/* ─── Tokens: light ──────────────────────────────────────────── */
:root {
  --bg:            #f4f5fb;
  --surface:       #ffffff;
  --surface-dim:   #eceef8;
  --border:        #dde0f0;
  --border-sub:    #eef0f9;

  --sidebar-bg:    #181d38;
  --sidebar-hov:   #222846;
  --sidebar-act:   #293060;
  --sidebar-txt:   #7f8abd;
  --sidebar-hi:    #ffffff;

  --accent:        #3f5dee;
  --accent-dim:    #eaedfe;
  --accent-deep:   #3350d6;

  --text-1:        #13172b;
  --text-2:        #484f72;
  --text-3:        #8a90b0;

  --good:          #1a7a3a;
  --good-bg:       #e6f5ec;
  --good-bd:       #b7e4c7;

  --warn:          #b45000;
  --warn-bg:       #fff3e2;
  --warn-bd:       #ffd699;

  --bad:           #be2a2a;
  --bad-bg:        #fdecea;
  --bad-bd:        #f5bcbc;

  --info:          #1760a0;
  --info-bg:       #e6f0fa;
  --info-bd:       #bdd9f5;

  --chip-bg:       #e8eaf5;
  --chip-fg:       #484f72;

  color-scheme: light;
}

/* ─── Tokens: dark (system) ──────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0d1022;
    --surface:       #151829;
    --surface-dim:   #1c2038;
    --border:        #2a2f50;
    --border-sub:    #1f2440;
    --sidebar-bg:    #0b0e1e;
    --sidebar-hov:   #171c30;
    --sidebar-act:   #1d2440;
    --sidebar-txt:   #5e6898;
    --sidebar-hi:    #dde4ff;
    --accent:        #5a7dff;
    --accent-dim:    #1a2650;
    --accent-deep:   #4a6ee0;
    --text-1:        #dde4ff;
    --text-2:        #8490c0;
    --text-3:        #4a5280;
    --good:          #3cc070;
    --good-bg:       #0d2a1a;
    --good-bd:       #1a4830;
    --warn:          #e07820;
    --warn-bg:       #221200;
    --warn-bd:       #4a2a00;
    --bad:           #e05050;
    --bad-bg:        #230a0a;
    --bad-bd:        #4a1414;
    --info:          #4a9ad4;
    --info-bg:       #0a1e30;
    --info-bd:       #143252;
    --chip-bg:       #1c2038;
    --chip-fg:       #8490c0;
    color-scheme: dark;
  }
}

/* ─── Tokens: dark (explicit) ────────────────────────────────── */
:root[data-theme="dark"] {
  --bg:            #0d1022;
  --surface:       #151829;
  --surface-dim:   #1c2038;
  --border:        #2a2f50;
  --border-sub:    #1f2440;
  --sidebar-bg:    #0b0e1e;
  --sidebar-hov:   #171c30;
  --sidebar-act:   #1d2440;
  --sidebar-txt:   #5e6898;
  --sidebar-hi:    #dde4ff;
  --accent:        #5a7dff;
  --accent-dim:    #1a2650;
  --accent-deep:   #4a6ee0;
  --text-1:        #dde4ff;
  --text-2:        #8490c0;
  --text-3:        #4a5280;
  --good:          #3cc070;
  --good-bg:       #0d2a1a;
  --good-bd:       #1a4830;
  --warn:          #e07820;
  --warn-bg:       #221200;
  --warn-bd:       #4a2a00;
  --bad:           #e05050;
  --bad-bg:        #230a0a;
  --bad-bd:        #4a1414;
  --info:          #4a9ad4;
  --info-bg:       #0a1e30;
  --info-bd:       #143252;
  --chip-bg:       #1c2038;
  --chip-fg:       #8490c0;
  color-scheme: dark;
}

/* ─── Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Shell ──────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }

.brand-wordmark { font-size: 14px; font-weight: 700; color: #ffffff; letter-spacing: -0.01em; }
.brand-sub      { font-size: 9.5px; font-family: 'IBM Plex Mono', monospace; color: var(--sidebar-txt); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 1px; }

.sidebar-section { padding: 14px 10px 6px; }

.nav-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--sidebar-txt);
  padding: 0 8px; margin-bottom: 4px; opacity: 0.7;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 7px;
  color: var(--sidebar-txt); font-size: 13px; font-weight: 450;
  cursor: pointer; transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--sidebar-hov); color: var(--sidebar-hi); }
.nav-item.active { background: var(--sidebar-act); color: var(--sidebar-hi); font-weight: 600; }
.nav-item svg { flex-shrink: 0; opacity: 0.65; }
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }

.nav-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bad); color: white; border-radius: 10px;
  padding: 1px 6px; min-width: 18px; text-align: center;
}

.sidebar-footer {
  margin-top: auto; padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.sync-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 7px;
  font-size: 12px; color: var(--sidebar-txt);
}
.sync-time { font-family: 'IBM Plex Mono', monospace; margin-left: auto; font-size: 11px; opacity: 0.7; }

/* ─── Pulse dot ──────────────────────────────────────────────── */
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #3cc070; flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ─── Main ───────────────────────────────────────────────────── */
.main { min-width: 0; display: flex; flex-direction: column; }

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  height: 54px; padding: 0 24px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-heading { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.topbar-sep     { width: 1px; height: 18px; background: var(--border); }
.topbar-ctx     { font-size: 13px; color: var(--text-3); }
.topbar-right   { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.sync-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--text-3);
  background: var(--surface-dim); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px;
  font-family: 'IBM Plex Mono', monospace;
}

.icon-btn {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--surface-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: background 0.12s; cursor: pointer;
}
.icon-btn:hover { background: var(--border); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  flex-shrink: 0; cursor: default; user-select: none;
}

/* ─── Content ────────────────────────────────────────────────── */
.content { padding: 20px 24px 48px; flex: 1; }

/* ─── Toolbar ────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.filter-sel {
  height: 33px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-1); padding: 0 10px;
  font: inherit; font-size: 13px; outline: none; cursor: pointer;
  transition: border-color 0.12s; appearance: auto;
}
.filter-sel:focus, .filter-sel:hover { border-color: var(--accent); }

.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search-input {
  height: 33px; padding: 0 10px 0 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text-1); font: inherit; font-size: 13px;
  outline: none; width: 200px; transition: border-color 0.12s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-3); }

.spacer { flex: 1; min-width: 4px; }

.btn {
  height: 33px; padding: 0 14px; border-radius: 6px;
  font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; transition: background 0.12s; border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary  { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost    { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-dim); }

/* ─── Metric grid ────────────────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }

.metric-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px 16px 12px;
  cursor: pointer; transition: border-color 0.14s, box-shadow 0.14s;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
}
.metric-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--m-acc, var(--border)); transition: height 0.14s;
}
.metric-card:hover { border-color: var(--m-acc, var(--border)); box-shadow: 0 3px 12px rgba(0,0,0,0.06); }
.metric-card:hover::after { height: 3px; }

.metric-card.c-accent { --m-acc: var(--accent); }
.metric-card.c-good   { --m-acc: var(--good); }
.metric-card.c-info   { --m-acc: var(--info); }
.metric-card.c-warn   { --m-acc: var(--warn); }
.metric-card.c-bad    { --m-acc: var(--bad); }

.metric-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); }
.metric-value { font-size: 26px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; color: var(--text-1); line-height: 1.1; }
.metric-delta { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 3px; }
.metric-delta.up { color: var(--good); }
.metric-delta.dn { color: var(--bad); }

/* ─── Mid row ────────────────────────────────────────────────── */
.mid-row { display: grid; grid-template-columns: 1fr 288px; gap: 12px; margin-bottom: 12px; }

/* ─── Panel ──────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--border-sub);
}
.panel-title { font-size: 13px; font-weight: 600; }
.panel-meta  { font-size: 11.5px; color: var(--text-3); }
.panel-link  { font-size: 12px; color: var(--accent); font-weight: 500; }
.panel-link:hover { text-decoration: underline; }

/* Chart */
.chart-area { padding: 14px 16px 12px; }
.chart-wrap { position: relative; height: 148px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }

.chart-legend { display: flex; gap: 14px; margin-top: 10px; }
.legend-item  { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); }
.legend-sw    { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }

/* Provider panel */
.provider-list { display: flex; flex-direction: column; }
.provider-row  { padding: 13px 16px; border-bottom: 1px solid var(--border-sub); display: flex; flex-direction: column; gap: 8px; }
.provider-row:last-child { border-bottom: none; }
.provider-head { display: flex; align-items: center; justify-content: space-between; }
.provider-name { font-size: 13px; font-weight: 600; }

.health-chip { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.health-chip.ok   { background: var(--good-bg); color: var(--good); }
.health-chip.warn { background: var(--warn-bg); color: var(--warn); }
.health-chip.bad  { background: var(--bad-bg);  color: var(--bad); }

.provider-nums { display: flex; gap: 12px; }
.p-num         { font-size: 11.5px; color: var(--text-3); }
.p-num strong  { font-family: 'IBM Plex Mono', monospace; font-weight: 500; color: var(--text-2); }

.minibar-track { height: 4px; background: var(--surface-dim); border-radius: 2px; overflow: hidden; }
.minibar-fill  { height: 100%; border-radius: 2px; transition: width 0.6s cubic-bezier(.4,0,.2,1); }

.country-strip { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px 12px; border-top: 1px solid var(--border-sub); }
.ctry-chip {
  font-size: 11px; font-weight: 600; font-family: 'IBM Plex Mono', monospace;
  padding: 3px 8px; border-radius: 4px;
  background: var(--chip-bg); color: var(--chip-fg);
  cursor: pointer; transition: background 0.1s, color 0.1s;
  border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.ctry-chip:hover { background: var(--accent-dim); color: var(--accent); }
.ctry-chip.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

/* ─── Table panel ────────────────────────────────────────────── */
.table-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.table-wrap  { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead th {
  padding: 9px 14px; text-align: left;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-dim);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
thead th a { color: inherit; }
thead th.sorted { color: var(--accent); }

tbody tr { border-bottom: 1px solid var(--border-sub); transition: background 0.08s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-dim); cursor: pointer; }

tbody td { padding: 10px 14px; white-space: nowrap; vertical-align: middle; }

.td-id    { font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 500; color: var(--accent); }
.td-track { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-3); }
.td-muted { color: var(--text-3); font-size: 12.5px; }
.td-time  { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--text-3); }
.td-mono  { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }

.country-cell { display: flex; align-items: center; gap: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 600; }
.flag { font-size: 15px; line-height: 1; }

/* ─── Status badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.bdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.badge.delivered   { background: var(--good-bg); color: var(--good); border-color: var(--good-bd); }
.badge.in_transit  { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.badge.returned    { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-bd); }
.badge.rejected    { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-bd); }
.badge.canceled    { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-bd); }
.badge.pending     { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.badge.incident    { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-bd); }
.badge.out_of_area { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.badge.in_delivery { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.badge.confirmed   { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.badge.processing  { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.badge.created     { background: var(--chip-bg); color: var(--chip-fg); }
.badge.unknown     { background: var(--chip-bg); color: var(--chip-fg); }
.badge.archived    { background: var(--chip-bg); color: var(--chip-fg); }

.badge.delivered   .bdot { background: var(--good); }
.badge.in_transit  .bdot,
.badge.in_delivery .bdot,
.badge.confirmed   .bdot,
.badge.processing  .bdot { background: var(--info); }
.badge.returned    .bdot,
.badge.rejected    .bdot,
.badge.canceled    .bdot,
.badge.incident    .bdot { background: var(--bad); }
.badge.pending     .bdot,
.badge.out_of_area .bdot { background: var(--warn); }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; padding: 12px 16px; border-top: 1px solid var(--border-sub); }
.pg-btn {
  min-width: 32px; height: 30px; padding: 0 8px;
  border-radius: 5px; font-size: 13px; font-weight: 500;
  background: var(--surface-dim); color: var(--text-2); border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.pg-btn:hover { background: var(--border); }
.pg-btn.active { background: var(--accent); color: white; border-color: var(--accent); }
.pg-btn:disabled { opacity: 0.35; pointer-events: none; }
.pg-info { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* ─── Detail page ────────────────────────────────────────────── */
.detail-header {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 20px 24px; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
}
.detail-id { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--text-3); }
.detail-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin: 4px 0 8px; }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }

.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.section-head { padding: 11px 16px; border-bottom: 1px solid var(--border-sub); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-3); }
.section-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }

.field-row { display: flex; flex-direction: column; gap: 2px; }
.field-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.field-value { font-size: 13.5px; color: var(--text-1); }
.field-value.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12.5px; }

/* Timeline */
.timeline { padding: 4px 16px 16px; }
.tl-item { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-item:not(:last-child)::before {
  content: ''; position: absolute; left: 7px; top: 28px;
  width: 1px; bottom: -4px; background: var(--border-sub);
}
.tl-dot { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex-shrink: 0; margin-top: 3px; }
.tl-dot.active { border-color: var(--accent); background: var(--accent); }
.tl-dot.good   { border-color: var(--good); background: var(--good); }
.tl-dot.bad    { border-color: var(--bad); background: var(--bad); }
.tl-dot.warn   { border-color: var(--warn); background: var(--warn); }
.tl-body { flex: 1; }
.tl-status { font-size: 13px; font-weight: 600; }
.tl-meta   { font-size: 11.5px; color: var(--text-3); font-family: 'IBM Plex Mono', monospace; }
.tl-note   { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* Items table */
.items-table td:not(:first-child) { text-align: right; }
.items-table th:not(:first-child) { text-align: right; }

/* ─── Error page ─────────────────────────────────────────────── */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; }
.error-box  { text-align: center; max-width: 420px; }
.error-code { font-size: 72px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--border); line-height: 1; }
.error-msg  { font-size: 18px; font-weight: 600; margin: 12px 0 8px; }
.error-hint { font-size: 14px; color: var(--text-3); margin-bottom: 24px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .mid-row { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    height: auto; position: relative; flex-direction: row; flex-wrap: wrap;
    align-items: center; padding: 8px 10px; gap: 4px;
  }
  .sidebar-brand { padding: 6px 8px; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.05); margin-right: 4px; }
  .sidebar-section { padding: 0; }
  .nav-label, .sidebar-footer { display: none; }
  .nav-item { padding: 6px 9px; font-size: 12px; }
  .content { padding: 14px 14px 40px; }
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: 0 14px; }
}
@media (max-width: 600px) {
  .sync-chip { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-value { font-size: 22px; }
  .search-input { width: 140px; }
}
