/* =====================================================================
   CRM Admin Panel — style.css
   Тёмная премиум-тема (в стиле Notion / Linear), с плавными анимациями,
   адаптивной вёрсткой и переключателем тёмной/светлой темы.
   ===================================================================== */

/* ---------- Цветовые токены ---------- */
:root,
[data-theme="dark"] {
    --bg: #0d0e12;
    --bg-elev: #15171e;
    --bg-card: #181b23;
    --bg-hover: #1f2330;
    --bg-input: #12141a;
    --border: #262a36;
    --border-soft: #1e222c;
    --text: #e7e9ee;
    --text-dim: #9aa1b2;
    --text-faint: #6b7280;
    --accent: #6366f1;
    --accent-hover: #7c7ff5;
    --accent-soft: rgba(99, 102, 241, 0.14);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.14);
    --yellow: #eab308;
    --yellow-soft: rgba(234, 179, 8, 0.14);
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.14);
    --blue: #3b82f6;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    --radius: 14px;
    --radius-sm: 10px;
    --sidebar-w: 248px;
}

[data-theme="light"] {
    --bg: #f6f7f9;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f1f4;
    --bg-input: #f0f1f4;
    --border: #e4e6eb;
    --border-soft: #eef0f3;
    --text: #1b1d23;
    --text-dim: #5b6170;
    --text-faint: #8a909e;
    --accent: #5b5ef0;
    --accent-hover: #4a4de0;
    --accent-soft: rgba(91, 94, 240, 0.10);
    --shadow: 0 8px 30px rgba(20, 20, 40, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    transition: background .3s ease, color .3s ease;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }

[hidden] { display: none !important; }

/* =====================================================================
   Bход (login)
   ===================================================================== */
.login-screen {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(1200px 600px at 50% -10%, #1b1e2e 0%, var(--bg) 60%);
    padding: 20px; z-index: 100;
}
.login-card {
    width: 100%; max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 38px 30px;
    box-shadow: var(--shadow);
    text-align: center;
    animation: pop .4s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.login-logo {
    width: 64px; height: 64px; margin: 0 auto 18px;
    display: grid; place-items: center;
    border-radius: 18px; font-size: 26px; color: #fff;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 10px 30px var(--accent-soft);
}
.login-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.login-sub { color: var(--text-dim); margin: 6px 0 26px; }
.input-wrap {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0 14px; margin-bottom: 14px;
    transition: border-color .2s, box-shadow .2s;
}
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap i { color: var(--text-faint); }
.input-wrap input {
    flex: 1; background: none; border: none; outline: none;
    color: var(--text); padding: 13px 0; font-size: 15px;
}
.captcha-q { color: var(--text); font-weight: 600; white-space: nowrap; }
.captcha-wrap input { max-width: 90px; }
.btn-primary {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
    padding: 13px; border-radius: var(--radius-sm); margin-top: 6px;
    transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.login-error { color: var(--red); min-height: 18px; margin-top: 14px; font-size: 13px; }

/* =====================================================================
   Каркас приложения
   ===================================================================== */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: var(--bg-elev); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 18px 14px;
    transition: transform .28s cubic-bezier(.2,.8,.2,1);
    z-index: 40;
}
.brand {
    display: flex; align-items: center; gap: 11px;
    font-size: 17px; font-weight: 700; padding: 6px 10px 22px; letter-spacing: -.3px;
}
.brand i {
    color: #fff; background: linear-gradient(135deg, var(--accent), #8b5cf6);
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 15px;
}
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: var(--radius-sm);
    color: var(--text-dim); font-size: 14.5px; font-weight: 500;
    transition: background .18s, color .18s; position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active::before {
    content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
    background: var(--accent); border-radius: 3px;
}
.nav-badge {
    margin-left: auto; background: var(--accent); color: #fff;
    font-size: 11px; font-weight: 700; font-style: normal;
    min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px;
    display: grid; place-items: center;
}
.nav-badge.warn { background: var(--yellow); color: #1b1d23; }
.sidebar-foot { padding-top: 12px; border-top: 1px solid var(--border-soft); }
.btn-ghost {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 11px 12px; border-radius: var(--radius-sm);
    color: var(--text-dim); font-weight: 500; transition: background .18s, color .18s;
}
.btn-ghost:hover { background: var(--red-soft); color: var(--red); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 62px; flex-shrink: 0; display: flex; align-items: center; gap: 14px;
    padding: 0 22px; border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elev) 80%, transparent);
    backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30;
}
.topbar h2 { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; }
.icon-btn {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    color: var(--text-dim); transition: background .18s, color .18s; position: relative;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.notif-btn .dot {
    position: absolute; top: 8px; right: 9px; width: 8px; height: 8px;
    background: var(--red); border-radius: 50%; border: 2px solid var(--bg-elev);
}
.search-trigger {
    display: flex; align-items: center; gap: 9px; padding: 8px 12px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 10px;
    color: var(--text-dim); font-size: 13px; transition: border-color .18s;
}
.search-trigger:hover { border-color: var(--accent); }
.search-trigger kbd {
    font-size: 11px; background: var(--bg-hover); border: 1px solid var(--border);
    padding: 2px 6px; border-radius: 5px; color: var(--text-faint);
}
.content { flex: 1; overflow-y: auto; padding: 26px; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   Карточки метрик (Dashboard)
   ===================================================================== */
.stat-grid {
    display: grid; gap: 16px; margin-bottom: 22px;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.stat-card .ic {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    font-size: 17px; margin-bottom: 14px;
}
.ic.indigo { background: var(--accent-soft); color: var(--accent); }
.ic.green { background: var(--green-soft); color: var(--green); }
.ic.yellow { background: var(--yellow-soft); color: var(--yellow); }
.ic.red { background: var(--red-soft); color: var(--red); }
.stat-card .label { color: var(--text-dim); font-size: 13px; }
.stat-card .value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; margin-top: 3px; }
.stat-card .trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; font-weight: 600; }
.trend.up { color: var(--green); }
.trend.down { color: var(--red); }
.trend.flat { color: var(--text-faint); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.panel {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h3 { font-size: 15px; font-weight: 700; }
.panel-head .sub { color: var(--text-faint); font-size: 12px; }
.chart-box { position: relative; height: 260px; }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.qa-btn {
    display: flex; align-items: center; gap: 9px; padding: 11px 16px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-weight: 600; font-size: 13.5px; transition: all .18s;
}
.qa-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); transform: translateY(-2px); }

/* Списки (топ, покупки) */
.mini-list { display: flex; flex-direction: column; gap: 4px; }
.mini-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 8px;
    border-radius: var(--radius-sm); transition: background .15s;
}
.mini-row:hover { background: var(--bg-hover); }
.mini-row .rank { width: 22px; color: var(--text-faint); font-weight: 700; font-size: 13px; text-align: center; }
.mini-row .meta { flex: 1; min-width: 0; }
.mini-row .meta b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .meta span { color: var(--text-faint); font-size: 12px; }
.mini-row .amt { font-weight: 700; color: var(--green); white-space: nowrap; }

/* =====================================================================
   Аватары
   ===================================================================== */
.avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* =====================================================================
   Таблицы + панель инструментов
   ===================================================================== */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-field {
    display: flex; align-items: center; gap: 9px; flex: 1; min-width: 220px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 13px;
}
.search-field i { color: var(--text-faint); }
.search-field input { flex: 1; background: none; border: none; outline: none; color: var(--text); padding: 11px 0; font-size: 14px; }
.filter-pills { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
    padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); transition: all .15s;
}
.pill:hover { color: var(--text); }
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.select, .date-input {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); padding: 10px 12px; font-size: 13.5px; outline: none;
}
.btn-sm {
    display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-weight: 600; font-size: 13px; transition: all .15s;
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-sm.accent:hover { background: var(--accent-hover); color: #fff; }

.table-wrap {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}
.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th {
    text-align: left; padding: 13px 16px; font-size: 12px; font-weight: 600;
    color: var(--text-faint); text-transform: uppercase; letter-spacing: .4px;
    border-bottom: 1px solid var(--border); white-space: nowrap; cursor: default;
}
.tbl thead th.sortable { cursor: pointer; }
.tbl thead th.sortable:hover { color: var(--text); }
.tbl tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
.tbl tbody tr { transition: background .14s; }
.tbl tbody tr:hover { background: var(--bg-hover); cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: none; }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-user .meta b { font-weight: 600; display: block; }
.cell-user .meta span { color: var(--text-faint); font-size: 12px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--text-dim); font-size: 12.5px; }

/* Статус-бейджи */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.active { background: var(--green-soft); color: var(--green); }
.badge.expiring { background: var(--yellow-soft); color: var(--yellow); }
.badge.expired { background: var(--red-soft); color: var(--red); }
.badge.frozen { background: var(--accent-soft); color: var(--accent); }
.badge.neutral { background: var(--bg-hover); color: var(--text-dim); }
.badge.deposit { background: var(--green-soft); color: var(--green); }
.badge.purchase { background: var(--accent-soft); color: var(--accent); }
.badge.refund { background: var(--red-soft); color: var(--red); }

.row-actions { display: flex; gap: 6px; }
.row-actions button {
    width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
    color: var(--text-dim); transition: all .15s; font-size: 13px;
}
.row-actions button:hover { background: var(--bg-hover); color: var(--text); }
.row-actions button.danger:hover { background: var(--red-soft); color: var(--red); }
.row-actions button.ok:hover { background: var(--green-soft); color: var(--green); }

.summary-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.summary-chip {
    flex: 1; min-width: 160px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
}
.summary-chip .label { color: var(--text-dim); font-size: 12.5px; }
.summary-chip .value { font-size: 22px; font-weight: 700; margin-top: 4px; }

.empty { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty i { font-size: 34px; margin-bottom: 12px; opacity: .5; display: block; }

/* =====================================================================
   Модальные окна
   ===================================================================== */
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    z-index: 80; animation: fade .2s ease;
}
.modal {
    width: 100%; max-width: 620px; max-height: 88vh; overflow-y: auto;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 18px; box-shadow: var(--shadow); animation: pop .28s cubic-bezier(.2,.8,.2,1);
}
.modal-head {
    display: flex; align-items: center; gap: 13px; padding: 20px 22px;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg-card); z-index: 2;
}
.modal-head .meta { flex: 1; min-width: 0; }
.modal-head .meta b { font-size: 16px; font-weight: 700; display: block; }
.modal-head .meta span { color: var(--text-faint); font-size: 12.5px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 20px 22px; }
.modal-section { margin-bottom: 22px; }
.modal-section h4 {
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-faint); margin-bottom: 11px; font-weight: 700;
}
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kv .item { background: var(--bg-input); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; }
.kv .item .k { color: var(--text-faint); font-size: 12px; }
.kv .item .v { font-weight: 700; font-size: 16px; margin-top: 3px; }

.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.field { flex: 1; min-width: 130px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text); padding: 11px 12px; font-size: 14px; outline: none;
    transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 90px; }

.sub-card {
    background: var(--bg-input); border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); padding: 13px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px;
}
.sub-card .meta { flex: 1; min-width: 0; }
.sub-card .meta b { font-weight: 600; }
.sub-card .meta span { display: block; color: var(--text-faint); font-size: 12px; margin-top: 2px; }

.tx-line {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid var(--border-soft); font-size: 13px;
}
.tx-line:last-child { border-bottom: none; }
.tx-line .desc { flex: 1; min-width: 0; }
.tx-line .desc span { display: block; color: var(--text-faint); font-size: 11.5px; }
.tx-line .amt { font-weight: 700; white-space: nowrap; }
.amt.pos { color: var(--green); }
.amt.neg { color: var(--red); }

/* =====================================================================
   Command palette (Ctrl+K)
   ===================================================================== */
.palette {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 14vh; z-index: 90; animation: fade .18s ease;
}
.palette-box {
    width: 100%; max-width: 580px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
    overflow: hidden; animation: pop .22s cubic-bezier(.2,.8,.2,1);
}
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.palette-input i { color: var(--text-faint); }
.palette-input input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 16px; }
.palette-input kbd { font-size: 11px; background: var(--bg-hover); border: 1px solid var(--border); padding: 3px 7px; border-radius: 5px; color: var(--text-faint); }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px;
    border-radius: var(--radius-sm); color: var(--text-dim); transition: background .12s;
}
.palette-item .meta { flex: 1; min-width: 0; }
.palette-item .meta b { color: var(--text); font-weight: 600; display: block; }
.palette-item:hover, .palette-item.sel { background: var(--accent-soft); color: var(--accent); }
.palette-section { font-size: 11px; text-transform: uppercase; color: var(--text-faint); padding: 10px 12px 4px; letter-spacing: .5px; }

/* =====================================================================
   Toast
   ===================================================================== */
.toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 120; }
.toast {
    display: flex; align-items: center; gap: 11px; min-width: 240px; max-width: 360px;
    background: var(--bg-elev); border: 1px solid var(--border); border-left-width: 3px;
    border-radius: var(--radius-sm); padding: 13px 15px; box-shadow: var(--shadow);
    animation: slideIn .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--accent); }
.toast.warn { border-left-color: var(--yellow); }
.toast i { font-size: 16px; }
.toast.success i { color: var(--green); }
.toast.error i { color: var(--red); }
.toast.info i { color: var(--accent); }
.toast.warn i { color: var(--yellow); }
.toast .msg { flex: 1; font-size: 13.5px; }

/* Скелетон-загрузка */
.skeleton { background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-card) 50%, var(--bg-hover) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-card { height: 120px; }

.spinner {
    width: 34px; height: 34px; border: 3px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Адаптивность (мобильные)
   ===================================================================== */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; animation: fade .2s; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .menu-toggle { display: grid; }
    .sidebar { position: fixed; top: 0; bottom: 0; left: 0; transform: translateX(-100%); }
    .sidebar.open { transform: none; box-shadow: var(--shadow); }
    .content { padding: 16px; }
    .search-trigger span, .search-trigger kbd { display: none; }
    .kv { grid-template-columns: 1fr; }
    /* На телефоне таблицы прокручиваются горизонтально */
    .table-wrap { overflow-x: auto; }
    .tbl { min-width: 620px; }
}
@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .stat-card .value { font-size: 21px; }
    .topbar { padding: 0 14px; }
}
