/* ==========================================
   D&T STC STAFF PANEL — SHARED THEME
   "Atelier" — cool graphite minimalism. One restrained slate accent,
   hairline borders, flat surfaces, precise 8px spacing. Dark + light.
   ========================================== */

:root {
    /* Surfaces (dark, default) */
    --bg: #0e0f12;
    --surface: #17181c;
    --surface2: #1d1f24;
    --surface3: #25272d;
    --border: #2a2d34;
    --border-soft: #212329;

    /* Single slate accent */
    --accent: #7c93ad;
    --accent-2: #9db0c6;
    --accent-strong: #6580a0;
    --accent-soft: rgba(124, 147, 173, 0.14);
    --focus-ring: rgba(124, 147, 173, 0.35);

    /* Muted, palette-aligned status hues (used sparingly) */
    --green: #85a892;
    --red: #c58d87;
    --yellow: #c4a877;
    --purple: #7c93ad; /* decorative purple folds into the accent */

    /* Ink */
    --text: #e8eaed;
    --muted: #8b8f98;

    /* Geometry */
    --radius: 10px;
    --radius-sm: 7px;
    --radius-lg: 14px;

    /* 8px spacing scale */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
    --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

    /* Elevation — soft and restrained */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.28);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.30);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.45);

    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-display: 'Inter Tight', 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'Consolas', ui-monospace, 'SF Mono', monospace;
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: var(--s6) var(--s4) var(--s8);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.container { max-width: 980px; margin: 0 auto; }

a { color: var(--accent-2); text-underline-offset: 2px; }

/* Icons render at the text color, aligned to the baseline in text contexts */
.lc { flex-shrink: 0; vertical-align: -0.18em; }

/* ---- USER INFO BAR ---- */
.user-info {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--s3) var(--s5);
    margin-bottom: var(--s6);
}
.user-info-left { display: flex; align-items: center; gap: var(--s3); }
.role-logo {
    height: 34px; width: 34px; border-radius: 50%;
    object-fit: cover;
    background: var(--surface2);
    border: 1px solid var(--border);
}
.user-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; display: inline-flex; align-items: center; }
.user-role-chip {
    font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent-2); background: var(--accent-soft);
    border: 1px solid var(--border);
    padding: 3px 8px; border-radius: 999px; margin-left: var(--s3);
}

.header-actions { display: flex; align-items: center; gap: var(--s2); }

.icon-btn {
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
    width: 36px; height: 36px; border-radius: var(--radius-sm); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface2); }
.icon-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }

.logout-btn {
    display: inline-flex; align-items: center; gap: var(--s2);
    background: var(--surface); color: var(--muted); text-decoration: none;
    padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 13px;
    border: 1px solid var(--border); transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.logout-btn:hover { color: var(--text); border-color: var(--accent); }

.panel-title {
    text-align: center; font-family: var(--font-display); font-size: 28px; font-weight: 600;
    letter-spacing: -0.02em; margin: var(--s6) 0 var(--s6);
}
.panel-title span { color: var(--accent); }

/* ---- MENU CARDS ---- */
.menu-container { display: flex; gap: var(--s4); justify-content: center; flex-wrap: wrap; margin: 0 0 var(--s5); }
.menu-card {
    background: var(--surface);
    border: 1px solid var(--border); padding: var(--s5) var(--s4); border-radius: var(--radius);
    text-align: left; cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
    flex: 1 1 210px; min-width: 200px; max-width: 236px; position: relative;
    display: flex; flex-direction: column; gap: var(--s2);
}
.menu-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.menu-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.menu-card-icon {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--accent-2);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: var(--s2);
    transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.menu-card:hover .menu-card-icon { border-color: var(--accent); color: var(--accent); }
.menu-card-dashed { border-style: dashed; }
.menu-card-dashed .menu-card-icon { background: transparent; }
.menu-card b { font-family: var(--font-display); font-size: 15px; display: block; font-weight: 600; letter-spacing: -0.01em; }
.menu-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.menu-card.drag-mode { cursor: grab; }
.menu-card.drag-mode:active { cursor: grabbing; }
.menu-card.sortable-ghost { opacity: 0.35; }
.menu-card.sortable-drag { box-shadow: var(--shadow-lg); }
.drag-handle {
    display: none; position: absolute; top: var(--s3); right: var(--s3); color: var(--muted);
    align-items: center;
}
.menu-container.drag-mode .drag-handle { display: inline-flex; }
.menu-container.drag-mode .menu-card { animation: wiggle 0.25s var(--ease); }
@keyframes wiggle { 0% { transform: rotate(0); } 30% { transform: rotate(-0.5deg); } 60% { transform: rotate(0.5deg); } 100% { transform: rotate(0); } }

/* ---- HEADINGS ---- */
h1 {
    font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 0 0 var(--s5);
    letter-spacing: -0.02em; display: flex; align-items: center; gap: var(--s3);
}
h1 .lc, h2 .lc { vertical-align: baseline; color: var(--accent); }
h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: var(--s6) 0 var(--s3); letter-spacing: -0.01em; display: flex; align-items: center; gap: var(--s2); }
h3 { font-size: 11px; font-weight: 600; color: var(--muted); margin: 0 0 var(--s3); text-transform: uppercase; letter-spacing: 0.08em; display: flex; align-items: center; gap: var(--s2); }
h4 { font-family: var(--font-display); font-size: 14px; font-weight: 600; margin: 0; }
.hidden { display: none !important; }

.back-btn {
    display: inline-flex; align-items: center; gap: var(--s2); background: var(--surface); color: var(--muted);
    padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
    font-weight: 500; font-size: 12.5px; margin-bottom: var(--s5); transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
    text-decoration: none;
}
.back-btn:hover { color: var(--text); border-color: var(--accent); }
.back-btn .lc { vertical-align: middle; }

/* ---- FORMS ---- */
.form-group { margin-bottom: var(--s4); }
label { display: block; font-weight: 500; font-size: 11px; margin-bottom: 6px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="password"], select, textarea {
    width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 13.5px; font-family: inherit; transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.username-field { max-width: 400px; font-weight: 600; }
.small-field { max-width: 110px; }
textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
.summary-box { min-height: 110px; }
input[readonly], textarea[readonly] { opacity: 0.85; }

.category-card { background: var(--surface); border: 1px solid var(--border); border-left: 2px solid var(--accent); padding: var(--s5); margin-bottom: var(--s4); border-radius: var(--radius); }
.row { display: flex; gap: var(--s3); }
.flex-3 { flex: 3; }
.flex-1 { flex: 1; }

/* ---- BUTTONS ---- */
.submit-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    background: var(--accent-strong); color: #fff; border: 1px solid transparent; padding: 11px 18px;
    font-size: 13px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; width: 100%; margin-top: var(--s3);
    font-family: var(--font-display); letter-spacing: 0.01em;
    transition: background 0.15s var(--ease), transform 0.1s var(--ease);
}
.submit-btn:hover { background: var(--accent); }
.submit-btn:active { transform: scale(0.99); }
.secondary-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
    background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 11px 18px;
    font-size: 13px; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; flex: 1;
    transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.secondary-btn:hover { border-color: var(--accent); color: var(--accent-2); }
.action-row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-top: var(--s3); }
.action-row .submit-btn { flex: 1; margin-top: 0; }
.status-message { display: none; margin: var(--s3) 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-2); font-weight: 500; font-size: 12.5px; border: 1px solid var(--border); }
.status-message.error { background: rgba(197, 141, 135, 0.1); color: var(--red); border-color: rgba(197, 141, 135, 0.3); }

.fade-in { animation: fadeInUp 0.28s var(--ease) both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

.copy-box { width: 100%; min-height: 40px; background: var(--surface2); color: var(--accent-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-family: var(--font-mono); font-size: 12px; line-height: 1.55; }
.mini-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 11px; cursor: pointer; font-weight: 500; font-size: 12px; margin-top: 5px;
    transition: border-color 0.15s var(--ease), color 0.15s var(--ease); text-decoration: none;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent-2); }

.info-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s5); margin: var(--s4) 0; }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.metric { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s4) var(--s3); text-align: center; transition: border-color 0.2s var(--ease); }
.metric span { display: block; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 5px; }
.metric strong { font-family: var(--font-display); color: var(--text); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.timer-container { background: var(--surface); border: 1px solid var(--border); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: var(--s3); margin-top: var(--s2); }
.timer-display { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--accent-2); background: var(--surface2); padding: 5px 12px; border-radius: 6px; letter-spacing: 2px; }
.timer-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; background: var(--surface2); color: var(--text); transition: border-color 0.15s var(--ease); }
.timer-btn:hover { border-color: var(--accent); }
.btn-start { color: var(--green); }
.btn-stop { color: var(--red); }
.btn-reset { color: var(--muted); }

.entry-list { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); }
.entry-row { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s3); display: grid; grid-template-columns: 1.4fr 1.2fr 100px auto; gap: var(--s3); align-items: start; }
.entry-row .img-row { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: 4px; }
.entry-row .img-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.entry-img-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; transition: transform 0.15s var(--ease), border-color 0.15s var(--ease); }
.entry-img-thumb:hover { border-color: var(--accent); transform: scale(1.03); }
.entry-row textarea { min-height: 52px; }
.entry-remove { display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--red); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; cursor: pointer; font-weight: 600; transition: border-color 0.15s var(--ease); }
.entry-remove:hover { border-color: var(--red); }

.board-container { background: var(--surface); border: 1px solid var(--border); padding: var(--s5); border-radius: var(--radius); margin-top: var(--s4); }
.thread-card { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s4); margin-bottom: var(--s3); }
.thread-title { display: flex; justify-content: space-between; gap: var(--s3); align-items: flex-start; border-bottom: 1px solid var(--border); padding-bottom: var(--s3); margin-bottom: var(--s3); }
.thread-title .post-del-btn { position: static; background: var(--surface); color: var(--red); padding: 6px 10px; border-radius: 5px; font-weight: 600; border: 1px solid var(--border); }
.thread-meta, .reply-meta { color: var(--muted); font-size: 12px; }
.reply-bubble { background: var(--bg); border-left: 2px solid var(--accent); padding: var(--s3) var(--s4); border-radius: 6px; margin-bottom: var(--s3); }
.reply-body { white-space: pre-line; margin-top: 5px; line-height: 1.55; font-size: 13px; }
.post-author { font-weight: 600; font-size: 13px; }
.post-role { background: var(--surface); color: var(--accent-2); padding: 2px 7px; border-radius: 4px; font-size: 10px; margin-left: 6px; text-transform: uppercase; font-weight: 600; border: 1px solid var(--border); letter-spacing: 0.05em; }
.post-del-btn { display: inline-flex; background: none; border: none; color: var(--red); cursor: pointer; position: absolute; top: var(--s3); right: var(--s3); }
.single-post { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s4); margin-bottom: var(--s3); position: relative; }
.post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s2); font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 7px; }
.img-separator { display: block; width: 100%; height: 1px; background: var(--border); margin: var(--s5) 0; border: none; }
.record-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s3); }
.user-record { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s4); transition: border-color 0.15s var(--ease); }
.user-record:hover { border-color: var(--accent); }
.user-record summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.record-meta { color: var(--muted); font-size: 12px; margin: var(--s2) 0; line-height: 1.7; }
.guide-item { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s4); margin-bottom: var(--s3); }
.section-divider { border: none; border-top: 1px solid var(--border); margin: var(--s6) 0; }

@media (max-width: 760px) {
    body { padding: var(--s4) var(--s3) var(--s7); }
    .user-info { padding: var(--s3) var(--s4); }
    .row, .action-row { flex-direction: column; }
    .entry-row { grid-template-columns: 1fr; }
    .menu-card { min-width: 100%; max-width: none; }
    .panel-title { font-size: 24px; }
}

/* ---- LIGHT THEME ---- */
body.light-mode {
    --bg: #fafaf9;
    --surface: #ffffff;
    --surface2: #f4f4f3;
    --surface3: #ececea;
    --border: #e4e4e2;
    --border-soft: #ededec;
    --accent: #46596e;
    --accent-2: #5b7186;
    --accent-strong: #384a5e;
    --accent-soft: rgba(70, 89, 110, 0.09);
    --focus-ring: rgba(70, 89, 110, 0.22);
    --green: #4f7a5e;
    --red: #a5544e;
    --yellow: #8a6d34;
    --purple: #46596e;
    --text: #1b1d21;
    --muted: #6b7078;
    --shadow-sm: 0 1px 2px rgba(20,25,35,0.06);
    --shadow-md: 0 10px 30px rgba(20,25,35,0.08);
    --shadow-lg: 0 24px 60px rgba(20,25,35,0.14);
}
body.light-mode input[type="text"], body.light-mode input[type="number"], body.light-mode input[type="date"],
body.light-mode input[type="time"], body.light-mode input[type="password"], body.light-mode select, body.light-mode textarea { background: #ffffff; }
body.light-mode .copy-box { background: var(--surface2); color: var(--accent-strong); }
body.light-mode .reply-bubble { background: var(--surface2); }

/* ---- SETTINGS MENU ---- */
.settings-panel {
    position: fixed; inset: 0; z-index: 1000; display: none;
    background: rgba(8, 10, 14, 0.5); backdrop-filter: blur(4px);
    align-items: flex-start; justify-content: center; padding: 90px 16px;
}
.settings-panel.open { display: flex; }
.settings-card {
    width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); animation: popIn 0.18s var(--ease) both;
    overflow: hidden;
}
.settings-header {
    display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5);
    border-bottom: 1px solid var(--border);
}
.settings-header strong { font-family: var(--font-display); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: var(--s2); }
.settings-close { display: inline-flex; background: none; border: none; color: var(--muted); cursor: pointer; line-height: 1; padding: 4px; border-radius: 6px; transition: color 0.15s var(--ease); }
.settings-close:hover { color: var(--text); }
.settings-body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s5); }
.settings-section-title { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s3); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.settings-row-label { font-size: 13px; font-weight: 500; }
.settings-row-desc { font-size: 11px; color: var(--muted); margin-top: 2px; }

.segmented { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.segmented button {
    display: inline-flex; align-items: center; gap: 6px;
    border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500;
    padding: 7px 13px; border-radius: 5px; cursor: pointer; transition: all 0.15s var(--ease);
}
.segmented button.active { background: var(--surface3); color: var(--text); }

.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border); border-radius: 20px; cursor: pointer; transition: background 0.2s var(--ease); }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--muted); border-radius: 50%; transition: all 0.2s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track .thumb { left: 20px; background: #fff; }

.settings-footer { padding: var(--s4) var(--s5); border-top: 1px solid var(--border); display: flex; gap: var(--s2); }

.theme-toggle {
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
    padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500;
    transition: all 0.2s var(--ease); display: inline-flex; align-items: center; gap: 6px;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }

/* ---- STYLED DIALOGS (confirm / alert) ---- */
.ui-dialog-overlay {
    position: fixed; inset: 0; z-index: 1100; display: none;
    background: rgba(8, 10, 14, 0.55); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 24px;
}
.ui-dialog-overlay.open { display: flex; }
.ui-dialog {
    width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: var(--s5);
    animation: popIn 0.16s var(--ease) both;
}
.ui-dialog-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: var(--s2); letter-spacing: -0.01em; }
.ui-dialog-msg { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: var(--s5); }
.ui-dialog-actions { display: flex; gap: var(--s2); justify-content: flex-end; }
.ui-dialog-actions .submit-btn, .ui-dialog-actions .secondary-btn { width: auto; margin-top: 0; flex: 0 0 auto; padding: 9px 16px; }
.submit-btn.is-danger { background: transparent; border-color: var(--red); color: var(--red); }
.submit-btn.is-danger:hover { background: var(--red); color: var(--bg); }

/* ---- LIVE STATS ---- */
.stats-bar {
    display: flex; flex-wrap: wrap; gap: var(--s3); justify-content: center; align-items: stretch;
    padding: var(--s5) 0 0; margin-top: var(--s6); border-top: 1px solid var(--border);
}
.stats-chip {
    display: flex; align-items: center; gap: var(--s3); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--s3) var(--s4);
    min-width: 140px; transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.stats-chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.stats-chip .stats-icon { display: inline-flex; color: var(--accent-2); }
.stats-chip .stats-value { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats-chip .stats-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(133,168,146,0.6); animation: pulseDot 2s infinite; flex-shrink: 0; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(133,168,146,0.5); } 70% { box-shadow: 0 0 0 7px rgba(133,168,146,0); } 100% { box-shadow: 0 0 0 0 rgba(133,168,146,0); } }
.stats-bar.stats-loading .stats-value { color: var(--muted); }
.stats-skeleton { display: inline-block; width: 34px; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--border) 25%, var(--border-soft) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- REDUCE MOTION ---- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
