@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ══ Variables ═══════════════════════════════════════ */
:root {
  --orange:          #E8520A;
  --orange-dim:      #F97316;
  --orange-light:    #FFF4EE;
  --orange-border:   #FDDBC9;
  --orange-hover:    #C94409;
  --black:           #0D0D0D;
  --ink:             #1A1A1A;
  --ink-2:           #3D3D3D;
  --ink-3:           #6B6B6B;
  --ink-4:           #686868;
  --rule:            #E8E8E8;
  --surface:         #F8F7F5;
  --surface-2:       #F0EEE9;
  --white:           #FFFFFF;
  --accent-text:     #BC400C;
  --green:           #15803D;
  --green-bg:        #DCFCE7;
  --red:             #DC2626;
  --red-bg:          #FEE2E2;
  --amber:           #D97706;
  --amber-bg:        #FEF3C7;
  --blue:            #2563EB;
  --blue-bg:         #DBEAFE;
  --purple:          #7C3AED;
  --purple-bg:       #EDE9FE;
  /* Badge text: darker shades that meet WCAG AA on the light -bg tints */
  --red-text:        #B91C1C;
  --blue-text:       #1D4ED8;
  --amber-text:      #92400E;

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.07);
  --shadow-md: 0 4px 14px rgba(0,0,0,.09);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.18);

  --font-display: 'Fraunces', Georgia, serif;
  --font-ui:      'Outfit', sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', monospace;

  --nav-h: 60px;
  --sidebar-w: 220px;
  --ease: cubic-bezier(.4,0,.2,1);
  --t: .16s;
}

/* ══ Dark mode ═══════════════════════════════════════ */
[data-theme="dark"] {
  --orange:          #F97316;
  --orange-dim:      #FB923C;
  --orange-light:    #431407;
  --orange-border:   #7C2D12;
  --orange-hover:    #FB923C;
  --black:           #F5F5F5;
  --ink:             #E5E5E5;
  --ink-2:           #D4D4D4;
  --ink-3:           #A3A3A3;
  --ink-4:           #9E9E9E;
  --rule:            #2E2E2E;
  --surface:         #171717;
  --surface-2:       #1E1E1E;
  --white:           #222222;
  --accent-text:     #F97316;
  --green:           #22C55E;
  --green-bg:        #052E16;
  --red:             #EF4444;
  --red-bg:          #450A0A;
  --amber:           #F59E0B;
  --amber-bg:        #451A03;
  --blue:            #3B82F6;
  --blue-bg:         #172554;
  --purple:          #A78BFA;
  --purple-bg:       #2E1065;
  /* Badge text: lighter shades that meet WCAG AA on the dark -bg tints */
  --red-text:        #FCA5A5;
  --blue-text:       #93C5FD;
  --amber-text:      #FCD34D;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.3);
  --shadow-sm: 0 2px 6px rgba(0,0,0,.4);
  --shadow-md: 0 4px 14px rgba(0,0,0,.5);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.6);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.7);
}
[data-theme="dark"] body { background: var(--surface); color: var(--ink); }
[data-theme="dark"] img { opacity: .9; }
/* Login & loading overlays now use theme variables directly (var(--surface)/var(--white)/var(--ink)) — no hardcoded overrides needed. */
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: var(--white) !important; color: var(--ink) !important; border-color: var(--rule) !important;
}
[data-theme="dark"] ::placeholder { color: var(--ink-4) !important; }
[data-theme="dark"] #shortcutHint { background: var(--ink); color: var(--surface); }
[data-theme="dark"] .skip-link { background: var(--orange); }
[data-theme="dark"] #globalSearchOverlay > div { background: var(--white) !important; border-color: var(--rule) !important; }
[data-theme="dark"] #notifPanel { background: var(--white) !important; border-color: var(--rule) !important; }

/* ══ Reset ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-ui); background: var(--surface); color: var(--ink); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-ui); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-ui); }
ul { list-style: none; }

/* ══ Accessibility: Skip Link ════════════════════════ */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--orange);
  color: #fff;
  padding: 8px 16px;
  z-index: 100000;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.2s;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ══ Accessibility: Screen Reader Only ═══════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ══ Accessibility: Focus Indicators (WCAG 2.4.7) ═══ */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ══ Accessibility: Minimum Touch Target (WCAG 2.5.8) */
button, [onclick], a[href], input, select, textarea {
  min-width: 24px;
  min-height: 24px;
}

/* ══ Accessibility: Reduced Motion (WCAG 2.3.3) ═════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══ Typography ══════════════════════════════════════ */
.t-display { font-family: var(--font-display); }
h1,h2,h3 { font-family: var(--font-display); }

/* ══ Top Navigation ══════════════════════════════════ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 0;
}
.topnav-brand {
  display: flex; align-items: center; gap: 10px;
  margin-right: 32px; flex-shrink: 0;
}
.topnav-logo {
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--orange); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-size: 1rem;
  color: var(--white); font-weight: 600;
}
.topnav-name {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 700; letter-spacing: -.02em; color: var(--black);
}
.topnav-tabs {
  display: flex; align-items: stretch; gap: 2px;
  height: 100%; flex: 1;
}
.tab-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px; height: 100%;
  font-size: .82rem; font-weight: 500; color: var(--ink-3);
  border-bottom: 2px solid transparent;
  transition: all var(--t) var(--ease);
  white-space: nowrap; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.tab-btn:hover { color: var(--ink); background: var(--surface); }
.tab-btn.active { color:var(--accent-text); border-bottom-color: var(--orange); font-weight: 600; }
.tab-btn .tab-icon { font-size: .95rem; }
.topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ══ Page Shell ══════════════════════════════════════ */
.page-shell {
  margin-top: var(--nav-h);
  min-height: calc(100vh - var(--nav-h));
}
.page { display: none; animation: pageIn .2s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ Skeleton loading ═══════════════════════════════ */
.skeleton-bar {
  height: 14px;
  background: linear-gradient(90deg, var(--rule) 25%, var(--surface-2) 50%, var(--rule) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--rule) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}
.skeleton-card {
  height: 80px;
  margin-bottom: 8px;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.page-inner { max-width: 1200px; margin: 0 auto; padding: 32px 28px 64px; }

/* ══ Page Header ═════════════════════════════════════ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px; flex-wrap: wrap;
}
.page-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.page-subtitle { font-size: .875rem; color: var(--ink-3); margin-top: 4px; font-weight: 400; font-family: var(--font-ui); }
.page-actions { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }

/* ══ Buttons ═════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-ui); font-size: .82rem; font-weight: 600;
  padding: 8px 16px; border-radius: var(--r-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: all var(--t) var(--ease); white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--orange); color: var(--white); border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,82,10,.35); }
.btn-outline { background: var(--white); color: var(--ink); border-color: var(--rule); }
.btn-outline:hover { border-color: var(--orange); color:var(--accent-text); }
.btn-ghost { background: transparent; color: var(--ink-3); border-color: transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--ink); }
.btn-danger { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-danger:hover { opacity: .88; }
.btn-sm { padding: 5px 11px; font-size: .78rem; }
.btn-xs { padding: 3px 8px; font-size: .72rem; }
.btn-lg { padding: 11px 22px; font-size: .9rem; }
.btn-icon { padding: 7px; aspect-ratio: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ══ Cards ═══════════════════════════════════════════ */
.card {
  background: var(--white); border-radius: var(--r-lg);
  border: 1px solid var(--rule); box-shadow: var(--shadow-xs);
}
.card-pad { padding: 22px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--rule);
}
.card-title { font-size: .9rem; font-weight: 700; letter-spacing: -.01em; }
.card-body { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--rule); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); }

/* ══ KPI Cards ═══════════════════════════════════════ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi-card {
  background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-xs);
}
.kpi-label { font-size: .7rem; font-weight: 600; color: var(--ink-4); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.kpi-value { font-size: 2rem; font-weight: 700; font-family: var(--font-display); letter-spacing: -.04em; line-height: 1; color: var(--black); }
.kpi-trend { font-size: .72rem; color: var(--green); font-weight: 500; margin-top: 5px; }
.kpi-trend.down { color: var(--red); }
.kpi-icon-wrap {
  width: 44px; height: 44px; border-radius: var(--r-md); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.kpi-icon-wrap.orange { background: var(--orange-light); }
.kpi-icon-wrap.green  { background: var(--green-bg); }
.kpi-icon-wrap.blue   { background: var(--blue-bg); }
.kpi-icon-wrap.purple { background: var(--purple-bg); }

/* ══ Grid layouts ════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 18px; }

/* ══ Table ═══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-size: .7rem; font-weight: 600; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 10px 16px; background: var(--surface);
  text-align: left; border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--rule); transition: background var(--t) var(--ease); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
tbody td { padding: 11px 16px; font-size: .84rem; color: var(--ink); vertical-align: middle; }
.td-mono { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-3); }

/* ══ Avatar ══════════════════════════════════════════ */
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: var(--white);
  flex-shrink: 0;
}
.avatar-sm { width: 24px; height: 24px; font-size: .65rem; }

/* ══ Badges ══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: .7rem; font-weight: 600; letter-spacing: .02em;
}
.badge-active       { background: var(--green-bg);  color: var(--green); }
.badge-unsubscribed { background: var(--surface-2); color: var(--ink-3); }
.badge-bounced      { background: var(--red-bg);    color: var(--red-text); }
.badge-sent         { background: var(--green-bg);  color: var(--green); }
.badge-draft        { background: var(--surface-2); color: var(--ink-3); }
.badge-scheduled    { background: var(--blue-bg);   color: var(--blue-text); }
.badge-delivered    { background: var(--green-bg);  color: var(--green); }
.badge-reserved     { background: var(--amber-bg);  color: var(--amber-text); }
.badge-pending      { background: var(--amber-bg);  color: var(--amber-text); }
.badge-inactive     { background: var(--surface-2); color: var(--ink-3); }
.badge-orange       { background: var(--orange-light); color:var(--accent-text); }

/* ══ Forms ═══════════════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: .75rem; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.form-hint  { font-size: .72rem; color: var(--ink-4); margin-top: 3px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

input[type="text"], input[type="email"], input[type="date"],
input[type="number"], input[type="datetime-local"], select, textarea {
  font-family: var(--font-ui); font-size: .85rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--rule);
  border-radius: var(--r-sm); padding: 9px 12px;
  width: 100%; transition: border-color var(--t);
  outline: none; appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,82,10,.1);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 1px;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239B9B9B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
textarea { min-height: 80px; resize: vertical; line-height: 1.6; }

/* ══ Checkbox / Tag pills ════════════════════════════ */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill {
  padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
  border: 1.5px solid transparent; transition: all var(--t);
}
.tag-pill:hover { border-color: var(--orange); color:var(--accent-text); }
.tag-pill.selected { background: var(--orange-light); color:var(--accent-text); border-color: var(--orange); }

/* ══ Progress bar ════════════════════════════════════ */
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); border-radius: 20px; transition: width .4s var(--ease); }
.progress-fill.green  { background: var(--green); }
.progress-fill.blue   { background: var(--blue); }

/* ══ Divider ═════════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--rule); margin: 20px 0; }
.divider-sm { margin: 12px 0; }

/* ══ Empty state ═════════════════════════════════════ */
.empty-state { text-align: center; padding: 52px 24px; color: var(--ink-4); }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 14px; }
.empty-state h3 { font-size: .95rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; font-family: var(--font-ui); }
.empty-state p  { font-size: .83rem; line-height: 1.6; }

/* ══ Section header ══════════════════════════════════ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: .88rem; font-weight: 700; letter-spacing: -.01em; }
.section-link  { font-size: .78rem; color:var(--accent-text); font-weight: 500; cursor: pointer; }
.section-link:hover { text-decoration: underline; }

/* ══ Stat row (inside card) ══════════════════════════ */
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.stat-row:last-child { border-bottom: none; }
.stat-row-label { font-size: .82rem; color: var(--ink-3); }
.stat-row-value { font-size: .88rem; font-weight: 700; color: var(--ink); }

/* ══ Modal ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,13,.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white); border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl); width: 100%;
  max-height: 90vh; display: flex; flex-direction: column;
  transform: translateY(20px) scale(.97);
  transition: transform .22s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-sm  { max-width: 480px; }
.modal-md  { max-width: 640px; }
.modal-lg  { max-width: 820px; }
.modal-xl  { max-width: 1000px; }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--rule); flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.modal-subtitle { font-size: .78rem; color: var(--ink-4); margin-top: 2px; }
.modal-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); color: var(--ink-4); font-size: 1rem;
  transition: all var(--t); cursor: pointer; background: none; border: none;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--surface); color: var(--ink); }

.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--rule); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

/* Stepper */
.stepper { display: flex; gap: 0; margin-bottom: 24px; }
.step {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--ink-4); font-weight: 500;
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; flex-shrink: 0;
  transition: all var(--t);
}
.step.active .step-num    { border-color: var(--orange); background: var(--orange); color: var(--white); }
.step.active              { color: var(--ink); }
.step.done .step-num      { border-color: var(--green); background: var(--green); color: var(--white); }
.step-line { flex: 1; height: 1px; background: var(--rule); margin: 0 6px; }
.step-dot { display: none; }

/* ══ Quill overrides ═════════════════════════════════ */
.ql-toolbar { border-radius: var(--r-sm) var(--r-sm) 0 0 !important; border-color: var(--rule) !important; background: var(--surface); font-family: var(--font-ui) !important; }
.ql-container { border-radius: 0 0 var(--r-sm) var(--r-sm) !important; border-color: var(--rule) !important; font-family: var(--font-ui) !important; font-size: .875rem !important; }
.ql-editor { min-height: 220px; line-height: 1.7; }
.ql-editor.ql-blank::before { color: var(--ink-4) !important; font-style: normal !important; }
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover { color:var(--accent-text) !important; }
.ql-snow.ql-toolbar button.ql-active { color:var(--accent-text) !important; }

/* ══ Chart containers ════════════════════════════════ */
.chart-wrap { position: relative; }
.chart-wrap canvas { max-width: 100%; }

/* ══ Compliance checklist ════════════════════════════ */
.compliance-list { display: flex; flex-direction: column; gap: 8px; }
.compliance-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--rule);
  font-size: .82rem; transition: border-color var(--t);
}
.compliance-item.pass  { border-color: var(--green); background: var(--green-bg); }
.compliance-item.fail  { border-color: var(--red);   background: var(--red-bg); }
.compliance-item.warn  { border-color: var(--amber); background: var(--amber-bg); }
.compliance-icon { font-size: .95rem; flex-shrink: 0; margin-top: 1px; }
.compliance-text strong { display: block; font-weight: 600; margin-bottom: 1px; }
.compliance-text span   { color: var(--ink-3); font-size: .75rem; }

/* ══ Ad slot badge ═══════════════════════════════════ */
.ad-slot {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-sm);
  background: var(--orange-light); color:var(--accent-text);
  font-size: .72rem; font-weight: 600; border: 1px solid var(--orange-border);
}

/* ══ Toast ═══════════════════════════════════════════ */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--black); color: var(--white);
  padding: 11px 18px; border-radius: var(--r-md);
  font-size: .83rem; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-xl); z-index: 9999;
  transform: translateY(20px); opacity: 0;
  transition: all .25s var(--ease); max-width: 340px;
  border-left: 3px solid var(--orange);
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-left-color: var(--green); }
#toast.error   { border-left-color: var(--red); }

/* ══ Scrollbar ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ══ Sparklines ═════════════════════════════════════ */
.kpi-sparkline { flex-shrink: 0; width: 80px; height: 32px; }

/* ══ Sortable table headers ════════════════════════ */
th.sortable { cursor: pointer; user-select: none; transition: color .12s; }
th.sortable:hover { color:var(--accent-text); }

/* ══ Button group ══════════════════════════════════ */
.btn-group { display: flex; gap: 2px; background: var(--surface); border-radius: var(--r-sm); padding: 2px; border: 1px solid var(--rule); }
.btn-group .btn-ghost.active { background: var(--white); box-shadow: var(--shadow-xs); color:var(--accent-text); font-weight: 600; }

/* ══ Utilities ═══════════════════════════════════════ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 14px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 28px; }
.mt-auto { margin-top: auto; }
.text-sm { font-size: .8rem; }
.text-xs { font-size: .72rem; }
.text-muted { color: var(--ink-4); }
.text-orange { color:var(--accent-text); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════
   AUTOMATION BUILDER
   ═══════════════════════════════════════════════════ */

.auto-builder {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
}

.auto-builder-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  flex-shrink: 0;
}

.auto-builder-header .auto-name-input {
  font-size: 1.1rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  flex: 1;
  min-width: 0;
}

.auto-builder-header .auto-name-input:focus {
  border-color: var(--orange);
  background: var(--white);
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.auto-builder-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.auto-builder-canvas {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auto-builder-sidebar {
  width: 320px;
  border-left: 1px solid var(--rule);
  background: var(--white);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  flex-shrink: 0;
}

.auto-builder-sidebar * {
  max-width: 100%;
  box-sizing: border-box;
}

.auto-node {
  width: 340px;
  padding: 14px 16px;
  background: var(--white);
  border: 2px solid var(--rule);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.auto-node:hover {
  border-color: var(--ink-3);
}

.auto-node--trigger {
  border-top: 3px solid var(--orange);
}

.auto-node--selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 82, 10, 0.15);
}

.auto-node--step {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.auto-node--dragging {
  opacity: 0.4;
  transform: scale(0.95);
  box-shadow: none !important;
}

.auto-node--step.drag-above {
  transform: translateY(4px);
}

.auto-node--step.drag-below {
  transform: translateY(-4px);
}

.auto-drag-handle {
  cursor: grab;
  color: var(--ink-4);
  font-size: 14px;
  user-select: none;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.auto-drag-handle:active {
  cursor: grabbing;
}

.auto-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink-6);
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.auto-connector {
  width: 2px;
  height: 32px;
  background: var(--rule);
  margin: 0 auto;
  transition: height 0.15s ease;
}

.auto-insert-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px dashed var(--rule);
  background: var(--white);
  color: var(--ink-4);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.15s ease, transform 0.15s ease;
}

.auto-insert-btn:hover {
  border-color: var(--orange);
  color:var(--accent-text);
  background: var(--orange-light, #fef3ee);
  transform: scale(1.15);
}

.auto-drop-indicator {
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  width: 340px;
  margin: 4px auto;
  animation: dropPulse 0.8s ease infinite;
}

@keyframes dropPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Smooth insert/remove animations */
.auto-node-enter {
  animation: nodeEnter 0.2s ease forwards;
}

@keyframes nodeEnter {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auto-add-step {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1.5px dashed var(--rule);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.auto-add-step:hover {
  border-color: var(--orange);
  color:var(--accent-text);
}

.auto-sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-4);
  margin-bottom: 12px;
}

/* ══ Loading spinner (empty page state) ══════════════ */
.page:empty::after {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 80px auto;
  border: 3px solid var(--rule);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ══ Compose mobile — hidden by default on desktop ═ */
.compose-more-tools-btn { display: none; }

/* ═══════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════ */

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--rule);
  z-index: 1000;
  padding: 4px 0;
  padding-bottom: env(safe-area-inset-bottom, 4px);
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--ink-4);
  font-size: 10px;
  cursor: pointer;
  border-radius: 8px;
  transition: all .15s;
  text-decoration: none;
}

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

.mobile-nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════
   MOBILE CARDS — Campaign & Subscriber card lists
   ═══════════════════════════════════════════════════ */

/* Hidden on desktop, shown on mobile via @media block above */
.campaign-mobile-cards,
.sub-mobile-cards {
  display: none;
  padding: 12px 16px;
}

.campaign-mobile-card,
.sub-mobile-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.campaign-mobile-card:active,
.sub-mobile-card:active {
  box-shadow: 0 0 0 2px var(--orange-border);
  background: var(--orange-light);
}

.campaign-mobile-card-top,
.sub-mobile-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.campaign-mobile-card-subject {
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  flex: 1;
  line-height: 1.3;
}

.campaign-mobile-card-meta,
.sub-mobile-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .75rem;
  color: var(--ink-4);
}

/* ═══════════════════════════════════════════════════
   BOTTOM SHEET — Mobile action panels
   ═══════════════════════════════════════════════════ */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 9998;
  opacity: 0;
  transition: opacity .25s;
  display: none;
}

.bottom-sheet-overlay.open {
  display: block;
  opacity: 1;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.15);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 9999;
  padding: 0 16px 24px;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-handle {
  width: 36px;
  height: 4px;
  background: #d4d4d4;
  border-radius: 2px;
  margin: 12px auto 16px;
}

.bottom-sheet-title {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.bottom-sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: .9rem;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
  touch-action: manipulation;
}

.bottom-sheet-action:active {
  background: var(--surface);
}

.bottom-sheet-action span {
  font-size: 1.1rem;
  width: 28px;
  text-align: center;
}

/* Safe area for iPhone bottom bar */
.bottom-sheet {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ── Mobile Nav FAB center button ────────────────── */
.mobile-nav-fab {
  position: relative;
  top: -12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 82, 10, 0.4);
  flex: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-fab span {
  font-size: 1.3rem;
  color: #fff;
}

/* ── Collapsible dashboard sections (mobile) ─────── */
.collapsible-section .section-title {
  user-select: none;
}

.collapse-arrow {
  display: inline-block;
  font-size: .7rem;
  color: var(--ink-4);
  transition: transform .2s;
  flex-shrink: 0;
}

/* ── Keyboard shortcut hints ──────────────────────── */
[data-shortcut] {
  position: relative;
}

[data-shortcut]::after {
  content: attr(data-shortcut);
  display: none;
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: .6rem;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 100;
}

[data-shortcut]:hover::after {
  display: block;
}

/* ── Mobile-only elements: hidden on desktop ─────────────── */
.mobile-show { display: none; }
.dashboard-show-more, .analytics-show-more { display: none; }

/* ═══════════════════════════════════════════════════════════
   MOBILE — Single consolidated responsive section
   Breakpoint: 768px (tablets+phones), 480px (small phones)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* ── Layout ────────────────────────────────────── */
  .sidebar { display: none; }
  .main-content, .page-shell { padding-bottom: 72px; margin-left: 0; }
  .page-inner { padding: 16px 12px 80px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 8px; }
  .page-actions { width: 100%; flex-wrap: wrap; gap: 6px; }
  .page-title { font-size: 1.3rem; }

  /* ── Mobile Bottom Nav ─────────────────────────── */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--rule);
    z-index: 1000;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
    box-shadow: 0 -2px 10px rgba(0,0,0,.06);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 4px;
    border: none; background: none;
    color: var(--ink-4); font-size: 9px;
    cursor: pointer; text-decoration: none;
  }
  .mobile-nav-item.active { color:var(--accent-text); }
  .mobile-nav-item span { font-size: 18px; line-height: 1; }

  .mobile-nav-fab {
    position: relative; top: -14px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--orange); color: #fff;
    box-shadow: 0 2px 8px rgba(232,82,10,.4);
    flex: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .mobile-nav-fab span { font-size: 1.2rem; color: #fff; }

  /* ── Grids ──────────────────────────────────────── */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 8px; }
  .form-row { flex-direction: column; }

  /* ── KPI Grid — horizontal scroll ──────────────── */
  .kpi-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding-bottom: 8px;
    grid-template-columns: unset;
  }
  .kpi-grid > .card { min-width: 140px; flex-shrink: 0; scroll-snap-align: start; }
  .kpi-grid::-webkit-scrollbar { display: none; }

  /* ── Cards ──────────────────────────────────────── */
  .card { border-radius: 10px; }
  .card-pad { padding: 14px; }

  /* ── Buttons — touch targets ────────────────────── */
  .btn { min-height: 40px; min-width: 40px; font-size: .85rem; }
  .btn-xs, .btn-sm { min-height: 34px; padding: 6px 12px; }
  button, a, [onclick] { touch-action: manipulation; }

  /* ── Inputs — prevent iOS zoom ──────────────────── */
  input, select, textarea { font-size: 16px; }

  /* ── Touch feedback ─────────────────────────────── */
  .card:active, .btn:active, .bottom-sheet-action:active,
  .campaign-mobile-card .card-content:active, .sub-mobile-card:active {
    transform: scale(0.98); opacity: 0.9;
  }
  .card, .btn, .campaign-mobile-card .card-content, .sub-mobile-card {
    transition: transform .1s, opacity .1s;
  }

  /* ── Top bar compact ────────────────────────────── */
  .top-bar { padding: 8px 12px; }
  .top-bar .search-trigger, .top-bar .notification-bell { display: none; }

  /* ── Modals — full screen slide up ──────────────── */
  .modal {
    width: 100%; max-width: 100%;
    height: 100vh; max-height: 100vh;
    border-radius: 0; margin: 0;
  }

  /* ── Tables → Mobile cards ──────────────────────── */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .campaign-table-wrap, .sub-table-wrap { display: none; }
  .campaign-mobile-cards, .sub-mobile-cards { display: block; }

  /* ── Campaign mobile cards ──────────────────────── */
  .campaign-mobile-card {
    position: relative; overflow: hidden;
    margin-bottom: 8px; border-radius: 10px;
    border: 1px solid var(--rule); background: var(--white);
  }
  .campaign-mobile-card .card-content { padding: 14px; position: relative; z-index: 1; background: var(--white); }
  .campaign-mobile-card .swipe-delete {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 80px; background: #dc2626; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: .8rem; font-weight: 600;
    transform: translateX(80px); transition: transform .2s;
  }
  .campaign-mobile-card.swiped .swipe-delete { transform: translateX(0); }
  .campaign-mobile-card.swiped .card-content { transform: translateX(-80px); transition: transform .2s; }

  /* ── Subscriber mobile cards ────────────────────── */
  .sub-mobile-card {
    padding: 14px; margin-bottom: 8px; border-radius: 10px;
    border: 1px solid var(--rule); background: var(--white);
  }

  /* ── Compose — auto builder ─────────────────────── */
  .auto-builder { height: calc(100vh - 130px); }
  .auto-builder-body { flex-direction: column; }
  .auto-builder-sidebar { width: 100%; max-height: 50vh; border-left: none; border-top: 1px solid var(--rule); }
  .auto-builder-header { flex-wrap: wrap; gap: 6px; padding: 8px 12px; }
  .auto-builder-header .auto-name-input { width: 100%; order: -1; }
  .auto-builder-canvas { padding: 12px; }

  /* ── Compose — progressive disclosure ────────────── */
  .compose-advanced { display: none; }
  .compose-more-tools-btn { display: inline-flex !important; }

  /* ── Compose stepper — dots ─────────────────────── */
  .stepper { display: flex; gap: 6px; align-items: center; }
  .stepper .step { flex: 0 0 auto; gap: 0; }
  .stepper .step-num, .stepper .step-label, .stepper .step-line { display: none; }
  .step-dot { display: block; }
  .stepper .step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
  .stepper .step-dot.active { background: var(--orange); width: 24px; border-radius: 5px; }
  .stepper .step-dot.done { background: #16a34a; }

  /* ── Block editor ──────────────────────────────── */
  .be-left-palette { display: none; }
  .be-canvas { padding: 12px; }
  .be-mobile-add-btn {
    display: flex; position: fixed; bottom: 140px; right: 16px;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--orange); color: #fff; font-size: 1.5rem;
    border: none; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(232,82,10,.4); z-index: 100;
  }

  /* ── Automation nodes ──────────────────────────── */
  .auto-node { width: 100%; max-width: 340px; }

  /* ── Filter tabs scrollable ────────────────────── */
  .flex.gap-1 {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; flex-wrap: nowrap;
  }
  .flex.gap-1::-webkit-scrollbar { display: none; }

  /* ── Settings accordion ────────────────────────── */
  .settings-section-root.settings-collapsed > *:not(.settings-section-header) { display: none; }
  .settings-section-header {
    cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; user-select: none; padding: 4px 0;
  }
  .settings-section-header::after {
    content: '\25BC'; font-size: .7rem; color: var(--ink-4);
    transition: transform .2s; flex-shrink: 0; margin-left: 8px;
  }
  .settings-section-root.settings-collapsed > .settings-section-header::after {
    transform: rotate(-90deg);
  }

  /* ── Touch-friendly spacing improvements ─────── */
  .flex.gap-2 { gap: 8px; }
  .bottom-sheet-action { min-height: 48px; font-size: .95rem; }
  .form-group { margin-bottom: 12px; }
  .form-label { font-size: .85rem; margin-bottom: 6px; }
  .badge { font-size: .7rem; padding: 3px 8px; }
  .stat-row { padding: 8px 0; }
  #globalSearchOverlay input { font-size: 16px; }

  /* ── Radical simplification — hide secondary content ── */
  .desktop-only { display: none !important; }

  /* Dashboard: only show Quick Capture + KPIs + 1-2 key cards */
  .dashboard-secondary { display: none; }

  /* Page actions: collapse into single menu button on mobile */
  .page-actions .btn:not(:first-child):not(.mobile-show) { display: none; }

  /* Quick actions row: hide on mobile (FAB replaces this) */
  .quick-actions-row { display: none; }

  /* Reduce card padding for density */
  .card-pad { padding: 12px; }

  /* Smaller section titles */
  .section-title { font-size: .75rem; }

  /* Compact stat rows */
  .stat-row { padding: 6px 0; font-size: .8rem; }

  /* Hide verbose descriptions */
  .page-subtitle { display: none; }

  /* Campaign list: simpler cards */
  .campaign-mobile-card .campaign-meta-extra { display: none; }

  /* Audience: hide secondary sections */
  .audience-secondary { display: none; }

  /* Analytics: only show top charts, collapse rest */
  .analytics-secondary { display: none; }

  /* Settings: ultra compact */
  .settings-description { display: none; }

  /* Compose: minimal header */
  .compose-header-extra { display: none; }

  /* Mobile-show utility: visible only on mobile */
  .mobile-show { display: inline-flex !important; }

  /* Reduce font sizes slightly for density */
  .page-title { font-size: 1.2rem; }
  body { font-size: 14px; }

  /* Cards: tighter margins */
  .card { margin-bottom: 8px; }
  .mb-4 { margin-bottom: 8px !important; }
  .mb-3 { margin-bottom: 6px !important; }

  /* Simpler badges */
  .badge { padding: 2px 6px; font-size: .65rem; }

  /* Show-more buttons visible only on mobile */
  .dashboard-show-more, .analytics-show-more { display: block; }
}

/* ── Small phones ────────────────────────────────── */
@media (max-width: 480px) {
  .page-inner { padding: 12px 8px 80px; }
  .page-title { font-size: 1.1rem; }
  .card-pad { padding: 12px; }
  .btn { font-size: .8rem; padding: 8px 12px; }
  .mobile-nav-item { font-size: 8px; padding: 4px 2px; }
  .mobile-nav-item span { font-size: 16px; }
  .page-actions { flex-direction: column; }
  .page-actions .btn { width: 100%; }
}
