/* ================================================================
   Smart WiFi Tag Portal — Ultra Modern Design v4
   Deep Blue-Grey Base · Orange Brand · Semantic Status Colors
   Full Mobile-First · No Inner Scroll Traps · Fluid Layouts
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  /* Background layers */
  --bg:      #0D1117;
  --bg2:     #0F1420;
  --bg3:     #161B27;
  --bg4:     #1C2333;
  --bg5:     #21293A;

  /* Surface / glass */
  --surface:  rgba(255,255,255,0.04);
  --surface-h:rgba(255,255,255,0.07);
  --border:   rgba(255,255,255,0.08);
  --border-h: rgba(255,255,255,0.16);
  --border-light: rgba(255,255,255,0.06);

  /* Text */
  --text:  #F0F6FC;
  --text2: #B0BAC5;
  --text3: #6E7681;

  /* ── Brand color ── */
  --orange:      #F97316;
  --orange-h:    #FB923C;
  --orange-d:    #EA580C;
  --orange-dim:  rgba(249,115,22,0.12);
  --orange-glow: rgba(249,115,22,0.25);

  /* ── Semantic status colors ── */
  --emerald:     #10B981;
  --emerald-dim: rgba(16,185,129,0.12);
  --amber:       #F59E0B;
  --amber-dim:   rgba(245,158,11,0.12);
  --red:         #EF4444;
  --red-dim:     rgba(239,68,68,0.12);
  --blue:        #3B82F6;
  --blue-dim:    rgba(59,130,246,0.12);
  --purple:      #8B5CF6;
  --purple-dim:  rgba(139,92,246,0.12);

  /* ── Backward-compat aliases ── */
  --yellow:      var(--amber);
  --yellow-dim:  var(--amber-dim);
  --green:       var(--emerald);
  --green-bright:var(--emerald);
  --blue-bright: var(--blue);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-head: 'Inter', sans-serif;

  /* Layout */
  --sidebar-w:  252px;
  --header-h:   56px;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-xs:  5px;
  --shadow:     0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.6);
  --transition: 0.15s ease;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.005em;
  overflow-x: hidden;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-h); }
img { max-width: 100%; }

/* Ambient radial glow */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 35% at 12% 0%,  rgba(249,115,22,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 88% 100%,rgba(139,92,246,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(59,130,246,0.03) 0%, transparent 65%);
}

/* ── Layout ──────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 1000; transition: transform .28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #FB923C 0%, #EA580C 60%, #C2410C 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px var(--orange-glow), inset 0 1px 0 rgba(255,255,255,.25);
  position: relative; overflow: hidden;
}
.logo-mark::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35) 0%, transparent 60%);
  pointer-events: none;
}
.logo-mark svg { width: 17px; height: 17px; color: #fff; }
.logo-text {
  font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -.2px; line-height: 1.2;
}
.logo-sub {
  font-size: 10px; color: var(--orange);
  letter-spacing: 1px; text-transform: uppercase; margin-top: 2px;
  font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.nav-section {
  font-size: 10px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 12px 8px 5px; user-select: none;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; color: var(--text2);
  font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  border: none; background: none; width: 100%;
  text-align: left; text-decoration: none; margin-bottom: 3px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.nav-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  transition: all var(--transition);
}
.nav-icon[data-tint="blue"]    { color: #60A5FA; background: rgba(96,165,250,.08); border-color: rgba(96,165,250,.2); }
.nav-icon[data-tint="emerald"] { color: #34D399; background: rgba(52,211,153,.08); border-color: rgba(52,211,153,.2); }
.nav-icon[data-tint="orange"]  { color: #FB923C; background: rgba(251,146,60,.08); border-color: rgba(251,146,60,.2); }
.nav-icon[data-tint="violet"]  { color: #A78BFA; background: rgba(167,139,250,.08); border-color: rgba(167,139,250,.2); }
.nav-icon[data-tint="cyan"]    { color: #22D3EE; background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.2); }
.nav-icon[data-tint="amber"]   { color: #FBBF24; background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.2); }
.nav-icon[data-tint="slate"]   { color: var(--text3); }
.nav-item-text { flex: 1; min-width: 0; line-height: 1.2; }
.nav-item-label { display: block; }
.nav-item-desc {
  display: block; font-size: 10.5px; font-weight: 450;
  color: var(--text3); margin-top: 2px; letter-spacing: 0;
  text-transform: none;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item:hover .nav-icon { border-color: var(--border-h); transform: translateY(-1px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(249,115,22,0.16) 0%, rgba(249,115,22,0.03) 100%);
  color: var(--text); font-weight: 600;
}
.nav-item.active .nav-icon {
  color: var(--orange-h);
  background: rgba(249,115,22,.14);
  border-color: rgba(249,115,22,.4);
  box-shadow: 0 4px 14px rgba(249,115,22,.15);
}
.nav-item.active .nav-item-desc { color: rgba(251,146,60,.75); }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 3px;
  background: linear-gradient(180deg, var(--orange-h) 0%, var(--orange-d) 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--orange-glow);
}
.nav-item.nav-item--danger { margin-top: 4px; }
.nav-item.nav-item--danger:hover { background: rgba(239,68,68,.08); color: #FCA5A5; }
.nav-item.nav-item--danger .nav-icon { color: #F87171; background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.22); }
.nav-item.nav-featured {
  background: linear-gradient(135deg, rgba(52,211,153,.06) 0%, transparent 70%);
  border: 1px solid rgba(52,211,153,.12);
  margin-bottom: 6px;
}
.nav-item.nav-featured.active {
  border-color: rgba(249,115,22,.25);
  background: linear-gradient(135deg, rgba(249,115,22,.12) 0%, rgba(52,211,153,.04) 100%);
}
.nav-badge {
  margin-left: auto; background: var(--amber); color: #000;
  border-radius: 20px; padding: 1px 6px;
  font-size: 10px; font-weight: 800; line-height: 1.7;
}
.nav-badge.red { background: var(--red); color: #fff; }

.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); flex-shrink: 0; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color var(--transition);
}
.user-chip:hover { border-color: var(--border-h); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange-h) 0%, var(--orange-d) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  flex-shrink: 0; font-style: normal;
  box-shadow: 0 4px 10px var(--orange-glow);
}
.user-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.user-meta { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ── Topbar ──────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-height: 100vh;
  width: calc(100% - var(--sidebar-w));
  position: relative; z-index: 1;
}

.topbar {
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(13,17,23,0.95) 0%, rgba(13,17,23,0.88) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  flex-shrink: 0;
}
.topbar-title {
  font-size: 16px; font-weight: 700;
  background: linear-gradient(180deg, var(--text) 0%, var(--text2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -.3px;
}
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* Hamburger button */
.hamburger-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px;
  cursor: pointer;
  color: var(--text);
  align-items: center; justify-content: center;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.hamburger-btn:hover, .hamburger-btn:active {
  background: var(--orange-dim); border-color: var(--orange); color: var(--orange);
}

/* Sidebar overlay */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 950; animation: fadeIn .2s ease;
}
.sidebar-overlay.open { display: block; }

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 6px var(--emerald);
  animation: livePulse 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes livePulse {
  0%,100% { opacity: 1; box-shadow: 0 0 6px var(--emerald); }
  50%      { opacity: .6; box-shadow: 0 0 14px var(--emerald); }
}

/* Language dropdown */
.lang-drop { position: relative; }
.lang-trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; font-size: 13px; color: var(--text2); font-weight: 600;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.lang-trigger:hover { border-color: var(--orange); background: var(--orange-dim); color: var(--text); }
.lang-flag { font-size: 1rem; line-height: 1; }
.lang-code { font-weight: 700; font-size: 12px; letter-spacing: .5px; }
.lang-arrow { font-size: 10px; color: var(--text3); transition: transform .15s; }
.lang-drop.open .lang-arrow { transform: rotate(180deg); color: var(--orange); }
.lang-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 140px; background: var(--bg4); border: 1px solid var(--border-h);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  overflow: hidden; z-index: 400;
}
.lang-drop.open .lang-menu { display: block; animation: fadeIn .12s ease; }
.lang-option {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px; cursor: pointer; transition: background var(--transition);
  border: none; background: none; width: 100%; text-align: left;
  font-size: 13px; color: var(--text2); font-family: var(--font-body);
}
.lang-option:hover { background: var(--surface-h); color: var(--text); }
.lang-option.active { color: var(--orange); font-weight: 600; }

/* Page body */
.page-body {
  padding: 22px 28px 48px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  animation: pageFadeIn .3s ease;
  overflow-x: hidden;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(155deg, var(--bg3) 0%, var(--bg4) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color .2s, box-shadow .25s;
  animation: pageFadeIn .35s ease backwards;
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: var(--border-h); box-shadow: 0 8px 24px -12px rgba(0,0,0,.5); }
.card > * { position: relative; z-index: 1; }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.card-title {
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.2px;
}
.card-title-lg {
  font-size: 14px; font-weight: 700; color: var(--text);
  letter-spacing: -.2px;
}
.card-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s;
}
.card-icon svg { width: 15px; height: 15px; }
.card-icon.orange { background: var(--orange-dim); border-color: rgba(249,115,22,0.2); color: var(--orange); }
.card-icon.emerald { background: var(--emerald-dim); border-color: rgba(16,185,129,0.2); color: var(--emerald); }
.card-icon.amber { background: var(--amber-dim); border-color: rgba(245,158,11,0.2); color: var(--amber); }
.card-icon.red { background: var(--red-dim); border-color: rgba(239,68,68,0.2); color: var(--red); }
.card-icon.blue { background: var(--blue-dim); border-color: rgba(59,130,246,0.2); color: var(--blue); }
.card-icon.purple { background: var(--purple-dim); border-color: rgba(139,92,246,0.2); color: var(--purple); }

/* ── KPI Cards ─────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.kpi-card {
  --kc:      var(--orange);
  --kc-dim:  var(--orange-dim);
  --kc-glow: var(--orange-glow);
  background: linear-gradient(145deg, var(--bg3) 0%, var(--bg4) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(0.4,0,0.2,1), border-color .2s, box-shadow .25s;
  animation: kpiSlideIn .4s cubic-bezier(0.34,1.4,0.64,1) backwards;
  cursor: default;
}
.kpi-card:nth-child(1) { animation-delay: 0.00s; }
.kpi-card:nth-child(2) { animation-delay: 0.05s; }
.kpi-card:nth-child(3) { animation-delay: 0.10s; }
.kpi-card:nth-child(4) { animation-delay: 0.15s; }
.kpi-card:nth-child(5) { animation-delay: 0.20s; }
.kpi-card:nth-child(6) { animation-delay: 0.25s; }
@keyframes kpiSlideIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--kc) 0%, var(--kc) 35%, transparent 100%);
  border-radius: 14px 14px 0 0;
}
.kpi-card::after {
  content: ''; position: absolute; top: -40%; right: -25%;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, var(--kc-dim) 0%, transparent 65%);
  opacity: .8; pointer-events: none;
  transition: transform .5s, opacity .5s;
}
.kpi-card:hover { border-color: var(--kc); transform: translateY(-3px); box-shadow: 0 14px 28px -10px var(--kc-glow); }
.kpi-card:hover::after { transform: scale(1.4); opacity: 1; }

.kpi-card.orange,  .kpi-card.accent { --kc: var(--orange);  --kc-dim: var(--orange-dim);  --kc-glow: var(--orange-glow); }
.kpi-card.emerald, .kpi-card.green  { --kc: var(--emerald); --kc-dim: var(--emerald-dim); --kc-glow: rgba(16,185,129,.35); }
.kpi-card.amber,   .kpi-card.yellow { --kc: var(--amber);   --kc-dim: var(--amber-dim);   --kc-glow: rgba(245,158,11,.35); }
.kpi-card.red                       { --kc: var(--red);     --kc-dim: var(--red-dim);     --kc-glow: rgba(239,68,68,.35); }
.kpi-card.blue                      { --kc: var(--blue);    --kc-dim: var(--blue-dim);    --kc-glow: rgba(59,130,246,.35); }
.kpi-card.purple                    { --kc: var(--purple);  --kc-dim: var(--purple-dim);  --kc-glow: rgba(139,92,246,.35); }

.kpi-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  background: var(--kc-dim); border: 1px solid var(--kc);
  color: var(--kc); position: relative; z-index: 1;
  box-shadow: 0 4px 12px -4px var(--kc-glow);
  transition: transform .3s cubic-bezier(0.34,1.56,0.64,1);
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-card:hover .kpi-icon { transform: scale(1.1) rotate(-4deg); }

.kpi-value {
  font-size: 2.2rem; font-weight: 800; color: var(--text);
  line-height: 1; letter-spacing: -.04em; margin-bottom: 6px;
  font-variant-numeric: tabular-nums; position: relative; z-index: 1;
}
.kpi-card.orange  .kpi-value, .kpi-card.accent .kpi-value { color: #FB923C; }
.kpi-card.emerald .kpi-value, .kpi-card.green  .kpi-value { color: #34D399; }
.kpi-card.amber   .kpi-value, .kpi-card.yellow .kpi-value { color: #FBBF24; }
.kpi-card.red     .kpi-value { color: #F87171; }
.kpi-card.blue    .kpi-value { color: #60A5FA; }
.kpi-card.purple  .kpi-value { color: #A78BFA; }

.kpi-label {
  font-size: 11px; color: var(--text3); text-transform: uppercase;
  letter-spacing: 1px; font-weight: 600; position: relative; z-index: 1;
  line-height: 1.3;
}

/* KPI sub-value (trend) */
.kpi-trend {
  position: relative; z-index: 1;
  font-size: 11px; font-weight: 600; margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}
.kpi-trend.up   { color: var(--emerald); }
.kpi-trend.down { color: var(--red); }
.kpi-trend.same { color: var(--text3); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent; line-height: 1.4;
  white-space: nowrap; text-decoration: none; letter-spacing: -.1px;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary {
  background: linear-gradient(135deg, var(--orange-h) 0%, var(--orange-d) 100%);
  color: #fff; border-color: var(--orange);
  box-shadow: 0 4px 14px -2px var(--orange-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.2) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
}
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 24px -4px var(--orange-glow); }
.btn-primary:hover::before { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--bg4); color: var(--text2); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-h); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text2); border-color: transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-outline { background: transparent; color: var(--orange); border-color: rgba(249,115,22,0.3); }
.btn-outline:hover { background: var(--orange-dim); border-color: var(--orange); }
.btn-success { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(16,185,129,0.3); }
.btn-success:hover { background: rgba(16,185,129,0.2); }
.btn-danger { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm  { padding: 5px 11px; font-size: 12px; }
.btn-xs  { padding: 3px 8px;  font-size: 11px; }
.btn-icon { padding: 6px; border-radius: var(--radius-xs); }
.btn-lg  { padding: 11px 20px; font-size: 14.5px; }

/* ── Badges ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  border: 1px solid transparent; line-height: 1.6;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
.badge-active    { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(16,185,129,0.25); }
.badge-suspicious{ background: var(--amber-dim);   color: var(--amber);   border-color: rgba(245,158,11,0.3);
  animation: suspPulse 2.5s ease-in-out infinite; }
.badge-missing   { background: var(--red-dim);     color: var(--red);     border-color: rgba(239,68,68,0.25); }
.badge-checked_out { background: var(--blue-dim);  color: var(--blue);    border-color: rgba(59,130,246,0.25); }
.badge-transit,.badge-in_transit { background: var(--purple-dim); color: var(--purple); border-color: rgba(139,92,246,0.25); }
.badge-never,.badge-never_seen { background: var(--surface); color: var(--text3); border-color: var(--border); }
.badge-orange { background: var(--orange-dim); color: var(--orange-h); border-color: rgba(249,115,22,0.25); }
.badge-green  { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(16,185,129,0.25); }
.badge-emerald { background: var(--emerald-dim); color: var(--emerald); border-color: rgba(16,185,129,0.25); }
.badge-amber,.badge-warn { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,0.25); }
.badge-red    { background: var(--red-dim); color: var(--red); border-color: rgba(239,68,68,0.2); }
.badge-blue,.badge-info { background: var(--blue-dim); color: var(--blue); border-color: rgba(59,130,246,0.2); }

@keyframes suspPulse   { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 8px rgba(245,158,11,.4)} }
@keyframes transitGlow { from{border-color:rgba(139,92,246,.2)} to{border-color:rgba(139,92,246,.5)} }

/* ── Status dots ─────────────────────────────────────────────────── */
.status-dot, .dev-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text3);
}
.status-dot.active, .dev-dot.active   { background: var(--emerald); box-shadow: 0 0 6px rgba(16,185,129,.6); }
.status-dot.suspicious, .dev-dot.suspicious { background: var(--amber); animation: suspPulse 2s ease-in-out infinite; }
.status-dot.missing, .dev-dot.missing { background: var(--red); }
.status-dot.checked_out, .dev-dot.checked_out { background: var(--blue); }
.status-dot.in_transit, .dev-dot.in_transit { background: var(--purple); }
.status-dot.never_seen, .dev-dot.never_seen { background: var(--text3); }

/* ── Forms ───────────────────────────────────────────────────────── */
input, textarea, select {
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: var(--font-body); font-size: 14px; padding: 10px 13px;
  transition: border-color .15s, box-shadow .15s;
  outline: none; width: 100%;
  -webkit-appearance: none;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
select option { background: var(--bg4); color: var(--text); }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px;
}
.form-hint { font-size: 12px; color: var(--text3); margin-top: 5px; line-height: 1.5; }

/* Input group */
.input-group { position: relative; }
.input-group-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--text3);
}
.input-group input { padding-left: 34px; }

/* ── Tables ──────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
.table-wrap::-webkit-scrollbar { height: 4px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
thead tr { border-bottom: 1px solid var(--border); }
th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1.1px; white-space: nowrap;
  background: rgba(255,255,255,.015); position: sticky; top: 0;
}
td {
  padding: 13px 16px; font-size: 13.5px; color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
td:first-child { color: var(--text); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; cursor: pointer; }
tbody tr:hover td { background: rgba(249,115,22,0.04); }
.text-mono { font-family: var(--font-mono); font-size: 11px; color: var(--text3); }

/* ── Battery ─────────────────────────────────────────────────────── */
.batt-wrap { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.batt-bar { width: 36px; height: 6px; border-radius: 3px; background: var(--bg5); overflow: hidden; }
.batt-fill { height: 100%; border-radius: 3px; transition: width .5s; }
.batt-fill.high   { background: var(--emerald); }
.batt-fill.medium { background: var(--amber); }
.batt-fill.low    { background: var(--red); animation: battFlash 1.5s ease-in-out infinite; }
@keyframes battFlash { 0%,100%{opacity:1} 50%{opacity:.35} }
.batt-pct { font-size: 11px; color: var(--text3); font-variant-numeric: tabular-nums; }

.batt-progress-track { height: 5px; background: var(--bg5); border-radius: 3px; overflow: hidden; min-width: 50px; }
.batt-progress-fill { height: 100%; border-radius: 3px; transition: width .6s ease; }
.batt-progress-fill.high   { background: var(--emerald); }
.batt-progress-fill.medium { background: var(--amber); }
.batt-progress-fill.low    { background: var(--red); animation: battFlash 1.5s ease-in-out infinite; }

/* ── Device list row ─────────────────────────────────────────────── */
.dev-list { display: flex; flex-direction: column; }
.dev-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px; border-bottom: 1px solid rgba(255,255,255,0.035);
  transition: background .15s; cursor: pointer; position: relative;
}
.dev-row::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 0; background: var(--orange); transition: width .2s; border-radius: 0 2px 2px 0;
}
.dev-row:last-child { border-bottom: none; }
.dev-row:hover { background: linear-gradient(90deg, rgba(249,115,22,.06) 0%, transparent 60%); }
.dev-row:hover::before { width: 3px; }
.dev-name { flex: 1; min-width: 0; }
.dev-name strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-name span { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dev-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Timeline ────────────────────────────────────────────────────── */
.timeline { padding: 4px 0; }
.timeline-item {
  display: flex; gap: 12px; padding: 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; color: var(--orange);
}
.timeline-dot svg { width: 12px; height: 12px; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-name { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.timeline-time { font-size: 11px; color: var(--text3); flex-shrink: 0; padding-top: 2px; white-space: nowrap; }

/* ── Location tile ───────────────────────────────────────────────── */
.loc-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.035);
  transition: background var(--transition);
}
.loc-tile:last-child { border-bottom: none; }
.loc-tile:hover { background: var(--surface); }
.loc-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--orange-dim); border: 1px solid rgba(249,115,22,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); font-size: 18px;
}
.loc-icon svg { width: 16px; height: 16px; }
.loc-info { flex: 1; min-width: 0; }
.loc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.loc-ap   { font-size: 11px; color: var(--text3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loc-counts { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  z-index: 500; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn .16s ease; }
.modal-card {
  background: linear-gradient(155deg, var(--bg4) 0%, var(--bg3) 100%);
  border: 1px solid var(--border-h);
  border-radius: 16px; padding: 24px;
  width: 100%; max-width: 520px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  max-height: calc(100vh - 32px); overflow-y: auto;
  animation: slideUp .25s cubic-bezier(0.34,1.4,0.64,1);
}
.modal-card::-webkit-scrollbar { width: 5px; }
.modal-card::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
.modal-box {
  background: linear-gradient(155deg, var(--bg4) 0%, var(--bg3) 100%);
  border: 1px solid var(--border-h);
  border-radius: 16px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  max-height: calc(100vh - 32px); overflow-y: auto;
  animation: slideUp .25s cubic-bezier(0.34,1.4,0.64,1);
}
.modal-box::-webkit-scrollbar { width: 5px; }
.modal-box::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--text);
  position: sticky; top: 0; background: var(--bg4); z-index: 2;
}
.modal-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px; letter-spacing: -.2px;
}
.modal-body { padding: 20px 22px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 22px; border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: var(--bg3); z-index: 2;
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.alert-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; margin-bottom: 16px;
}
.alert-warn    { background: var(--amber-dim);   border: 1px solid rgba(245,158,11,.3); color: var(--amber); }
.alert-error   { background: var(--red-dim);     border: 1px solid rgba(239,68,68,.3);  color: var(--red); }
.alert-info    { background: var(--blue-dim);    border: 1px solid rgba(59,130,246,.3); color: var(--blue); }
.alert-success { background: var(--emerald-dim); border: 1px solid rgba(16,185,129,.3); color: var(--emerald); }

/* ── Toast ───────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  z-index: 9999; opacity: 0; transform: translateY(20px) scale(.94);
  transition: all .3s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
  display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 48px);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { background: linear-gradient(135deg, rgba(16,185,129,.95), rgba(5,150,105,.95)); color: #fff; border: 1px solid rgba(16,185,129,.5); }
.toast-error   { background: linear-gradient(135deg, rgba(239,68,68,.95), rgba(220,38,38,.95)); color: #fff; border: 1px solid rgba(239,68,68,.5); }
.toast-warn    { background: linear-gradient(135deg, rgba(245,158,11,.95), rgba(217,119,6,.95)); color: #fff; border: 1px solid rgba(245,158,11,.5); }

/* ── Spinner ─────────────────────────────────────────────────────── */
.spinner {
  border: 2px solid var(--border); border-top-color: var(--orange);
  border-right-color: var(--orange-h);
  border-radius: 50%; width: 24px; height: 24px;
  animation: spin .8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  flex-shrink: 0;
}
.spinner-sm { width: 16px; height: 16px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; align-items: center; justify-content: center; padding: 40px; gap: 12px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text2); }
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; line-height: 1.7; }
.empty-state a { font-weight: 600; }

/* ── Tabs ────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { height: 0; }
.tab-btn {
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: var(--text3); background: none; border: none;
  cursor: pointer; transition: all var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: var(--font-body); white-space: nowrap; flex-shrink: 0;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── WiFi rings ──────────────────────────────────────────────────── */
.wifi-rings {
  position: relative; width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.wifi-ring {
  position: absolute; border-radius: 50%;
  border: 1.5px solid var(--orange); opacity: 0;
  animation: wifiPulse 2.4s ease-out infinite;
}
.wifi-ring.ring-1 { width: 90px; height: 90px; animation-delay: 0s; }
.wifi-ring.ring-2 { width: 58px; height: 58px; animation-delay: .55s; }
.wifi-ring.ring-3 { width: 30px; height: 30px; animation-delay: 1.1s; }
.wifi-center {
  width: 11px; height: 11px; background: var(--orange); border-radius: 50%;
  box-shadow: 0 0 10px rgba(249,115,22,.7); z-index: 2;
  animation: wifiDot 2.4s ease-in-out infinite;
}
.wifi-rings.offline .wifi-ring    { border-color: var(--text3); animation-play-state: paused; opacity: .15; }
.wifi-rings.offline .wifi-center  { background: var(--text3); box-shadow: none; }
.wifi-rings.suspicious .wifi-ring { border-color: var(--amber); }
.wifi-rings.suspicious .wifi-center { background: var(--amber); }
.wifi-rings.in_transit .wifi-ring { border-color: var(--purple); }
.wifi-rings.in_transit .wifi-center { background: var(--purple); }
.wifi-rings.checked_out .wifi-ring { border-color: var(--blue); animation-play-state: paused; opacity: .2; }
.wifi-rings.checked_out .wifi-center { background: var(--blue); box-shadow: none; }
@keyframes wifiPulse { 0%{opacity:.7;transform:scale(.55)} 70%{opacity:.1} 100%{opacity:0;transform:scale(1.05)} }
@keyframes wifiDot   { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }

/* ── Signal bars ─────────────────────────────────────────────────── */
.signal-bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.signal-bar { width: 4px; border-radius: 2px; background: rgba(255,255,255,.08); }
.signal-bar.b1{height:4px} .signal-bar.b2{height:7px} .signal-bar.b3{height:10px} .signal-bar.b4{height:14px}
.signal-bar.filled { background: var(--emerald); }
.signal-bar.filled.warn { background: var(--amber); }
.signal-bar.filled.weak { background: var(--red); }

/* ── Products ────────────────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 14px; }
.product-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all var(--transition); cursor: pointer; color: inherit;
  text-decoration: none;
}
.product-card:hover { border-color: var(--border-h); transform: translateY(-2px); box-shadow: var(--shadow); }
.product-card-img { width: 100%; aspect-ratio: 4/3; object-fit: contain; padding: 6px; box-sizing: border-box; background: var(--bg5); }
.product-card-body { padding: 12px; }
.product-card-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--text); }
.product-photo { width: 38px; height: 38px; border-radius: 7px; object-fit: contain; background: var(--bg3); border: 1px solid var(--border); flex-shrink: 0; }
.product-photo-lg { width: 96px; height: 96px; border-radius: var(--radius); object-fit: contain; background: var(--bg3); border: 1px solid var(--border); }
.photo-placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg5); border: 1.5px dashed var(--border); border-radius: 7px; color: var(--text3); font-size: 1.2rem; }

/* ── Locations ───────────────────────────────────────────────────── */
.loc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }
.loc-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: all var(--transition);
  border-left: 3px solid var(--orange);
}
.loc-card:hover { border-color: var(--border-h); box-shadow: var(--shadow); }
.loc-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.loc-card-title { font-weight: 700; font-size: 14px; color: var(--text); }
.loc-card-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.loc-stat { text-align: center; padding: 8px; background: var(--bg4); border-radius: 6px; }
.loc-stat-val { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; }
.loc-stat-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }
.loc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.loc-stat-label { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.loc-desc { font-size: 11px; color: var(--text3); margin-top: 2px; }
.loc-ap-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.ap-pill {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 20px; font-size: 10px;
  background: var(--bg5); border: 1px solid var(--border);
  color: var(--text3); white-space: nowrap;
}

/* ── Networks list ───────────────────────────────────────────────── */
.networks-list { display: flex; flex-direction: column; gap: 6px; }
.network-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: var(--bg4); border-radius: var(--radius-sm);
  border: 1px solid var(--border); gap: 10px;
  transition: border-color var(--transition);
}
.network-row:hover { border-color: var(--border-h); }
.network-row.best { border-color: rgba(249,115,22,.3); background: var(--orange-dim); }
.network-name { font-size: 13px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.network-bssid { font-size: 11px; color: var(--text3); font-family: var(--font-mono); }

/* ── Device hero ─────────────────────────────────────────────────── */
.dev-hero {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.dev-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr));
  gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 16px;
}
.dev-info-item .label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.dev-info-item .value { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Leaflet ─────────────────────────────────────────────────────── */
.leaflet-popup-content-wrapper { background: #FFFFFF; border: 1px solid rgba(0,0,0,0.12); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,0.18); color: #111827; }
.leaflet-popup-tip { background: #FFFFFF; }
.leaflet-popup-content { margin: 12px 16px; }
.leaflet-control-zoom a { background: #FFFFFF !important; color: #4B5563 !important; border-color: rgba(0,0,0,0.15) !important; }
.leaflet-control-zoom a:hover { background: #F9FAFB !important; color: var(--orange) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,.9) !important; color: #9CA3AF !important; font-size: 9px !important; }

/* ── Section header ──────────────────────────────────────────────── */
.section-label {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--orange); font-weight: 700; margin-bottom: 6px;
  display: inline-flex; align-items: center; gap: 6px;
}
.section-label::before { content: ''; width: 18px; height: 2px; background: var(--orange); border-radius: 1px; }
.section-title {
  font-size: 1.55rem; font-weight: 800; color: var(--text);
  letter-spacing: -.5px; line-height: 1.15; margin-bottom: 4px;
}
.section-title span {
  background: linear-gradient(90deg, var(--orange-h) 0%, var(--orange-d) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Progress bar ────────────────────────────────────────────────── */
.progress-track {
  height: 6px; background: var(--bg5); border-radius: 3px; overflow: hidden; width: 100%;
}
.progress-fill {
  height: 100%; border-radius: 3px; transition: width .7s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.orange  { background: linear-gradient(90deg, var(--orange-d), var(--orange-h)); }
.progress-fill.emerald { background: linear-gradient(90deg, #059669, var(--emerald)); }
.progress-fill.amber   { background: linear-gradient(90deg, #D97706, var(--amber)); }
.progress-fill.red     { background: linear-gradient(90deg, #DC2626, var(--red)); }
.progress-fill.blue    { background: linear-gradient(90deg, #2563EB, var(--blue)); }
.progress-fill.purple  { background: linear-gradient(90deg, #7C3AED, var(--purple)); }

/* ── Stat ring (donut) ───────────────────────────────────────────── */
.stat-ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.stat-ring-label { position: absolute; text-align: center; }

/* ── Sparkline (inline SVG chart) ───────────────────────────────── */
.sparkline { display: block; }

/* ── Quick stat row ──────────────────────────────────────────────── */
.quick-stats {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.quick-stat {
  display: flex; flex-direction: column;
  padding: 8px 12px; border-radius: 8px;
  background: var(--bg5); border: 1px solid var(--border);
  min-width: 70px; flex: 1;
}
.quick-stat-val { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
.quick-stat-lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: .7px; margin-top: 4px; }

/* ── Device card (alternative to row) ───────────────────────────── */
.device-card {
  background: var(--bg4); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; cursor: pointer; transition: all var(--transition);
  display: flex; flex-direction: column; gap: 10px;
}
.device-card:hover { border-color: var(--border-h); background: var(--bg3); }
.device-card-top { display: flex; align-items: center; gap: 10px; }
.device-card-serial { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.device-card-loc { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.device-card-batt { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }

/* ── Scrollbars ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(249,115,22,.4); }

/* ── Dash section spacing ────────────────────────────────────────── */
.dash-section { margin-bottom: 20px; }

/* ── Utilities ───────────────────────────────────────────────────── */
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3     { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-60-40 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-40-60 { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.flex-col     { flex-direction: column; }

.gap-4{gap:4px} .gap-6{gap:6px} .gap-8{gap:8px} .gap-10{gap:10px}
.gap-12{gap:12px} .gap-16{gap:16px} .gap-20{gap:20px}
.mb-4{margin-bottom:4px} .mb-8{margin-bottom:8px} .mb-12{margin-bottom:12px} .mb-16{margin-bottom:16px}
.mb-20{margin-bottom:20px} .mb-24{margin-bottom:24px} .mb-32{margin-bottom:32px}
.mt-4{margin-top:4px} .mt-8{margin-top:8px} .mt-12{margin-top:12px} .mt-16{margin-top:16px}
.text-sm{font-size:12.5px} .text-xs{font-size:11px}
.text-muted{color:var(--text2)} .text-dim{color:var(--text3)}
.text-orange{color:var(--orange)} .text-emerald,.text-green{color:var(--emerald)}
.text-amber,.text-yellow{color:var(--amber)} .text-red{color:var(--red)} .text-blue{color:var(--blue)}
.text-center{text-align:center} .text-right{text-align:right}
.fw-600{font-weight:600} .fw-700{font-weight:700} .fw-800{font-weight:800}
.w-full{width:100%} .min-w-0{min-width:0}
.divider{height:1px;background:var(--border);margin:16px 0}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hidden{display:none!important}
.rounded{border-radius:var(--radius)} .rounded-sm{border-radius:var(--radius-sm)}
.overflow-hidden{overflow:hidden}

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp  { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }
@keyframes popIn    { from{opacity:0;transform:scale(.88)} to{opacity:1;transform:scale(1)} }

/* ── Auth pages ──────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; background: var(--bg); }
.auth-left {
  width: 44%; background: linear-gradient(145deg, #F97316 0%, #C2410C 100%);
  display: flex; flex-direction: column;
  justify-content: space-between; padding: 44px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.auth-left::after {
  content: ''; position: absolute; left: -60px; bottom: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(0,0,0,.12);
}
.auth-brand { position: relative; z-index: 1; }
.auth-brand-icon {
  width: 48px; height: 48px; background: rgba(255,255,255,.2); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.auth-brand-icon svg { width: 24px; height: 24px; color: #fff; }
.auth-brand-title { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.4px; }
.auth-brand-sub { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 4px; }
.auth-features { position: relative; z-index: 1; }
.auth-feature { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.auth-feature-icon {
  width: 36px; height: 36px; background: rgba(255,255,255,.15); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.auth-feature-icon svg { width: 16px; height: 16px; color: #fff; }
.auth-feature p { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.5; }
.auth-feature strong { color: #fff; display: block; font-size: 13px; }
.auth-right {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 48px;
}
.auth-form { width: 100%; max-width: 360px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -.3px; }
.auth-sub { font-size: 13px; color: var(--text3); margin-bottom: 28px; }
.auth-demo { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--orange-dim); border: 1px solid rgba(249,115,22,.25); font-size: 12px; color: var(--orange-h); margin-bottom: 20px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 12px; color: var(--text3); }
.lang-flag-row { display: flex; gap: 6px; }
.lang-flag-btn { padding: 5px 10px; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); cursor: pointer; font-size: 13px; transition: all var(--transition); font-family: var(--font-body); color: var(--text2); }
.lang-flag-btn:hover,.lang-flag-btn.active { background: var(--orange-dim); border-color: rgba(249,115,22,.3); color: var(--text); }

/* ══════════════════════════════════════════════
   BOTTOM NAVIGATION BAR  (mobile ≤ 900px)
   ══════════════════════════════════════════════ */
.bottom-nav { display: none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1400px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-60-40, .grid-40-60 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; width: 100%; }
  .grid-2, .grid-3, .grid-60-40, .grid-40-60 { grid-template-columns: 1fr; gap: 14px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .page-body { padding: 14px 14px calc(72px + env(safe-area-inset-bottom) + 14px); }
  .topbar { padding: 0 14px; }
  .hamburger-btn { display: flex !important; }
  .auth-left { display: none; }
  .auth-right { padding: 28px 20px; }
  .nav-item { padding: 11px 12px; }
  .card-header { padding: 13px 15px; gap: 8px; }
  .card { padding: 14px; border-radius: 12px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { padding: 10px 12px; font-size: 13px; }
  .modal-card, .modal-box { max-width: calc(100vw - 24px); }
  .modal-card { padding: 16px; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1 1 auto; min-width: 100px; justify-content: center; }
  .topbar-title { font-size: 14px; }
  .lang-trigger { padding: 6px 8px; }
  .kpi-card { padding: 14px 14px 12px; border-radius: 12px; }
  .kpi-value { font-size: 1.9rem; }
  .kpi-icon { width: 34px; height: 34px; margin-bottom: 10px; }
  .dev-row { padding: 10px 14px; }
  .timeline-item { padding: 9px 14px; }
  .loc-tile { padding: 10px 14px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }

  /* Show bottom nav, push content above it */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(15,20,32,0.96);
    border-top: 1px solid var(--border);
    z-index: 900;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 20px rgba(0,0,0,.4);
  }
  .bottom-nav a, .bottom-nav button {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; color: var(--text3);
    font-size: 10px; font-weight: 600; letter-spacing: .2px;
    text-decoration: none; background: none; border: none; cursor: pointer;
    padding: 6px 4px; transition: color .15s, transform .15s;
    -webkit-tap-highlight-color: transparent; position: relative;
  }
  .bottom-nav .bn-icon {
    width: 28px; height: 28px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; transition: all .15s;
  }
  .bottom-nav a.active, .bottom-nav button.active { color: var(--orange-h); }
  .bottom-nav a.active .bn-icon, .bottom-nav button.active .bn-icon {
    background: rgba(249,115,22,.14);
    box-shadow: 0 2px 10px rgba(249,115,22,.2);
  }
  .bottom-nav a.active svg, .bottom-nav button.active svg { stroke: var(--orange-h); }
  .bottom-nav a.bn-center .bn-icon {
    width: 44px; height: 44px; border-radius: 14px; margin-top: -10px;
    background: linear-gradient(145deg, #FB923C, #EA580C);
    box-shadow: 0 6px 20px rgba(234,88,12,.45);
    border: 2px solid rgba(255,255,255,.12);
  }
  .bottom-nav a.bn-center { color: var(--text2); }
  .bottom-nav a.bn-center.active { color: #fff; }
  .bottom-nav a.bn-center svg { stroke: #fff; }
  .bottom-nav a.bn-center.active .bn-icon {
    background: linear-gradient(145deg, #FDBA74, #EA580C);
    box-shadow: 0 8px 24px rgba(234,88,12,.55);
  }
  .bottom-nav a.active::before {
    content: ''; position: absolute; top: 0; left: 22%; right: 22%;
    height: 2px; background: var(--orange); border-radius: 0 0 3px 3px;
  }
  .bottom-nav a.bn-center.active::before { display: none; }
  .bottom-nav .bn-badge {
    position: absolute; top: 4px; right: calc(50% - 18px);
    min-width: 14px; height: 14px; background: var(--red);
    border-radius: 7px; font-size: 9px; font-weight: 700; color: #fff;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
    pointer-events: none;
  }
  /* Sidebar only via "More" button */
  .hamburger-btn { display: none !important; }
  /* Toast above bottom nav */
  .toast { bottom: calc(68px + env(safe-area-inset-bottom) + 8px) !important; right: 14px !important; left: 14px !important; }
}

@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .kpi-card { padding: 12px 12px 11px; }
  .kpi-value { font-size: 1.7rem; }
  .kpi-label { font-size: 10px; letter-spacing: .7px; }
  .kpi-icon { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 8px; }
  .loc-grid, .product-grid { grid-template-columns: 1fr; }
  .topbar-title { font-size: 13px; }
  .live-dot { display: none; }
  .lang-code { display: none; }
  .lang-trigger { padding: 6px 7px; }
  .btn { padding: 8px 12px; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
  .auth-form { max-width: 100%; }
  .auth-title { font-size: 20px; }
  .page-body { padding: 12px 12px calc(72px + env(safe-area-inset-bottom) + 12px); }
  .card-header { flex-wrap: wrap; }
  .bottom-nav { height: 56px; }
  .bottom-nav a, .bottom-nav button { font-size: 9.5px; }
}

@media (max-width: 400px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-value { font-size: 1.5rem; }
}

/* ── Mobile: all modals become full-width bottom sheets ───────────── */
@media (max-width: 640px) {
  input, textarea, select { font-size: 16px; } /* iOS auto-zoom önleme */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-overlay.open { animation: fadeIn .16s ease; }
  .modal-card, .modal-box {
    width: 100%; max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: calc(100dvh - env(safe-area-inset-top) - 14px);
    animation: sheetUp .22s cubic-bezier(0.32,0.72,0,1);
  }
  .modal-header {
    border-radius: 16px 16px 0 0;
    padding: 14px 16px;
  }
  .modal-header::before {
    content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 4px; border-radius: 3px; background: var(--border-h);
  }
  .modal-header { position: sticky; padding-top: 18px; }
  .modal-body { padding: 16px; }
  .modal-footer {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .modal-footer .btn { flex: 1 1 auto; min-width: 100px; padding: 12px 14px; justify-content: center; }
  .modal-title { font-size: 15px; }
}
@keyframes sheetUp { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }

/* Disable hover transforms on touch devices */
@media (hover: none) {
  .kpi-card:hover { transform: none !important; }
  .btn-primary:hover { transform: none !important; }
  .product-card:hover { transform: none !important; }
}

/* ── Low stock rows (dashboard inline style) ─────────────────────── */
.ls-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.ls-row:last-child { border-bottom: none; }
.ls-row:hover { background: var(--bg3); }
.ls-row.critical { background: rgba(239,68,68,.04); }
.ls-row.critical:hover { background: rgba(239,68,68,.08); }
.ls-img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; background: var(--bg4); flex-shrink: 0; }
.ls-empty { display: flex; align-items: center; justify-content: center; font-size: 22px; }
.ls-info { flex: 1; min-width: 0; }
.ls-name { font-weight: 600; color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-sub { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.ls-stock { text-align: right; flex-shrink: 0; }
.ls-bal { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; line-height: 1; }
.ls-min { font-size: 11px; color: var(--text3); margin-top: 2px; }
.ls-action { color: var(--text3); flex-shrink: 0; }
.ls-row:hover .ls-action { color: var(--orange); }

/* ── Page-specific: stock, activity, settings tweaks ─────────────── */
.filters-row {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filters-row select, .filters-row input {
  width: auto; min-width: 0; flex: 1; max-width: 200px;
  padding: 7px 10px; font-size: 12.5px;
}
.filters-row .btn { flex-shrink: 0; }

/* ── Search input ────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text3); }
.search-wrap input { padding-left: 32px; }

/* ── Section divider with label ──────────────────────────────────── */
.section-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px; color: var(--text3); font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
}
.section-divider::before, .section-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Status header banner ────────────────────────────────────────── */
.status-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px;
  background: linear-gradient(90deg, rgba(16,185,129,.1) 0%, transparent 100%);
  border: 1px solid rgba(16,185,129,.2);
  margin-bottom: 18px;
}
.status-banner.warn {
  background: linear-gradient(90deg, rgba(245,158,11,.1) 0%, transparent 100%);
  border-color: rgba(245,158,11,.25);
}
.status-banner.danger {
  background: linear-gradient(90deg, rgba(239,68,68,.1) 0%, transparent 100%);
  border-color: rgba(239,68,68,.25);
}

/* ── Global FAB (Floating Action Button) ────────────────────────── */
.global-fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 800;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(249,115,22,.45);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.global-fab:hover {
  background: var(--orange-h);
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(249,115,22,.55);
}
.global-fab:active { transform: scale(.96); }

@media (max-width: 900px) {
  .global-fab { bottom: calc(72px + env(safe-area-inset-bottom) + 14px); right: 16px; }
}

/* ── Tab bar (reusable) ──────────────────────────────────────────── */
.tab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab-btn {
  background: none; border: none; padding: 10px 18px; cursor: pointer;
  color: var(--text2); font-size: .9rem; border-bottom: 2px solid transparent;
  transition: .15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text1); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); font-weight: 600; }
.tab-panel { animation: fadeIn .2s ease; }

/* ── Surface color aliases ───────────────────────────────────────── */
.surface2 { background: var(--bg3); }
.surface3 { background: var(--bg4); }

/* ── 3D indoor container ─────────────────────────────────────────── */
.indoor-3d-viewport {
  width: 100%;
  height: 70vh;
  min-height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e1a 0%, #0d1324 100%);
  border: 1px solid var(--border);
  position: relative;
}
.indoor-controls-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 12px 0; margin-bottom: 12px;
}
.indoor-mode-btn {
  padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text2); cursor: pointer; font-size: .82rem;
  transition: .15s;
}
.indoor-mode-btn:hover { background: var(--surface-h); color: var(--text); }
.indoor-mode-btn.active { background: var(--orange-dim); border-color: var(--orange); color: var(--orange); font-weight: 600; }

/* ── AP wizard ───────────────────────────────────────────────────── */
.ap-wizard-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border); transition: background .15s;
}
.ap-wizard-row:hover { background: var(--surface); }
.ap-wizard-row:last-child { border-bottom: none; }
.ap-ssid-label { font-weight: 600; font-size: .9rem; }
.ap-ssid-meta { font-size: .76rem; color: var(--text3); margin-top: 2px; }

/* ── Accuracy badge ──────────────────────────────────────────────── */
.acc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: .72rem; font-weight: 600;
}
.acc-good { background: var(--emerald-dim); color: var(--emerald); }
.acc-medium { background: var(--amber-dim); color: var(--amber); }
.acc-poor { background: var(--red-dim); color: var(--red); }

/* ── Info/warn banner ────────────────────────────────────────────── */
.info-banner {
  padding: 10px 14px; border-radius: 8px; font-size: .82rem;
  background: var(--blue-dim); border: 1px solid rgba(59,130,246,.2); color: var(--text2);
}

/* ── Link text (replaces raw <a> styling in tables) ─────────────── */
.link-text { color: var(--text); font-weight: 500; }
.link-text:hover { color: var(--orange); }

/* ── Button XS ───────────────────────────────────────────────────── */
.btn-xs { padding: 3px 8px; font-size: .72rem; border-radius: 5px; }

/* ── Filter select ───────────────────────────────────────────────── */
.filter-select {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: .82rem; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--orange); }

/* ── Additional root vars ────────────────────────────────────────── */
:root {
  --surface2: var(--bg3);
  --surface3: var(--bg4);
  --text1: var(--text);
}

/* ── Accordion ────────────────────────────────────────────────────── */
.accordion-section { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-top: 12px; }
.accordion-header {
  padding: 10px 16px; cursor: pointer; background: var(--surface);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .85rem; font-weight: 600; color: var(--text2);
  user-select: none; transition: background .15s;
}
.accordion-header:hover { background: var(--surface-h); }
.accordion-body { padding: 16px; display: none; }
.accordion-body.open { display: block; }

/* ── No-location badge ────────────────────────────────────────────── */
.badge-uncertain {
  background: rgba(107,114,128,.15); color: #9CA3AF;
  border: 1px solid rgba(107,114,128,.2);
}

