/* ============================================================================
   SATURN Panel — skin "mono"
   Stesso impianto di prima (vetro scuro, bordi bianchi al 7%, griglia puntinata
   sul main, Satoshi / Cabinet Grotesk / JetBrains Mono) ma palette bianco-nero:
   niente viola, accenti bianchi, testo scuro solo sopra i bottoni chiari.

   Nessuna classe e' stata rinominata: app.js, admin.html e login.html restano
   identici e continuano a funzionare. Questo file e' solo pelle.
   ========================================================================== */

:root {
    /* --- palette monocromatica --- */
    --bg: #050506;
    --surface: #0b0b0c;
    --card: #101012;
    --card-2: #151517;
    --border: rgba(255, 255, 255, 0.07);
    --border-2: rgba(255, 255, 255, 0.14);
    --text: #f5f5f7;
    --muted: #a2a2a8;
    --dim: #78787f;

    --primary: #f5f5f7;
    --secondary: #a1a1aa;
    --glow: #ffffff;
    --accent: #d4d4d8;
    --ink: #0a0a0a;

    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;

    --grad-primary: linear-gradient(135deg, #ffffff, #c9c9d1);
    --grad-glow: linear-gradient(135deg, #ffffff, #8e8e96);

    --acc-soft: rgba(255, 255, 255, 0.10);
    --acc-mid: rgba(255, 255, 255, 0.18);
    --acc-line: rgba(255, 255, 255, 0.34);

    --r: 18px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font: "Satoshi", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-display: "Cabinet Grotesk", "Satoshi", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior: none;
}

a { color: #ffffff; text-decoration: none; }
a:hover { color: var(--muted); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- login */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
        radial-gradient(ellipse 820px 560px at 50% -10%, rgba(255, 255, 255, 0.10), transparent 62%),
        radial-gradient(ellipse 600px 460px at 100% 100%, rgba(255, 255, 255, 0.05), transparent 62%),
        var(--bg);
}

.auth-card {
    width: 384px;
    max-width: 100%;
    padding: 36px 34px 30px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012)),
        var(--card);
    border: 1px solid var(--border);
    box-shadow:
        0 30px 80px -40px rgba(0, 0, 0, 0.85),
        0 0 40px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 4px;
}

.brand-mark {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 72%),
        rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 22px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark img {
    width: 72%;
    height: 72%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45));
}

.brand-name {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.14em;
    background: linear-gradient(180deg, #ffffff, #b6b6bf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-sub {
    text-align: center;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 8px 0 26px;
}

.field { margin-bottom: 12px; }

.field input {
    width: 100%;
    padding: 13px 15px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
}

.field input::placeholder { color: var(--dim); }

.field input:focus {
    background: rgba(0, 0, 0, 0.55);
    border-color: var(--acc-line);
    box-shadow: 0 0 0 3px var(--acc-soft);
}

/* ---------------------------------------------------------------- bottoni */

.btn {
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 11px;
    background: var(--grad-primary);
    color: var(--ink);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: filter 0.15s, transform 0.12s var(--ease), box-shadow 0.2s;
}

.btn:hover { filter: brightness(0.94); box-shadow: 0 0 30px rgba(255, 255, 255, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn:active { transform: scale(0.985); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
    width: auto;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-2);
    filter: none;
    box-shadow: none;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.30);
    color: #fca5a5;
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.16); }

.hint {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--dim);
    min-height: 16px;
}

.hint.error { color: #fca5a5; }
.hint.ok { color: #86efac; }

/* ---------------------------------------------------------------- shell */

.app {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar {
    width: 272px;
    flex: 0 0 272px;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 0 0 14px;
    border-radius: 0 24px 24px 0;
    border-right: 1px solid var(--border);
    background:
        radial-gradient(ellipse 140% 40% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 70%),
        linear-gradient(180deg, #101012, #08080a);
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.sidebar .brand {
    justify-content: flex-start;
    padding: 20px 20px 18px;
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.sidebar .brand-mark { width: 34px; height: 34px; font-size: 15px; border-radius: 11px; }
.sidebar .brand-name { font-size: 18px; }

.nav-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--dim);
    margin: 18px 0 8px 20px;
}

#nav { padding: 0 10px; overflow-y: auto; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-weight: 500;
    font-size: 13.5px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    overflow: hidden;
    transition: background 0.18s, color 0.18s, transform 0.18s var(--ease);
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 0 3px 3px 0;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
    transform: translateY(-50%);
    transition: height 0.25s var(--ease);
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.035);
    transform: translateX(2px);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.14);
}

.nav-item.active::before { height: 60%; }

.nav-item svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke: currentColor;
    opacity: 0.9;
    transition: transform 0.2s var(--ease);
}

.nav-item:hover svg { transform: scale(1.08); }

/* monochrome png icons (black artwork inverted to white) */
.nav-item .nav-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    object-fit: contain;
    opacity: 0.72;
    filter: invert(1);
    transition: opacity 0.18s, transform 0.2s var(--ease), filter 0.18s;
}

.nav-item:hover .nav-icon {
    opacity: 0.95;
    transform: scale(1.08);
}

.nav-item.active .nav-icon {
    opacity: 1;
    filter: invert(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.45));
}
.nav-item.active svg { stroke: #ffffff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.45)); }

.sidebar-foot { margin-top: auto; padding: 12px 10px 0; }

/* download loader: sta tra il profilo e sign out */
.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    margin-bottom: 8px;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background 0.18s, border-color 0.18s, box-shadow 0.2s, transform 0.15s var(--ease);
}

.btn-download svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 24px -8px rgba(255, 255, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.btn-download:active { transform: scale(0.985); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.026);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}

.avatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    color: var(--ink);
    background: var(--grad-primary);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
}

.user-chip .name { font-size: 13px; font-weight: 600; line-height: 1.25; }
.user-chip .plan {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ---------------------------------------------------------------- main */

.main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
        radial-gradient(ellipse 820px 560px at 18% 0%, rgba(255, 255, 255, 0.07), transparent 58%),
        radial-gradient(ellipse 600px 460px at 100% 26%, rgba(255, 255, 255, 0.04), transparent 62%),
        radial-gradient(ellipse 700px 520px at 42% 100%, rgba(255, 255, 255, 0.03), transparent 62%);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(5, 5, 6, 0.72);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--dim);
}

.crumbs b { color: var(--text); font-weight: 500; }
.crumbs b:last-child { font-family: var(--font-display); font-weight: 700; }
.crumbs span { opacity: 0.4; }

.search-wrap {
    position: relative;
    margin-left: auto;
    width: 240px;
    flex: 0 0 240px;
}

.search-wrap .search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    object-fit: contain;
    opacity: 0.5;
    filter: invert(1);
    pointer-events: none;
    transition: opacity 0.18s;
}

.search-wrap:focus-within .search-icon { opacity: 0.9; }

.search {
    width: 240px;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.search-wrap .search {
    width: 100%;
    padding-left: 36px;
}

.search::placeholder { color: var(--dim); }

.search:focus {
    border-color: var(--acc-line);
    box-shadow: 0 0 0 3px var(--acc-soft);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    animation: s-pulse 2.2s ease-out infinite;
}

.pill.online {
    color: #86efac;
    background: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.28);
}

.pill.online .dot {
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
}

@keyframes s-pulse {
    0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
    70%  { box-shadow: 0 0 0 6px transparent; opacity: 0.85; }
    100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

.content {
    position: relative;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px 24px 80px;
}

/* ---------------------------------------------------------------- tabs */

.tabs {
    display: flex;
    align-items: flex-end;
    gap: 26px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}

.tab {
    position: relative;
    padding: 4px 2px 13px;
    background: none;
    border: 0;
    border-radius: 0;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.18s;
}

.tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s var(--ease);
}

.tab:hover { color: var(--text); }

.tab.active { color: #ffffff; font-weight: 700; }
.tab.active::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- cards */

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 1180px) {
    .grid { grid-template-columns: minmax(0, 1fr); }
}

.card {
    position: relative;
    margin-bottom: 18px;
    border-radius: var(--r);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012)),
        var(--card);
    box-shadow: 0 24px 60px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: var(--border-2);
    box-shadow: 0 24px 70px -38px rgba(0, 0, 0, 0.95), 0 0 34px -20px rgba(255, 255, 255, 0.35);
}

.card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.018);
}

.card-head .ico {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.02) 72%),
        rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.card-head .ico img {
    width: 64%;
    height: 64%;
    display: block;
    object-fit: contain;
    filter: invert(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.35));
}

.card-head h3 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.card-body { padding: 2px 0; }

/* ---------------------------------------------------------------- righe */

.row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.row:last-child { border-bottom: 0; }
.row:hover { background: rgba(255, 255, 255, 0.018); }

.row .label {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.005em;
    color: #f0f0f3;
}

/* ------------------------------------------------------ sottocategorie */
/* i controlli figli compaiono solo col toggle padre acceso, rientrati
   e legati al padre da una linea ad angolo */

.row-sub {
    position: relative;
    padding-left: calc(42px + (var(--depth, 1) - 1) * 22px);
    animation: depIn 0.18s var(--ease);
}

.row-sub.dep-hidden { display: none; }

.row-sub .label {
    font-weight: 500;
    font-size: 12.5px;
    letter-spacing: 0;
    color: #b4b4bd;
}

.row-sub::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(20px + (var(--depth, 1) - 1) * 22px);
    width: 1px;
    background: rgba(255, 255, 255, 0.09);
}

.row-sub::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(20px + (var(--depth, 1) - 1) * 22px);
    width: 11px;
    height: 1px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.09);
}

@keyframes depIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- switch */

.switch {
    position: relative;
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.25s;
}

.switch:hover { background: rgba(255, 255, 255, 0.14); }

.switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d8d8de;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background 0.2s;
}

.switch.on {
    background: var(--grad-primary);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.switch.on::after {
    transform: translateX(16px);
    background: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------------------- slider */

.slider {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 268px;
}

.slider button {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.slider button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-2);
}

.slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.slider input[type="range"]::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

.slider .val {
    display: grid;
    place-items: center;
    min-width: 56px;
    height: 26px;
    padding: 0 8px;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: #d4d4d8;
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- select */

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 152px;
    height: 34px;
    padding: 0 36px 0 13px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background-color: rgba(13, 13, 15, 0.92);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    color: #ededf1;
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px -14px rgba(0, 0, 0, 0.95);
    transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s, color 0.18s;
}

select:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background-color: rgba(24, 24, 28, 0.95);
    color: #ffffff;
}

select:active {
    background-color: rgba(32, 32, 37, 0.98);
}

select:focus {
    border-color: rgba(255, 255, 255, 0.52);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

select option {
    background: #0d0d0f;
    color: #f5f5f7;
    padding: 8px;
}

select::-ms-expand { display: none; }

/* ---------------------------------------------------------------- color */

.color {
    width: 48px;
    height: 26px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
}

.color::-webkit-color-swatch-wrapper { padding: 3px; }
.color::-webkit-color-swatch { border: 0; border-radius: 4px; }

/* ---------------------------------------------------------------- azione */

.row .btn-action {
    padding: 8px 18px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: var(--grad-primary);
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.10);
    transition: filter 0.15s, box-shadow 0.2s;
}

.row .btn-action:hover { filter: brightness(0.94); box-shadow: 0 0 28px rgba(255, 255, 255, 0.20); }

/* ---------------------------------------------------------------- liste */

.list { max-height: 340px; overflow-y: auto; padding: 6px 0; }

.list .item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: 12.5px;
    color: #d4d4d8;
    transition: background 0.14s;
}

.list .item:hover { background: rgba(255, 255, 255, 0.035); }

.list .item .dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
}

.list .item .id {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--dim);
}

.list .item .dist {
    margin-left: 8px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.list .item.is-npc { opacity: 0.6; }
.list .item.is-npc .dot { background: #6b7280; box-shadow: none; }

.list .empty {
    padding: 22px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
}

.loc-search { width: 100%; }
.loc-list { max-height: 280px; overflow-y: auto; }
.loc-list .item { cursor: pointer; }

/* ---------------------------------------------------------------- table */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.table th {
    padding: 11px 18px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #d4d4d8;
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, 0.025); }

.table .mono {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #9c9ca4;
}

.table .hwid-cell {
    max-width: 260px;
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.35;
    cursor: copy;
    user-select: all;
}

.table .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table .actions .btn-ghost { padding: 6px 11px; font-size: 11.5px; white-space: nowrap; }

/* ------------------------------------------------- admin table (fixed) */
/* la tabella admin ha colonne dichiarate: prima il token andava a capo
   sopra la colonna status perche' la cella cresceva con il contenuto. */

.table-wrap { width: 100%; overflow-x: auto; }

.table-admin {
    table-layout: fixed;
    min-width: 1180px;
}

.table-admin th,
.table-admin td {
    padding: 12px 14px;
    overflow: hidden;
}

.table-admin th.th-actions,
.table-admin td.col-actions {
    text-align: right;
    white-space: normal;
}

.table-admin .col-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dim);
}

.table-admin .col-user { font-weight: 700; color: #f0f0f3; }

.table-admin .hwid-cell {
    max-width: none;
    white-space: normal;
    word-break: break-all;
    line-height: 1.35;
}

.cell-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.cell-copy .cell-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #b9b9c1;
    cursor: copy;
    transition: color 0.15s;
}

.cell-copy .cell-text:hover { color: #ffffff; }
.cell-copy .mini { flex: 0 0 auto; }

.cell-copy .cell-empty {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--dim);
    cursor: help;
}
.table td { white-space: nowrap; }
.table td.hwid-cell { white-space: normal; }

/* ---------------------------------------------------------------- badge */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
}

.badge.on {
    color: #86efac;
    background: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.28);
}

.badge.off { color: var(--dim); }

.badge.dead {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ---------------------------------------------------------------- admin */

.admin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 18px;
}

.admin-form input,
.admin-form select {
    height: 34px;
    padding: 0 36px 0 13px;
    border-radius: 10px;
    background-color: rgba(13, 13, 15, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}

.admin-form input::placeholder { color: var(--dim); }
.admin-form input:focus { border-color: var(--acc-line); box-shadow: 0 0 0 3px var(--acc-soft); }
.admin-form .btn { width: auto; padding: 9px 18px; }

/* ---------------------------------------------------------------- toast */

.toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-left: 3px solid #ffffff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
    font-size: 13px;
    color: var(--text);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------- mini */

.item-actions { display: flex; gap: 4px; margin-left: 8px; }

.item-actions .mini,
.mini {
    padding: 3px 9px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.5;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.item-actions .mini:hover,
.mini:hover {
    color: var(--ink);
    background: #ffffff;
    border-color: #ffffff;
}

/* ---------------------------------------------------------------- scroll */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.10);
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.28); }

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

::selection { background: rgba(255, 255, 255, 0.22); color: #ffffff; }

/* ---------------------------------------------------------------- mobile */

@media (max-width: 860px) {
    .app { flex-direction: column; }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
        height: auto;
        max-height: 42vh;
        position: relative;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0 0 22px 22px;
    }

    .content { padding: 16px 14px 60px; }
    .topbar { padding: 10px 14px; flex-wrap: wrap; }
    .search-wrap { width: 100%; flex: 1 1 100%; margin-left: 0; order: 3; }
    .search { width: 100%; margin-left: 0; order: 3; }
    .row { flex-wrap: wrap; }
    .slider { flex: 1 1 100%; justify-content: flex-start; }
}

.muted-note{margin:10px 0 0;font-size:12px;color:var(--muted);line-height:1.5}
