/* ============================================================
   AutoResponder admin theme (VibeCoder-style)
   Indigo/violet gradient, glassmorphic surfaces.
   No inline styles required anywhere (strict CSP-friendly).
   ============================================================ */

:root {
  --bg: #F3F0FF;
  --ink: #1F1B3A;
  --muted: #635F82;
  --accent: #4F46E5;
  --accent-2: #8B5CF6;
  --grad: linear-gradient(135deg, #4F46E5, #8B5CF6);
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --border: rgba(255, 255, 255, 0.9);
  --shadow: 0 18px 40px -20px rgba(79, 70, 229, 0.4);
  --radius: 16px;
  --danger: #E11D48;
  --success: #059669;
  --warning: #D97706;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Decorative gradient blobs */
body::before,
body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
body::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.55), transparent 70%);
  top: -140px; right: -120px;
}
body::after {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.4), rgba(56, 189, 248, 0.25) 60%, transparent 75%);
  bottom: -180px; left: -140px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.sidebar {
  width: 264px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  gap: 18px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  /* ONE scrollbar for the whole sidebar: brand → menu → footer (logout).
     Everything scrolls together from top to bottom. */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

/* Guaranteed scroll room BELOW the Logout button. Browsers (Firefox
   especially) ignore padding-bottom on scroll containers, so the last
   item would sit flush against the viewport edge and look cut off.
   A real flex spacer always creates scrollable space. */
.sidebar::after {
  content: '';
  display: block;
  flex-shrink: 0;
  height: 36px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--grad);
  border-radius: 12px;
  box-shadow: 0 8px 18px -8px rgba(79, 70, 229, 0.7);
  flex-shrink: 0;
}

.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); text-decoration: none; }
.nav-item.is-active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(79, 70, 229, 0.8);
}

.sidebar-footer { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: 600; font-size: 14px; }
.user-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px 6px;
  position: relative;
  z-index: 70; /* keeps the menu toggle clickable above the sidebar backdrop */
}
.topbar-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.topbar-spacer { flex: 1; }
.topbar-tz {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  backdrop-filter: blur(12px);
}

.content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1;
}

.app-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0 20px;
}

.backdrop { display: none; }

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 16px; font-weight: 700; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-note { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 14px;
  border-bottom: 1px solid rgba(99, 91, 130, 0.25);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(99, 91, 130, 0.14);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.45); }

.cell-muted { color: var(--muted); font-size: 13px; }
.cell-error { color: var(--danger); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------
   Badges & chips
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.badge-success { background: rgba(5, 150, 105, 0.14); color: #047857; }
.badge-danger  { background: rgba(225, 29, 72, 0.12); color: #BE123C; }
.badge-warning { background: rgba(217, 119, 6, 0.14); color: #B45309; }
.badge-info    { background: rgba(79, 70, 229, 0.12); color: var(--accent); }
.badge-muted   { background: rgba(99, 91, 130, 0.14); color: var(--muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--muted);
  backdrop-filter: blur(12px);
}
.chip strong { color: var(--ink); }

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */
.form { display: flex; flex-direction: column; gap: 22px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 22px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.label { font-size: 13px; font-weight: 600; color: var(--ink); }

.input, .select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(99, 91, 130, 0.28);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.help { font-size: 12px; color: var(--muted); }

.form-actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(99, 91, 130, 0.28);
  border-radius: 12px;
  padding: 10px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad);
  color: #fff;
  border: none;
  box-shadow: 0 12px 24px -10px rgba(79, 70, 229, 0.75);
}
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(79, 70, 229, 0.85); }

.btn-ghost { background: transparent; border-color: rgba(99, 91, 130, 0.3); color: var(--muted); }

/* Radio pill toggle (broadcast content source, etc.) */
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(99, 91, 130, 0.3);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  transition: all 0.15s ease;
}
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pill.is-active {
  background: linear-gradient(135deg, #4F46E5, #8B5CF6);
  color: #fff;
  border-color: transparent;
}
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.5); }

.btn-danger { background: rgba(225, 29, 72, 0.1); border-color: rgba(225, 29, 72, 0.35); color: var(--danger); }
.btn-danger:hover { background: rgba(225, 29, 72, 0.18); }

.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-strong); }

/* ------------------------------------------------------------
   Alerts
   ------------------------------------------------------------ */
.alert {
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14px;
  border: 1px solid transparent;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.alert.is-hiding { opacity: 0; transform: translateY(-4px); }
.alert-success { background: rgba(5, 150, 105, 0.1); border-color: rgba(5, 150, 105, 0.3); color: #047857; }
.alert-error   { background: rgba(225, 29, 72, 0.08); border-color: rgba(225, 29, 72, 0.3); color: #BE123C; }
.alert-warning { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.35); color: #92400E; }

.alert-list { margin: 6px 0 0 18px; }
.alert-list li { margin: 2px 0; }

.text-muted { color: var(--muted); font-size: 14px; }
.text-danger { color: var(--danger); }
.mono { font-family: var(--mono); font-size: 13px; }
.small { font-size: 12.5px; }

/* ------------------------------------------------------------
   Empty states
   ------------------------------------------------------------ */
.empty { text-align: center; padding: 56px 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-icon {
  width: 84px; height: 84px;
  border-radius: 24px;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 34px -14px rgba(79, 70, 229, 0.8);
  margin-bottom: 6px;
}
.empty h2 { font-size: 19px; }
.empty p { max-width: 520px; }
.empty-actions { margin-top: 10px; }
.empty-note { font-size: 12.5px; margin-top: 14px; }

/* ------------------------------------------------------------
   Auth (login / errors)
   ------------------------------------------------------------ */
.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }

.login-wrap { width: 100%; max-width: 420px; }

.login-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-brand { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-brand .brand-mark { width: 52px; height: 52px; border-radius: 16px; }
.login-brand h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.login-brand p { font-size: 13.5px; color: var(--muted); }

.login-hint { text-align: center; font-size: 12px; color: var(--muted); }

.error-card { text-align: center; align-items: center; }
.error-code { font-size: 64px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.error-card h1 { font-size: 18px; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    height: 100vh;
    height: 100dvh; /* respect the visible viewport on mobile/tablet so the
                       bottom (Logout) is not hidden under browser chrome */
    /* Blur on a tall fixed panel costs GPU while scrolling — drop it on
       mobile so the menu never stutters when the page is scrolled. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(31, 27, 58, 0.4);
    backdrop-filter: blur(2px);
  }
  .topbar { padding: 14px 18px 4px; }
  .content { padding: 14px 18px 32px; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card { padding: 18px; }
}

/* ------------------------------------------------------------
   Phase 2: admin list filters, pagination, row actions
   ------------------------------------------------------------ */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px 12px; /* generous row AND column gaps — wrapped rows never touch */
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.filter-search { flex: 1 1 260px; }

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  white-space: nowrap;
}
.inline-form { display: inline-flex; margin: 0; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.pagination-info { font-size: 13px; color: var(--muted); }

.req { color: var(--danger); }

.notice-box { margin-top: 14px; }

.form-full { grid-column: 1 / -1; }

/* Field editor rows */
.field-editor-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.4fr) 110px minmax(150px, 1.2fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.field-required .checkbox { margin-bottom: 11px; }

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Subscriber detail */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px 24px;
}
.detail-item { display: flex; flex-direction: column; gap: 4px; }
.detail-full { grid-column: 1 / -1; }
.detail-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.chip-inline { margin: 2px 6px 2px 0; }

.stat-value-sm { font-size: 22px; line-height: 1.3; }
.stat-value-md { font-size: 24px; }

@media (max-width: 960px) {
  .field-editor-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .field-editor-row { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Public opt-in page (mobile-first, standalone)
   ------------------------------------------------------------ */
.optin-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #B45309;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 10px 14px;
}

.optin-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.optin-card {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.optin-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.optin-head .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.optin-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.optin-subtitle { font-size: 15px; color: var(--muted); }
.optin-description { font-size: 14px; color: var(--muted); line-height: 1.6; }

.optin-form { display: flex; flex-direction: column; gap: 16px; }

.optin-field { display: flex; flex-direction: column; gap: 6px; }

.optin-consent { align-items: flex-start; }

.optin-submit {
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  border-radius: 14px;
  margin-top: 4px;
}

.optin-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Phase 16: image (left) + benefits (right) split block */
.optin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
}
.optin-split-media img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  display: block;
}
.optin-benefit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.optin-benefit {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}
.optin-benefit-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.12);
}
.optin-benefit-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.optin-benefit-text { padding-top: 3px; }
@media (max-width: 520px) {
  .optin-split { grid-template-columns: 1fr; }
}

/* Editor live preview: image + benefits */
.optin-preview-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.optin-preview-media img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 12px;
}
.optin-preview-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
@media (max-width: 520px) {
  .optin-preview-split { grid-template-columns: 1fr; }
}

/* Honeypot: visually hidden, keyboard-skipped */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Success state */
.optin-success { text-align: center; align-items: center; }
.optin-success h1 { font-size: 22px; font-weight: 800; }
.optin-success-msg { font-size: 15px; color: var(--muted); line-height: 1.6; }

.success-check {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 34px -14px rgba(5, 150, 105, 0.7);
}

.optin-unsub { text-align: center; align-items: center; }
.optin-unsub h1 { font-size: 21px; font-weight: 800; }
.optin-unsub form { width: 100%; }

/* ------------------------------------------------------------
   Phase 3: subscriber management, tags, segments, bulk, import
   ------------------------------------------------------------ */
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-bar-wide {
  /* Simple flex-wrap with a real gap on both axes. Each control keeps its
     natural width (no forced 1fr cells, no overflow), rows wrap cleanly and
     always stay separated — desktop, tablet and mobile. */
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px 12px;
}
.filter-bar-wide > .form-group,
.filter-bar-wide .filter-range { flex: 0 1 auto; }
.filter-bar-wide > .form-group { min-width: 160px; }
.filter-bar-wide .filter-search { flex: 1 1 260px; }

/* "Subscribed dari / sampai / Filter" as one unit that stays on a single
   row on wide screens and wraps with spacing on narrow ones. */
.filter-range {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}
.filter-range .form-group { min-width: 150px; }
.filter-range input[type="date"] { width: 150px; }
.filter-range .btn { flex-shrink: 0; }
.small-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.table-check .col-check { width: 34px; }
.table-check .col-actions { width: 190px; }
.table th a { color: var(--ink); text-decoration: none; }
.table th a:hover { color: var(--accent); }

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.bulk-bar .form-group { min-width: 180px; margin: 0; }
.bulk-count { font-size: 13px; }

.pagination-full { justify-content: space-between; }
.pagination-pages { display: flex; align-items: center; gap: 8px; }
.inline-label { display: inline; margin-right: 8px; }
.select-sm { width: auto; padding: 6px 10px; border-radius: 10px; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-remove { display: inline-flex; align-items: center; margin-left: 4px; }
.chip-x {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.chip-x:hover { color: var(--danger); }
.tag-add-form { margin: 0; padding: 12px; }

.activity-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.activity-desc { flex: 1; min-width: 160px; font-size: 14px; }
.activity-time { font-size: 12.5px; }

.sub-card { margin-top: 4px; }
.rule-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.notice-box { padding: 12px 16px; }

/* Effective-sender summary on the SMTP card */
.sender-summary {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.92rem;
}
.sender-summary .cell-muted { margin-left: 4px; }

@media (max-width: 760px) {
  .rule-row { grid-template-columns: 1fr 1fr; }
  .rule-row .rule-value-group { grid-column: 1 / -1; }
  .table-check .col-actions { width: 130px; }
}

/* ------------------------------------------------------------
   Phase 4: email template editor + preview
   ------------------------------------------------------------ */
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.editor-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
}
.editor-tab {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
}
.editor-tab.is-active { background: var(--grad); color: #fff; }
.editor-save-state { margin-left: auto; font-size: 12.5px; color: var(--muted); padding-right: 8px; }

.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
}
.tb-btn {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.tb-btn:hover { background: rgba(79, 70, 229, 0.1); }
.tb-sep { width: 1px; height: 20px; background: rgba(99, 91, 130, 0.3); margin: 0 4px; }
.tb-color { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.tb-color input[type="color"] { width: 20px; height: 20px; border: none; background: none; cursor: pointer; padding: 0; }
.tb-select {
  font: inherit;
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid rgba(99, 91, 130, 0.3);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.editor-pane { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.editor-visual {
  min-height: 480px;
  padding: 24px;
  outline: none;
  font-size: 15px;
  line-height: 1.6;
  overflow-y: auto;
}
.editor-visual:focus { box-shadow: inset 0 0 0 2px rgba(79, 70, 229, 0.25); }
.editor-textarea {
  width: 100%;
  min-height: 480px;
  padding: 20px;
  border: none;
  outline: none;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.editor-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.status-radio { display: flex; gap: 16px; }

.var-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { cursor: pointer; }
.var-chip:hover { background: var(--grad); color: #fff; border-color: transparent; }

.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; border: none; }
.btn-success:hover { box-shadow: 0 12px 24px -10px rgba(5, 150, 105, 0.7); }

/* Preview page */
.preview-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.preview-controls .filter-bar { margin: 0; flex: 1 1 300px; }
.device-toggle { display: flex; gap: 6px; }
.device-toggle .is-active { background: var(--grad); color: #fff; border-color: transparent; }

.preview-frame-wrap {
  width: 640px;
  max-width: 100%;
  margin: 0 auto;
  transition: width 0.25s ease;
}
.preview-frame-wrap.is-mobile { width: 360px; }
.preview-frame {
  width: 100%;
  height: 720px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f4f4f5;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-side { order: -1; }
}

/* ------------------------------------------------------------
   Phase 5: sequence timeline
   ------------------------------------------------------------ */
.seq-timeline { display: flex; flex-direction: column; gap: 4px; }
.seq-node {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
}
.seq-node.is-paused { opacity: 0.65; }
.seq-start { font-weight: 700; color: var(--muted); text-align: center; }
.seq-arrow { text-align: center; color: var(--muted); font-size: 12.5px; padding: 2px 0; }
.seq-step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seq-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.seq-step-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; }
.seq-step-edit { margin-top: 12px; border-top: 1px dashed rgba(99, 91, 130, 0.3); padding-top: 10px; }
.seq-step-form { margin: 0 0 8px; padding: 10px; }
.seq-step-form .form-group { min-width: 110px; }
.input-sm { padding: 7px 10px; font-size: 13px; border-radius: 9px; width: auto; }

#subscriber_ids { width: 240px; }

/* ------------------------------------------------------------
   Phase 6: campaign wizard + progress bars
   ------------------------------------------------------------ */
.wizard-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.wizard-step.is-active { background: var(--grad); color: #fff; }
.wizard-step.is-done { color: var(--accent); }
.wizard-num {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(99, 91, 130, 0.15);
  font-size: 12px;
}
.wizard-step.is-active .wizard-num { background: rgba(255, 255, 255, 0.25); }

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(99, 91, 130, 0.15);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--grad);
  transition: width 0.4s ease;
}

/* ------------------------------------------------------------
   Phase 7: analytics
   ------------------------------------------------------------ */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 140px;
  overflow-x: auto;
  padding-top: 6px;
}
.chart-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  min-width: 22px;
  height: 100%;
}
.chart-bar {
  width: 100%;
  max-width: 30px;
  border-radius: 6px 6px 0 0;
  background: var(--grad);
  min-height: 2px;
}
.chart-label { font-size: 10px; color: var(--muted); white-space: nowrap; }

.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--grad);
  color: #fff;
  border-radius: 10px;
  font-size: 13.5px;
  transition: width 0.3s ease;
}
.funnel-row span { opacity: 0.92; }
.funnel-row strong { font-weight: 700; }

/* ------------------------------------------------------------
   Phase 7A: integrations
   ------------------------------------------------------------ */
.code-block {
  background: rgba(31, 27, 58, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-inline {
  font-family: var(--mono);
  font-size: 11.5px;
  background: rgba(31, 27, 58, 0.05);
  border-radius: 6px;
  padding: 4px 6px;
  white-space: pre-wrap;
  word-break: break-all;
  max-width: 320px;
}
.secret-box {
  margin: 8px 0;
  padding: 10px 12px;
  background: rgba(31, 27, 58, 0.08);
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
}
.doc-block p { margin: 8px 0; line-height: 1.6; }

/* ------------------------------------------------------------
   Phase 8: multi-tenant
   ------------------------------------------------------------ */
.workspace-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.workspace-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.ws-form { margin: 0; padding: 0; background: transparent; border: none; }
.ws-form .select { width: 100%; }

.usage-bar { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.usage-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.usage-row .progress-bar { flex: 1; }
.usage-label { min-width: 110px; color: var(--muted); }
.usage-value { min-width: 110px; text-align: right; font-weight: 600; white-space: nowrap; }



/* Phase 9: billing */
.pricing-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pricing-card { align-items: flex-start; }
.pricing-card.is-current { outline: 2px solid var(--accent); }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin: 6px 0 14px; }

/* ------------------------------------------------------------
   Opt-in page editor: theming + live preview
   ------------------------------------------------------------ */
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type="color"] {
  width: 46px; height: 40px;
  padding: 3px;
  border: 1px solid rgba(99, 91, 130, 0.3);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.color-hex { width: 120px; font-family: var(--mono); text-transform: uppercase; }

.icon-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.icon-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(99, 91, 130, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option:hover { border-color: var(--accent); color: var(--ink); }
.icon-option.is-active {
  border-color: var(--accent);
  background: rgba(79, 70, 229, 0.1);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.bg-upload-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bg-thumb-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(99, 91, 130, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  max-width: 460px;
}
.bg-thumb-wrap img {
  max-width: 160px;
  max-height: 90px;
  border-radius: 10px;
  border: 1px solid var(--border);
  object-fit: cover;
}

/* Live preview replicating the public opt-in card */
.optin-preview-shell {
  position: relative;
  border-radius: 22px;
  padding: 30px 22px;
  background-size: cover;
  background-position: center;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
}
.optin-preview-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(31, 27, 58, 0.28);
}
.optin-preview-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.optin-preview-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.optin-preview-head .brand-mark { width: 44px; height: 44px; border-radius: 13px; }
#pv-icon-wrap svg[hidden] { display: none; }
.optin-preview-head h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.optin-preview-subtitle { font-size: 14px; color: var(--muted); margin: 0; }
.optin-preview-desc { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.optin-preview-form { display: flex; flex-direction: column; gap: 14px; }
.optin-preview-form .optin-submit { margin-top: 0; }

/* Public page: hide decorative blur blobs when a background image is set */
.optin-has-bg::before,
.optin-has-bg::after { opacity: 0; }

/* ------------------------------------------------------------
   Responder AI — floating chat widget (all pages)
   ------------------------------------------------------------ */
.ai-chat { position: fixed; right: 22px; bottom: 22px; z-index: 90; }

.ai-chat-fab {
  width: 58px; height: 58px;
  border: none;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(79, 70, 229, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ai-chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 18px 36px -10px rgba(79, 70, 229, 0.85); }
.ai-chat-fab-close { display: none; }
.ai-chat-fab[aria-expanded="true"] .ai-chat-fab-open { display: none; }
.ai-chat-fab[aria-expanded="true"] .ai-chat-fab-close { display: block; }

.ai-chat-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 372px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(31, 27, 58, 0.45);
  overflow: hidden;
}
.ai-chat-panel[hidden] { display: none; }

.ai-chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  background: var(--grad);
  color: #fff;
  flex-shrink: 0;
}
.ai-chat-avatar {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-chat-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ai-chat-title strong { font-size: 15px; letter-spacing: 0.01em; }
.ai-chat-subtitle { font-size: 11.5px; opacity: 0.85; }
.ai-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  opacity: 0.85;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: inline-flex;
}
.ai-chat-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.18); }

.ai-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}
.ai-chat-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-wrap: break-word;
}
.ai-chat-msg p { margin: 0; }
.ai-chat-msg-ai {
  align-self: flex-start;
  background: rgba(79, 70, 229, 0.09);
  border: 1px solid rgba(79, 70, 229, 0.14);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.ai-chat-msg-user {
  align-self: flex-end;
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-chat-typing { font-style: italic; opacity: 0.7; }

.ai-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px 4px;
  flex-shrink: 0;
}
.ai-chat-chip {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.22);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ai-chat-chip:hover { background: rgba(79, 70, 229, 0.16); }

.ai-chat-form {
  display: flex;
  gap: 8px;
  padding: 8px 14px 12px;
  flex-shrink: 0;
}
.ai-chat-input { flex: 1; }
.ai-chat-send {
  width: 46px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-chat-note {
  margin: 0;
  padding: 0 14px 10px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .ai-chat { right: 12px; bottom: 12px; }
  .ai-chat-panel {
    right: -8px;
    bottom: 62px;
    width: calc(100vw - 24px);
    height: min(520px, calc(100vh - 90px));
  }
}

/* filter-bar-wide: mobile — each control full-width, one per row, spaced */
@media (max-width: 560px) {
  .filter-bar-wide > .form-group,
  .filter-range { width: 100%; flex: 1 1 100%; }
  .filter-range .form-group { flex: 1 1 100%; }
  .filter-range input[type="date"] { width: 100%; }
  .filter-bar-wide .btn,
  .filter-range .btn { width: 100%; }
}

/* ------------------------------------------------------------
   Bridge pages (Phase 11) — public + builder
   ------------------------------------------------------------ */
.bridge-body {
  min-height: 100vh;
  padding: 28px 16px;
  display: flex;
  justify-content: center;
}
.bridge-wrap { width: 100%; margin: 0 auto; }
.bridge-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 44px);
  display: flex;
  flex-direction: column;
}
.bridge-stack { display: flex; flex-direction: column; }
.bridge-logo { display: flex; justify-content: center; }
.bridge-logo img { max-height: 64px; max-width: 240px; object-fit: contain; }
.bridge-logo-text { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.bridge-headline { font-size: clamp(22px, 4.5vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.bridge-subheadline { font-size: 15px; color: var(--muted); line-height: 1.65; }
.bridge-video {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden;
  background: #0f0d1f;
}
.bridge-video iframe, .bridge-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bridge-form { display: flex; flex-direction: column; gap: 12px; }
.bridge-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bridge-field { display: flex; flex-direction: column; }
.bridge-consent { align-items: flex-start; font-size: 13px; }
.bridge-submit { margin-top: 2px; }
.bridge-cta {
  display: inline-block;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.bridge-cta:hover { text-decoration: none; transform: translateY(-1px); }
.bridge-cta-outline { background: transparent; color: #4F46E5; border: 2px solid #4F46E5; padding: 12px 22px; font-size: 15px; }
.bridge-offer { text-align: center; padding: 18px; border: 1px dashed rgba(99, 91, 130, 0.4); border-radius: 14px; }
.bridge-offer h3 { font-size: 18px; }
.bridge-offer p { color: var(--muted); font-size: 14px; }
.bridge-bonuses { display: flex; flex-direction: column; gap: 14px; }
.bridge-bonus-title { text-align: center; font-size: 20px; font-weight: 800; }
.bridge-bonus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.bridge-bonus-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 22px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}
.bridge-bonus-img { max-height: 84px; max-width: 100%; object-fit: contain; border-radius: 10px; }
.bridge-bonus-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.bridge-bonus-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.bridge-bonus-card h4 { font-size: 16px; margin: 0; }
.bridge-bonus-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.bridge-bonus-cta { font-size: 13px; font-weight: 700; color: #fff; background: var(--grad); padding: 8px 16px; border-radius: 10px; text-decoration: none; margin-top: 4px; }
.bridge-affiliate { text-align: center; padding: 16px; border-radius: 14px; background: rgba(79, 70, 229, 0.06); }
.bridge-affiliate p { font-weight: 700; margin-bottom: 10px; }
.bridge-thanks { text-align: center; align-items: center; gap: 16px; }
.bridge-thanks h1 { font-size: 26px; font-weight: 800; }

@media (max-width: 560px) {
  .bridge-body { padding: 14px 10px; }
  .bridge-card { padding: 20px 16px; border-radius: 16px; }
  .bridge-row-2 { grid-template-columns: 1fr; }
  .bridge-bonus-grid { grid-template-columns: 1fr; }
}

/* Builder bonus rows */
.bridge-bonus-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.5);
}

/* ------------------------------------------------------------
   Bridge pages (Phase 11) — public + builder
   ------------------------------------------------------------ */
.bridge-body {
  min-height: 100vh;
  padding: 28px 16px;
  display: flex;
  justify-content: center;
}
.bridge-wrap { width: 100%; margin: 0 auto; }
.bridge-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 44px);
  display: flex;
  flex-direction: column;
}
.bridge-stack { display: flex; flex-direction: column; }
.bridge-logo { display: flex; justify-content: center; }
.bridge-logo img { max-height: 64px; max-width: 240px; object-fit: contain; }
.bridge-logo-text { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.bridge-headline { font-size: clamp(22px, 4.5vw, 34px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }
.bridge-subheadline { font-size: 15px; color: var(--muted); line-height: 1.65; }
.bridge-video {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden;
  background: #0f0d1f;
}
.bridge-video iframe, .bridge-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bridge-form { display: flex; flex-direction: column; gap: 12px; }
.bridge-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bridge-field { display: flex; flex-direction: column; }
.bridge-consent { align-items: flex-start; font-size: 13px; }
.bridge-submit { margin-top: 2px; }
.bridge-cta {
  display: inline-block;
  font-weight: 800;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.bridge-cta:hover { text-decoration: none; transform: translateY(-1px); }
.bridge-cta-outline { background: transparent; color: #4F46E5; border: 2px solid #4F46E5; padding: 12px 22px; font-size: 15px; }
.bridge-offer { text-align: center; padding: 18px; border: 1px dashed rgba(99, 91, 130, 0.4); border-radius: 14px; }
.bridge-offer h3 { font-size: 18px; }
.bridge-offer p { color: var(--muted); font-size: 14px; }
.bridge-bonuses { display: flex; flex-direction: column; gap: 14px; }
.bridge-bonus-title { text-align: center; font-size: 20px; font-weight: 800; }
.bridge-bonus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.bridge-bonus-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 22px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}
.bridge-bonus-img { max-height: 84px; max-width: 100%; object-fit: contain; border-radius: 10px; }
.bridge-bonus-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.bridge-bonus-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); text-transform: uppercase; }
.bridge-bonus-card h4 { font-size: 16px; margin: 0; }
.bridge-bonus-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.bridge-bonus-cta { font-size: 13px; font-weight: 700; color: #fff; background: var(--grad); padding: 8px 16px; border-radius: 10px; text-decoration: none; margin-top: 4px; }
.bridge-affiliate { text-align: center; padding: 16px; border-radius: 14px; background: rgba(79, 70, 229, 0.06); }
.bridge-affiliate p { font-weight: 700; margin-bottom: 10px; }
.bridge-thanks { text-align: center; align-items: center; gap: 16px; }
.bridge-thanks h1 { font-size: 26px; font-weight: 800; }

@media (max-width: 560px) {
  .bridge-body { padding: 14px 10px; }
  .bridge-card { padding: 20px 16px; border-radius: 16px; }
  .bridge-row-2 { grid-template-columns: 1fr; }
  .bridge-bonus-grid { grid-template-columns: 1fr; }
}

/* Builder bonus rows */
.bridge-bonus-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.5);
}
