/* ─────────────────────────────────────────────────────────────────
   Liquid Panel — dark glass-morphism design system
   ───────────────────────────────────────────────────────────────── */

:root {
    --bg: #050814;
    --bg-2: #0a0f1f;
    --primary: #5b59ff;
    --primary-2: #2238ff;
    --primary-rgb: 91, 89, 255;

    --glass-bg: rgba(255, 255, 255, 0.035);
    --glass-bg-strong: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-soft: rgba(255, 255, 255, 0.05);

    --text: #f8fafc;
    --text-soft: rgba(248, 250, 252, 0.85);
    --muted: #94a3b8;
    --muted-2: #64748b;

    --green: #34d399;
    --green-2: #10b981;
    --red: #fb7185;
    --red-2: #f43f5e;
    --amber: #fbbf24;
    --amber-2: #f59e0b;
    --purple: #a78bfa;
    --cyan: #67e8f9;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
    --shadow-primary: 0 8px 32px rgba(var(--primary-rgb), 0.35);

    /* Legacy aliases — sequence kept for old class names */
    --panel: var(--glass-bg);
    --panel-2: var(--glass-bg-strong);
    --border: var(--glass-border);
    --accent: var(--primary);
    --accent2: var(--primary-2);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: rgba(var(--primary-rgb), 0.9); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--text); text-decoration: none; }
h1, h2, h3, h4 { letter-spacing: -0.01em; }

/* ─────────── Ambient light orbs (radial light backdrop) ─────────── */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(91, 89, 255, 0.18), transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(34, 56, 255, 0.10), transparent 60%),
        radial-gradient(ellipse 50% 40% at 0% 50%, rgba(167, 139, 250, 0.08), transparent 60%),
        var(--bg);
}
.ambient-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
.light-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orb-float 18s ease-in-out infinite;
}
.orb-1 { width: 480px; height: 480px; top: -120px; left: 10%; background: rgba(91, 89, 255, 0.5); }
.orb-2 { width: 380px; height: 380px; bottom: -80px; right: 8%; background: rgba(34, 56, 255, 0.45); animation-delay: -6s; }
.orb-3 { width: 320px; height: 320px; top: 40%; right: 30%; background: rgba(167, 139, 250, 0.35); animation-delay: -12s; }
@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-30px, 40px) scale(0.95); }
}

/* ─────────── App shell ─────────── */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background: rgba(10, 14, 25, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--glass-border-soft);
}
.app-header-inner {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 64px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    font-weight: 700;
    transition: opacity .15s ease;
}
.brand:hover { opacity: 0.85; text-decoration: none; }
.brand-mark {
    width: 32px; height: 32px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.brand-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.app-nav { display: flex; gap: 0.25rem; }
.app-nav a {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    transition: all .15s ease;
}
.app-nav a:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
    text-decoration: none;
}
.app-nav a.active,
.app-nav a[aria-current="page"] {
    color: var(--text);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 14px rgba(var(--primary-rgb), 0.18);
}

.app-main {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    position: relative;
    z-index: 1;
}

/* ─────────── Glass panels (replaces .panel) ─────────── */
.panel {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color .2s ease;
}
.panel:hover { border-color: rgba(255,255,255,0.1); }

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
    color: var(--text);
}
.page-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
}

.field { margin-bottom: 1.25rem; }
.field label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.55rem;
}

/* ─────────── Forms ─────────── */
.dropzone {
    border: 1.5px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
    background: rgba(255,255,255,0.02);
    transition: all .15s ease;
}
.dropzone:hover { border-color: rgba(var(--primary-rgb), 0.6); background: rgba(var(--primary-rgb), 0.05); }
.dropzone .file-name { color: var(--text); font-weight: 600; margin-top: 0.5rem; }

/* Native file input — restyle picker button */
input[type="file"] {
    color: var(--muted);
    font-size: 0.88rem;
    background: transparent;
    border: none;
    padding: 0;
    width: auto;
}
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-right: 0.75rem;
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: all .15s ease;
}
input[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}

.modes { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.mode-card {
    flex: 1;
    min-width: 180px;
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    cursor: pointer;
    background: rgba(255,255,255,0.025);
    transition: all .18s cubic-bezier(.4,0,.2,1);
}
.mode-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-1px);
}
.mode-card.active {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(var(--primary-rgb), 0.06));
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.4), 0 8px 24px rgba(var(--primary-rgb), 0.18);
}
.mode-card h3 { margin: 0 0 0.35rem; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.mode-card p  { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

.cmd-input,
input:not([type]),
input[type="text"], input[type="number"], input[type="password"], input[type="email"],
input[type="search"], input[type="url"], input[type="tel"],
select, textarea {
    width: auto;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border-soft);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all .15s ease;
    color-scheme: dark;
}

/* Native <option> in <select>: до открытия drop-down это управляется ОС, но всё
   равно задаём dark background+text — иначе на Windows/Chromium до hover'а
   строки рисуются белыми (system colors). color-scheme:dark выше включает
   тёмный popup-стиль, а явные background/color гарантируют контраст. */
select option,
select optgroup {
    background-color: #0f1320;
    color: var(--text);
    padding: 0.4rem 0.6rem;
}
select option:checked,
select option:hover {
    background: linear-gradient(0deg, rgba(var(--primary-rgb), 0.35), rgba(var(--primary-rgb), 0.35)),
                #0f1320;
    color: var(--text);
}
select option:disabled {
    color: var(--muted);
    background-color: #0a0e1a;
}

/* Autofill (override browser white background) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 24, 38, 0.95) inset;
    box-shadow: 0 0 0 1000px rgba(20, 24, 38, 0.95) inset;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: var(--text);
}
.cmd-input { width: 100%; resize: vertical; font-family: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace; }
input:focus, select:focus, textarea:focus, .cmd-input:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.7);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.25); }

/* ─────────── Buttons ─────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.25), inset 0 1px 0 rgba(255,255,255,0.15);
    white-space: nowrap;
}
.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.4), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-lg { padding: 0.85rem 1.8rem; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.btn-ghost {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--glass-border-soft);
}
.btn-ghost:hover:not(:disabled) {
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 0 0 1px var(--glass-border);
    transform: none;
}
.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--red);
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.3);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(244, 63, 94, 0.18);
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.5);
}

/* ─────────── Header right cluster ─────────── */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.lang-switch {
    display: flex;
    gap: 0.15rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border-soft);
    border-radius: 999px;
    padding: 0.2rem;
}
.lang {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 600;
    transition: all .15s ease;
}
.lang:hover { color: var(--text); text-decoration: none; }
.lang-on {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.35);
}
.logout-form { margin: 0; }

/* ─────────── Balance pill in header ─────────── */
.header-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border-soft);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all .15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.header-balance:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--glass-border);
    text-decoration: none;
    transform: translateY(-1px);
}
.header-balance .material-symbols-outlined {
    font-size: 18px !important;
    color: var(--amber);
}
.header-balance-amount {
    background: linear-gradient(135deg, #fff 30%, var(--amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}

/* ─────────── User menu (dropdown) ─────────── */
.user-menu {
    position: relative;
    display: inline-block;
    outline: none;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.5rem 0.4rem 0.85rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border-soft);
    border-radius: 999px;
    color: var(--text-soft);
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}
.user-pill:hover {
    background: rgba(255,255,255,0.09);
    border-color: var(--glass-border);
    color: var(--text);
}
.user-menu:focus-within .user-pill {
    background: rgba(255,255,255,0.09);
    border-color: var(--glass-border);
    color: var(--text);
}
.user-pill-avatar {
    font-size: 18px !important;
    color: rgba(255,255,255,0.8);
}
.user-pill-name {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}
.user-pill-chevron {
    font-size: 18px !important;
    color: rgba(255,255,255,0.5);
    transition: color .15s ease, transform .2s ease;
}
.user-menu:hover .user-pill-chevron,
.user-menu:focus-within .user-pill-chevron {
    color: var(--text);
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    padding-top: 0.55rem; /* invisible hover bridge between pill and menu */
    min-width: 220px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s cubic-bezier(.4,0,.2,1), visibility .18s;
    pointer-events: none;
}
.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-menu-dropdown-inner {
    background: rgba(15, 19, 32, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
    transform-origin: top right;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-soft);
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all .12s ease;
    box-shadow: none;
    text-decoration: none;
    line-height: 1.2;
    font-family: inherit;
}
.user-menu-item:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
    text-decoration: none;
    transform: none;
    box-shadow: none;
}
.user-menu-item.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--primary-rgb), 0.06));
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.25);
}
.user-menu-item .material-symbols-outlined {
    font-size: 18px !important;
    color: var(--muted);
    transition: color .12s ease;
}
.user-menu-item:hover .material-symbols-outlined,
.user-menu-item.active .material-symbols-outlined {
    color: var(--text);
}
.user-menu-item-danger {
    color: var(--red);
}
.user-menu-item-danger:hover {
    color: var(--red-2);
    background: rgba(244, 63, 94, 0.10);
}
.user-menu-item-danger .material-symbols-outlined { color: var(--red); }
.user-menu-item-danger:hover .material-symbols-outlined { color: var(--red-2); }

.user-menu-divider {
    height: 1px;
    margin: 0.35rem 0.5rem;
    background: var(--glass-border-soft);
}

/* ─────────── Engine chips ─────────── */
.engine-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border-soft);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all .15s ease;
}
.chip:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
}
.chip-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}
.chip-on {
    color: var(--text);
    border-color: rgba(var(--primary-rgb), 0.5);
    background: rgba(var(--primary-rgb), 0.12);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.3);
}
.chip-on .chip-dot {
    background: var(--green);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}
.chip-os {
    font-size: 0.7rem;
    color: var(--muted);
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border-soft);
    border-radius: 6px;
    padding: 0.05rem 0.4rem;
}

/* ─────────── Scan summary ─────────── */
.scan-summary {
    display: flex;
    gap: 2.5rem;
    padding: 1.1rem 1.25rem;
    margin: 0.5rem 0 1.2rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius);
    align-items: center;
    flex-wrap: wrap;
}
.scan-summary > div { display: flex; flex-direction: column; gap: 0.2rem; }
.scan-summary .muted { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.scan-summary b { font-size: 1.1rem; font-weight: 700; color: var(--text); }

/* ─────────── Tables ─────────── */
table.results,
table.sub-table,
.app-main table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
table.results thead tr,
.app-main table thead tr {
    background: rgba(0,0,0,0.25);
}
table.results th,
.app-main table th {
    text-align: left;
    padding: 0.85rem 1rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--glass-border-soft);
}
table.results td,
.app-main table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-soft);
    vertical-align: middle;
}
table.results tbody tr:hover,
.app-main table tbody tr:hover {
    background: rgba(255,255,255,0.025);
}
table.results tbody tr:last-child td { border-bottom: none; }

/* ─────────── Badges ─────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-clean    { background: rgba(52, 211, 153, 0.12); color: var(--green); border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-detected { background: rgba(244, 63, 94, 0.12);  color: var(--red);   border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-running  { background: rgba(var(--primary-rgb), 0.15); color: rgba(var(--primary-rgb), 1); border: 1px solid rgba(var(--primary-rgb), 0.35); }
.badge-pending  { background: rgba(148, 163, 184, 0.12); color: var(--muted); border: 1px solid rgba(148, 163, 184, 0.25); }
.badge-error    { background: rgba(251, 191, 36, 0.12); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.3); }

/* Verdict colors */
.verdict-clean    { color: var(--green); }
.verdict-detected { color: var(--red); }

/* ─────────── Spinner ─────────── */
.spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────── Detection ratio ring ─────────── */
.ratio { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.ring {
    --pct: 0;
    width: 140px; height: 140px;
    border-radius: 50%;
    display: grid; place-items: center;
    background:
        conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(255,255,255,0.05) 0);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
}
.ring::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.25), transparent 70%);
    z-index: -1;
    filter: blur(8px);
}
.ring-inner {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: rgba(10, 14, 25, 0.95);
    display: grid; place-items: center;
    text-align: center;
    border: 1px solid var(--glass-border-soft);
}
.ring-inner .big { font-size: 1.6rem; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.ring-inner .small { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.2rem; }

/* ─────────── Meta grid ─────────── */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
}
.meta-grid .k {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}
.meta-grid .v {
    font-family: ui-monospace, "Cascadia Code", monospace;
    word-break: break-all;
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* ─────────── Alerts ─────────── */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    background: rgba(244, 63, 94, 0.08);
    color: var(--red);
    border: 1px solid rgba(244, 63, 94, 0.25);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-ok   { background: rgba(52, 211, 153, 0.08); color: var(--green); border-color: rgba(52, 211, 153, 0.25); }
.alert-warn { background: rgba(251, 191, 36, 0.08); color: var(--amber); border-color: rgba(251, 191, 36, 0.25); }

/* ─────────── Auth pages ─────────── */
.auth-wrap {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-2xl);
    padding: 2.4rem 2.2rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
}
.auth-logo { display: grid; place-items: center; margin-bottom: 1.2rem; }
.auth-logo .brand-mark {
    width: 56px; height: 56px;
    border-radius: 16px;
    font-size: 1.3rem;
    box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.4);
}
.auth-title {
    text-align: center;
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.auth-sub {
    text-align: center;
    color: var(--muted);
    margin: 0 0 1.75rem;
    font-size: 0.92rem;
}
.auth-foot {
    text-align: center;
    margin-top: 1.25rem;
    color: var(--muted);
    font-size: 0.88rem;
}
.mono-input {
    width: 100%;
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.82rem;
}

/* Crypto Top up panel: QR + info side-by-side, full width on mobile. */
.deposit-pane {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.deposit-pane .deposit-qr {
    flex: 0 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.deposit-pane .deposit-info {
    flex: 1 1 280px;
    min-width: 0;
}
.deposit-pane .deposit-info input.mono-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.85rem;
    padding-right: 0.75rem;
    overflow-wrap: anywhere;
}

/* Auth-card form fields take full width and match button height */
.auth-card .field { margin-bottom: 1.1rem; }
.auth-card input,
.auth-card textarea,
.auth-card select {
    width: 100%;
    padding: 0.75rem 0.95rem;
    font-size: 0.92rem;
}
.auth-card .btn-block { padding: 0.85rem 1.4rem; font-size: 0.95rem; }
.key-box {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
    word-break: break-all;
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(var(--primary-rgb), 0.5);
    border-radius: var(--radius);
    padding: 0.95rem 1.1rem;
    color: var(--text);
}

/* ─────────── Captcha ─────────── */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.45rem;
}
.captcha-img {
    width: 220px;
    height: 70px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border-soft);
    background: rgba(0,0,0,0.4);
    user-select: none;
    -webkit-user-drag: none;
    image-rendering: -webkit-optimize-contrast;
}
.captcha-refresh {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.1rem;
    text-decoration: none;
}

/* ─────────── Account balance hero ─────────── */
.balance-hero {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.18), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    border-radius: var(--radius-xl);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}
.balance-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(var(--primary-rgb), 0.25), transparent 60%);
    pointer-events: none;
}
.balance-amount {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 20%, var(--primary) 60%, var(--purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
    position: relative;
}

/* ─────────── Telegram 2FA / various utils ─────────── */
.tfa-status { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.tfa-steps { margin: 0.4rem 0 0; padding-left: 1.2rem; line-height: 1.9; color: var(--muted); }
.tfa-link { margin-top: 0.4rem; }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

.options-row { display: flex; gap: 2rem; align-items: flex-end; flex-wrap: wrap; }

.muted     { color: var(--muted); }
.mono      { font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.85rem; }
.small-cell{ font-size: 0.8rem; }
.hash-sub  { color: var(--muted); font-size: 0.72rem; font-family: ui-monospace, monospace; }

/* History sub-table */
.history-row > td { background: rgba(255,255,255,0.02); padding: 0.6rem 0.8rem; }
.sub-table { margin: 0; }
.sub-table th, .sub-table td { padding: 0.45rem 0.7rem; }
.ua-cell { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* User actions / admin */
.user-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.credit-input { width: 90px; }

/* Detection screenshot + lightbox */
.shot {
    max-width: 140px;
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-sm);
    cursor: zoom-in;
    transition: transform .12s ease;
}
img.shot:hover { transform: scale(1.04); }
video.shot { cursor: default; }
.lightbox {
    position: fixed; inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: grid; place-items: center;
    padding: 2rem;
    animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner { position: relative; max-width: 95vw; max-height: 92vh; }
.lightbox-inner img {
    max-width: 95vw; max-height: 92vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 80px rgba(0,0,0,0.7);
    cursor: zoom-in;
    transition: transform .2s ease;
}
.lightbox-inner img.zoomed { transform: scale(1.8); cursor: zoom-out; }
.lightbox-close {
    position: absolute; top: -16px; right: -16px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(20, 24, 38, 0.95);
    color: var(--text);
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

/* Maintenance */
.maint-banner b { font-size: 1rem; }

/* ─────────── Stat cards (admin/dashboard) ─────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-xl);
    padding: 1.4rem 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .2s cubic-bezier(.4,0,.2,1), border-color .2s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.12); }
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--stat-color, rgba(var(--primary-rgb),0.15)), transparent 60%);
    opacity: 0;
    transition: opacity .25s ease;
    pointer-events: none;
}
.stat-card:hover::before { opacity: 1; }
.stat-card .label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.stat-card .value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* ─────────── Blazor error UI ─────────── */
#blazor-error-ui {
    color: #fff;
    background: linear-gradient(135deg, var(--red-2), var(--red));
    position: fixed; bottom: 0; left: 0; right: 0;
    padding: 0.75rem 1.25rem;
    display: none;
    z-index: 9999;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ─────────── Material Symbols Outlined helper ─────────── */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─────────── Signals (agent log per engine on Report page) ─────────── */
.signals-row > td {
    padding: 0 1rem 0.7rem !important;
    background: rgba(0,0,0,0.18);
    border-bottom: 1px solid var(--glass-border-soft) !important;
}
.signals-row details > summary {
    cursor: pointer;
    list-style: none;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    user-select: none;
    transition: background .12s ease;
}
.signals-row details > summary:hover { background: rgba(255,255,255,0.05); }
.signals-row details[open] > summary { color: var(--text); }
.signals-row details > summary::-webkit-details-marker { display: none; }
.signals-list {
    list-style: none;
    margin: 0.5rem 0 0.5rem 0;
    padding: 0.4rem 0.6rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}
.signals-list li {
    display: flex;
    gap: 0.6rem;
    padding: 0.2rem 0;
    border-bottom: 1px dashed rgba(255,255,255,0.04);
}
.signals-list li:last-child { border-bottom: none; }
.signal-type {
    flex: 0 0 auto;
    color: rgba(var(--primary-rgb), 1);
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    min-width: 80px;
}
.signal-detail {
    flex: 1;
    color: var(--text-soft);
    word-break: break-word;
}

/* ─────────── Code blocks (API docs) ─────────── */
pre.code-block {
    margin: 0;
    padding: 1rem 1.1rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border-soft);
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-soft);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
pre.code-block code { color: inherit; background: transparent; padding: 0; }
code.mono, .panel code {
    font-family: ui-monospace, "Cascadia Code", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border-soft);
    border-radius: 6px;
    padding: 0.05rem 0.4rem;
    color: var(--text);
}

/* ─────────── Selection ─────────── */
::selection { background: rgba(var(--primary-rgb), 0.35); color: #fff; }

/* ─────────── Scrollbars (WebKit) ─────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); background-clip: content-box; }

/* ─────────── Animations ─────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.app-main > * { animation: fadeIn 0.35s cubic-bezier(.4,0,.2,1) both; }

/* ─────────── Responsive ─────────── */
@media (max-width: 720px) {
    .app-header-inner { padding: 0.6rem 1rem; gap: 0.75rem; height: 56px; }
    .app-nav { display: none; }
    .brand-text { display: none; }
    .header-left { gap: 0.75rem; }
    .app-main { padding: 1.25rem 1rem 3rem; }
    .panel { padding: 1.25rem; border-radius: var(--radius-lg); }
    .page-title { font-size: 1.45rem; }
    .user-pill-name { display: none; }
    .user-pill { padding: 0.4rem 0.5rem; }
    .header-balance { padding: 0.35rem 0.65rem; font-size: 0.8rem; }
}
