/* ==========================================================================
   Ark Vision Mail — dark cPanel-webmail theme
   ========================================================================== */
:root {
  /* cPanel-esque dark palette: graphite surfaces, teal/cyan brand accent */
  --navy-950: #0a0c10;
  --navy-900: #12151b;
  --navy-800: #1a1e26;
  --blue-600: #3b82f6;
  --blue-700: #2563eb;
  --blue-100: #17233d;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-100: #0e2b28;
  --amber-500: #f0a93d;
  --amber-100: #3a2c10;
  --red-500: #f0555b;
  --red-100: #3a1417;

  --bg: #0d0f13;
  --surface: #161920;
  --surface-alt: #1d212a;
  --surface-raised: #21252f;
  --border: #2a2f3a;
  --border-soft: #232733;
  --text: #e7e9ee;
  --text-muted: #9aa3b5;
  --text-faint: #6a7385;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.6);
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand, .display { font-family: 'Sora', 'Inter', sans-serif; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.center { text-align: center; }

:focus-visible {
  outline: 2px solid var(--teal-400);
  outline-offset: 2px;
}

/* ==========================================================================
   Envelope-seal signature shape
   ========================================================================== */
.seal {
  position: relative;
  width: 34px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  flex-shrink: 0;
}
.seal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 46%);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  border-radius: 4px 4px 0 0;
}

.seal-divider {
  width: 46px;
  height: 30px;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  opacity: .9;
}

/* ==========================================================================
   Buttons, inputs
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
  line-height: 1.2;
}
.btn:hover { border-color: var(--teal-500); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  border: 1px solid transparent;
  color: #04110f;
  font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: #fff;
}
.btn-secondary:hover { background: var(--navy-900); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--teal-400); }
.btn-ghost:hover { background: rgba(45, 212, 191, .1); border-color: transparent; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 15px; }
.btn-block { width: 100%; }

input, select, textarea {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .16);
}
textarea { resize: vertical; }

.form-grid { display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); font-weight: 500; }
.checkbox-row { display: flex; align-items: center; gap: 8px; flex-direction: row !important; }
.checkbox-row input { width: auto; }

.field-error { color: var(--red-500); font-size: 13px; min-height: 18px; }
.field-hint { color: var(--text-faint); font-size: 12px; margin-top: -2px; }

/* Mailbox local-part + fixed-domain combo input (signup) */
.mailbox-input {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
}
.mailbox-input:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .16);
}
.mailbox-input input {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}
.mailbox-input input:focus { outline: none; box-shadow: none; }
.mailbox-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}

/* Fixed "From" badge on compose (address can't be changed) */
.from-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-alt);
  font-size: 14px;
  font-weight: 600;
}
.from-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-400); flex-shrink: 0; }
.mailbox-pill { margin-left: auto; }

/* Mailbox address chip with copy button (sidebar / profile) */
.mailbox-address {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--teal-400);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  text-align: left;
}
.mailbox-address:hover { border-color: var(--teal-500); background: var(--surface-raised); }
.mailbox-address-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mailbox-address-copy-icon { flex-shrink: 0; opacity: .8; }
.mailbox-address-lg { font-size: 16px; padding: 14px 16px; margin-bottom: 0; }

/* ==========================================================================
   App shell: sidebar (desktop) / top bar + drawer (mobile)
   ========================================================================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 60;
  border-right: 1px solid var(--border-soft);
  transition: transform .2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 22px;
  color: #fff;
}
.brand strong { color: var(--teal-400); font-weight: 700; }
.brand small { display: block; font-family: 'Inter'; font-weight: 500; font-size: 10.5px; color: #7c879c; letter-spacing: .03em; margin-top: 1px; }

nav.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link {
  color: #a4aec2;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link.active {
  background: linear-gradient(135deg, #14b8a626, #3b82f61f);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .25);
}
.nav-icon { width: 16px; text-align: center; flex-shrink: 0; opacity: .9; }
.nav-badge {
  margin-left: auto;
  background: var(--teal-500);
  color: #04110f;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.5;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: #7c879c;
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.user-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20,184,166,.16);
  color: var(--teal-400);
  margin-top: 8px;
}

.topbar {
  display: none;
}

.content-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-width: 0;
}

.content { padding: 32px 40px; max-width: 980px; margin: 0 auto; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; display: block; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 55;
}

.page-header { margin-bottom: 26px; }
.page-header h1 { margin: 0 0 6px; font-size: 24px; }
.page-header p { margin: 0; max-width: 60ch; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.card-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.card-value { font-size: 26px; font-weight: 700; font-family: 'Sora', sans-serif; color: #fff; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-header h2 { margin: 0; font-size: 16px; }
.panel-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.panel-title-row { display: flex; align-items: center; gap: 10px; }
.count-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 9px;
  font-weight: 600;
}

.search-input { width: 240px; max-width: 100%; }

/* ==========================================================================
   Tables — cPanel-style message list. Responsive: scroll on tablet,
   stacked cards on mobile.
   ========================================================================== */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.table tbody tr:hover { background: var(--surface-alt); }

/* Unread received-mail rows: bold + accent bar, like a classic webmail list */
.table tbody tr.row-unread { font-weight: 700; }
.table tbody tr.row-unread td:first-child { box-shadow: inset 3px 0 0 var(--teal-400); }
.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-400);
  margin-right: 7px;
  vertical-align: middle;
}

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-muted { background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }
.pill-ok { background: var(--teal-100); color: var(--teal-400); }
.pill-error { background: var(--red-100); color: #ff8b8f; }

.link-btn {
  background: none;
  border: none;
  color: var(--teal-400);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }

.status-pill { text-transform: capitalize; }
.status-delivered, .status-sent { background: var(--teal-100); color: var(--teal-400); }
.status-bounced, .status-failed, .status-complained { background: var(--red-100); color: #ff8b8f; }
.status-queued, .status-scheduled { background: var(--amber-100); color: #f0c07d; }
.status-opened, .status-clicked, .status-delivery_delayed { background: var(--blue-100); color: #8fb4ff; }

.empty-state { padding: 34px 10px; text-align: center; }

/* ==========================================================================
   Modal (email viewer)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
  padding: 24px;
}
.modal-overlay.modal-open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { margin: 0; font-size: 15px; }
.modal-header-actions { display: flex; align-items: center; gap: 6px; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }

.email-meta { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.email-meta-row { display: flex; gap: 8px; font-size: 13px; }
.email-meta-label { width: 64px; flex-shrink: 0; color: var(--text-muted); }
.email-meta-value { word-break: break-word; }

.email-attachments {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.email-attachments ul { margin: 6px 0 0; padding-left: 18px; }

.cache-indicator {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 600;
}

.email-body-wrap { border-top: 1px solid var(--border); padding-top: 14px; }
.email-body-frame {
  width: 100%;
  min-height: 280px;
  border: none;
  background: #f4f5f7; /* inbound HTML is often authored for a light bg */
  border-radius: 6px;
}
.email-body-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  margin: 0;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--navy-800);
  border: 1px solid var(--border);
  color: #fff;
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 320px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-md);
}
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-error { border-color: var(--red-500); }
.toast-success { border-color: var(--teal-500); }

/* ==========================================================================
   Compose page extras
   ========================================================================== */
.advanced-toggle {
  background: none;
  border: none;
  color: var(--teal-400);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: left;
}
.advanced-fields { display: none; flex-direction: column; gap: 14px; margin-top: 4px; }
.advanced-fields.open { display: flex; }

/* ==========================================================================
   Auth pages (login / signup)
   ========================================================================== */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1100px 500px at 15% -10%, #142230 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 110%, #0f2a27 0%, transparent 55%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow-lg);
}
.auth-card.auth-card-wide { max-width: 620px; }
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 22px;
  text-decoration: none;
  color: var(--text);
}
.auth-back { display: block; text-align: center; margin-top: 18px; }

.plan-toggle {
  display: flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}
.plan-toggle button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.plan-toggle button.active {
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  color: #04110f;
}
.plan-save-badge {
  display: inline-block;
  background: var(--teal-100);
  color: var(--teal-400);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
}

.plan-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.plan-summary .amount { font-family: 'Sora', sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.plan-summary .amount span { font-size: 13px; font-weight: 500; color: var(--text-muted); }

/* ==========================================================================
   Marketing / landing page
   ========================================================================== */
.mkt-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 15, 19, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.mkt-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mkt-nav { display: flex; align-items: center; gap: 28px; }
.mkt-nav a:not(.btn) { text-decoration: none; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.mkt-nav a:not(.btn):hover { color: var(--text); }
.mkt-cta-group { display: flex; align-items: center; gap: 10px; }

.mkt-section { max-width: var(--container); margin: 0 auto; padding: 64px 24px; }
.mkt-section-tight { padding-top: 32px; padding-bottom: 32px; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 24px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-100);
  color: #8fb4ff;
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.hero p.lead { font-size: 17px; color: var(--text-muted); max-width: 46ch; margin: 0 0 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hero-note { font-size: 13px; color: var(--text-faint); }

.inbox-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.inbox-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.inbox-preview-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.inbox-preview-title { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-left: 4px; }
.inbox-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.inbox-preview-row:last-child { border-bottom: none; }
.inbox-preview-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.inbox-preview-body { min-width: 0; flex: 1; }
.inbox-preview-sender { font-size: 13.5px; font-weight: 600; }
.inbox-preview-subject { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-preview-time { font-size: 12px; color: var(--text-faint); flex-shrink: 0; }

.section-head { max-width: 620px; margin: 0 0 36px; }
.section-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--teal-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.section-head h2 { font-size: 30px; margin: 0 0 10px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-muted); margin: 0; font-size: 15.5px; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--blue-100);
  color: #8fb4ff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 17px;
}
.feature-card h3 { font-size: 15.5px; margin: 0 0 6px; }
.feature-card p { font-size: 13.5px; color: var(--text-muted); margin: 0; }

.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-step { position: relative; padding-left: 4px; }
.how-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--navy-800); color: #fff; font-weight: 700; font-size: 13px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.how-step h3 { font-size: 15.5px; margin: 0 0 6px; }
.how-step p { font-size: 13.5px; color: var(--text-muted); margin: 0; }

/* Pricing */
.price-toggle-wrap { display: flex; justify-content: center; margin-bottom: 34px; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 760px; margin: 0 auto; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,.14), var(--shadow-md);
  position: relative;
}
.price-card-badge {
  position: absolute;
  top: -12px; left: 26px;
  background: linear-gradient(135deg, var(--teal-500), var(--blue-600));
  color: #04110f;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.price-card h3 { font-size: 15px; margin: 0 0 4px; color: var(--text-muted); font-weight: 600; }
.price-amount { font-family: 'Sora', sans-serif; font-size: 40px; font-weight: 700; margin: 6px 0 2px; color: #fff; }
.price-amount span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.price-sub { font-size: 13px; color: var(--text-muted); margin: 0 0 20px; }
.price-features { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-features li { font-size: 13.5px; display: flex; gap: 8px; align-items: flex-start; }
.price-check { color: var(--teal-400); font-weight: 700; flex-shrink: 0; }

.mkt-cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-950));
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: var(--container);
  margin: 0 auto 64px;
}
.mkt-cta-band h2 { font-size: 28px; margin: 0 0 12px; color: #fff; }
.mkt-cta-band p { color: var(--text-muted); margin: 0 0 24px; }

.mkt-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px 40px;
}
.mkt-footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-faint);
}
.mkt-footer-links { display: flex; gap: 18px; }
.mkt-footer-links a { text-decoration: none; color: var(--text-muted); }
.mkt-footer-links a:hover { color: var(--text); }

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero p.lead { max-width: none; }
  .mkt-nav { display: none; }
}

@media (max-width: 880px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }

  .content-wrap { margin-left: 0; width: 100%; }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-h);
    padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
  }
  .menu-toggle { display: inline-flex; }

  .content { padding: 22px 18px 40px; }
  .page-header h1 { font-size: 20px; }

  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .mkt-cta-band { padding: 36px 22px; }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .panel { padding: 18px 16px; }
  .panel-header { flex-direction: column; align-items: flex-start; }
  .panel-actions { width: 100%; }
  .search-input { width: 100%; }
  .quick-actions .btn { flex: 1 1 auto; }
  .auth-card { padding: 26px 20px; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
  .toast { max-width: none; }
}

@media (max-width: 560px) {
  /* Stacked "card" table rows on very small screens */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; min-width: 0; }
  .table-stack { min-width: 0; }
  .table-stack tr {
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 4px 0;
    background: var(--surface);
  }
  .table-stack td {
    border-bottom: none;
    padding: 6px 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: right;
  }
  .table-stack td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-align: left;
  }
  .table-stack td:last-child { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
