/* ═══════════════════════════════════════════════════════
   VOLTIQ ADMIN — Tesla V12 Design System
   Dark monochromatic, white/grey only
═══════════════════════════════════════════════════════ */

:root {
  --sw: 240px;           /* sidebar width */
  --th: 64px;            /* topbar height */

  /* Surfaces */
  --bg:    #090909;
  --s1:    #111111;
  --s2:    #181818;
  --s3:    #202020;
  --s4:    #282828;

  /* Borders */
  --b1: rgba(255,255,255,0.07);
  --b2: rgba(255,255,255,0.12);
  --b3: rgba(255,255,255,0.18);

  /* Text */
  --t1: #f2f2f2;
  --t2: #888888;
  --t3: #555555;
  --t4: #333333;

  /* White */
  --w: #ffffff;

  /* Radius */
  --r1: 6px;
  --r2: 10px;
  --r3: 14px;
  --r4: 18px;
  --rf: 9999px;

  /* Transition */
  --tf: 140ms ease;
  --tm: 200ms ease;
  --ts: 300ms ease;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--t1);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}
a { text-decoration: none; color: inherit; cursor: pointer; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }
input, textarea, select { font-family: var(--font); }
img { display: block; max-width: 100%; }
svg { display: block; }

/* ── APP SHELL ─────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--sw);
  flex-shrink: 0;
  background: var(--s1);
  border-right: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--ts);
  z-index: 100;
  position: relative;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--th);
  border-bottom: 1px solid var(--b1);
  flex-shrink: 0;
}
.logo-mark {
  width: 30px; height: 30px;
  background: var(--w);
  color: var(--bg);
  border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
  letter-spacing: -0.5px;
}
.logo-name { font-size: 14px; font-weight: 700; letter-spacing: -0.3px; color: var(--w); display: block; }
.logo-sub  { font-size: 10px; color: var(--t3); display: block; margin-top: -1px; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 10px;
  display: flex; flex-direction: column; gap: 24px;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--t4);
  padding: 0 10px;
  margin-bottom: 4px;
}

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r2);
  color: var(--t2);
  font-size: 13px; font-weight: 450;
  transition: background var(--tf), color var(--tf);
  user-select: none;
  cursor: pointer;
}
.nav-link:hover   { background: var(--s2); color: var(--t1); }
.nav-link.active  { background: var(--s3); color: var(--w); font-weight: 500; }

.nav-icon { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 1.8; }
.nav-link > span:nth-of-type(1) { flex: 1; }

.nav-count {
  font-size: 11px; color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.nav-live {
  font-size: 10px; font-weight: 600;
  background: rgba(255,255,255,0.12);
  color: var(--w);
  padding: 2px 7px;
  border-radius: var(--rf);
  letter-spacing: .04em;
  animation: livePulse 3s ease infinite;
}
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.sidebar-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--b1);
  flex-shrink: 0;
}
.profile-avatar {
  width: 30px; height: 30px;
  background: var(--s3); border: 1px solid var(--b2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name  { font-size: 12px; font-weight: 500; display: block; }
.profile-email { font-size: 11px; color: var(--t3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-logout {
  width: 28px; height: 28px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  color: var(--t3); transition: background var(--tf), color var(--tf);
}
.profile-logout:hover { background: var(--s3); color: var(--t1); }
.profile-logout svg { width: 14px; height: 14px; }

/* ── OVERLAY ────────────────────────────────────────── */
.overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.55); z-index: 90;
}
.overlay.open { display: block; }

/* ── MAIN ───────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar {
  height: var(--th); flex-shrink: 0;
  border-bottom: 1px solid var(--b1);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 16px;
  background: var(--bg);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.topbar-menu {
  width: 34px; height: 34px; border-radius: var(--r1);
  display: none; align-items: center; justify-content: center;
  color: var(--t2); transition: background var(--tf);
}
.topbar-menu:hover { background: var(--s2); color: var(--t1); }
.topbar-menu svg { width: 18px; height: 18px; }

.page-title-text { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--s1); border: 1px solid var(--b1);
  border-radius: var(--r2); padding: 0 12px;
  height: 36px; width: 300px; transition: border-color var(--tf);
}
.topbar-search:focus-within { border-color: var(--b2); }
.topbar-search svg { width: 14px; height: 14px; color: var(--t3); flex-shrink: 0; }
.topbar-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--t1); font-size: 13px;
}
.topbar-search input::placeholder { color: var(--t3); }

.topbar-btn {
  width: 34px; height: 34px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  color: var(--t2); transition: background var(--tf), color var(--tf);
  position: relative;
}
.topbar-btn:hover { background: var(--s2); color: var(--t1); }
.topbar-btn svg { width: 16px; height: 16px; }
.pos-rel { position: relative; }

.notif-badge {
  position: absolute; top: 3px; right: 3px;
  width: 16px; height: 16px;
  background: var(--w); color: var(--bg);
  border-radius: 50%; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.topbar-avatar {
  width: 30px; height: 30px;
  background: var(--s3); border: 1px solid var(--b2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; cursor: pointer; margin-left: 2px;
}

/* ── CONTENT AREA ───────────────────────────────────── */
.content {
  flex: 1; overflow-y: auto; padding: 24px;
  scrollbar-width: thin; scrollbar-color: var(--b1) transparent;
}
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: var(--b1); border-radius: 2px; }

/* ── PAGE HEADER ────────────────────────────────────── */
.ph {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.ph-left {}
.ph-title { font-size: 20px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.ph-sub   { font-size: 12px; color: var(--t2); margin-top: 4px; }
.ph-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── STAT CARDS ─────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 20px;
}
.stat-card {
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r3);
  padding: 18px 20px; transition: border-color var(--tf);
}
.stat-card:hover { border-color: var(--b2); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--t2); }
.stat-ico {
  width: 30px; height: 30px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
}
.stat-ico svg { width: 14px; height: 14px; color: var(--t2); }
.stat-val { font-size: 26px; font-weight: 700; letter-spacing: -1px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-change {
  font-size: 11px; color: var(--t2);
  margin-top: 6px; display: flex; align-items: center; gap: 4px;
}
.stat-change.up   { color: rgba(255,255,255,.75); }
.stat-change.live { color: var(--w); }

/* ── GRIDS ─────────────────────────────────────────── */
.g2   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.g21  { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.g31  { display: grid; grid-template-columns: 3fr 1fr; gap: 14px; }
.g-col { display: flex; flex-direction: column; gap: 14px; }
.mb14 { margin-bottom: 14px; }
.mb20 { margin-bottom: 20px; }

/* ── CARD ───────────────────────────────────────────── */
.card { background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r3); overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 14px; border-bottom: 1px solid var(--b1);
}
.card-title { font-size: 13px; font-weight: 600; }
.card-sub   { font-size: 11px; color: var(--t2); margin-top: 2px; }
.card-acts  { display: flex; gap: 6px; align-items: center; }
.card-body  { padding: 20px; }
.chart-wrap { padding: 4px 16px 16px; }
.ch200 { height: 200px; }
.ch240 { height: 240px; }
.ch280 { height: 280px; }
.ch320 { height: 320px; }

/* ── TABLE ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--b1) transparent; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 10px 16px;
  font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--t3); border-bottom: 1px solid var(--b1); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--b1); transition: background var(--tf); cursor: default; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--s2); }
td { padding: 11px 16px; color: var(--t1); white-space: nowrap; }
.td-dim  { color: var(--t2); }
.td-mono { font-variant-numeric: tabular-nums; font-size: 12px; font-family: 'SF Mono','Fira Code',monospace; }

/* ── TOOLBAR ────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-bottom: 1px solid var(--b1); flex-wrap: wrap;
}
.toolbar-spacer { flex: 1; }

.srch {
  display: flex; align-items: center; gap: 8px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r2); padding: 0 12px; height: 34px;
  min-width: 200px; flex: 1; max-width: 320px;
  transition: border-color var(--tf);
}
.srch:focus-within { border-color: var(--b2); }
.srch svg { width: 13px; height: 13px; color: var(--t3); flex-shrink: 0; }
.srch input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--t1); font-size: 13px;
}
.srch input::placeholder { color: var(--t3); }

.fsel {
  height: 34px; padding: 0 10px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r2); color: var(--t1); font-size: 12px;
  font-family: var(--font); outline: none; cursor: pointer;
  transition: border-color var(--tf);
}
.fsel:focus { border-color: var(--b2); }
.fsel option { background: var(--s2); }

/* ── PAGINATION ─────────────────────────────────────── */
.pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-top: 1px solid var(--b1);
  font-size: 12px; color: var(--t2);
}
.pager-btns { display: flex; gap: 4px; }
.pager-btn {
  width: 30px; height: 30px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  background: var(--s2); border: 1px solid var(--b1);
  color: var(--t2); font-size: 12px; transition: var(--tf);
}
.pager-btn:hover  { border-color: var(--b2); color: var(--t1); }
.pager-btn.active { background: var(--w); color: var(--bg); border-color: var(--w); }
.pager-btn svg    { width: 13px; height: 13px; }

/* ── BADGES ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: var(--rf);
  font-size: 11px; font-weight: 500; border: 1px solid transparent;
}
.b-premium  { background: rgba(255,255,255,.13); color: var(--w); border-color: rgba(255,255,255,.15); }
.b-free     { background: transparent; color: var(--t2); border-color: var(--b1); }
.b-active   { background: rgba(255,255,255,.09); color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.1); }
.b-inactive { background: transparent; color: var(--t3); border-color: var(--b1); }
.b-online   { background: rgba(255,255,255,.12); color: var(--w); }
.b-offline  { background: transparent; color: var(--t3); border-color: var(--b1); }
.b-inuse    { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.1); }
.b-warn     { background: rgba(255,255,255,.05); color: var(--t2); border-color: var(--b1); }
.b-info     { background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.08); }
.b-error    { background: rgba(255,255,255,.04); color: var(--t3); border-color: var(--b1); }
.b-cancel   { background: transparent; color: var(--t3); border-color: var(--b1); }
.b-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--r2);
  font-size: 13px; font-weight: 500;
  transition: background var(--tf), opacity var(--tf), border-color var(--tf);
  cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn-p { background: var(--w); color: var(--bg); }
.btn-p:hover { background: rgba(255,255,255,.88); }
.btn-s { background: var(--s2); color: var(--t1); border-color: var(--b1); }
.btn-s:hover { background: var(--s3); border-color: var(--b2); }
.btn-g { background: transparent; color: var(--t2); }
.btn-g:hover { background: var(--s2); color: var(--t1); }
.btn-d { background: rgba(255,255,255,.06); color: var(--t2); border-color: var(--b1); }
.btn-d:hover { background: rgba(255,255,255,.1); color: var(--w); }
.btn svg { width: 14px; height: 14px; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-sm svg { width: 12px; height: 12px; }
.btn-ico {
  width: 30px; height: 30px; padding: 0;
  border-radius: var(--r1); justify-content: center;
}
.btn-ico svg { width: 13px; height: 13px; }

/* ── AVATAR ─────────────────────────────────────────── */
.av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--s3); border: 1px solid var(--b1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.av-lg { width: 38px; height: 38px; font-size: 14px; }

.uc { display: flex; align-items: center; gap: 10px; }
.uc-name  { font-size: 13px; font-weight: 500; }
.uc-email { font-size: 11px; color: var(--t2); }

/* ── ACTIVITY FEED ───────────────────────────────────── */
.feed-item {
  display: flex; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--b1);
}
.feed-item:last-child { border-bottom: none; padding-bottom: 0; }
.feed-ico {
  width: 30px; height: 30px; border-radius: var(--r1);
  background: var(--s2); border: 1px solid var(--b1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feed-ico svg { width: 13px; height: 13px; color: var(--t2); }
.feed-body { flex: 1; min-width: 0; }
.feed-text { font-size: 12.5px; line-height: 1.4; }
.feed-text strong { font-weight: 500; }
.feed-time { font-size: 11px; color: var(--t3); margin-top: 2px; }

/* ── FORMS ─────────────────────────────────────────── */
.fg { margin-bottom: 16px; }
.flabel {
  display: block; font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--t2); margin-bottom: 6px;
}
.finput {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r2); color: var(--t1); font-size: 13px;
  font-family: var(--font); outline: none; transition: border-color var(--tf);
}
.finput:focus { border-color: var(--b2); }
.ftarea {
  width: 100%; padding: 10px 12px; min-height: 90px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r2); color: var(--t1); font-size: 13px;
  font-family: var(--font); outline: none; resize: vertical;
  transition: border-color var(--tf);
}
.ftarea:focus { border-color: var(--b2); }
.fsel2 {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--s2); border: 1px solid var(--b1);
  border-radius: var(--r2); color: var(--t1); font-size: 13px;
  font-family: var(--font); outline: none; cursor: pointer;
}
.fsel2 option { background: var(--s2); }
.fhint { font-size: 11px; color: var(--t3); margin-top: 4px; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── TOGGLE ─────────────────────────────────────────── */
.trow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--b1);
}
.trow:last-child { border-bottom: none; }
.trow-left {}
.trow-label { font-size: 13px; font-weight: 500; }
.trow-desc  { font-size: 11px; color: var(--t2); margin-top: 2px; }
.tog {
  width: 38px; height: 21px; border-radius: var(--rf);
  background: var(--s3); border: 1px solid var(--b1);
  position: relative; cursor: pointer; transition: background var(--tm), border-color var(--tm);
  flex-shrink: 0;
}
.tog.on { background: var(--w); border-color: var(--w); }
.tog::after {
  content: ''; position: absolute;
  top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--t3);
  transition: left var(--tm), background var(--tm);
}
.tog.on::after { left: 19px; background: var(--bg); }

/* ── LIVE DOT ────────────────────────────────────────── */
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--t2);
}
.live-dot::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--w); animation: lp 2s ease infinite;
}
@keyframes lp { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── PROGRESS ────────────────────────────────────────── */
.prog { height: 4px; background: var(--s3); border-radius: var(--rf); overflow: hidden; }
.prog-fill { height: 100%; background: var(--w); border-radius: var(--rf); transition: width .6s ease; }
.prog-fill.dim { background: rgba(255,255,255,.3); }

/* ── TABS ─────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--b1); padding: 0 20px; }
.tab {
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: var(--t2); border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer; transition: color var(--tf);
}
.tab:hover { color: var(--t1); }
.tab.active { color: var(--w); border-bottom-color: var(--w); }

/* ── MODAL ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--s1); border: 1px solid var(--b2);
  border-radius: var(--r4);
  width: 100%; max-width: 540px; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  animation: min .2s ease;
}
@keyframes min { from{opacity:0;transform:scale(.97) translateY(10px)} to{opacity:1;transform:none} }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--b1);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close-btn {
  width: 28px; height: 28px; border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  color: var(--t2); transition: background var(--tf);
}
.modal-close-btn:hover { background: var(--s2); color: var(--t1); }
.modal-close-btn svg { width: 15px; height: 15px; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px; border-top: 1px solid var(--b1);
}

/* ── TOASTS ─────────────────────────────────────────── */
.toast-stack {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 2000;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--s2); border: 1px solid var(--b2);
  border-radius: var(--r2); font-size: 13px;
  min-width: 240px; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: tin .2s ease;
}
@keyframes tin { from{opacity:0;transform:translateX(12px)} to{opacity:1;transform:none} }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--t2); }
.toast-msg { flex: 1; }
.toast-x {
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r1); color: var(--t3); cursor: pointer;
}
.toast-x:hover { color: var(--t1); }
.toast-x svg { width: 12px; height: 12px; }

/* ── LOADING / EMPTY ─────────────────────────────────── */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; height: 220px; gap: 12px; color: var(--t2);
}
.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--b1); border-top-color: var(--t2);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to{transform:rotate(360deg)} }
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 48px 24px;
  color: var(--t3); gap: 12px; text-align: center;
}
.empty-state svg { width: 36px; height: 36px; opacity: .35; }
.empty-state p { font-size: 13px; }

/* ── STATUS BANNER ───────────────────────────────────── */
.status-banner {
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r3);
  padding: 14px 20px; display: flex; align-items: center; gap: 24px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.sbi { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sbi strong { font-variant-numeric: tabular-nums; }
.sbi-div { width: 1px; height: 16px; background: var(--b1); }

/* ── CODE ─────────────────────────────────────────────── */
.code {
  font-family: 'SF Mono','Fira Code','Consolas',monospace; font-size: 11.5px;
  background: var(--s3); border: 1px solid var(--b1); border-radius: var(--r1);
  padding: 2px 6px;
}

/* ── DIVIDER ─────────────────────────────────────────── */
.div { height: 1px; background: var(--b1); margin: 16px 0; }

/* ── SECTION TITLE ───────────────────────────────────── */
.sec-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t3); margin-bottom: 12px; }

/* ── MAP PLACEHOLDER ─────────────────────────────────── */
.map-ph {
  background: var(--s2); border-radius: var(--r2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--t3); height: 100%; min-height: 200px;
}
.map-ph svg { width: 32px; height: 32px; opacity: .4; }
.map-ph p { font-size: 12px; }

/* ── SPINNING REFRESH ─────────────────────────────────── */
.spin-anim { animation: spin .7s linear infinite; }

/* ──────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .g31 { grid-template-columns: 1fr; }
  .g21 { grid-template-columns: 1fr; }
  .g3  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .topbar-search { display: none; }
  .g2 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    transform: translateX(-100%); z-index: 100;
  }
  .sidebar.open { transform: translateX(0); }
  .overlay.open { display: block; }
  .topbar-menu { display: flex; }
  .stats-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .ph { flex-direction: column; align-items: stretch; }
  .frow { grid-template-columns: 1fr; }
  .modal-box { max-width: 100%; border-radius: var(--r3); }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: auto; }
}

/* ── LOGIN SCREEN ────────────────────────────────────── */
.login-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: none; align-items: center; justify-content: center;
}
.login-screen.show { display: flex; }
.login-box {
  width: 100%; max-width: 380px;
  background: var(--s1); border: 1px solid var(--b2);
  border-radius: var(--r4); padding: 32px 28px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}
.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.login-error {
  background: rgba(255,255,255,.05); border: 1px solid var(--b2);
  border-radius: var(--r2); padding: 10px 14px;
  font-size: 12px; color: var(--t2); margin-bottom: 16px;
}
/* ── SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--b1); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--b2); }
