/* Barricade Panel - look carried over from the VirexSystem panel (accent #fbd540) */

:root {
  --bg-primary: #0d0e14;
  --bg-secondary: #13151f;
  --bg-card: #161822;
  --bg-hover: #1d1f2e;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(251, 213, 64, 0.3);

  --accent: #fbd540;
  --accent-dark: #d4b030;
  --accent-glow: rgba(251, 213, 64, 0.15);
  --accent-bg: rgba(251, 213, 64, 0.08);
  --accent-text: #fbd540;
  --chart: #fbd540;

  --text-primary: #f0f1f8;
  --text-secondary: #a0a3bc;
  --text-muted: #7c7f99;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --success-bg: rgba(34, 197, 94, 0.1);
  --danger-bg: rgba(239, 68, 68, 0.1);
  --warning-bg: rgba(245, 158, 11, 0.1);
  --info-bg: rgba(59, 130, 246, 0.1);

  --sidebar-width: 240px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
  color-scheme: dark;
}

body.light {
  --bg-primary: #f0f2fa;
  --bg-secondary: #e6e9f5;
  --bg-card: #ffffff;
  --bg-hover: #dde2f5;
  --border: rgba(0, 0, 0, 0.09);
  --border-hover: rgba(251, 213, 64, 0.5);
  --accent-text: #8a6a00;
  --chart: #a67c00;
  --text-primary: #1a1b2e;
  --text-secondary: #4a4d6a;
  --text-muted: #686b88;
  --success-bg: rgba(34, 197, 94, 0.12);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15.5px; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; line-height: 1.6; }
a { color: var(--accent-text); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
h1, h2, h3 { line-height: 1.3; }
.muted { color: var(--text-muted); }
.small { font-size: 0.78rem; }
.mono { font-family: ui-monospace, "Courier New", monospace; font-size: 0.78rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 20px; }
.link { color: var(--accent-text); font-weight: 600; font-size: 0.8rem; }
.accent { color: var(--accent-text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, 0.25); border-radius: 3px; }

/* ---------- sidebar ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--bg-secondary); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 100; }
.sidebar-brand { height: var(--header-height); padding: 0 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--accent); color: #0d0e14; display: grid; place-items: center; font-weight: 800; transform: rotate(-10deg); flex: none; }
.brand-icon span { transform: rotate(10deg); }
.brand-name { font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; color: var(--text-primary); }
.brand-name span { color: var(--accent-text); }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); padding: 12px 20px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 17px; color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; border-left: 3px solid transparent; transition: var(--transition); }
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent-bg); color: var(--accent-text); border-left-color: var(--accent); }
.nav-icon { width: 18px; height: 18px; opacity: 0.7; flex: none; display: grid; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 1px 7px; border-radius: 20px; min-width: 20px; text-align: center; }
.sidebar-status { display: flex; align-items: center; gap: 8px; padding: 10px 20px; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border); }
.sidebar-footer { padding: 14px 20px; border-top: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; background: var(--accent-bg); border: 1px solid var(--border-hover); border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--accent-text); flex: none; }
.user-info { flex: 1; min-width: 0; line-height: 1.35; }
.user-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--text-muted); text-transform: capitalize; }
.icon-btn { width: 28px; height: 28px; background: none; border: 0; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; transition: var(--transition); }
.icon-btn:hover { background: var(--bg-hover); color: var(--accent-text); }
.icon-btn.logout:hover { background: var(--danger-bg); color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex: none; }
.dot.off { background: var(--text-muted); }

/* ---------- main / header ---------- */
.main { margin-left: var(--sidebar-width); flex: 1; min-width: 0; padding-bottom: 40px; }
.page-head { position: sticky; top: 0; z-index: 50; height: var(--header-height); background: var(--bg-secondary); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 28px; margin-bottom: 28px; }
.page-head .titles { flex: 1; min-width: 0; line-height: 1.3; }
.page-head h1 { font-size: 1rem; font-weight: 600; }
.page-head .sub { font-size: 0.75rem; color: var(--text-muted); }
.main > :not(.page-head) { margin-left: 28px; margin-right: 28px; }
.theme-toggle { width: 36px; height: 36px; border-radius: 8px; background: var(--bg-hover); border: 1px solid var(--border); cursor: pointer; display: grid; place-items: center; color: var(--text-muted); transition: var(--transition); flex: none; }
.theme-toggle:hover { color: var(--accent-text); border-color: var(--border-hover); }
.search { position: relative; width: 260px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search input { padding-left: 34px; }

/* ---------- cards ---------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-head h2 { flex: 1; font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { color: var(--text-secondary); }
.card-body { padding: 18px 20px; }
.count-pill { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); background: var(--bg-hover); border-radius: 20px; padding: 1px 8px; }
.empty { color: var(--text-muted); padding: 36px 20px; text-align: center; font-size: 0.875rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; transition: var(--transition); color: inherit; }
.stat-card:hover { border-color: var(--border-hover); background: var(--bg-hover); color: inherit; }
.stat-icon { width: 46px; height: 46px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.stat-icon.yellow { background: var(--accent-bg); color: var(--accent-text); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.blue { background: var(--info-bg); color: var(--info); }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th { padding: 11px 16px; text-align: left; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); background: var(--bg-secondary); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: var(--transition); }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: var(--bg-hover); }
tbody td { padding: 12px 16px; vertical-align: middle; }
tr.clickable { cursor: pointer; }
td.num { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.currency { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* ---------- player bits ---------- */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.who:hover { color: inherit; }
.who-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { font-size: 0.72rem; color: var(--text-muted); }
.avatar { position: relative; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--bg-hover); flex: none; display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; color: var(--text-secondary); }
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar .presence { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--success); border: 2px solid var(--bg-card); }
.avatar.lg .presence { width: 15px; height: 15px; border-width: 3px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.yellow { background: var(--accent-bg); color: var(--accent-text); }
.badge.muted { background: rgba(127, 127, 127, 0.1); color: var(--text-muted); }

.seg { display: inline-flex; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; border-radius: 4px; padding: 4px 11px; background: none; color: var(--text-secondary); font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text-primary); }
.seg button.on { background: var(--accent); color: #0d0e14; }

/* ---------- forms & buttons ---------- */
label.field { display: grid; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
input, select, textarea { width: 100%; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); padding: 8px 12px; font-size: 0.875rem; transition: var(--transition); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:disabled { opacity: 0.55; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
textarea { resize: vertical; min-height: 70px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 0.825rem; font-weight: 600; border: 1px solid var(--border); background: var(--bg-hover); color: var(--text-primary); cursor: pointer; transition: var(--transition); white-space: nowrap; line-height: 1.2; }
.btn:hover { border-color: var(--border-hover); color: var(--accent-text); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0d0e14; }
.btn.primary:hover { background: var(--accent-dark); color: #0d0e14; }
.btn.danger { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.25); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.success { background: var(--success-bg); border-color: rgba(34, 197, 94, 0.25); color: var(--success); }
.btn.success:hover { background: var(--success); color: #fff; }
.btn.warning { background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.25); color: var(--warning); }
.btn.warning:hover { background: var(--warning); color: #0d0e14; }
.btn.sm { padding: 5px 11px; font-size: 0.78rem; }
.btn.icon { width: 32px; height: 32px; padding: 0; color: var(--text-muted); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; display: grid; gap: 2px; }
.alert.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.alert .muted { color: var(--text-secondary); }

/* ---------- feed (recent actions) ---------- */
.feed { display: grid; }
.feed-row { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.feed-row:last-child { border-bottom: 0; }
.feed-row .user-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
.feed-row .text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.feed-row .line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-row .detail { font-size: 0.75rem; color: var(--text-muted); overflow-wrap: anywhere; }
.feed-row .when { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

/* ---------- report cards ---------- */
.q-list { display: grid; }
.q-item { padding: 14px 20px; border-bottom: 1px solid var(--border); display: grid; gap: 6px; }
.q-item:last-child { border-bottom: 0; }
.q-item p { font-size: 0.85rem; color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.q-top { display: flex; align-items: center; gap: 8px; }
.q-top .when { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.quote { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- player page ---------- */
.profile { display: flex; align-items: center; gap: 16px; padding: 20px; flex-wrap: wrap; }
.profile .names { flex: 1; min-width: 240px; display: grid; gap: 4px; }
.profile h1 { font-size: 1.35rem; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta { font-size: 0.8rem; color: var(--text-muted); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.meta b { color: var(--text-primary); font-weight: 600; }
.meta b.accent { color: var(--accent-text); }
.big-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; padding: 22px 20px; text-align: center; }
.big-stats .v { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--accent-text); }
.big-stats .v.plain { color: var(--text-primary); }
.big-stats .l { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }
.stats-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.items { display: grid; gap: 16px; }
.items h3 { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bg-secondary); border: 1px solid var(--border); cursor: pointer; font-size: 0.85rem; font-weight: 500; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: none; }
.check.changed { border-color: var(--accent); }
.rar { margin-left: auto; font-size: 0.68rem; font-weight: 700; }
.rar.Rare { color: var(--info); } .rar.Epic { color: #a78bfa; } .rar.Legendary { color: var(--accent-text); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; font-size: 0.85rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 8px; font-size: 0.75rem; font-weight: 600; }

/* ---------- trends ---------- */
.trends { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trend { padding: 16px 20px 12px; border-right: 1px solid var(--border); display: grid; gap: 10px; min-width: 0; }
.trend:last-child { border-right: 0; }
.trend-head { display: flex; align-items: baseline; gap: 8px; font-size: 0.8rem; }
.trend-head .label { font-weight: 600; color: var(--text-secondary); }
.trend-head .peak { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.plot { position: relative; height: 110px; margin-left: 22px; outline: none; }
.plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plot .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plot .line { fill: none; stroke: var(--chart); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.plot .area { fill: var(--chart); fill-opacity: 0.1; stroke: none; }
.plot .tick { position: absolute; right: calc(100% + 6px); font-size: 0.68rem; color: var(--text-muted); transform: translateY(-50%); line-height: 1; font-variant-numeric: tabular-nums; }
.plot .end-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--chart); box-shadow: 0 0 0 2px var(--bg-card); transform: translate(-50%, -50%); pointer-events: none; }
.plot .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-muted); opacity: 0.6; pointer-events: none; }
.plot .tip { position: absolute; top: -8px; transform: translate(-50%, -100%); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 0.75rem; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow); z-index: 5; }
.plot .tip b { font-size: 0.9rem; }
.plot-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.75rem; color: var(--text-muted); text-align: center; }
.x-axis { display: flex; justify-content: space-between; margin-left: 22px; font-size: 0.68rem; color: var(--text-muted); }
.trend-table { max-height: 300px; overflow: auto; border-top: 1px solid var(--border); }

/* ---------- menu / modal / toast / login ---------- */
.menu { position: absolute; z-index: 150; min-width: 180px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 5px; box-shadow: var(--shadow); display: grid; }
.menu button { text-align: left; background: none; border: 0; color: var(--text-primary); padding: 8px 10px; border-radius: 4px; cursor: pointer; font-size: 0.82rem; font-weight: 500; }
.menu button:hover { background: var(--bg-hover); }
.menu button.bad { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 200; }
.modal { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; width: min(460px, 100%); display: grid; gap: 16px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal h2 { font-size: 1rem; font-weight: 700; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

#toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 300; max-width: calc(100vw - 40px); }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; background: var(--bg-card); border: 1px solid rgba(34, 197, 94, 0.3); color: var(--success); box-shadow: var(--shadow); animation: in 0.15s ease-out; }
.toast.err { border-color: rgba(239, 68, 68, 0.3); color: var(--danger); }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(380px, 100%); padding: 36px 32px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login-logo { display: grid; justify-items: center; gap: 10px; margin-bottom: 8px; }
.login-logo .brand-icon { width: 48px; height: 48px; font-size: 1.3rem; }
.login-logo p { font-size: 0.8rem; color: var(--text-muted); }
.login .btn { padding: 11px; font-size: 0.9rem; }
.error-text { color: var(--danger); font-size: 0.82rem; min-height: 1.2em; }
.loading { color: var(--text-muted); padding: 40px; text-align: center; }

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .trends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend:nth-child(2) { border-right: 0; }
  .trend:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 768px) {
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .shell { flex-direction: column; }
  .sidebar-brand { border-bottom: 0; }
  .sidebar-nav { display: flex; padding: 0; }
  .nav-section-label, .sidebar-status { display: none; }
  .nav-item { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: 10px 14px; }
  .nav-item.active { border-bottom-color: var(--accent); }
  .sidebar-footer { border-top: 0; }
  .user-info { display: none; }
  .main { margin-left: 0; }
  .main > :not(.page-head) { margin-left: 16px; margin-right: 16px; }
  .page-head { padding: 0 16px; }
  .search { width: 100%; }
  .trends { grid-template-columns: 1fr; }
  .trend { border-right: 0; border-bottom: 1px solid var(--border); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- status banners ---------- */
.banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text-primary); border: 1px solid var(--border); flex-wrap: wrap; }
.banner:hover { color: var(--text-primary); filter: brightness(1.1); }
.banner.danger { background: var(--danger-bg); border-color: rgba(239, 68, 68, 0.3); }
.banner.danger svg { color: var(--danger); }
.banner.warning { background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.3); }
.banner.warning svg { color: var(--warning); }
.banner.yellow { background: var(--accent-bg); border-color: var(--border-hover); }
.banner.yellow svg { color: var(--accent-text); }
[hidden] { display: none !important; }

/* report replay */
.modal.replay { width: min(1280px, 100%); max-height: 94vh; padding: 20px; gap: 14px; }
.replay-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; min-height: 0; }
.replay-main { display: grid; gap: 10px; align-content: start; min-width: 0; }
.replay-stage { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.replay-canvas { display: block; width: 100%; height: min(62vh, 560px); cursor: grab; touch-action: none; }
.replay-canvas:active { cursor: grabbing; }
.replay-controls input[type=range] { flex: 1; min-width: 120px; accent-color: var(--accent); }
.replay-time { font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--text-secondary); min-width: 48px; text-align: right; }
.replay-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.replay-legend span { display: inline-flex; align-items: center; gap: 6px; }
.replay-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.replay-dot.sq { border-radius: 2px; }
.replay-side { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 10px; min-height: 0; max-height: min(62vh, 560px); }
.replay-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.replay-stat { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 9px; display: grid; }
.replay-stat span { font-size: 0.7rem; color: var(--text-muted); }
.replay-stat b { font-size: 0.85rem; font-weight: 600; }
.replay-stat.bad { border-color: var(--danger); background: var(--danger-bg); }
.replay-events { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); min-height: 120px; }
.replay-row { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 6px 10px; color: var(--text-primary); font: inherit; font-size: 0.78rem; cursor: pointer; }
.replay-row:hover { background: var(--bg-hover); }
.replay-row.warn { background: var(--danger-bg); }
.replay-row.future { opacity: 0.4; }
.replay-row-t { color: var(--text-muted); font-variant-numeric: tabular-nums; min-width: 44px; }
.replay-row-text { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .replay-body { grid-template-columns: 1fr; }
  .replay-side { max-height: none; }
  .replay-events { max-height: 320px; }
  .replay-canvas { height: 52vh; }
}
