/* =========================================================
   AI Visibility Tracker — premium SaaS aesthetic
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Markazi+Text:wght@700&family=Lato:wght@400;600;700&display=swap');

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

:root {
  --page-bg:     #F5F3EF;
  --nav-bg:      #DA7756;
  --nav-text:    #FAFAF9;
  --card-bg:     #FFFFFF;
  --border:      #E7E5E4;
  --accent:      #DA7756;
  --accent-hover:#C4684A;
  --green:       #16A34A;
  --amber:       #D97706;
  --red:         #DC2626;
  --text:        #1C1917;
  --muted:       #78716C;
  --shadow:      0 1px 3px rgba(0,0,0,0.06);
  --radius-card: 12px;
  --radius-btn:  8px;
  --radius-input:8px;
}

body {
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: #57534E;
  font-size: 14px;
  line-height: 1.6;
}

/* --- NAV --- */
nav {
  background: var(--nav-bg);
  color: var(--nav-text);
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: 0 2rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: #fff;
  text-decoration: none;
  margin-right: 0.5rem;
}

nav a {
  color: var(--nav-text);
  text-decoration: none;
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.65;
  transition: opacity 0.15s;
}
nav a:hover  { opacity: 1; }
nav a.active { opacity: 1; color: #fff; }

nav .spacer { flex: 1; }

nav a[href*="export"] {
  font-size: 0.78rem;
  opacity: 0.5;
}
nav a[href*="export"]:hover { opacity: 0.8; }

/* --- FAB WRAPPER --- */
.fab-wrap {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Tooltip card (hidden until is-running + hover) */
.fab-tooltip {
  display: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 14px;
  width: 280px;
  font-size: 13px;
}
.fab-wrap.is-running .fab-tooltip {
  display: block;
}
.fab-tt-heading {
  font-weight: 700;
  font-size: 13px;
  color: #1C1917;
  margin-bottom: 5px;
}
.fab-tt-detail {
  color: #78716C;
  font-size: 12px;
  margin-bottom: 3px;
}
.fab-tt-count {
  color: #78716C;
  font-size: 12px;
  margin-bottom: 10px;
}
.fab-tt-bar-track {
  height: 6px;
  background: rgba(218,119,86,0.2);
  border-radius: 999px;
  overflow: hidden;
}
.fab-tt-bar-fill {
  height: 100%;
  background: #DA7756;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* The button itself */
.btn-run-fab {
  position: relative;
  overflow: hidden;
  background: #fff;
  color: #DA7756;
  border: none;
  padding: 1.1rem 2.5rem;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 24px rgba(218,119,86,0.4);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, color 0.2s;
}
.btn-run-fab:hover:not(:disabled) {
  background: #FFF5F2;
  box-shadow: 0 6px 20px rgba(218,119,86,0.45);
  transform: translateY(-1px);
}
.btn-run-fab:disabled {
  cursor: default;
  transform: none;
}
.btn-run-fab.is-done {
  color: #16A34A;
  background: #F0FDF4;
  box-shadow: 0 6px 24px rgba(22,163,74,0.25);
}
/* Waiting for Friday — disabled, muted */
.btn-run-fab.is-waiting {
  color: var(--muted);
  background: #F5F3EF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-size: 0.72rem;
  white-space: nowrap;
}
/* New results available — accent colour, subtle pulse */
.btn-run-fab.has-new-results {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 24px rgba(218,119,86,0.5);
}
.btn-run-fab.has-new-results:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(218,119,86,0.55);
}
/* Notification dot */
.fab-dot {
  display: none;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--accent);
  animation: fab-dot-pulse 1.8s ease-in-out infinite;
}
@keyframes fab-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* In-button progress bar (bottom edge) */
.fab-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(218,119,86,0.2);
  display: none;
}
.fab-wrap.is-running .fab-bar-track {
  display: block;
}
.fab-bar-fill {
  display: block;
  height: 100%;
  background: #DA7756;
  transition: width 0.5s ease;
}

/* --- LAYOUT --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

/* --- PAGE HEADER --- */
.page-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.page-header h1 {
  font-family: 'Markazi Text', Georgia, serif;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: #1C1917;
}
.last-updated {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

/* --- METRIC CARDS --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-label {
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card-value {
  font-family: 'Lato', system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #1C1917;
}

.card-delta {
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.delta-up   { color: var(--green); }
.delta-down { color: var(--red); }
.delta-neu  { color: var(--muted); }

/* --- CARD COLOUR CODING --- */
.card-green { border-left: 3px solid var(--green); }
.card-amber { border-left: 3px solid var(--amber); }
.card-red   { border-left: 3px solid var(--red); }

/* --- DASHBOARD TWO-COLUMN GRID --- */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 32px;
}
.dash-col {
  min-width: 0;
}
.dash-col-full {
  grid-column: 1 / -1;
}
.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
@media (max-width: 720px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-col-full { grid-column: 1; }
}

/* --- SECTION HEADINGS --- */
.section-heading {
  font-family: 'Markazi Text', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #1C1917;
  margin: 40px 0 16px;
}

/* --- TABLES --- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #FAFAF9; }
tr:hover td { background: #F5F3EF; }

.text-right  { text-align: right; }
.text-center { text-align: center; }

.badge-yes { color: var(--green); font-weight: 600; }
.badge-no  { color: var(--muted); }

/* --- BADGES (coloured pills) --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: #DCFCE7; color: #15803D; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red   { background: #FEE2E2; color: #991B1B; }

/* --- RANKED LIST --- */
.ranked-list {
  list-style: none;
  counter-reset: rank;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ranked-list li {
  counter-increment: rank;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ranked-list li:last-child { border-bottom: none; }
.ranked-list li:nth-child(even) { background: #FAFAF9; }
.ranked-list li::before {
  content: counter(rank);
  font-weight: 700;
  color: var(--muted);
  min-width: 1.2rem;
  font-size: 0.75rem;
}
.ranked-list .q-text { flex: 1; }
.ranked-list .q-meta {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- MINI BAR (top queries) --- */
.mini-bar-wrap {
  display: inline-block;
  width: 56px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  vertical-align: middle;
  overflow: hidden;
}
.mini-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

/* --- EMPTY STATE --- */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.empty-state h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.empty-state p  { font-size: 0.875rem; }

/* --- FORM (prompts add) --- */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }

.form-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.form-group input,
.form-group select {
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(218,119,86,0.15);
}
.form-group.grow { flex: 1; min-width: 200px; }

.btn {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-btn);
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover { background: #B91C1C; }

/* --- FILTER BAR --- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* --- PAGINATION --- */
.pagination {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
}
.pagination a, .pagination span {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: var(--card-bg);
}
.pagination a:hover { background: var(--page-bg); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pagination .disabled { color: var(--muted); cursor: default; background: transparent; }

/* (progress bar moved into FAB — see .fab-bar-track above) */

/* --- RESPONSE EXPAND --- */
.response-row td { cursor: pointer; }
.response-full {
  display: none;
  white-space: pre-wrap;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--page-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.7;
}
.response-full.open { display: block; }

/* --- BREADCRUMB --- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* --- LINKS --- */
a.row-link { color: var(--accent); text-decoration: none; font-weight: 500; }
a.row-link:hover { text-decoration: underline; }

/* --- TAGS --- */
.tag {
  display: inline-block;
  background: #F1F0EE;
  color: var(--muted);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 500;
  margin-right: 0.2rem;
}

/* --- SHARE OF VOICE BARS (competitors page) --- */
.sov-list { list-style: none; }
.sov-item { margin-bottom: 1rem; }
.sov-name {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sov-bar-wrap {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}
.sov-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease;
}
.sov-bar-fill.is-brand { background: var(--accent); }
.sov-bar-fill.is-comp  { background: #CBD5E1; }

/* --- FILTER TABS (citations page) --- */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.filter-tab {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.filter-tab:hover { background: var(--page-bg); }
.filter-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- HIGHLIGHT MARKS (responses page) --- */
mark.hl-brand {
  background: #DCFCE7;
  color: #15803D;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}
mark.hl-comp {
  background: #FEF3C7;
  color: #92400E;
  border-radius: 3px;
  padding: 0 2px;
  font-style: normal;
}

/* --- BANNER (legacy, keep for block usage) --- */
.banner {
  background: #FEF3C7;
  border-left: 3px solid var(--amber);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}

/* --- RECOMMENDATIONS --- */
.rec-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.rec-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #FAFAF9;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.rec-run  { font-weight: 700; color: var(--text); }
.rec-date { color: var(--muted); }
.rec-model { color: var(--muted); margin-left: auto; font-style: italic; }
.rec-list {
  list-style: decimal;
  padding: 1rem 1rem 1rem 2.25rem;
  margin: 0;
}
.rec-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.rec-list li:last-child { border-bottom: none; }
.rec-action {
  display: block;
  font-weight: 600;
  color: var(--text);
}
.rec-why {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.83rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
}

/* ── Welcome modal ── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.welcome-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  width: min(560px, 92vw);
  padding: 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.welcome-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.welcome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E0DDD8;
  transition: background 0.2s;
}
.welcome-dot.active {
  background: var(--accent, #DA7756);
}
.welcome-steps {
  min-height: 210px;
}
.welcome-step {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}
.welcome-step.active {
  display: flex;
}
.welcome-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.welcome-step h2 {
  font-family: 'Markazi Text', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}
.welcome-step p {
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  max-width: 42ch;
}
.welcome-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.welcome-nav {
  display: flex;
  gap: 0.5rem;
}
.welcome-btn-skip {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0.4rem 0;
}
.welcome-btn-skip:hover { color: var(--text); }
.welcome-btn-back {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}
.welcome-btn-back:hover { background: #F5F4F2; }
.welcome-btn-next {
  background: var(--accent, #DA7756);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
  transition: opacity 0.15s;
}
.welcome-btn-next:hover { opacity: 0.88; }


/* --- Stripe / Subscription --- */
.banner-warning {
  background: #FEF3C7;
  border-left: 3px solid #D97706;
  color: #92400E;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
}
.banner-link-btn {
  background: none;
  border: none;
  color: #92400E;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.btn-secondary {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: #F5F4F2; border-color: #C7C4C0; }

/* =========================================================
   MOBILE NAV — hamburger + drawer
   ========================================================= */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer — hidden by default */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--nav-bg);
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 0.5rem 0 1rem;
  position: sticky;
  top: 56px;
  z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  color: var(--nav-text);
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.75;
  padding: 0.7rem 1.5rem;
  transition: opacity 0.15s, background 0.15s;
}
.nav-mobile-menu a:hover  { opacity: 1; background: rgba(255,255,255,0.08); }
.nav-mobile-menu a.active { opacity: 1; }
.nav-mobile-divider {
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 0.5rem 1.5rem;
}

/* =========================================================
   MOBILE RESPONSIVE — general layout
   ========================================================= */

@media (max-width: 768px) {
  /* Hide desktop nav groups, show hamburger */
  .nav-links     { display: none; }
  .nav-user      { display: none; }
  nav .spacer    { display: none; }
  .nav-hamburger { display: flex; }
  nav            { padding: 0 1rem; gap: 0; }

  /* Tighter page padding */
  .container { padding: 1rem; }

  /* FAB closer to edges */
  .fab-wrap { bottom: 1rem; right: 1rem; }

  /* Tables scroll horizontally */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Section headings */
  .section-heading { font-size: 1.6rem; margin: 20px 0 12px; }

  /* Cards stack nicely */
  .card { padding: 16px; }

  /* Stat grid — 2 columns max on mobile */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
}
