:root {
  /* Indigo/amber palette, matching jobpilot.autovibe.co.nz's brand language.
     Names kept from the original palette so every rule below (buttons,
     badges, cards) picks up the new colors without a rewrite; only the
     *values* changed, plus the handful of rules noted below that used
     these as full dark-page backgrounds and are now light instead. */
  --navy-950: #172554;
  --navy-900: #1e3a8a;
  --navy-800: #1e40af;
  --navy-700: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --cyan-400: #f59e0b;
  --green-500: #16a34a;
  --green-100: #dcfce7;
  --amber-500: #d97706;
  --amber-100: #fef3c7;
  --red-500: #dc2626;
  --red-100: #fee2e2;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --line: #e2e8f0;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.06), 0 16px 32px rgba(15, 23, 42, 0.08);
  --shadow-glow: 0 8px 20px rgba(37, 99, 235, 0.28);
  --radius: 14px;
  --radius-sm: 10px;
  --ease: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 232px;
}

* { box-sizing: border-box; }

/* Author rules that set `display` on a class (e.g. .field, .checkbox-row)
   otherwise beat the browser's default `[hidden] { display: none }` UA rule
   at equal specificity, silently un-hiding anything hidden via that class. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-muted);
  color: var(--ink-900);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

button, input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- Brand mark ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-accent { color: var(--blue-500); }
.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.mark svg { width: 19px; height: 19px; }
.mark-lg { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35); }
.mark-lg svg { width: 46px; height: 46px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
  color: #bfd2f0;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand { color: #fff; padding: 0 8px; }

.nav-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7391c4;
  padding: 0 12px;
  margin-bottom: 6px;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: #bfd2f0;
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.nav-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; transition: opacity var(--ease); }
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-link.active { background: var(--blue-500); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45); }
.nav-link.active svg { opacity: 1; }

.sidebar-footer { margin-top: auto; font-size: 12px; color: #7391c4; padding: 0 8px; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 14px; }
.sidebar-footer > div:first-child { color: #fff !important; }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h1 { font-size: 19px; }
.topbar-heading { display: flex; align-items: center; gap: 12px; }
.topbar-logo { height: 30px; width: auto; max-width: 120px; object-fit: contain; border-radius: 6px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.content { padding: 24px 28px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- Cards / surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad { padding: 20px 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d5deed; }

.stat-card .stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-card .stat-label { font-size: 12px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.stat-card .stat-value { font-size: 27px; font-weight: 800; color: var(--ink-900); letter-spacing: -0.01em; }
.stat-card .stat-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-icon.blue { background: #e7edff; color: var(--blue-500); }
.stat-icon.green { background: var(--green-100); color: var(--green-500); }
.stat-icon.amber { background: var(--amber-100); color: var(--amber-500); }
.stat-icon.red { background: var(--red-100); color: var(--red-500); }

.hero-banner {
  background: linear-gradient(120deg, var(--navy-900), var(--blue-500) 140%);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.hero-banner .hero-label { font-size: 12px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }
.hero-banner .hero-value { font-size: 24px; font-weight: 800; margin-top: 4px; }
.hero-banner.plan { background: linear-gradient(120deg, #0d6b4c, var(--green-500) 140%); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  gap: 6px;
  min-height: 38px;
  padding: 9px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-900);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color var(--ease), border-color var(--ease), box-shadow var(--ease), transform 100ms ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-muted); border-color: #cdd8e8; }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
  border-color: var(--blue-500);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--blue-500), #1d4ed8); box-shadow: var(--shadow-glow); }
.btn-danger { background: var(--red-500); border-color: var(--red-500); color: #fff; }
.btn-danger:hover { background: #c22e39; }
.btn-view { background: #0d9488; border-color: #0d9488; color: #fff; }
.btn-view:hover { background: #0b7d73; }
.btn-edit { background: var(--amber-500); border-color: var(--amber-500); color: #fff; }
.btn-edit:hover { background: #b45f04; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-sm { min-height: 32px; padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.field .hint { font-size: 11.5px; color: var(--ink-500); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="date"], input[type="datetime-local"], select, textarea {
  padding: 10px 12px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-900);
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.checkbox-row input { width: auto; }

.toggle { position: relative; display: inline-block; width: 38px; height: 21px; flex-shrink: 0; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle-track { position: absolute; inset: 0; background: var(--ink-300); border-radius: 999px; transition: background 0.15s ease; }
.toggle-track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}
.toggle input:checked + .toggle-track { background: var(--blue-500); }
.toggle input:checked + .toggle-track::before { transform: translateX(17px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.toggle input:disabled + .toggle-track { opacity: 0.5; }
.toggle input:disabled { cursor: not-allowed; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color 100ms ease; }
tbody tr:hover { background: var(--surface-muted); }
.text-right { text-align: right; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-green { background: var(--green-100); color: var(--green-500); }
.badge-amber { background: var(--amber-100); color: var(--amber-500); }
.badge-red { background: var(--red-100); color: var(--red-500); }
.badge-blue { background: #e7edff; color: var(--blue-500); }
.badge-teal { background: #ccfbf1; color: #0d9488; }
.badge-gray { background: var(--surface-muted); color: var(--ink-500); }
.pill-mono {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--navy-900);
  color: #cfe0ff;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Misc ---------- */
.muted { color: var(--ink-500); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input { position: relative; flex: 1; min-width: 220px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 9px;
  background: var(--navy-950);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(10, 16, 36, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 340px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-success { background: var(--green-500); }
.toast.toast-error { background: var(--red-500); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 16, 36, 0.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 16px; z-index: 50; overflow-y: auto;
}
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(10,16,36,0.35); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 17px; }
.modal-body { padding: 20px 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--ink-500); }
.autocomplete { position: relative; }
.autocomplete-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); max-height: 220px; overflow-y: auto; z-index: 10;
}
.autocomplete-item { padding: 9px 12px; cursor: pointer; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--surface-muted); }
.autocomplete-item .sub { color: var(--ink-500); font-size: 12px; }

.error-text { color: var(--red-500); font-size: 13px; margin: 8px 0; }
.banner-note { background: var(--amber-100); color: #8a5314; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.banner-note.green { background: var(--green-100); color: #0d6b4c; }
.banner-note.blue { background: #e7edff; color: #1d4ed8; }

/* ---------- AI Assistant (floating chat widget, right-hand side) ---------- */
.ai-widget { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.ai-widget-toggle {
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500) 55%, var(--navy-800));
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.38);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: box-shadow var(--ease), transform 100ms ease;
}
.ai-widget-toggle svg { width: 22px; height: 22px; flex-shrink: 0; }
.ai-widget-toggle:hover { box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5); transform: translateY(-1px); }
.ai-widget-toggle:active { transform: scale(0.97); }
.ai-widget-toggle.active { background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); }
.ai-widget-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(10, 16, 36, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ai-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(120deg, var(--navy-950), var(--navy-800) 140%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.ai-widget-header-actions { display: flex; gap: 6px; }
.ai-widget-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ai-widget-icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
.ai-widget-quota { padding: 8px 16px; font-size: 12px; color: var(--ink-500); border-bottom: 1px solid var(--line); flex-shrink: 0; }
.ai-widget-panel .ai-log { flex: 1; min-height: 0; padding: 12px 16px; margin-bottom: 0; max-height: none; }
.ai-widget-panel #ai-draft-slot { padding: 0 16px; max-height: 300px; overflow-y: auto; flex-shrink: 0; }
.ai-widget-panel .error-text { padding: 0 16px; flex-shrink: 0; }
.ai-widget-panel .ai-input-row { padding: 12px 16px; border-top: 1px solid var(--line); margin-top: 0; flex-shrink: 0; }
@media (max-width: 480px) {
  .ai-widget { right: 16px; bottom: 16px; }
  .ai-widget-panel { right: 12px; left: 12px; width: auto; bottom: 84px; height: calc(100vh - 120px); }
}

.ai-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.ai-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ai-bubble-model { align-self: flex-start; background: var(--surface-muted); color: var(--ink-900); border-bottom-left-radius: 4px; }
.ai-bubble-user { align-self: flex-end; background: var(--blue-500); color: #fff; border-bottom-right-radius: 4px; }
.ai-input-row { display: flex; gap: 10px; }
.ai-input-row input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; min-width: 0; }
.ai-draft-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 8px 0;
  background: var(--surface-muted);
}
.ai-draft-meta { font-size: 13px; color: var(--ink-700); margin-bottom: 2px; }
.ai-draft-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.ai-draft-row:last-child { border-bottom: none; }
.ai-draft-row .label { color: var(--ink-500); }
.ai-draft-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.ai-draft-table th, .ai-draft-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.ai-draft-total { font-weight: 700; text-align: right; margin-top: 4px; }
.ai-draft-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 16px;
  background: radial-gradient(circle at top, #eef2ff, var(--surface-muted));
}
.auth-shell .brand { color: var(--ink-900); font-size: 22px; }
.auth-logo-link { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.auth-logo-text { font-size: 28px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink-900); }
.auth-card { width: 100%; max-width: 380px; padding: 28px; }
.auth-card h2 { font-size: 19px; margin-bottom: 18px; }
.auth-card .btn-primary { width: 100%; justify-content: center; margin-top: 4px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-500); }
.auth-switch a { color: var(--blue-500); font-weight: 600; }

/* ---------- Marketing site: dark, high-contrast theme ---------- */
body.mkt {
  --mkt-bg: #05070d;
  --mkt-bg-soft: #0a0e18;
  --mkt-surface: rgba(255, 255, 255, 0.04);
  --mkt-surface-solid: #0d1220;
  --mkt-border: rgba(255, 255, 255, 0.09);
  --mkt-border-hover: rgba(255, 255, 255, 0.2);
  --mkt-text: #f4f7fc;
  --mkt-muted: #97a2b8;
  --mkt-dim: #626d84;
  --mkt-accent: #3b82f6;
  --mkt-accent-2: #38bdf8;
  background: var(--mkt-bg);
  color: var(--mkt-text);
}
body.mkt a { color: inherit; }
body.mkt .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--mkt-border);
  color: var(--mkt-text);
}
body.mkt .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, 0.12); border-color: var(--mkt-border-hover); }

.mkt-glow-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 560px at 15% -8%, rgba(59, 130, 246, 0.22), transparent 60%),
    radial-gradient(700px 500px at 100% 10%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 100%, rgba(37, 99, 235, 0.12), transparent 60%),
    var(--mkt-bg);
}
.mkt-glow-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(1200px 800px at 50% 0%, #000 0%, transparent 75%);
}

.marketing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; max-width: 1220px; margin: 0 auto;
  position: sticky; top: 0; z-index: 30;
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mkt-border);
}
.marketing-nav .brand { font-size: 22px; }
.marketing-nav .mark { width: 40px; height: 40px; }
.marketing-nav .mark svg { width: 22px; height: 22px; }
.marketing-nav .links { display: flex; gap: 28px; align-items: center; font-weight: 600; font-size: 14px; }
.marketing-nav .links a:not(.btn) { color: var(--mkt-muted); transition: color var(--ease); }
.marketing-nav .links a:not(.btn):hover { color: var(--mkt-text); }

.mkt-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--mkt-accent-2);
  background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.mkt-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mkt-accent-2); box-shadow: 0 0 8px var(--mkt-accent-2); }

.marketing-hero { padding: 90px 32px 40px; text-align: center; }
.marketing-hero-inner { max-width: 780px; margin: 0 auto; }
.marketing-hero h1 {
  font-size: 54px; line-height: 1.1; margin-bottom: 20px; letter-spacing: -0.02em; color: var(--mkt-text);
}
.marketing-hero h1 .grad {
  background: linear-gradient(100deg, var(--mkt-accent-2), var(--mkt-accent) 60%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.marketing-hero p { font-size: 18px; color: var(--mkt-muted); line-height: 1.6; margin: 0 auto 30px; max-width: 620px; }
.mkt-hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; justify-content: center; }
.hero-trust-row span {
  font-size: 12.5px; font-weight: 600; color: var(--mkt-muted);
  background: var(--mkt-surface); border: 1px solid var(--mkt-border); border-radius: 999px;
  padding: 6px 13px;
}

/* Browser-frame product showcase — houses a real screenshot or the invoice mock */
.mkt-showcase { max-width: 1100px; margin: 56px auto 0; padding: 0 32px; }
.browser-frame {
  border-radius: 16px;
  border: 1px solid var(--mkt-border);
  background: var(--mkt-surface-solid);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.browser-frame-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--mkt-border); }
.browser-frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.browser-frame-body { background: var(--surface-muted); }
.browser-frame-body img { display: block; width: 100%; height: auto; }
.hero-invoice-card { padding: 26px; background: var(--surface); color: var(--ink-900); }

.marketing-section { max-width: 1180px; margin: 0 auto; padding: 100px 32px; }
.marketing-section.tight { padding-top: 0; }
.marketing-section h2 { font-size: 34px; text-align: center; margin-bottom: 12px; letter-spacing: -0.01em; color: var(--mkt-text); }
.marketing-section .sub { text-align: center; color: var(--mkt-muted); margin-bottom: 46px; font-size: 16px; max-width: 560px; margin-left: auto; margin-right: auto; }
.mkt-center { text-align: center; }

.legal-page { max-width: 760px; margin: 0 auto; padding: 90px 32px 100px; color: var(--mkt-text); }
.legal-page h1 { font-size: 32px; letter-spacing: -0.01em; margin-bottom: 6px; }
.legal-page .legal-updated { color: var(--mkt-muted); font-size: 14px; margin-bottom: 40px; }
.legal-page h2 { font-size: 20px; text-align: left; margin: 36px 0 12px; color: var(--mkt-text); }
.legal-page p, .legal-page li { color: var(--mkt-muted); font-size: 15px; line-height: 1.7; }
.legal-page ul { margin: 0 0 16px; padding-left: 20px; }
.legal-page li { margin-bottom: 6px; }
.legal-page a { color: var(--mkt-accent-2); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-card {
  border: 1px solid var(--mkt-border); border-radius: var(--radius); padding: 26px;
  background: var(--mkt-surface); transition: border-color var(--ease), transform var(--ease), background var(--ease);
}
.feature-card:hover { border-color: var(--mkt-border-hover); background: rgba(255, 255, 255, 0.06); transform: translateY(-3px); }
.feature-card .icon-wrap {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(56,189,248,0.15));
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--mkt-accent-2); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; color: var(--mkt-text); }
.feature-card p { color: var(--mkt-muted); font-size: 14px; line-height: 1.6; }

/* Alternating large feature showcase rows (image + copy) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 110px; }
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-row-copy { order: 2; }
.feature-row.reverse .feature-row-shot { order: 1; }
@media (max-width: 860px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 30px; }
  .feature-row.reverse .feature-row-copy, .feature-row.reverse .feature-row-shot { order: initial; }
}
.feature-row-copy h3 { font-size: 27px; color: var(--mkt-text); margin-bottom: 14px; letter-spacing: -0.01em; }
.feature-row-copy p { font-size: 16px; color: var(--mkt-muted); line-height: 1.65; margin-bottom: 20px; }
.feature-row-copy ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 11px; }
.feature-row-copy li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #c3cbdc; }
.feature-row-copy li svg { width: 17px; height: 17px; margin-top: 1px; color: var(--mkt-accent-2); flex-shrink: 0; }
.feature-row-shot .browser-frame { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  border: 1px solid var(--mkt-border); border-radius: var(--radius); padding: 30px 26px;
  background: var(--mkt-surface); display: flex; flex-direction: column;
  transition: border-color var(--ease), transform var(--ease);
}
.price-card:hover { transform: translateY(-3px); border-color: var(--mkt-border-hover); }
.price-card.featured {
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.18);
  position: relative;
}
.price-card .badge-blue { align-self: flex-start; margin-bottom: 10px; background: rgba(56, 189, 248, 0.15); color: var(--mkt-accent-2); }
.price-card h3 { font-size: 18px; color: var(--mkt-text); }
.price-card .price { font-size: 36px; font-weight: 800; margin: 10px 0 4px; color: var(--mkt-text); letter-spacing: -0.01em; }
.price-card .price span { font-size: 14px; font-weight: 500; color: var(--mkt-dim); }
.price-card .muted { color: var(--mkt-muted) !important; }
.price-card ul { list-style: none; margin: 20px 0; padding: 0; display: flex; flex-direction: column; gap: 11px; font-size: 13.5px; color: #c3cbdc; }
.price-card ul li::before { content: "✓ "; color: var(--mkt-accent-2); font-weight: 700; }
.price-card .btn { margin-top: auto; justify-content: center; }
.price-card .btn:not(.btn-primary) { background: rgba(255, 255, 255, 0.05); border-color: var(--mkt-border); color: var(--mkt-text); }
.price-card .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, 0.1); }

.footer-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0b1330, #0a0e18 55%, #081018);
  border-top: 1px solid var(--mkt-border);
  color: #fff; text-align: center; padding: 90px 32px;
}
.footer-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(59, 130, 246, 0.3), transparent 65%);
}
.footer-cta > * { position: relative; }
.footer-cta h2 { font-size: 32px; margin-bottom: 12px; letter-spacing: -0.01em; }
.footer-cta p { color: var(--mkt-muted); margin-bottom: 26px; font-size: 16px; }
.site-footer { padding: 34px 32px; text-align: center; color: var(--mkt-dim); font-size: 13px; border-top: 1px solid var(--mkt-border); background: var(--mkt-bg); }
.site-footer a { color: var(--mkt-muted); }

/* ---------- Marketing: how-it-works, trust strip, FAQ, plan comparison ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 28px 24px 24px; border: 1px solid var(--mkt-border);
  border-radius: var(--radius); background: var(--mkt-surface);
  transition: border-color var(--ease), transform var(--ease);
}
.step:hover { border-color: var(--mkt-border-hover); transform: translateY(-3px); }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--mkt-accent-2), var(--mkt-accent));
  color: #04101f; font-weight: 800; font-size: 14px;
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; color: var(--mkt-text); }
.step p { color: var(--mkt-muted); font-size: 14px; line-height: 1.6; }

.trust-strip { border-top: 1px solid var(--mkt-border); border-bottom: 1px solid var(--mkt-border); background: rgba(255, 255, 255, 0.015); }
.trust-strip-inner {
  max-width: 1180px; margin: 0 auto; padding: 46px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
@media (max-width: 900px) { .trust-strip-inner { grid-template-columns: repeat(2, 1fr); } }
.trust-item { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: #c3cbdc; line-height: 1.55; }
.trust-item .icon-wrap {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--mkt-accent-2); display: flex; align-items: center; justify-content: center;
}
.trust-item .icon-wrap svg { width: 17px; height: 17px; }

.all-plans-include { border: 1px solid var(--mkt-border); border-radius: var(--radius); background: var(--mkt-surface); padding: 30px 32px; margin-bottom: 40px; }
.all-plans-include h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mkt-dim); margin-bottom: 18px; }
.all-plans-include ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 24px; }
@media (max-width: 700px) { .all-plans-include ul { grid-template-columns: 1fr; } }
.all-plans-include li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: #c3cbdc; }
.all-plans-include li svg { width: 16px; height: 16px; margin-top: 2px; color: var(--mkt-accent-2); flex-shrink: 0; }

.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--mkt-border); border-radius: var(--radius-sm); padding: 4px 18px; margin-bottom: 10px; background: var(--mkt-surface); transition: border-color var(--ease); }
.faq details[open] { border-color: var(--mkt-border-hover); }
.faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 14.5px; color: var(--mkt-text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 18px; color: var(--mkt-accent-2); font-weight: 800; }
.faq details[open] summary::before { content: "–"; }
.faq p { margin: 0 0 16px 18px; color: var(--mkt-muted); font-size: 13.5px; line-height: 1.6; }

/* ---------- Invoice print page (own layout, no sidebar) ---------- */
.invoice-print { max-width: 800px; margin: 30px auto; }

/* ---------- Bookings calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-nav .cal-range { font-weight: 700; font-size: 14.5px; min-width: 180px; text-align: center; }
.cal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-table th, .cal-table td { border: 1px solid var(--line); }
.cal-table thead th { background: var(--surface-muted); text-align: center; font-size: 11.5px; padding: 8px 4px; color: var(--ink-500); }
.cal-table thead th.today { background: #e7edff; color: var(--blue-500); }
.cal-table thead .day-name { font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; display: block; font-size: 10.5px; }
.cal-table thead .day-num { font-size: 17px; font-weight: 800; color: var(--ink-900); }
.cal-table thead th.today .day-num { color: var(--blue-500); }
.cal-table td.time-col { width: 68px; font-size: 12px; color: var(--ink-500); text-align: right; white-space: nowrap; background: var(--surface-muted); padding: 6px 8px; }
.cal-table td.closed-cell { background: repeating-linear-gradient(45deg, #f8f9fc, #f8f9fc 6px, #eef0f6 6px, #eef0f6 12px); }
.cal-table td.day-cell { height: 100px; padding: 4px; vertical-align: top; }
.cal-event { display: block; border-radius: 7px; padding: 6px 8px; font-size: 13px; line-height: 1.45; margin-bottom: 4px; border-left: 4px solid transparent; }
.cal-event .cal-event-name { font-weight: 700; display: block; font-size: 13.5px; }
.cal-event.pending { background: var(--amber-100); color: #8a5314; border-left-color: var(--amber-500); }
.cal-event.confirmed { background: var(--green-100); color: #0d6b4c; border-left-color: var(--green-500); }
.cal-event.cancelled { background: var(--red-100); color: #8a1f24; border-left-color: var(--red-500); text-decoration: line-through; }
.cal-event .btn { margin-top: 5px; padding: 4px 10px; font-size: 12px; }
