/* ============================================================
   QQBot Cloud · 管理后台样式
   零依赖、原生 CSS，支持浅色/深色主题
   ============================================================ */

:root {
    --bg: #f3f5fa;
    --bg-soft: #eaeef7;
    --panel: #ffffff;
    --panel-2: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --faint: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #dbeafe;
    --success: #059669;
    --success-soft: #d1fae5;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --info: #0891b2;
    --info-soft: #cffafe;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 10px 30px -18px rgba(15, 23, 42, .25);
    --sidebar-width: 252px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --bg: #080d18;
    --bg-soft: #0d1526;
    --panel: #101a2d;
    --panel-2: #0c1526;
    --text: #e6edf7;
    --muted: #93a2ba;
    --faint: #64748b;
    --border: #1d2a42;
    --border-strong: #2b3b58;
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-soft: rgba(59, 130, 246, .16);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, .14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .14);
    --info: #22d3ee;
    --info-soft: rgba(34, 211, 238, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -18px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
svg { flex: none; }

::selection { background: var(--primary-soft); color: var(--text); }

/* ---------------------------------------------------------- 布局 */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 14px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    z-index: 30;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 18px;
    color: var(--text);
}

.brand-mark {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #6366f1 55%, #8b5cf6);
    box-shadow: 0 6px 16px -6px rgba(59, 130, 246, .7);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: -.02em; }
.brand-text span { font-size: 11px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
    font-size: 11px;
    color: var(--faint);
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 14px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}

.nav-item:hover { background: var(--bg-soft); color: var(--text); }

.nav-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.nav-item .nav-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--muted);
    font-weight: 600;
}

.sidebar-foot {
    margin-top: auto;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 6px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 28px;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.topbar-title { font-size: 14px; font-weight: 600; color: var(--muted); }
.topbar-title strong { color: var(--text); font-weight: 650; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user-chip {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-weight: 550;
}

.avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 12px; font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #0ea5e9);
    text-transform: uppercase;
}

.content { padding: 26px 28px 56px; width: 100%; max-width: 1240px; margin: 0 auto; }

.menu-btn { display: none; }

/* ---------------------------------------------------------- 通用组件 */
.page-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-head h1 { font-size: 22px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card + .card { margin-top: 18px; }

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-head h2 { font-size: 15px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.card-body.flush { padding: 14px 20px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }

.stat {
    position: relative;
    padding: 18px 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
}

.stat::after {
    content: "";
    position: absolute;
    right: -26px; top: -26px;
    width: 84px; height: 84px;
    border-radius: 50%;
    background: var(--primary-soft);
    opacity: .6;
}

.stat-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.stat-sub { font-size: 12px; color: var(--faint); }

.stat.success::after { background: var(--success-soft); }
.stat.warning::after { background: var(--warning-soft); }
.stat.danger::after { background: var(--danger-soft); }

/* 表格 */
.table-wrap { overflow-x: auto; }

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

.table th {
    text-align: left;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
    white-space: nowrap;
}

.table td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel-2); }
.table .num { font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.table .right { text-align: right; }

.cell-main { font-weight: 550; }
.cell-sub { font-size: 12px; color: var(--muted); }

/* 徽标 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
    background: var(--bg-soft);
    color: var(--muted);
    white-space: nowrap;
}

.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.no-dot::before { display: none; }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.muted { background: var(--bg-soft); color: var(--muted); }

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .05s ease;
    white-space: nowrap;
}

.btn:hover { background: var(--primary-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn.ghost {
    background: var(--panel);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn.ghost:hover { background: var(--bg-soft); color: var(--text); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; }

.btn.ghost.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.ghost.danger:hover { background: var(--danger-soft); color: var(--danger); }

.btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
.btn.icon { padding: 7px; width: 32px; height: 32px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 表单 */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 600; }
.field .req { color: var(--danger); margin-left: 2px; }

.input, .select, .textarea {
    width: 100%;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.hint { font-size: 12px; color: var(--muted); }
.error-text { font-size: 12px; color: var(--danger); font-weight: 500; }

.check-list { display: flex; flex-wrap: wrap; gap: 8px; }

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 550;
    cursor: pointer;
    background: var(--panel);
    user-select: none;
}

.check input { accent-color: var(--primary); margin: 0; }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 550; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s ease; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }

/* 键值列表 */
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 11px 14px; font-size: 13px; align-items: start; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; word-break: break-all; }

/* 代码 / 密钥 */
.code {
    font-family: var(--mono);
    font-size: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    word-break: break-all;
    line-height: 1.55;
}

.code-block {
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.65;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: #0b1220;
    color: #cbd5e1;
    overflow: auto;
    max-height: 520px;
    border: 1px solid var(--border);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .code { flex: 1; min-width: 0; }

/* 提示条 */
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border: 1px solid transparent;
    animation: flash-in .25s ease;
}

.flash.success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.flash.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.flash .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; padding: 0; }
.flash .close:hover { opacity: 1; }

@keyframes flash-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* 空状态 */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 46px; height: 46px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 14px; background: var(--bg-soft); color: var(--faint); }
.empty h3 { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 13px; margin-bottom: 14px; }

/* 标签页 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* 分页 */
.pagination { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pagination .meta { margin-right: auto; font-size: 12px; color: var(--muted); }
.pagination .page {
    min-width: 30px; height: 30px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 550;
    color: var(--muted);
    background: var(--panel);
}
.pagination .page:hover { border-color: var(--primary); color: var(--primary); }
.pagination .page.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page.disabled { opacity: .45; pointer-events: none; }
.pagination .gap { color: var(--faint); padding: 0 2px; }

/* 工具条 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.toolbar .spacer { margin-left: auto; }
.toolbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; padding: 6px 10px; font-size: 12px; }

/* 图表 */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding: 8px 4px 0; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; height: 100%; }
.chart .bar { width: 100%; max-width: 46px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, transparent)); min-height: 3px; transition: height .3s ease; }
.chart .bar-label { font-size: 11px; color: var(--faint); }
.chart .bar-value { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 列表项 */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.list-item:last-child { border-bottom: 0; }
.list-item .li-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); flex: none; }
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-title { font-size: 13px; font-weight: 550; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list-item .li-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-meta { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* 详情 */
.meta-strip { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 20px; background: var(--panel-2); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.meta-strip strong { color: var(--text); font-weight: 600; }

.details { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 12px; background: var(--panel-2); }
.details > summary { cursor: pointer; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--muted); list-style: none; }
.details > summary::-webkit-details-marker { display: none; }
.details > summary::before { content: "▸ "; color: var(--faint); }
.details[open] > summary::before { content: "▾ "; }
.details .details-body { padding: 14px; border-top: 1px solid var(--border); background: var(--panel); }

/* 登录页 */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }

.auth-aside {
    position: relative;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #e2e8f0;
    background: radial-gradient(120% 120% at 0% 0%, #1d4ed8 0%, #0f172a 55%, #020617 100%);
    overflow: hidden;
}

.auth-aside::after {
    content: "";
    position: absolute;
    width: 460px; height: 460px;
    right: -170px; bottom: -190px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .55), transparent 65%);
}

.auth-aside .brand { color: #fff; padding: 0; }
.auth-aside .brand-text span { color: #93c5fd; }
.auth-hero h1 { font-size: 34px; line-height: 1.25; margin-bottom: 14px; letter-spacing: -.03em; }
.auth-hero p { color: #94a3b8; max-width: 430px; font-size: 14px; line-height: 1.8; }
.auth-points { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; position: relative; z-index: 1; }
.auth-point { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: #cbd5e1; }
.auth-point .pt-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(59, 130, 246, .18); color: #93c5fd; flex: none; }

.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 392px; }
.auth-card h2 { font-size: 23px; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn { width: 100%; padding: 11px; font-size: 14px; }
.auth-foot { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }

/* 其他 */
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.right { text-align: right; }

.scrim { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 25; display: none; }
.scrim.show { display: block; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 10px 16px; }
    .content { padding: 18px 16px 48px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .page-head h1 { font-size: 19px; }
}

@media (max-width: 560px) {
    .stat-grid { grid-template-columns: 1fr; }
    .toolbar { padding: 12px 14px; }
    .table th, .table td { padding: 10px 14px; }
}
