/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:      #0d0d0f;
  --surface: #151518;
  --card:    #1c1c21;
  --border:  #2a2a32;
  --accent:  #ff8c00;
  --success: #2ed573;
  --danger:  #ff4757;
  --info:    #3d9fff;
  --text:    #e8e8f0;
  --muted:   #6b6b80;
  --font:    'Inter', system-ui, -apple-system, sans-serif;
  --sidebar: 240px;
  --topbar:  56px;
  --radius:  12px;
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  grid-template-rows: var(--topbar) 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 14px; }
svg { fill: currentColor; width: 18px; height: 18px; flex-shrink: 0; }

/* ─── SIDEBAR ────────────────────────────────────────── */
#sidebar {
  grid-area: sidebar;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar);
  height: 100vh;
  z-index: 100;
  overflow: hidden;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--topbar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand-icon { font-size: 22px; color: var(--accent); line-height: 1; }
.brand-name { font-size: 16px; letter-spacing: -0.3px; color: var(--text); }
.brand-name strong { color: var(--accent); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.nav-item.active {
  color: var(--accent);
  background: rgba(255,140,0,0.08);
  border-left-color: var(--accent);
}
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.user-pill { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.logout-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border-radius: 8px; color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.logout-btn:hover { color: var(--danger); background: rgba(255,71,87,0.1); }

/* ─── TOPBAR ─────────────────────────────────────────── */
#topbar {
  grid-area: topbar;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  margin-left: var(--sidebar);
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-label { font-weight: 600; font-size: 14px; }
.breadcrumb-sep { color: var(--muted); font-size: 16px; }
.topbar-sub { color: var(--muted); font-size: 13px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── MAIN VIEW ──────────────────────────────────────── */
#view {
  grid-area: main;
  padding: 24px;
  overflow-y: auto;
  height: calc(100vh - var(--topbar));
  margin-left: var(--sidebar);
}
#view::-webkit-scrollbar { width: 6px; }
#view::-webkit-scrollbar-track { background: transparent; }
#view::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── LOADER ─────────────────────────────────────────── */
.page-loader {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
}
.loader-ring {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }

/* ─── KPI CARDS ──────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; color: var(--text); }
.kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-icon { font-size: 20px; margin-bottom: 4px; }

/* ─── GRID LAYOUTS ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col-span-2 { grid-column: span 2; }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; }
.btn-ghost {
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger {
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.15s;
}
.btn-danger:hover { opacity: 0.88; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-icon { padding: 6px; border-radius: 8px; }

/* ─── TABLES ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { height: 40px; border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 0 14px; font-size: 13px; white-space: nowrap; }
tbody tr:last-child { border-bottom: none; }

/* ─── STATUS PILLS ───────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}
.pill-paid     { background: rgba(46,213,115,0.15); color: var(--success); }
.pill-unpaid   { background: rgba(255,71,87,0.15);  color: var(--danger);  }
.pill-partial  { background: rgba(61,159,255,0.15); color: var(--info);    }
.pill-overdue  { background: rgba(255,71,87,0.25);  color: #ff6b78;        }
.pill-void     { background: rgba(107,107,128,0.2); color: var(--muted);   }
.pill-active   { background: rgba(46,213,115,0.15); color: var(--success); }
.pill-inactive { background: rgba(107,107,128,0.2); color: var(--muted);   }
.pill-debit    { background: rgba(255,71,87,0.15);  color: var(--danger);  }
.pill-credit   { background: rgba(46,213,115,0.15); color: var(--success); }
.pill-low      { background: rgba(255,140,0,0.15);  color: var(--accent);  }

/* ─── FORMS ──────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.form-control {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--muted); }
select.form-control option { background: var(--card); }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ─── SEARCH / FILTER BAR ────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-wrap { position: relative; flex: 1; min-width: 180px; max-width: 320px; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 15px; height: 15px; }
.search-input {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px 8px 34px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); }
.filter-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--accent); }

/* ─── PAGINATION ─────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  justify-content: flex-end;
  margin-top: 16px;
}
.page-btn {
  padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  transition: 0.15s;
}
.page-btn:hover, .page-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(255,140,0,0.08); }
.page-info { font-size: 12px; color: var(--muted); padding: 0 6px; }

/* ─── MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal.modal-lg { max-width: 860px; }
.modal.modal-xl { max-width: 1060px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close {
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  transition: 0.15s;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.modal-body {
  padding: 22px;
  overflow-y: auto;
  flex: 1;
}
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ─── TABS ───────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab-btn {
  padding: 10px 18px; font-size: 13px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── AVATAR INITIALS ────────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent);
  color: #000; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-sm { width: 26px; height: 26px; font-size: 11px; }

/* ─── BADGE ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; font-size: 11px; font-weight: 700;
}
.badge-accent { background: var(--accent); color: #000; }
.badge-muted  { background: var(--border); color: var(--muted); }

/* ─── TOASTS ─────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999;
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  display: flex; align-items: center; gap: 10px;
  min-width: 240px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  animation: toast-in 0.2s ease;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger);  }
.toast-info    { border-left: 3px solid var(--info);    }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ─── EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; display: block; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ─── INLINE ALERT ───────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13px;
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px;
}
.alert-warning { background: rgba(255,140,0,0.1); border: 1px solid rgba(255,140,0,0.25); color: var(--accent); }
.alert-danger  { background: rgba(255,71,87,0.1);  border: 1px solid rgba(255,71,87,0.25);  color: var(--danger);  }
.alert-success { background: rgba(46,213,115,0.1); border: 1px solid rgba(46,213,115,0.25); color: var(--success); }

/* ─── DIVIDER ────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ─── SECTION TITLE ──────────────────────────────────── */
.section-title {
  font-size: 18px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: -0.2px;
}

/* ─── UTILITY ────────────────────────────────────────── */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8  { gap: 8px;  }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-muted  { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.hidden { display: none !important; }

/* ─── STOCK BADGE ────────────────────────────────────── */
.stock-ok  { color: var(--success); font-weight: 600; }
.stock-low { color: var(--accent);  font-weight: 600; }
.stock-out { color: var(--danger);  font-weight: 600; }

/* ─── TOGGLE SWITCH ──────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 8px; }
.toggle {
  position: relative; display: inline-block;
  width: 36px; height: 20px; cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border); border-radius: 20px;
  transition: 0.15s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); left: 3px; top: 3px;
  transition: 0.15s;
}
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: #fff; }

/* ─── MAP CONTAINER ──────────────────────────────────── */
#map-container {
  height: calc(100vh - var(--topbar) - 48px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto;
  height: calc(100vh - var(--topbar) - 48px);
}
.map-layout { display: flex; gap: 16px; }

/* ─── PRINT ──────────────────────────────────────────── */
@media print {
  #sidebar, #topbar, #modal-overlay, #toast-container, .no-print { display: none !important; }
  #view { margin: 0; padding: 0; height: auto; overflow: visible; }
  body { background: #fff; color: #000; display: block; }
  .card { border: 1px solid #ccc; box-shadow: none; }
}
/* ═══════════════════════════════════════════════════════
   DASHBOARD — style patch (append to style.css)
   ═══════════════════════════════════════════════════════ */

/* Header row */
.db-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px;
}
.db-greeting {
  font-size: 22px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--text);
}
.db-date { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* KPI skeleton pulse */
.kpi-skeleton {
  min-height: 110px;
  background: linear-gradient(90deg, var(--card) 25%, var(--border) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* KPI card internals */
.kpi-icon-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kpi-badge { font-size: 18px; line-height: 1; }
.kpi-bar {
  height: 3px; background: var(--border); border-radius: 2px;
  margin-top: 12px; overflow: hidden;
}
.kpi-bar-fill { height: 100%; border-radius: 2px; width: 60%; opacity: 0.7; }

/* KPI colour accents — left-border */
.kpi-accent { border-left: 3px solid var(--accent); }
.kpi-info   { border-left: 3px solid var(--info);   }
.kpi-danger { border-left: 3px solid var(--danger);  }
.kpi-warn   { border-left: 3px solid var(--accent);  }
.kpi-ok     { border-left: 3px solid var(--success); }

/* Chart + salesmen layout */
.db-mid-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

/* Canvas chart wrapper */
.db-chart-wrap {
  position: relative;
  width: 100%;
  padding-top: 4px;
}
.db-chart-total {
  font-size: 12px; color: var(--muted); font-weight: 500;
}
#revenue-chart { display: block; width: 100% !important; }

/* Chart tooltip */
.chart-tooltip {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  pointer-events: none;
  z-index: 10;
  min-width: 130px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.ct-date { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.ct-val  { font-size: 15px; font-weight: 700; color: var(--text); }
.ct-sub  { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Alerts grid */
.db-alert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Alert dot */
.alert-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.alert-dot-danger { background: var(--danger); }
.alert-dot-warn   { background: var(--accent); }

/* Badge variants */
.badge-danger-soft { background: rgba(255,71,87,0.15);  color: var(--danger); }
.badge-warn-soft   { background: rgba(255,140,0,0.15);  color: var(--accent); }

/* Alert list items */
.alert-list { display: flex; flex-direction: column; gap: 0; }
.alert-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.alert-item:last-child { border-bottom: none; }
.ai-left  { flex: 1; min-width: 0; }
.ai-right { text-align: right; flex-shrink: 0; padding-left: 12px; }
.ai-num   { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-cust  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ai-amount{ font-size: 13px; font-weight: 700; }
.ai-days  { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* Top salesmen list */
.sm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sm-row:last-child { border-bottom: none; }
.sm-info   { flex: 1; min-width: 0; }
.sm-name   { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.sm-bar-wrap { display: flex; align-items: center; gap: 8px; }
.sm-bar    { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.sm-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }
.sm-val    { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sm-count  { font-size: 11px; color: var(--muted); flex-shrink: 0; text-align: right; }
