/* ── Variables ─────────────────────────────────────────── */
:root {
    --bg:          #07090f;
    --surface:     rgba(255,255,255,0.04);
    --surface-2:   rgba(255,255,255,0.07);
    --surface-3:   rgba(255,255,255,0.11);
    --border:      rgba(255,255,255,0.07);
    --border-2:    rgba(255,255,255,0.13);
    --text-1:      #f1f5f9;
    --text-2:      #94a3b8;
    --text-3:      #475569;
    --accent:      #6366f1;
    --accent-2:    #818cf8;
    --accent-glow: rgba(99,102,241,0.22);
    --success:     #10b981;
    --success-bg:  rgba(16,185,129,0.14);
    --warning:     #f59e0b;
    --warning-bg:  rgba(245,158,11,0.14);
    --danger:      #ef4444;
    --danger-bg:   rgba(239,68,68,0.14);
    --purple:      #8b5cf6;
    --purple-bg:   rgba(139,92,246,0.14);
    --sky:         #0ea5e9;
    --sky-bg:      rgba(14,165,233,0.14);
    --sidebar-w:   230px;
    --topbar-h:    56px;
    --bn-h:        60px;
    --radius:      14px;
    --radius-sm:   9px;
    --radius-xs:   5px;
    --t:           0.18s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html  { scroll-behavior:smooth; }
body  {
    background:var(--bg); color:var(--text-1);
    font-family:'Inter',sans-serif; font-size:14.5px; line-height:1.6;
    min-height:100vh; overflow-x:hidden; -webkit-font-smoothing:antialiased;
}
a { color:inherit; text-decoration:none; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }
input  { font-family:inherit; }

/* ── Background ────────────────────────────────────────── */
.bg-blobs { position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.blob { position:absolute; border-radius:50%; filter:blur(110px); opacity:.25;
    animation:blobf 16s ease-in-out infinite alternate; }
.blob-1 { width:560px;height:560px;top:-15%;left:-10%;
    background:radial-gradient(circle,#6366f1 0%,transparent 65%); }
.blob-2 { width:500px;height:500px;bottom:-15%;right:-10%;
    background:radial-gradient(circle,#8b5cf6 0%,transparent 65%);animation-delay:-7s; }
.blob-3 { width:360px;height:360px;top:40%;left:50%;
    background:radial-gradient(circle,#0ea5e9 0%,transparent 65%);opacity:.1;animation-delay:-3s; }
@keyframes blobf { 0%{transform:translate(0,0)scale(1)} 100%{transform:translate(40px,60px)scale(1.1)} }

/* ── Toast ─────────────────────────────────────────────── */
#toast-container {
    position:fixed; top:16px; right:16px; z-index:9999;
    display:flex; flex-direction:column; gap:8px; pointer-events:none;
}
.toast {
    display:flex; align-items:center; gap:9px;
    padding:10px 14px; border-radius:var(--radius-sm);
    font-size:.8375rem; font-weight:500;
    backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
    border:1px solid var(--border-2); pointer-events:all;
    animation:toastIn .28s ease forwards;
    min-width:200px; max-width:300px; box-shadow:0 8px 32px rgba(0,0,0,.4);
}
.toast.toast-success { background:rgba(16,185,129,.18);  color:#6ee7b7; border-color:rgba(16,185,129,.3); }
.toast.toast-error   { background:rgba(239,68,68,.18);   color:#fca5a5; border-color:rgba(239,68,68,.3); }
.toast.toast-info    { background:rgba(99,102,241,.18);  color:#a5b4fc; border-color:rgba(99,102,241,.3); }
.toast.toast-exit    { animation:toastOut .28s ease forwards; }
@keyframes toastIn  { from{opacity:0;transform:translateX(36px)} to{opacity:1;transform:translateX(0)} }
@keyframes toastOut { from{opacity:1;transform:translateX(0)}    to{opacity:0;transform:translateX(36px)} }

/* ── Splash / spinner ──────────────────────────────────── */
.splash-screen {
    position:fixed; inset:0; z-index:50;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:22px;
}
.splash-logo {
    width:68px; height:68px;
    background:linear-gradient(135deg,var(--accent),#8b5cf6);
    border-radius:18px; display:flex; align-items:center; justify-content:center;
    font-size:1.8rem; color:#fff; animation:pulse 2s ease infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 28px var(--accent-glow)} 50%{box-shadow:0 0 56px rgba(99,102,241,.45)} }
.spinner { width:26px; height:26px; border:2.5px solid var(--border-2); border-top-color:var(--accent);
    border-radius:50%; animation:spin .75s linear infinite; }
.spinner-lg { width:42px; height:42px; border-width:3px; }
@keyframes spin { to{transform:rotate(360deg)} }

/* ── Auth screens ──────────────────────────────────────── */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center;
    padding:20px; position:relative; z-index:1; }
.auth-card {
    width:100%; max-width:420px;
    background:var(--surface); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
    border:1px solid var(--border-2); border-radius:22px; padding:38px 34px;
    text-align:center; box-shadow:0 28px 56px rgba(0,0,0,.5);
    animation:fadeUp .45s ease forwards;
}
.auth-icon {
    width:60px; height:60px; margin:0 auto 18px;
    background:linear-gradient(135deg,var(--accent),#8b5cf6);
    border-radius:16px; display:flex; align-items:center; justify-content:center;
    font-size:1.6rem; color:#fff;
}
.auth-icon.icon-warning { background:linear-gradient(135deg,var(--warning),#f97316); }
.auth-icon.icon-danger  { background:linear-gradient(135deg,var(--danger),#dc2626); }
.auth-card h1 { font-size:1.625rem; font-weight:700; margin-bottom:8px; letter-spacing:-.03em; }
.auth-card p  { color:var(--text-2); font-size:.9rem; margin-bottom:20px; line-height:1.7; }
.code-hint {
    background:rgba(0,0,0,.35); border:1px solid var(--border-2);
    border-radius:var(--radius-sm); padding:11px 14px;
    font-family:'Fira Code',monospace; font-size:.8rem; color:var(--accent-2);
    word-break:break-all; margin-top:6px;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(22px)} to{opacity:1;transform:translateY(0)} }

/* ── Layout shell ──────────────────────────────────────── */
#app { position:relative; z-index:1; min-height:100vh; }

.layout { display:flex; min-height:100vh; }

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
    position:fixed; top:0; left:0; bottom:0;
    width:var(--sidebar-w); z-index:100;
    background:rgba(7,9,15,.85);
    backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
    border-right:1px solid var(--border);
    display:flex; flex-direction:column;
}
.sidebar-brand {
    display:flex; align-items:center; gap:11px;
    padding:18px 18px 14px; border-bottom:1px solid var(--border);
}
.brand-icon {
    width:34px; height:34px; flex-shrink:0;
    background:linear-gradient(135deg,var(--accent),#8b5cf6);
    border-radius:9px; display:flex; align-items:center; justify-content:center;
    font-size:.9rem; color:#fff;
}
.brand-icon.sm { width:28px; height:28px; border-radius:7px; font-size:.75rem; }
.brand-name { font-size:.9rem; font-weight:700; color:var(--text-1); letter-spacing:-.02em; }
.brand-ver  { font-size:.65rem; color:var(--text-3); }

.sidebar-nav { flex:1; padding:12px 10px; display:flex; flex-direction:column; gap:3px; overflow-y:auto; }

.nav-item {
    display:flex; align-items:center; gap:10px;
    padding:9px 12px; border-radius:var(--radius-sm);
    color:var(--text-2); font-size:.875rem; font-weight:500;
    transition:all var(--t); border:1px solid transparent;
    width:100%; text-align:left;
}
.nav-item i { width:16px; text-align:center; font-size:.85rem; flex-shrink:0; }
.nav-item:hover { background:var(--surface-2); color:var(--text-1); }
.nav-item.active {
    background:rgba(99,102,241,.12); color:var(--accent-2);
    border-color:rgba(99,102,241,.18);
}
.nav-sep { height:1px; background:var(--border); margin:8px 4px; }
.nav-danger:hover { background:var(--danger-bg); color:#fca5a5; border-color:rgba(239,68,68,.2); }

.sidebar-footer { padding:10px; border-top:1px solid var(--border); }
.user-chip-lg {
    display:flex; align-items:center; gap:9px;
    padding:9px 11px; border-radius:var(--radius-sm);
    background:var(--surface); border:1px solid var(--border);
}
.user-ava {
    width:30px; height:30px; flex-shrink:0;
    background:linear-gradient(135deg,var(--accent),#8b5cf6);
    border-radius:7px; display:flex; align-items:center; justify-content:center;
    font-size:.72rem; color:#fff;
}
.user-name   { font-size:.8rem; font-weight:600; color:var(--text-1); }
.user-id-sm  { font-size:.68rem; color:var(--text-3); }

/* ── Main area ─────────────────────────────────────────── */
.main-wrap { margin-left:var(--sidebar-w); flex:1; min-height:100vh; display:flex; flex-direction:column; }

/* Desktop top bar */
.topbar {
    height:var(--topbar-h); display:flex; align-items:center; justify-content:space-between;
    padding:0 24px; border-bottom:1px solid var(--border);
    background:rgba(7,9,15,.7); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
    position:sticky; top:0; z-index:50;
}
.topbar-title { font-size:1rem; font-weight:600; color:var(--text-1); }
.topbar-right { display:flex; align-items:center; gap:8px; }

/* Mobile header */
.mobile-hdr {
    display:none; height:52px;
    align-items:center; justify-content:space-between;
    padding:0 16px; border-bottom:1px solid var(--border);
    background:rgba(7,9,15,.8); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
    position:sticky; top:0; z-index:50;
}
.mobile-brand { display:flex; align-items:center; gap:9px; font-size:.9rem; font-weight:700; color:var(--text-1); }

/* Page content */
.content-area { flex:1; padding:22px 24px 40px; overflow-y:auto; }

.page { display:none; animation:fadeUp .25s ease forwards; }
.page.active { display:block; }

/* ── Bottom nav ────────────────────────────────────────── */
.bottom-nav {
    display:none; position:fixed; bottom:0; left:0; right:0;
    height:var(--bn-h); background:rgba(7,9,15,.92);
    backdrop-filter:blur(24px); -webkit-backdrop-filter:blur(24px);
    border-top:1px solid var(--border); z-index:100;
    padding-bottom:env(safe-area-inset-bottom,0);
}
.bn-item {
    flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
    gap:3px; color:var(--text-3); font-size:.65rem; font-weight:500;
    transition:color var(--t); height:100%;
}
.bn-item i { font-size:1.05rem; }
.bn-item:hover  { color:var(--text-2); }
.bn-item.active { color:var(--accent-2); }

/* ── Section header ────────────────────────────────────── */
.section-head {
    display:flex; align-items:center; justify-content:space-between;
    margin-bottom:10px;
    font-size:.7rem; font-weight:700; color:var(--text-3);
    text-transform:uppercase; letter-spacing:.07em;
}
.count-chip {
    display:inline-flex; align-items:center; justify-content:center;
    background:var(--surface-3); border:1px solid var(--border-2);
    border-radius:99px; padding:1px 7px; font-size:.65rem; font-weight:600;
    color:var(--text-2); margin-left:6px;
}

/* ── Stats grid ────────────────────────────────────────── */
.stats-grid {
    display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px;
}
.stat-card {
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--radius); padding:16px 16px 14px;
    display:flex; align-items:flex-start; gap:12px;
    transition:all var(--t); position:relative; overflow:hidden;
}
.stat-card::before {
    content:''; position:absolute; inset:0;
    background:linear-gradient(135deg,transparent 55%,rgba(99,102,241,.025));
    pointer-events:none;
}
.stat-card:hover { border-color:var(--border-2); background:var(--surface-2); transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,.28); }
.stat-icon { width:42px; height:42px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0; }
.stat-icon.indigo { background:rgba(99,102,241,.14); color:var(--accent-2); }
.stat-icon.purple { background:var(--purple-bg);    color:#c4b5fd; }
.stat-icon.green  { background:var(--success-bg);   color:#6ee7b7; }
.stat-icon.amber  { background:var(--warning-bg);   color:#fcd34d; }
.stat-icon.sky    { background:var(--sky-bg);        color:#7dd3fc; }
.stat-label { font-size:.68rem; font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:.06em; margin-bottom:3px; }
.stat-value { font-size:1.25rem; font-weight:700; color:var(--text-1); word-break:break-all; }
.stat-sub   { font-size:.72rem; color:var(--text-2); margin-top:2px; }

/* ── Card ──────────────────────────────────────────────── */
.card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.mb-4 { margin-bottom:16px; }
.card-header {
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 18px; border-bottom:1px solid var(--border);
}
.card-title { display:flex; align-items:center; gap:8px; font-size:.9rem; font-weight:600; color:var(--text-1); }
.card-title i { color:var(--accent-2); }
.card-body { padding:16px 18px; }

/* ── Bot card ──────────────────────────────────────────── */
.bot-card { margin-bottom:12px; }
.bot-card:last-child { margin-bottom:0; }

.bot-header-left  { display:flex; align-items:center; gap:10px; }
.bot-header-right { display:flex; align-items:center; gap:6px; }

.bot-avatar {
    width:38px; height:38px; border-radius:10px; flex-shrink:0;
    background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(139,92,246,.18));
    border:1px solid rgba(99,102,241,.2);
    display:flex; align-items:center; justify-content:center;
    color:var(--accent-2); font-size:.9rem;
}
.bot-username { font-size:.9rem; font-weight:600; color:var(--text-1); }
.bot-sub      { font-size:.7rem; color:var(--text-3); }

.bot-info { border-top:1px solid var(--border); }

/* ── Info rows ─────────────────────────────────────────── */
.info-row {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:10px 18px; border-bottom:1px solid var(--border);
}
.info-row:last-child { border-bottom:none; }
.info-label { font-size:.82rem; color:var(--text-2); display:flex; align-items:center; gap:6px; flex-shrink:0; }
.info-label i { color:var(--accent-2); font-size:.75rem; }
.info-val {
    font-size:.82rem; font-weight:600; color:var(--text-1);
    display:flex; align-items:center; gap:6px; word-break:break-all; justify-content:flex-end;
}

/* ── Bot settings panel ────────────────────────────────── */
.bot-settings { border-top:1px solid var(--border); overflow:hidden; transition:max-height .3s ease; }
.bot-settings.collapsed { max-height:0; border-top:none; }
.bot-settings:not(.collapsed) { max-height:400px; }
.settings-inner { padding:16px 18px; }
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
    display:inline-flex; align-items:center; gap:5px;
    padding:3px 9px; border-radius:99px;
    font-size:.72rem; font-weight:600; letter-spacing:.03em;
}
.badge-on      { background:var(--success-bg); color:#6ee7b7; border:1px solid rgba(16,185,129,.25); }
.badge-off     { background:var(--surface-3);  color:var(--text-2); border:1px solid var(--border-2); }
.badge-pending { background:var(--warning-bg); color:#fcd34d; border:1px solid rgba(245,158,11,.25); }
.badge-danger  { background:var(--danger-bg);  color:#fca5a5; border:1px solid rgba(239,68,68,.25); }
.badge .dot { width:5px; height:5px; border-radius:50%; background:currentColor; animation:dotP 2s ease infinite; }
@keyframes dotP { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display:inline-flex; align-items:center; justify-content:center; gap:6px;
    padding:8px 16px; border-radius:var(--radius-sm);
    font-size:.85rem; font-weight:600; border:1px solid transparent;
    transition:all var(--t); white-space:nowrap; cursor:pointer;
}
.btn-primary { background:var(--accent); color:#fff; }
.btn-primary:hover { background:#4f46e5; box-shadow:0 0 18px var(--accent-glow); transform:translateY(-1px); }
.btn-secondary { background:var(--surface-2); color:var(--text-1); border-color:var(--border-2); }
.btn-secondary:hover { background:var(--surface-3); }
.btn-danger { background:var(--danger-bg); color:#fca5a5; border-color:rgba(239,68,68,.25); }
.btn-danger:hover { background:rgba(239,68,68,.22); }
.btn-ghost { background:transparent; color:var(--text-2); border-color:var(--border); }
.btn-ghost:hover { background:var(--surface-2); color:var(--text-1); border-color:var(--border-2); }
.btn-sm { padding:5px 11px; font-size:.78rem; border-radius:var(--radius-xs); }

/* ── Icon button ───────────────────────────────────────── */
.icon-btn {
    width:32px; height:32px; flex-shrink:0;
    background:var(--surface); border:1px solid var(--border);
    border-radius:var(--radius-xs);
    display:flex; align-items:center; justify-content:center;
    color:var(--text-2); font-size:.8rem; transition:all var(--t);
}
.icon-btn:hover { background:var(--surface-2); color:var(--text-1); border-color:var(--border-2); }
.btn-del { color:var(--danger); opacity:.6; }
.btn-del:hover { opacity:1; background:var(--danger-bg); border-color:rgba(239,68,68,.25); }

/* ── Copy button ───────────────────────────────────────── */
.copy-btn {
    width:24px; height:24px; flex-shrink:0; cursor:pointer;
    background:var(--surface-2); border:1px solid var(--border);
    border-radius:var(--radius-xs);
    display:inline-flex; align-items:center; justify-content:center;
    font-size:.68rem; color:var(--text-2); transition:all var(--t);
}
.copy-btn:hover  { background:var(--surface-3); color:var(--accent-2); border-color:rgba(99,102,241,.3); }
.copy-btn.copied { color:var(--success); border-color:rgba(16,185,129,.3); }

/* ── Chip / inline code ────────────────────────────────── */
.chip {
    font-family:'Fira Code',monospace; font-size:.78rem;
    background:rgba(0,0,0,.3); border:1px solid var(--border-2);
    border-radius:4px; padding:1px 6px; color:var(--accent-2);
}

/* ── Analytics: health list ────────────────────────────── */
.health-list { display:flex; flex-direction:column; }
.health-row {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:10px 18px; border-bottom:1px solid var(--border); flex-wrap:wrap; gap:8px;
}
.health-row:last-child { border-bottom:none; }
.health-bot  { display:flex; align-items:center; gap:8px; min-width:120px; }
.bot-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.bot-dot.on  { background:var(--success); box-shadow:0 0 6px var(--success); }
.bot-dot.off { background:var(--text-3); }
.health-name { font-size:.85rem; font-weight:600; color:var(--text-1); }
.health-badges { display:flex; flex-wrap:wrap; gap:5px; }
.hb {
    display:inline-flex; align-items:center; gap:4px;
    padding:2px 8px; border-radius:99px; font-size:.7rem; font-weight:600;
    border:1px solid transparent;
}
.hb-on      { background:var(--success-bg); color:#6ee7b7; border-color:rgba(16,185,129,.2); }
.hb-off     { background:var(--danger-bg);  color:#fca5a5; border-color:rgba(239,68,68,.2); }
.hb-warn    { background:var(--warning-bg); color:#fcd34d; border-color:rgba(245,158,11,.2); }
.hb-neutral { background:var(--surface-3);  color:var(--text-3); border-color:var(--border); }

/* ── Progress bars ─────────────────────────────────────── */
.progress-track { height:6px; background:var(--surface-3); border-radius:99px; overflow:hidden; }
.progress-fill  { height:100%; border-radius:99px; transition:width .5s ease; }

/* ── Form fields ───────────────────────────────────────── */
.field-group  { margin-bottom:14px; }
.field-group:last-child { margin-bottom:0; }
.field-label  {
    display:flex; align-items:center; gap:5px;
    font-size:.775rem; font-weight:600; color:var(--text-2); margin-bottom:6px;
}
.field-label i { color:var(--accent-2); font-size:.7rem; }
.field-row    { display:flex; align-items:center; gap:7px; }
.field-input  {
    flex:1; min-width:0;
    background:rgba(0,0,0,.28); border:1px solid var(--border-2);
    border-radius:var(--radius-sm); padding:8px 12px;
    color:var(--text-1); font-size:.85rem; outline:none;
    transition:border-color var(--t), box-shadow var(--t);
}
.field-input::placeholder { color:var(--text-3); }
.field-input:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
.field-hint { font-size:.72rem; color:var(--text-3); margin-top:5px; line-height:1.5; }

/* ── Alert ─────────────────────────────────────────────── */
.alert {
    display:flex; align-items:flex-start; gap:10px;
    padding:11px 14px; border-radius:var(--radius-sm);
    font-size:.84rem; border:1px solid transparent;
}
.alert-info    { background:rgba(99,102,241,.08); color:#a5b4fc; border-color:rgba(99,102,241,.2); }
.alert-warning { background:var(--warning-bg); color:#fcd34d; border-color:rgba(245,158,11,.25); }
.alert i { flex-shrink:0; margin-top:2px; }
.mb-4  { margin-bottom:14px; }

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(0,0,0,.58);
    backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
    z-index:500; align-items:center; justify-content:center; padding:14px;
}
.modal-overlay.open { display:flex; animation:mFade .2s ease; }
@keyframes mFade { from{opacity:0} to{opacity:1} }
.modal {
    background:#0c0f1a; border:1px solid var(--border-2);
    border-radius:18px; width:100%; max-width:440px;
    box-shadow:0 36px 72px rgba(0,0,0,.55);
    animation:mUp .22s ease;
}
@keyframes mUp { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--border); }
.modal-title  { display:flex; align-items:center; gap:8px; font-size:.95rem; font-weight:600; color:var(--text-1); }
.modal-title i{ color:var(--accent-2); }
.modal-body   { padding:18px; }
.modal-footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; padding:14px 18px; border-top:1px solid var(--border); }

/* ── Empty state ───────────────────────────────────────── */
.empty-state  { text-align:center; padding:36px 20px; }
.empty-icon   { font-size:2.2rem; color:var(--text-3); margin-bottom:12px; }
.empty-state h3{ font-size:.9rem; font-weight:600; color:var(--text-2); margin-bottom:5px; }
.empty-state p { font-size:.83rem; color:var(--text-3); }

/* ── Skeleton ──────────────────────────────────────────── */
.skeleton {
    display:block;
    background:linear-gradient(90deg,var(--surface) 25%,var(--surface-2) 50%,var(--surface) 75%);
    background-size:400% 100%; animation:shimmer 1.4s infinite;
}
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:-100% 0} }

/* ── Misc utilities ────────────────────────────────────── */
.divider  { height:1px; background:var(--border); margin:16px 0; }
.font-mono{ font-family:'Fira Code','Courier New',monospace; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.mt-4  { margin-top:14px; }
.w-full{ width:100%; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 860px) {
    .stats-grid { grid-template-columns:1fr 1fr; }
}

@media (max-width: 700px) {
    .sidebar      { display:none; }
    .main-wrap    { margin-left:0; padding-bottom:var(--bn-h); }
    .topbar       { display:none; }
    .mobile-hdr   { display:flex; }
    .bottom-nav   { display:flex; }
    .content-area { padding:14px 14px 24px; }
    .stats-grid   { grid-template-columns:1fr 1fr; gap:10px; }
    .settings-grid{ grid-template-columns:1fr; }
    .health-row   { flex-direction:column; align-items:flex-start; }
    .modal-footer { flex-direction:column-reverse; }
    .modal-footer .btn { width:100%; justify-content:center; }
    #toast-container { top:auto; bottom:calc(var(--bn-h) + 10px); left:12px; right:12px; }
    .toast { max-width:100%; }
    .auth-card { padding:26px 18px; }
}

@media (max-width: 400px) {
    .stats-grid { grid-template-columns:1fr; }
}
