/* ==========================================================================
   Tambua — visual design system
   Modern + classic: Inter for UI, Fraunces (serif) for the brand wordmark and
   page titles, a Safaricom-green accent, warm-neutral surfaces, a layered
   elevation scale and soft motion. WhatsApp-style on mobile, sidebar on desktop.
   ========================================================================== */

:root {
  /* Brand — Safaricom green, with a deeper tone for chrome */
  --green: #3aa028;
  --green-bright: #43B02A;
  --green-dark: #2c7d1f;
  --green-deep: #14361b;
  --green-deeper: #0e2715;
  --green-tint: #eef7ea;
  --green-ring: rgba(67, 176, 42, .28);

  /* Neutrals — slightly warm so white surfaces feel calm, not clinical */
  --ink: #15201b;
  --ink-2: #3f4b45;
  --ink-soft: #6a7670;
  --line: #e7ebe8;
  --line-soft: #f0f3f1;
  --bg: #f5f7f5;
  --surface: #ffffff;

  /* Status */
  --warn: #c97a1a;
  --warn-tint: #fdf3e6;
  --bad: #d6453f;
  --bad-tint: #fdecec;

  /* Elevation — soft, layered, green-tinted shadows */
  --shadow-xs: 0 1px 2px rgba(20, 40, 25, .06);
  --shadow-sm: 0 1px 2px rgba(20, 40, 25, .05), 0 2px 6px rgba(20, 40, 25, .05);
  --shadow-md: 0 2px 6px rgba(20, 40, 25, .06), 0 8px 20px rgba(20, 40, 25, .07);
  --shadow-lg: 0 8px 24px rgba(20, 40, 25, .10), 0 18px 48px rgba(20, 40, 25, .12);
  --shadow-brand: 0 6px 16px rgba(58, 160, 40, .35);

  /* Radius */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Motion */
  --t: 160ms cubic-bezier(.4, 0, .2, 1);

  --topbar-h: 58px;
  --bottomnav-h: 62px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.tambua {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(67, 176, 42, .05), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05", "ss01";
}

a { color: var(--green-dark); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--green); text-decoration: none; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--green-ring);
  border-radius: 6px;
}

hr { border: 0; border-top: 1px solid var(--line); opacity: 1; }

::selection { background: var(--green-tint); color: var(--green-deep); }

/* --------------------------------------------------------------------------
   Top app bar (mobile + tablet)
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title {
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; }
.topbar-kebab,
.topbar-back {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--t);
  cursor: pointer;
}
.topbar-back:hover,
.topbar-kebab:hover { background: rgba(255, 255, 255, .18); color: #fff; }

.dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 6px;
}
.dropdown-item { border-radius: var(--r-sm); padding: 9px 12px; font-weight: 500; }
.dropdown-item:active { background: var(--green); }

/* --------------------------------------------------------------------------
   Content area
   -------------------------------------------------------------------------- */
.content {
  padding: 18px 16px calc(var(--bottomnav-h) + var(--safe-bottom) + 88px);
  max-width: 1000px;
  margin: 0 auto;
}
.messages { margin-bottom: 12px; }

.alert {
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-title {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 6px 0 18px;
}
.page-head .page-title { margin: 0; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin: 28px 2px 12px;
}
.hint { color: var(--ink-soft); font-size: .88rem; margin: 10px 2px; }
.empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 40px 18px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line);
  box-shadow: var(--shadow-xs);
}

/* --------------------------------------------------------------------------
   Chat-row cards (grouped list, WhatsApp-style)
   -------------------------------------------------------------------------- */
.chat-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  transition: background var(--t);
}
.chat-row + .chat-row { margin-top: 0; }
/* Round + lift the first/last of a contiguous group into one card */
.chat-row:first-of-type { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
.chat-row:last-of-type {
  border-bottom: 0;
  border-bottom-left-radius: var(--r);
  border-bottom-right-radius: var(--r);
}
.chat-row:only-of-type { border-radius: var(--r); }
a.chat-row:hover { background: var(--green-tint); }

.avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), var(--shadow-xs);
}
.avatar-muted { background: linear-gradient(135deg, #b6beb9, #97a19a); }
.avatar-good { background: linear-gradient(135deg, var(--green-bright), var(--green-dark)); }
.avatar-warn { background: linear-gradient(135deg, #e9a23b, var(--warn)); }
.avatar-bad { background: linear-gradient(135deg, #e7635e, var(--bad)); }

.chat-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-title {
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-subtitle {
  color: var(--ink-soft);
  font-size: .86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  text-align: right;
}
.chat-meta-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.chat-meta-sub {
  font-size: .68rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.chat-actions { flex-direction: row; align-items: center; gap: 2px; }

.icon-btn {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background var(--t), color var(--t);
}
.icon-btn:hover { background: var(--green-tint); color: var(--green-dark); }
.chat-actions form { margin: 0; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  font-weight: 600;
  letter-spacing: .02em;
  padding: .36em .62em;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Dashboard stat cards
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 12px;
  text-align: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t), box-shadow var(--t);
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--line);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-num {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
  margin-top: 4px;
  font-weight: 600;
}
.stat-good::before { background: linear-gradient(90deg, var(--green-bright), var(--green-dark)); }
.stat-good .stat-num { color: var(--green-dark); }
.stat-warn::before { background: var(--warn); }
.stat-warn .stat-num { color: var(--warn); }
.stat-bad::before { background: var(--bad); }
.stat-bad .stat-num { color: var(--bad); }

/* --------------------------------------------------------------------------
   Chips (unassigned / duplicate serials)
   -------------------------------------------------------------------------- */
.unassigned-list { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: .86rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  transition: all var(--t);
}
a.chip:hover {
  background: var(--warn-tint);
  border-color: var(--warn);
  color: var(--warn);
  transform: translateY(-1px);
}
.chip .bi { opacity: .7; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.card-form {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 560px;
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink-2); margin-bottom: 6px; }
.form-control,
.form-select {
  border-radius: var(--r-sm);
  border-color: var(--line);
  background-color: #fcfdfc;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.card-form .form-control,
.card-form .form-select { min-height: 46px; }
.form-control:focus,
.form-select:focus {
  border-color: var(--green);
  background-color: #fff;
  box-shadow: 0 0 0 4px var(--green-ring);
}
.form-control::placeholder { color: #aab2ad; }
.form-text { color: var(--ink-soft); }
.field-error { color: var(--bad); font-size: .82rem; font-weight: 500; margin-top: 5px; }
.form-check-input:checked { background-color: var(--green); border-color: var(--green); }
.form-check-input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-ring); }
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

/* Mode tabs (activation intake: paste vs CSV) */
.mode-tabs { margin-bottom: 18px; gap: 6px; }
.mode-tabs .nav-link {
  color: var(--ink-2);
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.mode-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* --------------------------------------------------------------------------
   Filter bar (e.g. settlement date range)
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.filter-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; }
.filter-field label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
}
.filter-field .form-control { min-height: 44px; }
.filter-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-sm);
}
.search-bar:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-ring); }
.search-bar > .bi { color: var(--green-dark); font-size: 1.25rem; }
.search-bar .form-control {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 0;
  font-variant-numeric: tabular-nums;
}
.search-bar .form-control:focus { box-shadow: none; background: transparent; }
.search-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  max-width: 560px;
}
.search-serial {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  margin-bottom: 16px;
  color: var(--green-deep);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-soft); font-weight: 500; }
.kv .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Result banners (import / search outcomes)
   -------------------------------------------------------------------------- */
.result-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--green-tint);
  border: 1px solid rgba(58, 160, 40, .35);
  color: var(--green-deep);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
}
.result-banner .bi { font-size: 1.35rem; line-height: 1.25; flex: 0 0 auto; }
.result-warn {
  background: var(--warn-tint);
  border-color: rgba(201, 122, 26, .4);
  color: #8a5212;
}

/* --------------------------------------------------------------------------
   Floating Action Button (mobile)
   -------------------------------------------------------------------------- */
.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 18px);
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  box-shadow: var(--shadow-brand), var(--shadow-md);
  z-index: 1015;
  transition: transform var(--t), box-shadow var(--t);
}
.fab:hover { color: #fff; transform: translateY(-2px) scale(1.03); }
.fab:active { transform: translateY(0) scale(.97); }

/* --------------------------------------------------------------------------
   Bottom nav (mobile + tablet)
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1020;
  display: flex;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 -2px 12px rgba(20, 40, 25, .06);
}
.bottom-nav a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: var(--bottomnav-h);
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .02em;
  position: relative;
  transition: color var(--t);
}
.bottom-nav a .bi { font-size: 1.35rem; transition: transform var(--t); }
.bottom-nav a.active { color: var(--green-dark); }
.bottom-nav a.active .bi { transform: translateY(-1px); }
.bottom-nav a.active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--green-bright), var(--green-dark));
}

/* --------------------------------------------------------------------------
   Auth pages (bare layout)
   -------------------------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(108, 192, 74, .55), transparent 55%),
    radial-gradient(700px 500px at 100% 100%, rgba(14, 39, 21, .55), transparent 55%),
    linear-gradient(160deg, var(--green-dark) 0%, var(--green-deep) 100%);
}
.auth-messages { width: 100%; max-width: 410px; margin-bottom: 12px; }
.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 34px 30px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--green-deep);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-brand .bi { color: var(--green); -webkit-text-fill-color: var(--green); }
.auth-tag { color: var(--ink-soft); text-align: center; margin: 6px 0 26px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Buttons — Safaricom green, soft depth, tactile press
   -------------------------------------------------------------------------- */
.btn { font-weight: 600; border-radius: var(--r-sm); transition: all var(--t); }
.btn-lg { border-radius: var(--r); }
.btn-success {
  --bs-btn-bg: var(--green);
  --bs-btn-border-color: var(--green);
  --bs-btn-hover-bg: var(--green-dark);
  --bs-btn-hover-border-color: var(--green-dark);
  --bs-btn-active-bg: var(--green-deep);
  --bs-btn-active-border-color: var(--green-deep);
  background: linear-gradient(135deg, var(--green-bright), var(--green-dark));
  border: 0;
  box-shadow: var(--shadow-brand);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: var(--shadow-brand), var(--shadow-sm); }
.btn-success:active { transform: translateY(0); }
.btn-link { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--green-dark); }
.btn-outline-light { --bs-btn-border-color: rgba(255,255,255,.4); }
.text-bg-success { background: linear-gradient(135deg, var(--green-bright), var(--green-dark)) !important; }

/* --------------------------------------------------------------------------
   Tables (desktop)
   -------------------------------------------------------------------------- */
.table-responsive {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table {
  margin: 0;
  --bs-table-bg: transparent;
}
.table > thead th {
  background: var(--line-soft);
  color: var(--ink-soft);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .06em;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.table > tbody td { padding: 13px 16px; border-color: var(--line-soft); vertical-align: middle; }
.table > tbody tr:last-child td { border-bottom: 0; }
.table > tbody tr { transition: background var(--t); }
.table > tbody tr:hover { background: var(--green-tint); }
.table .text-end { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Desktop layout (>=992px): left sidebar + main
   -------------------------------------------------------------------------- */
.sidebar { display: none; }

@media (min-width: 992px) {
  .app-shell { display: flex; min-height: 100vh; }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: 264px;
    flex: 0 0 264px;
    background:
      radial-gradient(600px 300px at 0% 0%, rgba(108, 192, 74, .18), transparent 60%),
      linear-gradient(180deg, var(--green-deep), var(--green-deeper));
    color: #fff;
    padding: 22px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
  }
  .sidebar-brand {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 12px;
  }
  .sidebar-brand .bi { color: #8fe07a; }
  .sidebar-company {
    font-size: .82rem;
    opacity: .72;
    padding: 0 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    margin-bottom: 12px;
  }
  .sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; }
  .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, .82);
    font-weight: 500;
    transition: background var(--t), color var(--t);
  }
  .sidebar-nav a .bi { font-size: 1.2rem; opacity: .9; }
  .sidebar-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .sidebar-nav a.active {
    background: rgba(255, 255, 255, .96);
    color: var(--green-deep);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
  }
  .sidebar-nav a.active .bi { opacity: 1; }
  .sidebar-foot { margin-top: 16px; }
  .sidebar-foot .btn-outline-light:hover { background: rgba(255, 255, 255, .14); }

  .app-main { flex: 1 1 auto; min-width: 0; }

  /* Top bar becomes a slim translucent desktop header; sidebar carries nav. */
  .topbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    color: var(--ink);
    box-shadow: none;
    border-bottom: 1px solid var(--line);
  }
  .topbar-title { display: none; }
  .topbar-kebab { color: var(--ink-soft); }
  .topbar-kebab:hover { background: var(--green-tint); }

  .content { padding: 28px 36px 48px; max-width: 1120px; }

  .stat-grid { grid-template-columns: repeat(6, 1fr); }

  .fab, .bottom-nav { display: none !important; }
}

/* Tablet: roomier stat grid */
@media (min-width: 600px) and (max-width: 991.98px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
