:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1c2430; --muted: #6b7685;
  --line: #e6e9ee; --brand: #0f2a43; --accent: #ff7a18; --active: #eef3f8;
}
[data-theme="dark"] {
  --bg: #0f141b; --panel: #161d27; --ink: #e7ecf2; --muted: #9aa6b2;
  --line: #232c39; --brand: #0b1622; --accent: #ff7a18; --active: #1b2531;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 system-ui, sans-serif; color: var(--ink); background: var(--bg); }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: var(--brand); color: #cdd7e2; display: flex; flex-direction: column; padding: 18px 14px; }
.brand { font-weight: 700; font-size: 18px; color: #fff; margin-bottom: 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { color: #cdd7e2; text-decoration: none; padding: 9px 12px; border-radius: 8px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; font-size: 13px; }
.loc { color: #fff; font-weight: 600; }
.loc-sub { color: #9fb0c2; }
.main { flex: 1; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px; background: var(--panel); border-bottom: 1px solid var(--line); }
.loc-switcher { font-weight: 600; }
.chevron { color: var(--muted); margin-left: 4px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.search { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); min-width: 240px; }
.theme-toggle { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.content { padding: 24px; }
h1 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.cards { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; min-width: 150px; }
.card-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.card-value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 16px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.row input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.badge { padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--active); }
.badge.active { background: #e4f5ea; color: #1a7f43; }
.badge.at_risk { background: #fef0d9; color: #98590a; }
.badge.inactive { background: #f0f1f3; color: #6b7685; }
