:root {
  --ink: #14161f;
  --muted: #6b7280;
  --border: #e9e5df;
  --bg: #faf8f6;
  --card-bg: #ffffff;
  --accent: #ff6a0d;        /* vivid brand orange — buttons, badges, decorative */
  --accent-dark: #e6590a;   /* hover state for accent buttons */
  --accent-text: #c24700;   /* accessible orange for text links on white */
  --accent-ink: #14161f;    /* dark text used on top of the orange accent */
  --danger: #b91c1c;
  --success: #15803d;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 31, 0.04), 0 1px 6px rgba(20, 22, 31, 0.05);
  --shadow-md: 0 4px 10px rgba(20, 22, 31, 0.06), 0 2px 4px rgba(20, 22, 31, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 420px;
  margin: 48px auto;
  padding: 0 20px;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 28px;
  text-decoration: none;
}

.brand img {
  height: 26px;
  width: auto;
  display: block;
}

h1 { font-size: 20px; margin: 0 0 6px; letter-spacing: -0.01em; }
p.sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
}

button, .btn {
  display: inline-block;
  width: 100%;
  margin-top: 20px;
  padding: 11px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover, .btn:hover { background: var(--accent-dark); }
button:active, .btn:active { transform: translateY(1px); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f5f3f0; }

.error {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 4px;
}

.notice {
  background: #f0fdf4;
  color: var(--success);
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 4px;
}

.foot {
  text-align: center;
  font-size: 14px;
  margin-top: 18px;
  color: var(--muted);
}

/* App shell (dashboard/settings/contacts) */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
  row-gap: 8px;
}

.app-header .brand { margin-bottom: 0; }

.app-nav { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; }

.app-nav a {
  margin-left: 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.app-nav a:hover { color: var(--ink); }

.app-main {
  max-width: 960px;
  margin: 32px auto;
  padding: 0 20px 48px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}

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

.stat .num { font-size: 22px; font-weight: 700; }
.stat .label { font-size: 13px; color: var(--muted); }

.logout-form { display: inline; }
.logout-form button {
  all: unset;
  cursor: pointer;
  margin-left: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.logout-form button:hover { color: var(--ink); }

/* Contacts */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar-actions .btn-sm { flex: 1 1 auto; text-align: center; }

.btn-sm {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-sm:hover { background: var(--accent-dark); }

.btn-sm.outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-sm.outline:hover { background: #f5f3f0; }

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.search-form .btn-sm { flex: 0 0 auto; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}

.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill:not(.active):hover { border-color: var(--accent); color: var(--ink); }

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
}

table.contacts-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}

table.contacts-table th, table.contacts-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.contacts-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
table.contacts-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-subscribed { background: #f0fdf4; color: var(--success); }
.badge-unsubscribed { background: #f3f4f6; color: var(--muted); }
.badge-bounced { background: #fef2f2; color: var(--danger); }
.badge-complained { background: #fef2f2; color: var(--danger); }

.row-actions { display: flex; gap: 10px; }
.row-actions a, .row-actions button {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.row-actions a:hover, .row-actions button:hover { color: var(--ink); }
.row-actions .danger { color: var(--danger); }
.row-actions .danger:hover { color: #7f1414; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.summary-grid .stat .num { font-size: 20px; }

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

/* Responsive tweaks */
@media (min-width: 640px) {
  .wrap { margin: 72px auto; }
  .app-main { padding: 0 32px 56px; }
}

@media (max-width: 480px) {
  .app-header { padding: 12px 16px; }
  .app-nav a, .logout-form button { margin-left: 12px; font-size: 13px; }
  .brand img { height: 22px; }
  .card { padding: 20px; }
}

/* Below this width, showing a wide table means hiding columns off-screen
   with no visible way to reach them — switch to one labeled card per row
   instead, the standard responsive-table pattern. */
@media (max-width: 700px) {
  .table-scroll {
    overflow-x: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  table.contacts-table { min-width: 0; }
  table.contacts-table thead { display: none; }

  table.contacts-table, table.contacts-table tbody,
  table.contacts-table tr, table.contacts-table td {
    display: block;
    width: 100%;
  }

  table.contacts-table tr {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    margin-bottom: 12px;
  }

  table.contacts-table td {
    border-bottom: none;
    padding: 4px 0;
    white-space: normal;
    word-break: break-word;
  }

  /* Every labelled cell after the title: label left, value right */
  table.contacts-table td:not(:first-child)[data-label]:not([data-label=""]) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  table.contacts-table td:not(:first-child)[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
  }

  /* Email: card title */
  table.contacts-table td:first-child {
    font-weight: 600;
    font-size: 15px;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }

  /* Actions: right-aligned footer row */
  table.contacts-table td:last-child {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid var(--border);
  }
  table.contacts-table td:last-child .row-actions { justify-content: flex-end; }
}

/* Public site: landing, privacy, terms */
.public-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
}

.public-header .brand { margin-bottom: 0; }

.public-nav { display: flex; align-items: center; gap: 20px; }
.public-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap; }
.public-nav a:hover { color: var(--ink); }
.public-nav a.btn-sm { color: var(--accent-ink); }

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 20px 40px;
  text-align: center;
}

.hero h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero p.sub {
  font-size: 17px;
  margin: 0 auto 28px;
  max-width: 520px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn, .hero-actions .btn-secondary { width: auto; margin-top: 0; padding: 12px 24px; }

.feature-grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

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

.feature-card h1 { font-size: 17px; margin: 0 0 8px; }
.feature-card p.sub { margin: 0; text-align: left; font-size: 14px; }

.steps-section {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 20px;
}

.steps-inner { max-width: 780px; margin: 0 auto; }
.steps-inner h1 { text-align: center; font-size: 24px; margin-bottom: 32px; }

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  text-align: center;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 12px;
}

.public-footer {
  margin-top: 24px;
  padding: 40px 20px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.public-footer .footer-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
}
.public-footer .footer-brand img { height: 20px; width: auto; opacity: 0.85; }

.public-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.public-footer .footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 2px 4px;
  transition: color 0.15s ease;
}
.public-footer .footer-links a:hover { color: var(--accent-text); }
.public-footer .footer-links .dot { color: var(--border); font-size: 10px; }

.public-footer .company-info {
  line-height: 1.7;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}
.public-footer .company-info a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); }
.public-footer .company-info a:hover { color: var(--accent-text); }
.public-footer .copyright { margin-top: 10px; color: #9ca3af; font-size: 12px; }

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

.legal-page h1 { font-size: 26px; margin-bottom: 4px; }
.legal-page h2 { font-size: 17px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { color: var(--ink); font-size: 15px; line-height: 1.7; }
.legal-page ul { padding-left: 20px; }
.legal-page .updated { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* ===================== Phase 10: Super Admin ===================== */
input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input[type="number"]:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input:disabled { background: #f5f3f0; color: var(--muted); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.admin-body { background: #f4f2ef; }
.admin-header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--border);
}
.admin-header .brand { margin-bottom: 0; }
.admin-header-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.admin-who { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.admin-tag {
  display: inline-block; background: var(--ink); color: var(--accent);
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px;
}
.admin-nav {
  display: flex; gap: 4px; overflow-x: auto; white-space: nowrap;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a {
  padding: 7px 13px; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.admin-nav a:hover { color: var(--ink); background: #f5f3f0; }
.admin-nav a.active { background: var(--ink); color: #fff; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.admin-main .stat-grid { margin: 14px 0; }
.admin-main .card { padding: 20px; }
.admin-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.admin-section { margin-top: 18px; }
.card-title { font-size: 15px; margin: 0 0 12px; display: flex; justify-content: space-between; align-items: center; }
.card-link { font-size: 13px; font-weight: 500; }
.section-title { font-size: 18px; margin: 28px 0 4px; }
.crumb { margin: 0 0 8px; font-size: 14px; }
.crumb a { text-decoration: none; }
.muted-sm { font-size: 12px; color: var(--muted); font-weight: 400; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 10px; display: block; }
.text-danger { color: var(--danger); font-weight: 600; }
code { font-size: 12px; background: #f5f3f0; padding: 2px 6px; border-radius: 4px; }

.stat.highlight { background: var(--ink); border-color: var(--ink); }
.stat.highlight .num { color: var(--accent); }
.stat.highlight .label { color: #c9cbd3; }
.stat.warn { border-color: #fecaca; background: #fff8f8; }
.stat.warn .num { color: var(--danger); }
.stat-link { color: inherit; text-decoration: none; display: block; }

.badge-plan { background: #fff4ec; color: var(--accent-text); }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 14px; margin: 0 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

table.mini-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.mini-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--border); }
table.mini-table td { padding: 8px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.mini-table tr:last-child td { border-bottom: none; }

.action-stack { display: flex; flex-direction: column; gap: 8px; }
.action-stack .btn-sm { width: 100%; }
.action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-danger, .btn-sm.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover, .btn-sm.btn-danger:hover { background: #7f1414; }

.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 180px; }
.inline-form .btn-sm { padding: 11px 14px; }
.field label { margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; margin: 14px 0 0; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-bar input { flex: 2 1 220px; width: auto; }
.filter-bar select { flex: 1 1 140px; width: auto; }
.filter-bar .btn-sm { padding: 10px 16px; }

.plan-card { margin-top: 14px; }
.plan-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.stripe-ids { margin-top: 14px; font-size: 14px; }
.stripe-ids summary { cursor: pointer; font-weight: 600; }
.info-card { font-size: 14px; background: #fffaf5; border-color: #ffd9bf; }

.refund-form { display: flex; gap: 6px; align-items: center; }
.refund-form input { width: 90px; padding: 6px 8px; font-size: 13px; }

.danger-zone { border-color: #fecaca; }

.status-row { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 14px; margin-bottom: 4px; }
.status-item { display: inline-flex; align-items: center; }
.dot-status { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; flex-shrink: 0; }
.dot-status.ok { background: var(--success); }
.dot-status.bad { background: var(--danger); }

.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bar-col .bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-val { font-size: 10px; color: var(--muted); height: 14px; }
.bar-label { font-size: 10px; color: var(--muted); margin-top: 4px; }

.qr-box { display: flex; justify-content: center; margin: 8px 0 4px; }
.qr-box img { border: 1px solid var(--border); border-radius: 8px; }
.secret-key { font-family: ui-monospace, Menlo, monospace; font-size: 14px; text-align: center; background: #f5f3f0; padding: 10px; border-radius: 8px; word-break: break-all; letter-spacing: 0.05em; }
.code-input { font-size: 22px !important; letter-spacing: 0.3em; text-align: center; }

/* Customer-facing bars (rendered by _footer.ejs) */
.impersonation-spacer { height: 64px; }
.impersonation-bar, .announcement-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 -2px 12px rgba(20, 22, 31, 0.15);
}
.impersonation-bar { background: var(--accent); color: var(--ink); }
.impersonation-bar form { margin: 0; }
.impersonation-bar button { width: auto; margin: 0; padding: 7px 14px; background: var(--ink); color: #fff; font-size: 13px; }
.announcement-bar { background: var(--ink); color: #fff; }
.announcement-bar.warning { background: var(--accent); color: var(--ink); }
.announcement-bar button { all: unset; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 6px; }

@media (max-width: 700px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .admin-who { display: none; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}

/* ===================== Phase 11: Automations ===================== */
.seq-create { margin-bottom: 8px; }
.seq-create label:first-child { margin-top: 0; }
.seq-create-row { display: flex; gap: 8px; }
.seq-create-row input { flex: 1; }
.seq-create-row .btn-sm { padding: 10px 18px; }
.seq-limit { font-size: 14px; }
.seq-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seq-title h1 { margin: 0; }
.seq-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 16px 20px; }
.seq-status form { margin: 0; }
.seq-h2 { font-size: 16px; margin: 28px 0 12px; }
.seq-steps { display: flex; flex-direction: column; }
.seq-wait { display: flex; justify-content: center; position: relative; padding: 10px 0; font-size: 13px; color: var(--muted); }
.seq-wait::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px dashed var(--border); }
.seq-wait span { position: relative; background: var(--bg); padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; }
.seq-step { padding: 16px 18px; }
.seq-step-head { display: flex; gap: 12px; align-items: flex-start; }
.seq-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--accent); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.seq-step-main { min-width: 0; word-break: break-word; }
.seq-step-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 10px 0 0 40px; }
.seq-step-stats strong { color: var(--ink); }
.seq-edit { margin: 10px 0 0 40px; font-size: 14px; }
.seq-edit summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
.seq-step-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.seq-step-actions form { margin: 0; }
.delay-row { display: flex; gap: 8px; }
.delay-row input { flex: 1; }
.delay-row select { flex: 1; }
.seq-add, .seq-enroll, .seq-settings { margin-top: 18px; }
.seq-delete { margin-top: 18px; text-align: right; }
@media (max-width: 480px) {
  .seq-step-stats, .seq-edit { margin-left: 0; }
}

/* ===================== Phase 13: dashboard send animation ===================== */
.dash-send { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: center; }
.dash-send-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-send-art { max-width: 300px; justify-self: end; width: 100%; }
@media (max-width: 640px) {
  .dash-send { grid-template-columns: 1fr; }
  .dash-send-art { justify-self: center; max-width: 280px; }
}

/* ===================== Phase 13: in-app templates ===================== */
.tpl-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 20px; }
.tpl-app-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.tpl-app-card h2 { font-size: 17px; margin: 6px 0 0; }
.tpl-app-card .sub { margin: 0; font-size: 14px; }
.tpl-app-subj { font-size: 14px; margin: 6px 0 0; }
.tpl-app-preview { font-size: 14px; margin: 4px 0 10px; }
.tpl-app-preview summary { cursor: pointer; color: var(--accent-text); font-weight: 600; }
.tpl-app-preview pre { white-space: pre-wrap; font-family: inherit; background: #f5f3f0; padding: 12px; border-radius: 8px; margin: 8px 0 0; }
.tpl-app-card form { margin-top: auto; }

/* ===================== Phase 14: designed templates ===================== */
.app-main.app-wide { max-width: 1180px; }
.gal-tabs { display: flex; gap: 6px; margin: 18px 0 14px; border-bottom: 1px solid var(--border); }
.gal-tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.gal-tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.gal-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.gal-cats a { white-space: nowrap; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: #fff; text-decoration: none; color: var(--ink); font-size: 14px; }
.gal-cats a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.gal-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.gal-thumb { background: var(--tpl-bg, #f5f3f0); aspect-ratio: 4 / 5; overflow: hidden; border-bottom: 1px solid var(--border); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.gal-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gal-body h2 { font-size: 17px; margin: 4px 0 0; }
.gal-body .sub { margin: 0 0 8px; font-size: 14px; }
.gal-body form { margin-top: auto; }

.ed-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-title h1 { margin: 0; }
.ed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; margin-top: 16px; align-items: start; }
.ed-form .card { margin-bottom: 12px; padding: 18px; }
.ed-block summary { cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.ed-hidden-tag { font-style: normal; font-size: 12px; color: var(--muted); background: #f5f3f0; padding: 2px 8px; border-radius: 6px; }
.ed-block[open] summary { margin-bottom: 8px; }
.check-row { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; margin-top: 12px; }
.check-row input { width: 18px; height: 18px; }
.ed-color { width: 64px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; margin-top: 6px; }
.ed-item { border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 12px; margin: 12px 0 0; }
.ed-item legend { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.ed-image-row { display: flex; gap: 12px; align-items: flex-start; }
.ed-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.ed-image-inputs { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ed-upload { align-self: flex-start; cursor: pointer; margin: 0 !important; }
.ed-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; }
.ed-actions button { width: auto; margin: 0; }
.ed-preview { position: sticky; top: 16px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; }
.ed-preview-bar { display: flex; justify-content: space-between; padding: 10px 14px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); background: #faf8f6; }
.ed-status { color: var(--muted); font-weight: 400; }
.ed-preview iframe { width: 100%; height: calc(100vh - 120px); min-height: 560px; border: 0; display: block; }
.ed-switch { display: none; }
@media (max-width: 900px) {
  .ed-layout { grid-template-columns: 1fr; }
  .ed-switch { display: inline-flex; gap: 4px; margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: #fff; }
  .ed-switch button { width: auto; margin: 0; padding: 8px 18px; background: transparent; color: var(--ink); font-size: 14px; }
  .ed-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
  .ed-layout[data-mode="edit"] .ed-preview { display: none; }
  .ed-layout[data-mode="preview"] .ed-form { display: none; }
  .ed-preview { position: static; }
  .ed-preview iframe { height: 75vh; }
}

/* ===================== Phase 15: blog admin ===================== */
.blog-ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-top: 12px; }
.blog-ed-form .card { margin-bottom: 12px; }
.blog-check { position: sticky; top: 16px; }
.checklist { list-style: none; padding: 0; margin: 10px 0; font-size: 13px; display: grid; gap: 7px; }
.checklist li { padding-left: 22px; position: relative; line-height: 1.4; }
.checklist li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.checklist li.ok::before { content: '✓'; color: #15803d; }
.checklist li.bad::before { content: '✕'; color: #b91c1c; }
.checklist li.warn::before { content: '!'; color: #b45309; }
.checklist li.bad { color: #7f1d1d; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.md-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.md-area { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.55; }
.md-help { margin-top: 8px; font-size: 13px; }
.md-help pre { white-space: pre-wrap; background: #f5f3f0; padding: 12px; border-radius: 8px; font-size: 12px; }
.ai-card summary { cursor: pointer; }
.ai-card form { margin-top: 12px; }
@media (max-width: 900px) { .blog-ed { grid-template-columns: 1fr; } .blog-check { position: static; order: -1; } .form-grid-2 { grid-template-columns: 1fr; } }

/* ===================== Phase 16: API keys ===================== */
.api-new { background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 10px; padding: 14px; margin: 12px 0; display: grid; gap: 8px; }
.api-new code { font-size: 13px; word-break: break-all; background: #fff; padding: 8px 10px; border-radius: 6px; }
.api-new .btn-sm { justify-self: start; }
.api-create { margin-top: 12px; }

/* =====================================================================
   Phase 17: App theme v2 — matches the website (fonts, colours, buttons)
   ===================================================================== */
@font-face { font-family: 'Bricolage'; src: url('/bricolage-grotesque-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Instrument'; src: url('/instrument-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument'; src: url('/instrument-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Instrument'; src: url('/instrument-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #f5f6f8;
  --border: #e6e7ec;
  --muted: #5a6070;
  --mist: #f5f6f8;
  --envelope: #fff1e6;
  --radius: 16px;
  --display: 'Bricolage', 'Instrument', system-ui, sans-serif;
  --text: 'Instrument', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-family: var(--text);
}
body { font-family: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .stat .num, .card-title, .section-title { font-family: var(--display); letter-spacing: -0.02em; }
h1 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 720; margin-bottom: 6px; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}

/* Buttons: orange with ink text, like the website */
button, .btn, .btn-sm {
  font-family: var(--text); font-weight: 600; border-radius: 12px; color: var(--ink); background: var(--accent);
}
button:hover, .btn:hover, .btn-sm:hover { background: var(--accent-dark); }
.btn-sm.outline, .btn-secondary {
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); border: 0;
}
.btn-sm.outline:hover, .btn-secondary:hover { background: var(--mist); }
.btn-danger, .btn-sm.btn-danger { background: var(--danger); color: #fff; }

/* Cards, stats, forms */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: none; padding: 18px 20px; }
.stat .num { font-size: 28px; font-weight: 720; }
.stat.highlight { background: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], select, textarea {
  border: 1.5px solid var(--border); border-radius: 10px; font-family: var(--text); font-size: 16px; background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink) !important; outline: none; }
label { font-weight: 600; }
.notice { background: #ecfdf3; border-color: #bbf7d0; color: #14532d; border-radius: 12px; }
.error { border-radius: 12px; }
.badge { border-radius: 999px; font-weight: 600; }
.badge-plan { background: var(--envelope); color: var(--accent-text); }
table.contacts-table { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: none; }
table.contacts-table th { text-transform: none; letter-spacing: 0; }
.empty-state { border-radius: var(--radius); border-color: var(--border); background: #fff; }

/* ---------- App header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 64px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); flex-wrap: nowrap;
}
.app-header .brand img { height: 23px; width: auto; display: block; }
.app-nav { flex: 1; display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.app-nav::-webkit-scrollbar { display: none; }
.app-nav a {
  padding: 8px 13px; border-radius: 999px; color: var(--muted); text-decoration: none;
  font-size: 15px; font-weight: 500; white-space: nowrap; margin: 0;
}
.app-nav a:hover { color: var(--ink); background: var(--mist); }
.app-nav a.active { background: var(--ink); color: #fff; }
.app-logout button { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--border); padding: 8px 14px; font-size: 14px; width: auto; margin: 0; }
.app-logout button:hover { background: var(--mist); color: var(--ink); }
.app-main { padding-top: 28px; }

/* ---------- Mobile tab bar ---------- */
.tabbar { display: none; }
@media (max-width: 820px) {
  .app-header { height: 56px; padding: 0 16px; justify-content: space-between; }
  .app-nav, .app-logout { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: #fff; border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(20, 22, 31, 0.06);
  }
  .tabbar > a, .tab-more > summary {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px;
    color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; list-style: none; cursor: pointer;
  }
  .tab-more > summary::-webkit-details-marker { display: none; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar > a.active, .tab-more > summary.active { color: var(--accent-text); }
  .tabbar > a.active svg, .tab-more > summary.active svg { stroke-width: 2.2; }
  .tab-sheet {
    position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); background: #fff;
    border: 1px solid var(--border); border-radius: 18px; padding: 8px; display: grid; gap: 2px;
    box-shadow: 0 16px 40px rgba(20, 22, 31, 0.18);
  }
  .tab-sheet a, .tab-sheet button {
    display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; font-size: 16px; font-weight: 600;
    color: var(--ink); text-decoration: none; background: transparent; width: 100%; text-align: left; margin: 0; box-shadow: none;
  }
  .tab-sheet a:hover, .tab-sheet button:hover { background: var(--mist); }
  .tab-sheet svg { width: 20px; height: 20px; }
  .tab-sheet form { margin: 0; border-top: 1px solid var(--border); padding-top: 4px; }
  .tab-sheet button { color: var(--danger); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .app-main { padding: 20px 16px 24px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .num { font-size: 22px; }
  .ed-actions { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .impersonation-bar, .announcement-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- App footer (compact) ---------- */
.public-footer { background: transparent; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; padding: 28px 20px; }
.public-footer .footer-brand img { height: 20px; opacity: 0.85; }
.public-footer a { color: var(--muted); }
.public-footer a:hover { color: var(--ink); }

/* ---------- Idle warning ---------- */
.idle-warning {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 1200; width: min(420px, calc(100% - 24px));
  background: var(--ink); color: #fff; border-radius: 16px; padding: 16px 18px; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; box-shadow: 0 16px 40px rgba(20, 22, 31, 0.3);
}
.idle-warning[hidden] { display: none; }
.idle-warning p { margin: 0; font-size: 14px; }
.idle-warning button { width: auto; margin: 0; padding: 9px 14px; font-size: 14px; }

/* ---------- Auth pages (login, signup) ---------- */
.wrap .card { border-radius: 20px; }
.wrap h1 { font-size: 28px; }

/* ---------- Admin in the same style ---------- */
.admin-body { background: var(--bg); font-family: var(--text); }
.admin-header { height: 60px; padding: 0 20px; }
.admin-nav a { font-family: var(--text); }
.admin-main .card { border-radius: var(--radius); }
.country-flag { font-size: 16px; margin-right: 4px; }
.country-table td:last-child, .country-table th:last-child { text-align: right; }
@media (max-width: 700px) {
  .admin-header { height: auto; padding: 10px 14px; }
  .admin-main { padding: 18px 12px 48px; }
}
.country-bar { height: 4px; background: var(--mist); border-radius: 4px; margin-top: 6px; max-width: 220px; }
.country-bar span { display: block; height: 4px; background: var(--accent); border-radius: 4px; }
.plan-control label { margin-top: 8px; }
.plan-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0 6px; }
.plan-pill { margin: 0 !important; cursor: pointer; }
.plan-pill input { position: absolute; opacity: 0; pointer-events: none; }
.plan-pill span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; font-weight: 500; }
.plan-pill small { color: var(--muted); font-size: 12px; }
.plan-pill input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.plan-pill input:checked + span small { color: #c9ccd6; }
.plan-pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.plan-control input[type=date] { max-width: 220px; }
.plan-control .btn-sm { margin-top: 6px; }
input[type="date"] { border: 1.5px solid var(--border); border-radius: 10px; font-family: var(--text); font-size: 16px; padding: 10px 12px; background: #fff; }
.app-logout button { border-radius: 999px; }
.row-actions { align-items: center; }
.row-actions form { margin: 0; display: inline-flex; }
.row-actions button, .row-actions button:hover { background: none; padding: 0; width: auto; margin: 0; box-shadow: none; font-weight: 600; }

/* =====================================================================
   Phase 18: premium dashboard, app footer, admin sidebar
   ===================================================================== */
.app-main.app-wide { max-width: 1200px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2, .dash h2 { font-family: var(--display); font-size: 18px; margin: 0; letter-spacing: -0.015em; }
.card-link { font-size: 14px; font-weight: 600; text-decoration: none; }

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-hello { margin: 0 0 4px; color: var(--muted); font-weight: 500; }
.dash-head h1 { margin: 0; font-size: clamp(28px, 3.4vw, 38px); }
.dash-head-actions { display: flex; gap: 8px; }
.dash-head-actions .btn-sm { padding: 11px 18px; }
.dash-stats { grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 18px; }
.dash-stats .stat { position: relative; padding: 20px; }
.stat-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--envelope); display: grid; place-items: center; margin-bottom: 14px; }
.stat-ic svg { width: 19px; height: 19px; fill: none; stroke: var(--accent-text); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-col { display: grid; gap: 18px; }
.dash .card { margin: 0; padding: 22px; }
.dash-send { grid-template-columns: 1fr 260px; }
.dash-send h2 { font-size: 22px; margin-bottom: 8px; }
.dash-empty { text-align: center; padding: 18px 8px 6px; color: var(--muted); }
.dash-empty p { margin: 0 0 14px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li + li { border-top: 1px solid var(--border); }
.recent-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px 64px; gap: 12px; align-items: center; padding: 12px 4px; color: var(--ink); text-decoration: none; border-radius: 10px; }
.recent-list a:hover { background: var(--mist); }
.recent-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.recent-num { text-align: right; line-height: 1.2; }
.recent-num small { display: block; color: var(--muted); font-size: 12px; }
.meter { margin-top: 14px; }
.meter-top { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.meter-top span:last-child { color: var(--muted); }
.meter-bar { height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.meter-bar.hot span { background: var(--accent); }
.plan-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.plan-foot a { font-weight: 700; text-decoration: none; }
.steps-progress { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; margin-bottom: 8px; }
.steps-progress span { display: block; height: 100%; background: var(--accent); }
.checklist-steps { list-style: none; margin: 0; padding: 0; }
.checklist-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.checklist-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.step-dot { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--ink); border: 1.5px solid var(--border); }
.checklist-steps li.done .step-dot { background: var(--success); color: #fff; border-color: var(--success); }
.checklist-steps li.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(90,96,112,.5); }
.step-body { flex: 1; min-width: 0; }
.step-body strong { display: block; font-size: 15px; }
.step-body small { color: var(--muted); font-size: 13px; }
.step-go { flex-shrink: 0; font-size: 13px; font-weight: 700; text-decoration: none; padding: 7px 11px; border-radius: 999px; background: var(--envelope); color: var(--accent-text); }
.step-go:hover { background: #ffe2cc; }
.dash-help h2 { margin-bottom: 6px; }
.dash-help-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dash-help-links a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 999px; border: 1.5px solid var(--border); color: var(--ink); }
.dash-help-links a:hover { border-color: var(--ink); }
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .dash-head { align-items: flex-start; }
  .dash-head-actions { width: 100%; }
  .dash-head-actions .btn-sm { flex: 1; text-align: center; }
  .dash-send { grid-template-columns: 1fr; }
  .dash .card { padding: 18px; }
  .recent-list a { grid-template-columns: minmax(0, 1fr) auto; }
  .recent-num { display: none; }
  .stat-ic { margin-bottom: 10px; }
}

/* App footer (compact, premium) */
.public-footer { display: none; }
.app-footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 22px 24px 28px; color: var(--muted); font-size: 13.5px; }
.app-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-footer-brand { display: flex; align-items: center; gap: 12px; }
.app-footer-brand img { height: 18px; width: auto; opacity: .9; }
.app-footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.app-footer-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.app-footer-links a:hover { color: var(--ink); }
.app-footer-legal { max-width: 1200px; margin: 12px auto 0; font-size: 12.5px; color: #8a8f9c; }
.app-footer-legal a { color: #8a8f9c; }
@media (max-width: 640px) {
  .app-footer { text-align: center; padding: 22px 16px; }
  .app-footer-inner { flex-direction: column; gap: 14px; }
  .app-footer-brand { flex-direction: column; gap: 8px; }
  .app-footer-links { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; gap: 10px 20px; }
}

/* ---------- Admin: sidebar layout ---------- */
.admin-header, .admin-nav { display: none; }
.adm-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.adm-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: #c9ccd6; padding: 22px 14px; display: flex; flex-direction: column; gap: 10px; }
.adm-side .adm-logo img { height: 22px; width: auto; filter: brightness(0) invert(1); }
.adm-side .admin-tag { align-self: flex-start; background: var(--accent); color: var(--ink); margin-bottom: 8px; }
.adm-nav { display: flex; flex-direction: column; gap: 2px; }
.adm-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c9ccd6; text-decoration: none; font-weight: 500; font-size: 15px; }
.adm-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.adm-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav a.active { background: #fff; color: var(--ink); }
.adm-nav a.active svg { color: var(--accent-text); }
.adm-side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; display: grid; gap: 8px; }
.adm-who { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9aa0ad; }
.adm-side-foot form { margin: 0; }
.adm-logout { width: 100%; background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); padding: 9px; font-size: 14px; margin: 0; }
.adm-logout:hover { background: rgba(255,255,255,.08); }
.adm-content { display: flex; flex-direction: column; min-width: 0; }
.adm-content .admin-main { flex: 1; width: 100%; max-width: 1240px; padding: 30px 28px 40px; }
.adm-topbar { display: none; }
.adm-footer { border-top: 1px solid var(--border); padding: 18px 28px 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.adm-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.adm-footer a { color: var(--muted); text-decoration: none; font-weight: 500; }
.adm-footer a:hover { color: var(--ink); }
@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { display: none; }
  .adm-topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 80; background: var(--ink); padding: 12px 16px; }
  .adm-topbar .adm-logo img { height: 19px; width: auto; filter: brightness(0) invert(1); display: block; }
  .adm-topbar .admin-tag { background: var(--accent); color: var(--ink); }
  .adm-menu { margin-left: auto; }
  .adm-menu summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); }
  .adm-menu summary::-webkit-details-marker { display: none; }
  .adm-menu summary span, .adm-menu summary span::before, .adm-menu summary span::after { display: block; width: 18px; height: 2px; background: #fff; position: relative; content: ''; }
  .adm-menu summary span::before { position: absolute; top: -6px; }
  .adm-menu summary span::after { position: absolute; top: 6px; }
  .adm-menu[open] summary { background: #fff; }
  .adm-menu[open] summary span { background: transparent; }
  .adm-menu[open] summary span::before { background: var(--ink); top: 0; transform: rotate(45deg); }
  .adm-menu[open] summary span::after { background: var(--ink); top: 0; transform: rotate(-45deg); }
  .adm-drawer { position: fixed; left: 0; right: 0; top: 66px; bottom: 0; overflow-y: auto; background: var(--ink); padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
  .adm-drawer .adm-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .adm-drawer .adm-nav a { background: rgba(255,255,255,.06); padding: 14px 12px; font-size: 15px; }
  .adm-drawer .adm-nav a.active { background: #fff; }
  .adm-content .admin-main { padding: 20px 14px 32px; }
  .adm-footer { flex-direction: column; text-align: center; align-items: center; padding: 18px 14px 24px; }
  .adm-footer nav { justify-content: center; }
}
@media (max-width: 640px) { .dash-send-art { display: none; } }

/* Admin mobile overflow fix: long emails/event names must wrap instead
   of widening the page. Grid columns use minmax(0, 1fr) so they can shrink. */
.admin-main { min-width: 0; overflow-wrap: anywhere; }
.admin-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.admin-grid-2 > *, .admin-main .card, .admin-main .stat { min-width: 0; }
table.mini-table { table-layout: fixed; }
table.mini-table td, table.mini-table th { overflow-wrap: anywhere; word-break: break-word; }
.admin-main code { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .admin-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .admin-main .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .country-table th:nth-child(2), .country-table td:nth-child(2) { width: 18%; }
}

/* =====================================================================
   Phase 19: customer app in the admin colour scheme (dark sidebar)
   and a website-style dark footer
   ===================================================================== */
.app-header {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; height: auto; z-index: 60;
  flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 14px;
  background: var(--ink); border: 0; backdrop-filter: none; overflow-y: auto;
}
.app-header .brand { padding: 0 6px 10px; }
.app-header .brand img { filter: brightness(0) invert(1); height: 22px; }
.app-header .app-nav { flex: 0 0 auto; flex-direction: column; gap: 2px; overflow: visible; }
.app-header .app-nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c9ccd6; font-size: 15px; font-weight: 500;
}
.app-header .app-nav a svg { width: 19px; height: 19px; flex-shrink: 0; }
.app-header .app-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-header .app-nav a.active { background: #fff; color: var(--ink); }
.app-header .app-nav a.active svg { color: var(--accent-text); }
.app-side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; display: grid; gap: 2px; }
.app-side-link { color: #9aa0ad; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.app-side-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.app-header .app-logout { margin-top: 8px; }
.app-header .app-logout button {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); border-radius: 12px; padding: 10px;
}
.app-header .app-logout button svg { width: 17px; height: 17px; }
.app-header .app-logout button:hover { background: rgba(255,255,255,.08); color: #fff; }
body:has(> .app-header) { padding-left: 240px; }
.app-main { padding-top: 32px; }

/* Website-style dark footer */
.app-footer { background: var(--ink); color: #c9ccd6; border-top: 0; margin-top: 56px; padding: 44px 32px 26px; font-size: 14px; }
.app-footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: start; }
.app-footer-brand img { height: 22px; width: auto; filter: brightness(0) invert(1); opacity: 1; }
.app-footer-brand p { margin: 12px 0 0; max-width: 24em; color: #9aa0ad; }
.app-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.app-footer-cols h2 { font-family: var(--text); font-size: 14px; color: #fff; margin: 0 0 12px; letter-spacing: 0; }
.app-footer-cols a { display: block; color: #c9ccd6; text-decoration: none; padding: 5px 0; }
.app-footer-cols a:hover { color: #fff; text-decoration: underline; }
.app-footer-bottom { max-width: 1200px; margin: 30px auto 0; padding-top: 18px; border-top: 1px solid #2a2e3b; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #9aa0ad; }
.app-footer-bottom a { color: #9aa0ad; }
.app-footer-bottom a:hover { color: #fff; }
.app-footer-links, .app-footer-legal { display: none; }

@media (max-width: 820px) {
  body:has(> .app-header) { padding-left: 0; }
  .app-header {
    position: sticky; top: 0; bottom: auto; width: auto; height: 56px; flex-direction: row; align-items: center;
    padding: 0 16px; overflow: visible;
  }
  .app-header .brand { padding: 0; }
  .app-header .brand img { height: 20px; }
  .app-header .app-nav, .app-side-foot { display: none; }
  .tabbar { background: var(--ink); border-top: 0; box-shadow: 0 -4px 20px rgba(20,22,31,.25); }
  .tabbar > a, .tab-more > summary { color: #9aa0ad; }
  .tabbar > a.active, .tab-more > summary.active, .tab-more[open] > summary { color: var(--accent); }
  .app-main { padding-top: 22px; }
  .app-footer { padding: 32px 18px 24px; margin-top: 36px; }
  .app-footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .app-footer-bottom { flex-direction: column; gap: 8px; }
}
.legal-prose h2 { font-size: 24px; }
.app-header .app-nav { align-items: stretch; }
.app-header .app-nav a { margin: 0; width: auto; }
.app-header .app-logout { display: block; }
.app-footer-brand { display: block; }
html { background: var(--bg); }
.app-header .app-logout button { margin: 0; }

/* =====================================================================
   Phase 19.1: dark TOP bar (no sidebar), account menu, sticky footer
   ===================================================================== */
body:has(> .app-header) { padding-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
body:has(> .app-header) > .app-main { flex: 1 0 auto; width: 100%; }
body:has(> .app-header) > .app-footer { flex-shrink: 0; margin-top: 48px; }

.app-header.app-topbar {
  position: sticky; top: 0; left: auto; bottom: auto; width: auto; height: 64px; z-index: 60;
  flex-direction: row; align-items: center; gap: 24px; padding: 0 28px;
  background: var(--ink); overflow: visible; box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.app-topbar .brand { padding: 0; flex-shrink: 0; }
.app-topbar .brand img { filter: brightness(0) invert(1); height: 22px; }
.app-topbar .app-nav { flex: 1; flex-direction: row; align-items: center; gap: 4px; overflow-x: auto; }
.app-topbar .app-nav a {
  display: inline-flex; padding: 8px 14px; border-radius: 999px; color: #c9ccd6;
  font-size: 15px; font-weight: 500; white-space: nowrap;
}
.app-topbar .app-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-topbar .app-nav a.active { background: #fff; color: var(--ink); }

/* Account menu (avatar) */
.acct { position: relative; margin-left: auto; flex-shrink: 0; }
.acct summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 999px; }
.acct summary::-webkit-details-marker { display: none; }
.acct summary:hover .acct-avatar, .acct[open] .acct-avatar { box-shadow: 0 0 0 3px rgba(255,106,13,.35); }
.acct-avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .02em;
}
.acct-avatar svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.9; }
.acct-caret { width: 8px; height: 8px; border-right: 2px solid #c9ccd6; border-bottom: 2px solid #c9ccd6; transform: rotate(45deg) translateY(-3px); }
.acct[open] .acct-caret { transform: rotate(-135deg) translateY(-1px); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 250px; background: #fff; color: var(--ink);
  border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(20,22,31,.22); z-index: 90;
}
.acct-name { margin: 4px 10px 8px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu a, .acct-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; background: none; margin: 0; box-shadow: none; text-align: left;
}
.acct-menu a svg, .acct-menu button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; color: var(--muted); }
.acct-menu a:hover, .acct-menu button:hover { background: var(--mist); }
.acct-menu a.active { background: var(--envelope); color: var(--accent-text); }
.acct-menu form { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.acct-menu button { color: var(--danger); font-weight: 600; }
.acct-menu button svg { color: var(--danger); }
.acct-menu button:hover { background: #fef2f2; }

@media (max-width: 820px) {
  .app-header.app-topbar { height: 58px; padding: 0 14px; gap: 12px; }
  .app-topbar .app-nav { display: none; }
  .acct-avatar { width: 36px; height: 36px; }
  .acct-caret { display: none; }
  /* Footer runs down behind the tab bar, so there's no light gap under it. */
  body:has(> .app-header) { padding-bottom: 0; }
  body:has(> .app-header) > .app-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); margin-top: 32px; }
  .tabbar { background: var(--ink); }
}
/* Wider content on every app page so desktop feels full. */
body:has(> .app-header) > .app-main { max-width: 1200px; padding-left: 28px; padding-right: 28px; }
@media (max-width: 820px) { body:has(> .app-header) > .app-main { padding-left: 16px; padding-right: 16px; } }

/* =====================================================================
   Phase 20: split-screen login / signup / admin auth pages
   ===================================================================== */
.auth-body { margin: 0; min-height: 100vh; background: #fff; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside {
  position: relative; overflow: hidden; background: var(--ink); color: #c9ccd6;
  padding: 44px 56px; display: flex; flex-direction: column; gap: 28px;
}
.auth-aside::before, .auth-aside::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.auth-aside::before { width: 520px; height: 520px; right: -180px; top: -200px; background: radial-gradient(circle, rgba(255,106,13,.35), rgba(255,106,13,0) 65%); }
.auth-aside::after { width: 420px; height: 420px; left: -160px; bottom: -180px; background: radial-gradient(circle, rgba(255,241,230,.10), rgba(255,241,230,0) 65%); }
.auth-aside > * { position: relative; z-index: 1; }
.auth-logo img { height: 26px; width: auto; filter: brightness(0) invert(1); display: block; }
.auth-copy { max-width: 520px; margin-top: auto; }
.auth-kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink); background: var(--accent); padding: 5px 11px; border-radius: 999px; }
.auth-aside h2 { font-family: var(--display); color: #fff; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.04; letter-spacing: -0.03em; margin: 18px 0 14px; font-weight: 750; }
.auth-aside p { font-size: 17px; line-height: 1.6; margin: 0; max-width: 32em; }
.auth-aside em { color: #fff; font-style: normal; font-weight: 600; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points svg { flex-shrink: 0; width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: rgba(255,255,255,.07); color: var(--accent); }
.auth-points strong { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }
.auth-points span { font-size: 15px; line-height: 1.45; }
.auth-art { max-width: 460px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 18px; }
.auth-art svg { width: 100%; height: auto; display: block; }
.auth-trust { font-size: 13.5px !important; color: #9aa0ad; margin-top: auto !important; }
.auth-admin .auth-copy { margin-bottom: auto; }

.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-main .wrap { max-width: 440px; width: 100%; margin: auto; padding: 0; }
.auth-main .wrap > .brand { display: none; }
.auth-main .card { padding: 34px 32px; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(20,22,31,.08); }
.auth-main h1 { font-size: 30px; margin: 0 0 6px; }
.auth-main .sub { margin-bottom: 18px; }
.auth-main label { margin-top: 12px; }
.auth-main input[type="text"], .auth-main input[type="email"], .auth-main input[type="password"] { padding: 13px 14px; }
.auth-main button[type="submit"] { width: 100%; padding: 14px; font-size: 16px; margin-top: 20px; border-radius: 12px; }
.auth-main .foot { text-align: center; margin-top: 18px; }
.auth-ticks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: 14.5px; }
.auth-ticks li { display: flex; gap: 8px; align-items: center; }
.auth-ticks li::before { content: '✓'; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #dcfce7; color: #15803d; flex-shrink: 0; }
.auth-legal { display: flex; gap: 18px; justify-content: center; margin: 28px 0 0; font-size: 13px; }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--ink); }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { padding: 22px 20px 24px; gap: 14px; }
  .auth-aside::before { width: 320px; height: 320px; right: -120px; top: -140px; }
  .auth-copy { margin-top: 0; }
  .auth-aside h2 { font-size: 26px; margin: 12px 0 8px; }
  .auth-aside p { font-size: 15px; }
  .auth-points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
  .auth-points li { flex-direction: column; gap: 6px; background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px; }
  .auth-points svg { width: 30px; height: 30px; padding: 6px; }
  .auth-points strong { font-size: 13px; line-height: 1.3; }
  .auth-points span { font-size: 0; }
  .auth-points strong { font-size: 13px; }
  .auth-art, .auth-trust { display: none; }
  .auth-main { padding: 22px 16px 32px; justify-content: flex-start; }
  .auth-main .card { padding: 24px 20px; box-shadow: none; }
  .auth-main h1 { font-size: 26px; }
  /* Login: form first; the pitch is shorter for returning users. */
  .auth-aside-login p, .auth-aside-login .auth-points { display: none; }
}
@media (min-width: 961px) {
  .auth-aside { position: sticky; top: 0; height: 100vh; padding: 40px 56px 32px; gap: 22px; }
  .auth-art { max-width: 380px; padding: 14px; }
}
@media (min-width: 961px) and (max-height: 820px) { .auth-art { display: none; } }
@media (max-width: 960px) { .auth-shell { grid-template-rows: auto 1fr; } }
@media (max-width: 960px) { .auth-main .wrap { margin: 0 auto; } }
.dot-status.warn { background: #d97706; }

/* =====================================================================
   Phase 19: AI email designer + visual editor
   ===================================================================== */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.style-chip { margin: 0 !important; cursor: pointer; font-weight: 400; }
.style-chip input { position: absolute; opacity: 0; pointer-events: none; }
.style-chip span { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; height: 100%; }
.style-chip strong { font-size: 14px; }
.style-chip small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.style-chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.style-chip input:checked + span small { color: #c9ccd6; }
.style-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.ed-sub { margin: 18px 0 8px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.action-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.action-grid .btn-sm { padding: 8px 12px; font-size: 13px; }
.ed-block summary { display: flex; align-items: center; gap: 10px; }
.ed-block-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-grip { cursor: grab; color: var(--muted); letter-spacing: -2px; font-weight: 700; padding: 4px 2px; user-select: none; }
.ed-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.ed-tool { width: 34px; height: 34px; padding: 0; border-radius: 9px; background: var(--mist); color: var(--ink); box-shadow: none; font-size: 15px; line-height: 1; margin: 0; display: grid; place-items: center; }
.ed-tool:hover { background: #e9ebf0; }
.ed-tool:disabled { opacity: .35; cursor: default; }
.ed-tool-del { color: var(--danger); }
.ed-block.dragging { opacity: .45; outline: 2px dashed var(--accent); }
.ed-opts { margin: 4px 0 6px; }
.ed-add-row { display: flex; gap: 8px; }
.ed-add-row select { flex: 1; min-width: 0; }
.ed-add-row .btn-sm { flex-shrink: 0; }
.dev-switch { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 3px; gap: 2px; }
.dev-switch button { background: transparent; color: var(--muted); box-shadow: none; padding: 6px 14px; border-radius: 999px; font-size: 13px; margin: 0; }
.dev-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.ed-frame-wrap { display: flex; justify-content: center; background: var(--mist); border-radius: 0 0 14px 14px; padding: 0; height: 100%; }
.ed-frame-wrap iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .2s ease; }
.ed-frame-wrap[data-device="mobile"] { padding: 14px 0; }
.ed-frame-wrap[data-device="mobile"] iframe { width: 390px; max-width: 100%; border: 8px solid var(--ink); border-radius: 26px; height: calc(100% - 4px); }
.ed-frame-wrap { height: calc(100vh - 120px); min-height: 560px; }
.ed-frame-wrap iframe { min-height: 0; height: 100%; }
@media (max-width: 900px) { .ed-frame-wrap { height: 75vh; } }
/* Phone: the editor column may shrink below its content width. */
.ed-form, .ed-form .card, .ed-preview { min-width: 0; }
@media (max-width: 900px) {
  .ed-layout { grid-template-columns: minmax(0, 1fr); }
  .ed-tools { gap: 3px; }
  .ed-tool { width: 32px; height: 32px; }
  .style-grid { grid-template-columns: 1fr 1fr; }
  .ed-add-row { flex-wrap: wrap; }
  .ed-actions { flex-wrap: wrap; }
}

/* ---------- Template library (sequence cards) ---------- */
.seq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 8px; }
.seq-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.seq-card:hover { border-color: var(--ink); }
.seq-thumb { position: relative; display: block; height: 280px; overflow: hidden; background: var(--mist); border-bottom: 1px solid var(--border); }
.seq-thumb iframe { width: 600px; height: 900px; border: 0; transform: scale(.44); transform-origin: top left; pointer-events: none; margin-left: calc((100% - 264px) / 2); background: #fff; }
.seq-badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.seq-badge-new { background: var(--ink); color: #fff; }
.seq-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.seq-body h2 { font-size: 19px; margin: 4px 0 0; }
.seq-body .sub { margin: 0; font-size: 14px; }
.seq-meta { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seq-body .btn-sm { align-self: flex-start; margin-top: auto; }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 8px 0 14px; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.lib-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.lib-use { position: sticky; top: 84px; }
.lib-use h2 { font-size: 20px; margin: 0 0 6px; }
.lib-use select { margin-top: 8px; }
.lib-use button[type=submit] { width: 100%; margin-top: 14px; }
.lib-email { margin-bottom: 14px; }
.lib-email-head { display: flex; align-items: center; gap: 12px; }
.lib-email-head small { display: block; }
.lib-subject { margin: 10px 0 6px; font-size: 15px; }
.lib-preview summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.lib-frame { margin-top: 10px; height: 460px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--mist); }
.lib-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 900px) {
  .lib-layout { grid-template-columns: minmax(0, 1fr); }
  .lib-use { position: static; order: -1; }
  .mode-row { grid-template-columns: 1fr; }
  .seq-thumb iframe { margin-left: calc((100% - 264px) / 2); }
}
/* Profile card in Settings */
.profile-card textarea { min-height: 84px; }
.ed-add-row { align-items: stretch; }

/* ---------- Admin template designer ---------- */
.tpl-publish { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tpl-publish form { margin: 0; }
.tpl-emails { display: grid; gap: 14px; margin-bottom: 18px; }
.tpl-email { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.tpl-email-thumb { height: 240px; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--mist); }
.tpl-email-thumb iframe { width: 600px; height: 900px; border: 0; transform: scale(.3); transform-origin: top left; pointer-events: none; background: #fff; }
.tpl-email-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.tpl-email-actions form { margin: 0; }
.delay-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.delay-form input[type=number] { width: 72px; }
@media (max-width: 700px) { .tpl-email { grid-template-columns: minmax(0, 1fr); } .tpl-email-thumb { height: 200px; } .tpl-email-thumb iframe { transform: scale(.3); } }
.dev-switch button { width: auto; white-space: nowrap; flex: none; }
.ed-preview-bar { align-items: center; }
.acct-menu button.acct-install { color: var(--ink); font-weight: 500; }
.acct-menu button.acct-install svg { color: var(--muted); }
.acct-menu button.acct-install:hover { background: var(--mist); }
.acct-menu button[hidden] { display: none; }
.danger-zone { border-color: #f3c4c4; }
.danger-zone summary { list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.btn-danger { background: var(--danger); color: #fff; }
/* Inside the installed app (Android / home-screen app) plans are managed on the website,
   as app-store payment rules require. Buying buttons are hidden; a short note shows instead. */
.pm-app-note { display: none; }
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
  .pm-purchase { display: none !important; }
  .pm-app-note { display: block; }
}
.site-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.site-row form { margin: 0; }
.connect-card { max-width: 560px; margin: 0 auto; }
.connect-sites { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 20px; }
.connect-sites .node { flex: 1; text-align: center; padding: 14px 10px; border: 1px solid var(--border); border-radius: 14px; background: #fff; font-weight: 700; word-break: break-word; }
.connect-sites .node small { display: block; font-weight: 400; color: var(--muted); }
.connect-sites .link { font-size: 22px; color: var(--accent); }
.connect-can { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.connect-can li::before { content: '✓'; color: #15803d; font-weight: 800; margin-right: 8px; }
.connect-can.no li::before { content: '✕'; color: var(--danger); }
.badge-pending { background: #fff7e6; color: #92400e; }
.badge-declined { background: #f1f2f6; color: #5b6172; }
.badge-optin { background: #e8f1ff; color: #1d4ed8; }
.badge-notice { background: #fff1e6; color: #c2410c; }
.rg-title { margin: 16px 0 2px; font-weight: 700; }
.rg-list { display: grid; gap: 10px; margin: 6px 0 8px; }
.rg-item { border: 1.5px solid var(--border); border-radius: 14px; padding: 12px 14px; background: #fff; }
.rg-item:has(input:checked) { border-color: var(--ink); background: #f8f9fb; }
.rg-item.is-empty { opacity: .8; }
.rg-row { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-weight: 400; cursor: pointer; }
.rg-row input { margin-top: 4px; flex-shrink: 0; }
.rg-main { display: flex; flex-direction: column; gap: 2px; }
.rg-count { font-size: 14px; color: var(--muted); }
.rg-ex { color: #92400e; }
.rg-note { margin: 8px 0 0 28px; font-size: 13px; color: var(--muted); }
.rg-note summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.rg-note p { margin: 6px 0 0; line-height: 1.5; }
/* Websites page */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 12px 0; }
.site-card { display: block; color: var(--ink); text-decoration: none; }
.site-card:hover { border-color: var(--ink); }
.site-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.site-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.site-stats div { background: var(--mist); border-radius: 12px; padding: 10px 12px; }
.site-stats strong { display: block; font-size: 22px; line-height: 1.1; }
.site-stats span { font-size: 12px; color: var(--muted); }
.wsec { font-size: 18px; margin: 0 0 4px; }
.confirm-card { border-color: #f0d58a; background: #fffdf5; }
.pm-radios { display: grid; gap: 8px; margin: 10px 0 6px; }
.pm-radio { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 14px; margin: 0; font-weight: 400; }
.pm-radio:has(input:checked) { border-color: var(--ink); background: #f6f7f9; font-weight: 600; }
.pm-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
/* Agreement window (Phase 26) */
.lf-ops { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 6px; margin: 14px 0 4px; }
.lf-ops legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.lf-agree { margin: 14px 0 10px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fafbfc; }
.lf-agree .check-row { margin: 0 0 8px; font-weight: 400; font-size: 14px; }
.lf-agree .btn-secondary { width: 100%; margin-top: 4px; }
.lf-ok { color: #15803d; font-weight: 600; } .lf-warn { color: #b45309; font-weight: 600; }
.lf-changes { margin: 0 0 12px; font-size: 14px; } .lf-changes summary { cursor: pointer; font-weight: 600; }
body.lw-open { overflow: hidden; }
.lw { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 17, 26, .66); display: none; align-items: center; justify-content: center; padding: 14px; }
.lw-box { background: #fff; width: 100%; max-width: 760px; height: min(86vh, 760px); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.4); }
.lw-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 4px; }
.lw-head h2 { margin: 0; font-size: 20px; }
.lw-x { border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: #5b6172; padding: 0 4px; }
.lw-help { margin: 0; padding: 0 20px 8px; font-size: 14px; color: #5b6172; }
.lw-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 10px; border-bottom: 1px solid #e3e5ea; }
.lw-tab { flex: 0 0 auto; border: 1.5px solid #d6d9e0; background: #fff; color: #14161f; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.lw-tab.is-on { background: #14161f; color: #fff; border-color: #14161f; }
.lw-tab.is-read::after { content: ' \2713'; color: #15803d; font-weight: 800; }
.lw-tab.is-on.is-read::after { color: #7ee2a8; }
.lw-body { flex: 1; overflow-y: auto; padding: 8px 22px 16px; -webkit-overflow-scrolling: touch; }
.lw-prose h1 { font-size: 22px; margin-top: 14px; } .lw-prose h2 { font-size: 17px; margin-top: 18px; } .lw-prose p, .lw-prose li { font-size: 14.5px; line-height: 1.6; }
.lw-end { margin: 18px 0 8px; padding: 12px 14px; border-radius: 12px; background: #ecfdf3; color: #14532d; font-size: 14px; font-weight: 600; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.lw-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid #e3e5ea; flex-wrap: wrap; }
.lw-progress { flex: 1; font-size: 13px; color: #5b6172; min-width: 90px; }
.lw-foot button { width: auto; margin: 0; }
.lw-yes:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) { .lw { padding: 0; } .lw-box { max-width: none; height: 100%; border-radius: 0; } .lw-foot button { flex: 1; } .lw-progress { flex-basis: 100%; } }
.legal-summary { background: #f6f7f9; border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-size: 15px; }
.legal-note { font-style: italic; color: #5b6172; }
.tbl-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: 14px; } .tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #e3e5ea; } .tbl th { background: #f6f7f9; }
.adm-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.5; }

.lw .lw-x { width: auto; margin: 0; padding: 0 6px; background: none; color: #5b6172; flex: 0 0 auto; }
.lw .lw-x:hover { background: none; color: #14161f; }
.lw .lw-head h2 { flex: 1; }
.lw .lw-tab { width: auto; margin: 0; }
.lw .lw-foot button { margin-top: 0; }
.lw .lw-end .btn-sm { margin: 0; width: auto; }
.lw .lw-tab:not(.is-on) { background: #fff; color: #14161f; }
.help-q { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; margin-left: 8px; vertical-align: middle; }
.help-q:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.refund-card.is-off { border-color: #f3c4c4; background: #fff7f7; }
.rf-row { display: flex; justify-content: space-between; font-size: 14px; margin-top: 8px; font-weight: 600; }
.rf-bar { margin: 4px 0 2px; }
.rf-bar { height: 10px; background: #eceef3; border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.rf-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.rf-bar.is-warn i { background: #d97706; } .rf-bar.is-full i { background: #dc2626; }

/* ---- Sending domain (Settings): compact, works on phone, tablet and desktop ---- */
#domain { overflow: hidden; }
#domain code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dn-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.dn-domain { font-size: 18px; word-break: break-all; }
.dn-chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.dn-ok { background: #e3f6e8; color: #14703a; } .dn-wait { background: #fff3dc; color: #8a5a00; }
.dn-bad { background: #fde8e8; color: #a31515; } .dn-opt { background: #eef0f4; color: #4a5060; }
.dn-steps { margin: 0 0 16px; padding-left: 20px; } .dn-steps li { margin: 0 0 8px; }
.dn-sub { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.dn-recs { display: grid; gap: 12px; margin-bottom: 16px; }
.dn-rec { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; min-width: 0; }
.dn-rec.is-ok { border-color: #b8e2c4; background: #f7fcf8; }
.dn-optional { border-style: dashed; }
.dn-rec-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.dn-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.dn-rec-title { flex: 1; min-width: 0; } .dn-rec-title strong { display: block; font-size: 15px; }
.dn-rec-title span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.dn-field { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 2px 10px; align-items: start; padding: 7px 0; border-top: 1px solid #f0ede8; }
.dn-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-top: 8px; }
.dn-line { display: flex; align-items: flex-start; gap: 6px; min-width: 0; grid-column: 2; }
.dn-val { flex: 1; min-width: 0; display: block; background: #f6f4f1; border-radius: 8px; padding: 6px 9px; font-size: 12.5px; line-height: 1.5; word-break: break-all; overflow-wrap: anywhere; user-select: all; }
#domain .dn-copy { flex: none; width: auto; margin: 0; padding: 4px 10px; background: #fff; color: var(--ink); border: 1px solid #cfd3da; border-radius: 6px; box-shadow: none; font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.4; cursor: pointer; transform: none; }
#domain .dn-copy:hover { background: #f1f2f5; border-color: #9aa1ad; color: var(--ink); }
#domain .dn-copy.is-copied { background: #e3f6e8; border-color: #8fd0a3; color: #14703a; }
#domain .dn-alt { grid-column: 2; justify-self: start; width: auto; margin: 2px 0 0; padding: 0; background: none; border: 0; box-shadow: none; color: var(--accent-text); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: underline; cursor: pointer; transform: none; }
#domain .dn-alt:hover { background: none; color: var(--ink); }
.dn-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; } .dn-actions form { margin: 0; }
#domain .dn-actions button, #domain .dn-use button, #domain .dn-done button { width: auto; margin: 0; padding: 9px 16px; }
#domain .dn-actions .danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }
#domain .dn-actions .danger:hover { background: var(--danger); color: #fff; }
#domain .dn-done .secondary { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.dn-help { font-size: 14px; }
.dn-done { background: #f7fcf8; border: 1px solid #b8e2c4; border-radius: 12px; padding: 14px; margin-bottom: 12px; } .dn-done p { margin: 0 0 8px; }
.dn-use { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .dn-use input { width: 120px; margin: 0; } .dn-at { font-weight: 600; word-break: break-all; }
.dn-warn { margin: -6px 0 12px; padding: 10px 12px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; font-size: 14px; }
@media (max-width: 520px) {
  .dn-field { grid-template-columns: minmax(0, 1fr); }
  .dn-label { padding-top: 4px; } .dn-line, #domain .dn-alt { grid-column: 1; }
}

/* Who opened / clicked (campaign and automation pages) */
.people-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin: 10px 0 12px; -webkit-overflow-scrolling: touch; }
.people-tabs a { flex: 0 0 auto; padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.people-tabs a span { font-weight: 500; font-size: 12px; background: #f3f4f6; border-radius: 999px; padding: 1px 7px; margin-left: 3px; }
.people-tabs a.active { color: var(--ink); border-bottom-color: var(--accent); }
.people-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.people-search input[type=search], .people-search select { flex: 1 1 180px; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; width: auto; margin: 0; }
.people-search .btn-sm { margin: 0; }
.people-table td, .people-table th { vertical-align: top; }
.people-table td a { font-weight: 600; word-break: break-word; }
.people-empty { padding: 14px 0; }
.people-pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 12px 0 0; }
.people-note { margin-top: 14px; }
.contact-history { margin-top: 14px; }
.ch-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 14px; }
.ch-row:first-of-type { border-top: 0; }
.ch-row a { font-weight: 600; word-break: break-word; }
.logo-preview { margin-top: 10px; }
.logo-preview[hidden] { display: none; }
.logo-preview-bar { margin-top: 6px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px 20px; }
.logo-preview-bar img { display: block; height: 44px; width: auto; max-width: 240px; }

/* Contacts: regions, countries, existing website users */
.region-row { margin-top: -4px; align-items: center; }
.region-label { align-self: center; margin-right: 2px; }
.country-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin: 4px 0 14px; }
.country-form select { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; min-width: 190px; max-width: 100%; width: auto; margin: 0; }
.country-summary { flex: 1 1 260px; }
.country-summary summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 8px 0; color: var(--ink); }
.existing-card { margin-bottom: 14px; }
.badge-ok { background: #f0fdf4; color: var(--success); }
.badge-needs { background: #fffbeb; color: #92400e; }
