/**
 * firma.css — Tıkla Takip Firma (İnşaat Firması) Web Paneli
 *
 * Shared stylesheet — views link this file and MUST NOT redefine these tokens.
 * Single Source of Truth for all firma panel pages.
 *
 * Mirrors the admin panel visual design but is MOBILE-FIRST RESPONSIVE:
 *   - Sidebar collapses to a slide-over drawer on mobile (< 768 px)
 *   - Tables collapse to card-list on narrow screens (< 640 px)
 *   - All interactive elements meet 44 px minimum touch targets
 *
 * Font: Inter (loaded by each view via Google Fonts <link> — not imported here
 *        to avoid blocking the CDN sheet when offline).
 * Icons: Lucide (loaded by each view via unpkg CDN).
 *
 * Structure
 * ──────────
 *  1. Design Tokens  (:root custom properties)
 *  2. Reset
 *  3. App Shell  (#app, body, html, .main, .content)
 *  4. Sidebar  (.sidebar, .sb-*, .nav-item, .sidebar-overlay)
 *  5. Topbar  (.topbar, .topbar-title, .hamburger, .btn-signout)
 *  6. Buttons  (.btn, .btn-primary, .btn-brand, .btn-danger, .btn-ghost, .btn-block)
 *  7. Badges  (.badge, .badge-*)
 *  8. Cards  (.card, .card-title)
 *  9. Stat Grid  (.stat-grid, .stat, .stat-num, .stat-label)
 * 10. Tables  (.table-wrap, table, thead, tbody, .card-list)
 * 11. Filter Chips  (.chips, .chip)
 * 12. Forms  (.form-card, .field, inputs, .field-err, .global-err, .success-msg)
 * 13. Toast  (.toast-host, .toast, .toast.success/.error/.info)
 * 14. Modal  (.modal-backdrop, .modal, .modal-close)
 * 15. Skeleton  (.skel, @keyframes skel)
 * 16. Auth Pages  (.auth-wrap, .auth-card, .auth-logo, .auth-banner)
 * 17. Spinner  (.spinner, @keyframes spin)
 * 18. Utility
 * 19. Responsive  (@media max-width: 768px / 640px / 380px)
 */


/* ─── 1. Design Tokens ─────────────────────────────────────────────────────── */

:root {
  /* Backgrounds */
  --bg:           #F4F7FB;
  --surface:      #FFFFFF;
  --surface2:     #F8FAFC;

  /* Typography */
  --text:         #0F172A;
  --muted:        #64748B;

  /* Borders */
  --border:       #E5EAF1;

  /* Brand — amber */
  --brand:        #F59E0B;
  --brand-dk:     #D97706;
  --brandSoft:    #FEF3C7;

  /* Accent — blue */
  --accent:       #1D4ED8;
  --accent-dk:    #1E3A8A;
  --accentSoft:   #DBEAFE;

  /* Status — success */
  --success:      #1FAA6B;
  --successSoft:  #DCF5E9;

  /* Status — danger */
  --danger:       #E5484D;
  --dangerSoft:   #FEE2E2;

  /* Status — warning (extends admin palette) */
  --warning:      #EA580C;
  --warningSoft:  #FFEDD5;

  /* Shadows */
  --shadow:       0 4px 18px rgba(15, 23, 42, .06);
  --shadowLg:     0 16px 40px rgba(15, 23, 42, .12);
}


/* ─── 2. Reset ─────────────────────────────────────────────────────────────── */

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

/* Inter loaded by each view's <link>; fall through to system stack */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}


/* ─── 3. App Shell ─────────────────────────────────────────────────────────── */

html,
body {
  height: 100dvh;
}

/* Hidden until JS auth-guard resolves — avoids flash of unauthenticated content */
#app {
  display: none;
  flex-direction: row;
  height: 100dvh;
  overflow: hidden;
}

#app.ready {
  display: flex;
}

/* Scrollable primary column */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;      /* prevent flex blowout */
  overflow-y: auto;
}

/* Inner content area — centred, constrained */
.content {
  padding: 24px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}


/* ─── 4. Sidebar ───────────────────────────────────────────────────────────── */

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow-y: auto;
}

/* Brand / logo strip at top of sidebar */
.sb-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.sb-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}

.sb-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}

.sb-sub {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}

/* Nav list */
nav {
  padding: 12px 10px;
  flex: 1;
}

/* Individual nav link — 44 px min-height for touch */
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  min-height: 44px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active {
  background: var(--accentSoft);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--accent);
}

/* Mobile overlay — hidden on desktop, shown when sidebar is open */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 40;
}


/* ─── 5. Topbar ────────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
  flex: 0 0 auto;
}

.topbar-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--text);
}

/* Hamburger button — hidden on desktop, shown on mobile */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  flex: 0 0 auto;
  transition: border-color .12s, color .12s;
}

.hamburger:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sign-out button pushed to the far right */
.btn-signout {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 7px 13px;
  min-height: 36px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, color .12s;
}

.btn-signout:hover {
  border-color: var(--danger);
  color: var(--danger);
}


/* ─── 6. Buttons ───────────────────────────────────────────────────────────── */

/* Base button — all variants extend this */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, color .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — accent blue */
.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dk);
}

/* Brand — amber */
.btn-brand {
  background: var(--brand);
  color: #fff;
}

.btn-brand:hover:not(:disabled) {
  background: var(--brand-dk);
}

/* Danger — red */
.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #C1121F;
}

/* Ghost — bordered, neutral */
.btn-ghost {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--muted);
}

/* Full-width variant */
.btn-block {
  width: 100%;
}

/* Spinner inside loading buttons */
.btn .spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex: 0 0 auto;
}

.btn.loading .spinner {
  display: block;
}

.btn.loading .btn-text {
  opacity: .7;
}


/* ─── 7. Badges ────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: var(--successSoft);
  color: #166534;
}

.badge-amber {
  background: var(--brandSoft);
  color: #92400E;
}

.badge-red {
  background: var(--dangerSoft);
  color: #991B1B;
}

.badge-gray {
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.badge-blue {
  background: var(--accentSoft);
  color: var(--accent-dk);
}

.badge-orange {
  background: var(--warningSoft);
  color: var(--warning);
}


/* ─── 8. Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 14px;
}


/* ─── 9. Stat Grid ─────────────────────────────────────────────────────────── */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}


/* ─── 10. Tables ───────────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

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

thead th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  text-align: left;
  background: var(--surface2);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg);
}

td {
  padding: 11px 16px;
  color: var(--text);
  vertical-align: middle;
}

/* Empty / loading state row */
.state-row td {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 32px;
}

/*
 * Card-list — mobile substitute for the table.
 * Hidden on desktop; revealed in the 640 px breakpoint below.
 */
.card-list {
  display: none;
}

/* Individual row card inside .card-list */
.card-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.card-list-item:last-child {
  margin-bottom: 0;
}


/* ─── 11. Filter Chips ─────────────────────────────────────────────────────── */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px; /* prevents clipping the bottom of chips on scroll */
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}

/* Prevent wrapping so the row stays horizontal on narrow screens */
.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s;
}

.chip:hover {
  background: var(--bg);
  color: var(--text);
}

.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ─── 12. Forms ────────────────────────────────────────────────────────────── */

/* Optional wrapper card for standalone form pages */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadowLg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
}

/* Field row */
.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

/* All text-like inputs, selects, textareas */
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface2);
  outline: none;
  transition: border-color .15s, background .15s;
  appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

/* Inline field-level error */
.field-err {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.field-err.show {
  display: block;
}

/* Full-form error banner */
.global-err {
  background: var(--dangerSoft);
  border: 1px solid #FECACA;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #991B1B;
  margin-bottom: 16px;
  display: none;
}

.global-err.show {
  display: block;
}

/* Success message */
.success-msg {
  background: var(--successSoft);
  border: 1px solid #A7F3D0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #166534;
  margin-bottom: 16px;
  display: none;
}

.success-msg.show {
  display: block;
}


/* ─── 13. Toast ────────────────────────────────────────────────────────────── */

/* Container — stacks in the bottom-right, above safe-area on iOS */
.toast-host {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadowLg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  pointer-events: all;
  animation: toastIn .2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.toast.success {
  background: var(--successSoft);
  border-color: #A7F3D0;
  color: #166534;
}

.toast.error {
  background: var(--dangerSoft);
  border-color: #FECACA;
  color: #991B1B;
}

.toast.info {
  background: var(--accentSoft);
  border-color: #BFDBFE;
  color: var(--accent-dk);
}


/* ─── 14. Modal ────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  max-width: 440px;
  width: calc(100% - 32px);
  padding: 20px;
  box-shadow: var(--shadowLg);
  position: relative;
  animation: modalIn .2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}


/* ─── 15. Skeleton ─────────────────────────────────────────────────────────── */

.skel {
  background: linear-gradient(
    90deg,
    #eef2f7 0%,
    #f7f9fc 50%,
    #eef2f7 100%
  );
  background-size: 200% 100%;
  animation: skel 1.2s infinite;
  border-radius: 8px;
}

@keyframes skel {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Common skeleton sizes used by views */
.skel-text {
  height: 14px;
  margin-bottom: 8px;
}

.skel-title {
  height: 20px;
  width: 60%;
  margin-bottom: 12px;
}

.skel-num {
  height: 32px;
  width: 70px;
}


/* ─── 16. Auth Pages ───────────────────────────────────────────────────────── */

/* Full-page centering wrapper for sign-in / sign-up pages */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.auth-card {
  max-width: 400px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px 36px;
  box-shadow: var(--shadowLg);
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Logo row inside auth card */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: 0 0 auto;
}

/* Kill-switch / maintenance banner on auth page (amber warning style) */
.auth-banner {
  background: var(--warningSoft);
  border: 1px solid #FED7AA;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--warning);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}


/* ─── 17. Spinner ──────────────────────────────────────────────────────────── */

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex: 0 0 auto;
}

/* Dark variant for use on light backgrounds */
.spinner-dark {
  border-color: rgba(15, 23, 42, .15);
  border-top-color: var(--accent);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Legacy pulse animation (used by old skeleton state-rows) */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}


/* ─── 18. Utility ──────────────────────────────────────────────────────────── */

/* Section heading */
.sec-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

/* Muted helper text */
.text-muted {
  color: var(--muted);
}

/* Action button group (small inline icon-buttons in table rows) */
.action-btns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* Small table action button — not the same as .btn */
.act-btn {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
  text-decoration: none;
}

.act-btn:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
  border-color: var(--muted);
}

.act-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.act-btn.approve {
  color: var(--success);
  border-color: var(--success);
}

.act-btn.approve:hover:not(:disabled) {
  background: var(--successSoft);
}

.act-btn.reject {
  color: var(--danger);
  border-color: var(--danger);
}

.act-btn.reject:hover:not(:disabled) {
  background: var(--dangerSoft);
}

.act-btn.warn {
  color: var(--warning);
  border-color: var(--warning);
}

.act-btn.warn:hover:not(:disabled) {
  background: var(--warningSoft);
}

.act-btn.detail {
  color: var(--accent);
  border-color: var(--accent);
}

.act-btn.detail:hover:not(:disabled) {
  background: var(--accentSoft);
}


/* ─── 19. Responsive ───────────────────────────────────────────────────────── */

/*
 * 768 px — sidebar collapses to a fixed slide-over drawer.
 *           Hamburger button appears in topbar.
 */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .25s ease;
    /* Sidebar is now out of document flow; main fills full width automatically */
  }

  .sidebar.open {
    transform: none;
  }

  /* Dim overlay visible when sidebar is open */
  .sidebar-overlay.open {
    display: block;
  }

  /* Show hamburger in topbar */
  .hamburger {
    display: inline-flex;
  }

  /* Four-column stat grid becomes 2-column */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*
 * 640 px — tables are replaced by stacked card-list; tighter content padding.
 */
@media (max-width: 640px) {
  /* Hide standard table; reveal card-list alternative */
  .table-wrap table {
    display: none;
  }

  .card-list {
    display: block;
  }

  /* Two-column stat grid stays */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Tighter content padding on small phones */
  .content {
    padding: 16px;
  }

  /* Auth card padding adjustment */
  .auth-card {
    padding: 28px 20px;
  }
}

/*
 * 380 px — very narrow phones: single-column everything.
 */
@media (max-width: 380px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .chips {
    /* Already scrolls horizontally; just ensure no wrap */
    flex-wrap: nowrap;
  }
}
