/* ============================================================
   Phonera — современный премиальный дизайн.
   Светлая тема по умолчанию, тёмная по prefers-color-scheme.
   Mobile-first для Mini App, веб-интерфейс использует те же
   токены через /web/styles.css.
   ============================================================ */

:root {
    /* Поверхности */
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f1f3f7;
    --surface-3: #e6e9ef;

    /* Текст */
    --text: #0b1220;
    --text-muted: #5b6470;
    --text-dim: #8a93a3;
    --text-inverse: #ffffff;

    /* Акцент */
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff5ff;
    --accent-ring: rgba(37, 99, 235, 0.18);

    /* Статусы */
    --success: #15803d;
    --success-soft: #e7f7ee;
    --warning: #b45309;
    --warning-soft: #fff4e0;
    --danger: #b91c1c;
    --danger-soft: #fdecec;
    --info: #0e7490;
    --info-soft: #e6f5f7;

    /* Контуры */
    --border: #e3e6ec;
    --border-strong: #cdd2dc;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-2: 0 6px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-pop: 0 18px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);

    --font: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b0f17;
        --surface: #121826;
        --surface-2: #1a2233;
        --surface-3: #232c40;

        --text: #f4f6fa;
        --text-muted: #a4adbd;
        --text-dim: #6e7891;
        --text-inverse: #0b0f17;

        --accent: #60a5fa;
        --accent-hover: #93c5fd;
        --accent-soft: rgba(96, 165, 250, 0.12);
        --accent-ring: rgba(96, 165, 250, 0.25);

        --success: #4ade80;
        --success-soft: rgba(74, 222, 128, 0.12);
        --warning: #facc15;
        --warning-soft: rgba(250, 204, 21, 0.12);
        --danger: #f87171;
        --danger-soft: rgba(248, 113, 113, 0.12);
        --info: #67e8f9;
        --info-soft: rgba(103, 232, 249, 0.12);

        --border: #232c40;
        --border-strong: #344053;

        --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-2: 0 8px 20px rgba(0, 0, 0, 0.45);
        --shadow-pop: 0 24px 50px rgba(0, 0, 0, 0.55);
    }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.mini {
    padding: 20px 20px 110px;
    max-width: 520px;
    margin: 0 auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

button, input, select, textarea { font: inherit; color: inherit; }

/* === Анимации === */
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 var(--accent-ring); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes shimmer { 0% { background-position: -300px 0; } 100% { background-position: 300px 0; } }
.appear { animation: fade-up var(--transition) both; }

/* ===== Header ===== */
.app-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 24px;
}
.app-header__logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-2);
}
.app-header__name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.app-header__hint { color: var(--text-muted); font-size: 12.5px; margin-top: 1px; }
.icon-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-1);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(0.97); }
.spacer { flex: 1; }

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-1);
}
.card--hero {
    background: linear-gradient(135deg, var(--accent), #4338ca);
    color: #fff;
    border: 0;
    box-shadow: var(--shadow-2);
}
.card--hero .card__label { color: rgba(255,255,255,0.85); }
.card--hero .card__value { color: #fff; }

.card__label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: none;
    font-weight: 500;
    letter-spacing: 0;
    margin-bottom: 6px;
}
.card__value {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.card__hint { color: var(--text-muted); font-size: 13px; margin-top: 6px; }

/* Section heading */
.section {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 22px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.section__more {
    font-size: 12.5px;
    color: var(--accent);
    cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.btn--primary {
    background: var(--accent); color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, var(--shadow-1);
}
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary:disabled { background: var(--surface-3); color: var(--text-dim); cursor: not-allowed; box-shadow: none; }
.btn--secondary {
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border);
}
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost {
    background: transparent; color: var(--text-muted);
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--block { width: 100%; padding: 14px 18px; font-size: 15px; }
.btn--lg { padding: 16px 22px; font-size: 16px; }
.btn--danger {
    background: var(--danger); color: #fff;
}

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }

/* ===== Dropzone ===== */
.dropzone {
    border: 1.5px dashed var(--border-strong);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 14px;
}
.dropzone:hover, .dropzone.is-drag {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.dropzone__icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
}
.dropzone__title { font-weight: 600; font-size: 15px; }
.dropzone__hint { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ===== Input row ===== */
.input-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 6px 6px 14px;
    margin-bottom: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-1);
}
.input-row:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-ring);
}
.input-row input {
    flex: 1; background: transparent; border: 0; outline: 0;
    padding: 10px 0;
    font-family: var(--font-mono);
    font-size: 14.5px;
    color: var(--text);
}
.input-row input::placeholder { color: var(--text-dim); }
.input-row .btn { padding: 10px 18px; }

/* ===== Stat tiles ===== */
.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    box-shadow: var(--shadow-1);
}
.tile__value { font-family: var(--font-mono); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.tile__label { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

/* ===== Toggle list (настройка проверок) ===== */
.toggle-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.toggle-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
}
.toggle-row__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.toggle-row__main { flex: 1; min-width: 0; }
.toggle-row__title { font-weight: 600; font-size: 14.5px; }
.toggle-row__hint { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.toggle {
    position: relative;
    width: 44px; height: 26px;
    background: var(--surface-3);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.toggle::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-1);
}
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 21px; }
.toggle.is-locked { opacity: 0.55; cursor: not-allowed; }

/* ===== File card (выбранный файл) ===== */
.file-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    box-shadow: var(--shadow-1);
}
.file-card__icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.file-card__main { flex: 1; min-width: 0; }
.file-card__name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.file-card__hint { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* ===== Progress ===== */
.progress-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
}
.progress-header__pulse {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-ring 1.8s infinite;
}
.progress-header__text { flex: 1; font-weight: 600; }
.progress-big { text-align: center; padding: 16px 0 18px; }
.progress-big__num {
    font-family: var(--font-mono);
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -0.03em;
}
.progress-big__total {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 500;
    margin-left: 4px;
}
.progress-big__label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.progress-bar {
    height: 8px; background: var(--surface-2);
    border-radius: 999px; overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
    transition: width 0.45s ease-out;
}
.progress-meta {
    display: flex; justify-content: space-between;
    color: var(--text-muted); font-size: 12.5px;
    margin-bottom: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.status-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-1);
}
.status-tile__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 4px; }
.status-tile__value { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.status-tile__pct { color: var(--text-muted); font-size: 12px; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot--success { background: var(--success); }
.dot--warning { background: var(--warning); }
.dot--danger { background: var(--danger); }
.dot--info { background: var(--info); }
.dot--muted { background: var(--text-dim); }
.dot--accent { background: var(--accent); }

/* ===== Result row ===== */
.result-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-1);
}
.result-row__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.result-row__main { flex: 1; min-width: 0; }
.result-row__phone { font-family: var(--font-mono); font-size: 13.5px; font-weight: 500; }
.result-row__meta { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* Badge */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.badge--premium { background: var(--success-soft); color: var(--success); }
.badge--good { background: var(--success-soft); color: var(--success); }
.badge--medium { background: var(--warning-soft); color: var(--warning); }
.badge--poor { background: var(--danger-soft); color: var(--danger); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--neutral { background: var(--surface-2); color: var(--text-muted); }

/* Distribution bar */
.dist-bar {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    background: var(--surface-2);
    margin-bottom: 10px;
}
.dist-bar__seg { height: 100%; transition: width 0.4s ease-out; }
.dist-bar__seg--success { background: var(--success); }
.dist-bar__seg--warning { background: var(--warning); }
.dist-bar__seg--danger { background: var(--danger); }
.dist-bar__seg--muted { background: var(--text-dim); }
.dist-legend {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 12.5px; color: var(--text-muted);
}
.dist-legend__item { display: flex; align-items: center; gap: 6px; }

/* History card */
.history-card {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-1);
}
.history-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.history-card__icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
}
.history-card__main { flex: 1; min-width: 0; }
.history-card__title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-card__hint { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }

/* Empty */
.empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--text-muted);
}
.empty__icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--surface-2);
    color: var(--text-muted);
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
}
.empty__title { font-weight: 600; color: var(--text); font-size: 16px; }
.empty__hint { font-size: 13.5px; margin-top: 4px; }

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 0px, var(--surface-3) 60px, var(--surface-2) 120px);
    background-size: 300px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 10px;
    height: 16px;
    margin-bottom: 8px;
}

/* Toast */
.toast-host { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 1000; pointer-events: none; max-width: 92%; }
.toast {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 8px;
    font-size: 13.5px;
    box-shadow: var(--shadow-pop);
    pointer-events: auto;
    animation: fade-up var(--transition);
}
.toast--success { border-color: var(--success); }
.toast--error { border-color: var(--danger); color: var(--danger); }

/* Quick-result */
.quick-result { margin-bottom: 14px; }
.quick-result .row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    font-size: 13.5px;
    margin-top: 12px;
}
.quick-result .row > div { color: var(--text-muted); }
.quick-result .row > div b { color: var(--text); }

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.detail-grid > div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-1);
}

/* Pill row */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pill {
    padding: 7px 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12.5px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.pill:hover { color: var(--text); }
.pill.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill.is-excluded { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

footer.tiny {
    text-align: center; color: var(--text-dim);
    font-size: 11.5px;
    margin-top: 28px;
}

/* === Bottom tab bar (только в Mini App) === */
.tabbar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: 16px;
    display: flex; gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--shadow-pop);
    z-index: 50;
    max-width: 360px;
    width: calc(100% - 32px);
    justify-content: space-around;
}
.tabbar a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 11px;
    gap: 2px;
    transition: var(--transition);
}
.tabbar a.is-active { background: var(--accent-soft); color: var(--accent); }
.tabbar a:hover { color: var(--text); }
.tabbar a.is-active:hover { color: var(--accent); }

/* =====================================================
   WEB layout (desktop) — общая дизайн-система, sidebar.
   Активируется через <body class="web">.
   ===================================================== */
body.web {
    max-width: none;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

.web-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar__brand {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 8px 22px;
}
.sidebar__brand-logo {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-2);
}
.sidebar__brand-name { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.sidebar__brand-sub { font-size: 11.5px; color: var(--text-muted); }

.sidebar__nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.sidebar__nav-item:hover { background: var(--surface-2); color: var(--text); }
.sidebar__nav-item.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}
.sidebar__nav-item svg { flex-shrink: 0; }

.sidebar__user {
    margin-top: auto;
    padding: 14px;
    border-radius: 12px;
    background: var(--surface-2);
    display: flex; align-items: center; gap: 12px;
}
.sidebar__user-avatar {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}
.sidebar__user-main { flex: 1; min-width: 0; }
.sidebar__user-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__user-handle { color: var(--text-muted); font-size: 11.5px; }
.sidebar__user-logout {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: var(--transition);
}
.sidebar__user-logout:hover { background: var(--surface-3); color: var(--danger); }

.web-main {
    padding: 32px 40px 60px;
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
}
.web-main h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}
.web-main .page-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

/* Login page */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.12), transparent 60%),
        radial-gradient(circle at 15% 90%, rgba(37, 99, 235, 0.10), transparent 60%),
        var(--bg);
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 44px 36px;
    box-shadow: var(--shadow-pop);
    text-align: center;
    max-width: 420px;
    width: 100%;
}
.login-logo {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    box-shadow: var(--shadow-2);
}
.login-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.login-sub { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.login-widget-slot {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    min-height: 50px;
}

/* Responsive — mobile */
@media (max-width: 900px) {
    .web-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .sidebar__brand { padding: 0 12px 0 0; flex: 1; }
    .sidebar__user { margin-top: 0; padding: 8px 12px; }
    .sidebar__nav-item { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
    .web-main { padding: 22px 18px 40px; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .grid-3 { grid-template-columns: 1fr; }
}
