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

:root {
  --orange:     #f97316;
  --orange-h:   #ea6c00;
  --orange-lt:  #fff7ed;
  --orange-bdr: #fed7aa;
  --dark:       #111111;
  --dark-2:     #1c1c1c;
  --dark-3:     #2a2a2a;
  --dark-4:     #3a3a3a;
  --sidebar-txt:#c8c8c8;
  --green:      #16a34a;
  --green-lt:   #dcfce7;
  --red:        #dc2626;
  --red-lt:     #fee2e2;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-400:   #9ca3af;
  --gray-600:   #4b5563;
  --gray-700:   #374151;
  --gray-900:   #111111;
  --radius:     8px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
}

body { font-family: system-ui, -apple-system, sans-serif; color: var(--gray-900); background: var(--gray-50); }

/* ── Auth layout ─────────────────────────────────────────────── */
.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c1c1c 0%, #2a2a2a 100%);
  padding: 1.5rem;
}
.auth-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-brand {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.auth-brand strong { color: var(--orange); }
.auth-brand__logo { height: 32px; width: auto; object-fit: contain; }
.auth-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .25rem; color: var(--dark); }
.auth-sub   { color: var(--gray-400); margin-bottom: 1.5rem; font-size: .95rem; }
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: var(--gray-600); }
.auth-switch a { color: var(--orange); text-decoration: none; font-weight: 600; }
.auth-forgot { font-size: .82rem; font-weight: 500; color: var(--gray-400); text-decoration: none; }
.auth-forgot:hover { color: var(--orange); }
.auth-card .flash { border-radius: var(--radius); padding: .65rem .9rem; font-size: .9rem; margin-bottom: .75rem; }
.auth-card .flash--error { background: var(--red-lt); color: var(--red); }
.auth-card .flash--error a { color: var(--red); font-weight: 600; }
.auth-card .flash--success { background: var(--green-lt); color: var(--green); }

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

.sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--dark);
  color: var(--sidebar-txt);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  border-right: 1px solid var(--dark-3);
}
.sidebar__brand {
  padding: 1.4rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid var(--dark-3);
  margin-bottom: .5rem;
  letter-spacing: -.01em;
}
.sidebar__logo { height: 28px; width: auto; object-fit: contain; }
.sidebar__name span { color: var(--orange); }
.sidebar__nav  { flex: 1; padding: .5rem .75rem; display: flex; flex-direction: column; gap: .15rem; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--sidebar-txt);
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.nav-link:hover  { background: var(--dark-3); color: #fff; }
.nav-link.active { background: var(--orange); color: #fff; font-weight: 600; }
.nav-icon { display: inline-flex; align-items: center; flex-shrink: 0; width: 16px; height: 16px; }

.sidebar__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--dark-3);
  font-size: .8rem;
}
.plan-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.plan-badge--free { background: var(--dark-3); color: var(--sidebar-txt); }
.plan-badge--pro  { background: var(--orange); color: #fff; }
.sidebar__user  { color: #888; margin-bottom: .4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-link    { color: #666; text-decoration: none; font-size: .8rem; }
.logout-link:hover { color: var(--orange); }

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 960px;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
}
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.page-sub   { color: var(--gray-400); font-size: .9rem; margin-top: .2rem; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; color: var(--dark); }
.card-sub   { color: var(--gray-400); font-size: .9rem; margin-bottom: 1.25rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-h); }
.btn--secondary { background: var(--orange-lt); color: var(--orange); border-color: var(--orange-bdr); }
.btn--secondary:hover { background: #ffe8d0; }
.btn--ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-200); }
.btn--ghost:hover { background: var(--gray-100); }
.btn--full { width: 100%; justify-content: center; }
.btn--sm { padding: .35rem .75rem; font-size: .8rem; }
.btn--send { background: #16a34a; }
.btn--send:hover { background: #15803d; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-link { background: none; border: none; color: var(--orange); cursor: pointer; font-size: inherit; padding: 0; text-decoration: underline; }

/* ── Forms ───────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
  min-width: 160px;
  margin-top: .75rem;
}
.field--sm { flex: 0 0 90px; min-width: 90px; }
.field--check { flex-direction: row; align-items: center; }
.field--check label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }

label { font-size: .85rem; font-weight: 500; color: var(--gray-700); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .55rem .75rem;
  font-size: .95rem;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  color: var(--gray-900);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
textarea { resize: vertical; }

.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.input-row { display: flex; gap: .5rem; align-items: flex-end; }
.input-row input { flex: 1; }

/* ── Flash messages ───────────────────────────────────────────── */
.flash {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}
.flash--success { background: var(--green-lt); color: var(--green); border: 1px solid #bbf7d0; }
.flash--error   { background: var(--red-lt); color: var(--red); border: 1px solid #fecaca; }
.flash--warning,
.flash--warn    { background: var(--orange-lt); color: var(--orange-h); border: 1px solid var(--orange-bdr); }

/* ── Notices ────────────────────────────────────────────────── */
.notice {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.notice--warn { background: var(--orange-lt); color: var(--orange-h); border: 1px solid var(--orange-bdr); }
.notice--info { background: var(--gray-50); color: var(--gray-700); border: 1px solid var(--gray-200); }
.notice a { color: inherit; font-weight: 700; }

/* ── Table ───────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { background: var(--gray-50); font-weight: 700; color: var(--gray-600); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--gray-200); }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge--green  { background: var(--green-lt); color: var(--green); }
.badge--red    { background: var(--red-lt); color: var(--red); }
.badge--orange { background: var(--orange-lt); color: var(--orange-h); border: 1px solid var(--orange-bdr); }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-600);
}
.empty-state__icon { display: flex; justify-content: center; align-items: center; margin-bottom: 1rem; color: var(--orange); }
.empty-state h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; color: var(--dark); }
.empty-state p { margin-bottom: 1.5rem; }

/* ── Steps indicator ─────────────────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
}
.step {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--gray-400);
}
.step.active { color: var(--orange); }
.step.done   { color: var(--green); }
.step__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
}
.step.active .step__num { background: var(--orange); color: #fff; border-color: var(--orange); }
.step.done   .step__num { background: var(--green); color: #fff; border-color: var(--green); }
.step__label { font-size: .85rem; font-weight: 600; }
.step-line { flex: 1; height: 2px; background: var(--gray-200); margin: 0 .5rem; }

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: 10px;
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-top: .75rem;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange);
  background: var(--orange-lt);
}
.upload-zone__icon { font-size: 2rem; margin-bottom: .5rem; }
.upload-zone p { color: var(--gray-600); font-size: .9rem; }

/* ── Tab bar ─────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: .25rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.25rem; }
.tab {
  background: none; border: none; cursor: pointer;
  padding: .55rem 1rem;
  font-size: .9rem; font-weight: 600;
  color: var(--gray-400);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
}
.tab.active { color: var(--orange); border-bottom-color: var(--orange); }

/* ── Email chips ─────────────────────────────────────────────── */
.email-list-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.25rem;
  margin-bottom: .6rem;
  flex-wrap: wrap;
}
.email-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  max-height: 180px;
  overflow-y: auto;
  padding: .5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.chip {
  display: flex;
  align-items: center;
  gap: .3rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: .2rem .6rem;
  font-size: .8rem;
  color: var(--gray-700);
}
.chip__remove {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: .85rem; padding: 0; line-height: 1;
}
.chip__remove:hover { color: var(--red); }

.chip__name {
  background: var(--orange-lt);
  color: var(--orange, #f97316);
  border-radius: 999px;
  padding: 0 .45rem;
  font-size: .7rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Personalization ─────────────────────────────────────────── */
.personalize-box {
  background: var(--gray-50, #f9fafb);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: .9rem 1rem;
}

.tag-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.names-editor {
  margin-top: .6rem;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: #fff;
}

.names-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .6rem;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}
.names-row:last-child { border-bottom: none; }

.names-row__email {
  flex: 1;
  font-size: .8rem;
  color: var(--gray-600, #4b5563);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.names-row__input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .3rem .5rem;
  font-size: .8rem;
}

/* ── AI box ──────────────────────────────────────────────────── */
.ai-box {
  background: var(--orange-lt);
  border: 1px solid var(--orange-bdr);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ── Wizard actions ──────────────────────────────────────────── */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}

/* ── Review grid ─────────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.review-item { display: flex; flex-direction: column; gap: .2rem; }
.review-item.full { grid-column: 1 / -1; }
.review-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gray-400); }
.review-val { font-size: .95rem; color: var(--gray-900); }
.review-body {
  font-size: .85rem;
  line-height: 1.6;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .75rem;
  max-height: 200px;
  overflow-y: auto;
}

/* ── Progress ────────────────────────────────────────────────── */
.progress-bar-wrap {
  background: var(--gray-100);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.progress-bar {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  transition: width .3s;
}
.progress-label { font-size: .85rem; color: var(--gray-600); margin-bottom: .75rem; }
.send-log {
  max-height: 160px;
  overflow-y: auto;
  font-size: .8rem;
  font-family: monospace;
  background: var(--dark);
  color: #d1fae5;
  border-radius: var(--radius);
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.log-ok   { color: #6ee7b7; }
.log-fail { color: #fca5a5; }

/* ── Send summary ────────────────────────────────────────────── */
.send-summary { display: flex; gap: 1rem; justify-content: center; }
.summary-stat {
  flex: 1;
  text-align: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1rem;
}
.summary-stat--green { background: var(--green-lt); border-color: #bbf7d0; }
.summary-stat--red   { background: var(--red-lt);   border-color: #fecaca; }
.stat-num   { font-size: 2rem; font-weight: 800; display: block; }
.stat-label { font-size: .8rem; color: var(--gray-600); }

/* ── Recipient results breakdown (campaign wizard send-done) ─── */
.recipients-table { font-size: .85rem; }
.recipient-error  { color: var(--red); font-size: .82rem; word-break: break-word; }

/* ── Stats row (campaign detail) ─────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-card--green { background: var(--green-lt); border-color: #bbf7d0; }
.stat-card--red   { background: var(--red-lt);   border-color: #fecaca; }
.stat-card__num   { font-size: 2rem; font-weight: 800; }
.stat-card__label { font-size: .8rem; color: var(--gray-600); margin-top: .2rem; }

/* ── Settings grid ───────────────────────────────────────────── */
.settings-grid { display: flex; flex-direction: column; gap: 1.5rem; }

/* ── Plan info ───────────────────────────────────────────────── */
.plan-current {
  padding: 1.25rem;
  border-radius: 10px;
  border: 2px solid var(--gray-200);
}
.plan-current--pro { border-color: var(--orange); background: var(--orange-lt); }
.plan-current p { margin-top: .35rem; font-size: .9rem; color: var(--gray-600); }

/* ── Pricing ─────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.pricing-card {
  background: #fff;
  border: 2px solid var(--gray-200);
  border-radius: 14px;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow);
}
.pricing-card--pro { border-color: var(--orange); }
.pricing-card--current { opacity: .8; }
.pricing-badge {
  position: absolute;
  top: -12px; right: 1.5rem;
  background: var(--orange);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  padding: .2rem .75rem;
  border-radius: 999px;
  letter-spacing: .03em;
}
.pricing-tier  { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--gray-400); margin-bottom: .4rem; }
.pricing-price { font-size: 2.5rem; font-weight: 900; color: var(--dark); margin-bottom: 1.25rem; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--gray-400); }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; font-size: .9rem; color: var(--gray-700); }
.pricing-features li { display: flex; align-items: center; gap: .5rem; }
.feat-yes { display: inline-flex; align-items: center; flex-shrink: 0; color: #16a34a; }
.feat-no  { display: inline-flex; align-items: center; flex-shrink: 0; color: #dc2626; }

/* ── Status message ──────────────────────────────────────────── */
.status-msg { font-size: .85rem; padding: .6rem .75rem; border-radius: var(--radius); margin-top: .75rem; }
.status-msg.info    { background: var(--orange-lt); color: var(--orange-h); border: 1px solid var(--orange-bdr); }
.status-msg.error   { background: var(--red-lt); color: var(--red); border: 1px solid #fecaca; }
.status-msg.success { background: var(--green-lt); color: var(--green); border: 1px solid #bbf7d0; }
.status-msg.hidden  { display: none; }

/* ── Attachments ─────────────────────────────────────────────── */
.attach-zone {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 0;
}
.attach-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .4rem;
}
.attach-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .4rem .75rem;
  font-size: .85rem;
}
.attach-name { flex: 1; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-size { flex-shrink: 0; }
.attach-remove {
  background: none; border: none; cursor: pointer;
  color: var(--gray-400); font-size: .85rem; padding: 0; line-height: 1; flex-shrink: 0;
}
.attach-remove:hover { color: var(--red); }

/* ── Tutorial & Help ─────────────────────────────────────────── */
.tutorial-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.tutorial-num {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tutorial-body { color: var(--gray-700); font-size: .9rem; line-height: 1.65; }
.tutorial-body p { margin-bottom: .75rem; }
.tutorial-body h4 { font-size: .9rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.tutorial-ol { padding-left: 1.4rem; margin-bottom: .75rem; }
.tutorial-ol li { margin-bottom: .4rem; }
.tutorial-ul { padding-left: 1.4rem; margin-bottom: .75rem; }
.tutorial-ul li { margin-bottom: .25rem; }
.tutorial-body code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .85em;
  font-family: monospace;
  color: var(--dark);
}

.faq-list { display: flex; flex-direction: column; gap: 1.25rem; }
.faq-item { border-bottom: 1px solid var(--gray-100); padding-bottom: 1.25rem; }
.faq-item:last-child { border-bottom: none; padding-bottom: 0; }
.faq-q { font-size: .95rem; font-weight: 700; color: var(--dark); margin-bottom: .4rem; }
.faq-a { font-size: .9rem; color: var(--gray-700); line-height: 1.6; }
.faq-a code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: .1em .35em;
  font-size: .85em;
  font-family: monospace;
  color: var(--dark);
}

.contact-box { font-size: .9rem; color: var(--gray-700); }

/* ── Misc ────────────────────────────────────────────────────── */
.muted { color: var(--gray-400); }
.small { font-size: .8rem; }
a { color: var(--orange); }

/* ── Two-column layout ───────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ── Scheduled campaign cards ────────────────────────────────── */
.sched-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.sched-card--paused { opacity: .65; }
.sched-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .75rem; }
.sched-card__name { font-weight: 700; font-size: .95rem; color: var(--dark); }
.sched-card__meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; font-size: .82rem; margin-bottom: .9rem; }
.sched-card__actions { display: flex; gap: .5rem; }

/* ── Extra badges / buttons ──────────────────────────────────── */
.badge--gray { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn--danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.btn--danger:hover { background: #fca5a5; }

/* ── Form field hint & inline errors ────────────────────────── */
.field__hint { font-size: .78rem; color: var(--gray-400); margin-top: .3rem; }
.field__errors { font-size: .8rem; color: var(--red); margin-top: .35rem; padding-left: 1.1em; display: flex; flex-direction: column; gap: .15rem; }
.field__error-msg { font-size: .8rem; color: var(--red); margin-top: .3rem; }
.field__input--error { border-color: var(--red) !important; }

/* ── Recipient limit slider ─────────────────────────────────────── */
.recipient-limit { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }
.recipient-limit label { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: .5rem; }
.recipient-limit__num { width: 70px; padding: .35rem .5rem; border: 1px solid var(--gray-200); border-radius: 6px; font-size: .88rem; text-align: center; }
.recipient-limit input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ── SMTP provider presets ──────────────────────────────────────── */
.preset-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1rem; }
.preset-bar__label { font-size: .8rem; font-weight: 600; color: var(--gray-600); margin-right: .25rem; }
.preset-btn.active { background: var(--orange-lt); color: var(--orange-h); border-color: var(--orange-bdr); }
.preset-help {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.preset-help ol { padding-left: 1.2em; margin: .4rem 0 0; display: flex; flex-direction: column; gap: .25rem; }
.preset-help a { color: var(--orange-h); }
.preset-help code { background: var(--gray-100); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.preset-note { color: var(--gray-600); font-size: .8rem; margin-top: .4rem; }

/* ── Test email row ─────────────────────────────────────────────── */
.test-email-row { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--gray-200); }

/* ── Page header action buttons ─────────────────────────────────── */
.page-header__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ── Live password checklist ────────────────────────────────────── */
.pw-checklist { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-direction: column; gap: .2rem; }
.pw-checklist li { font-size: .78rem; color: var(--gray-400); padding-left: 1.3em; position: relative; }
.pw-checklist li::before { content: "○"; position: absolute; left: 0; }
.pw-checklist li.ok { color: var(--green); }
.pw-checklist li.ok::before { content: "✓"; }

/* ── Marketing homepage ─────────────────────────────────────────── */
.hp {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--gray-900);
  background: #ffffff;
  min-height: 100vh;
}
.hp h1, .hp h2, .hp h3, .hp .hp-brand__name, .hp .hp-hero__brand {
  font-family: "Syne", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.hp-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.hp-header--scrolled {
  border-bottom-color: var(--gray-200);
  background: rgba(255, 255, 255, 0.92);
}
.hp-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.hp-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.hp-brand__logo { height: 28px; width: auto; }
.hp-brand__name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--orange);
}
.hp-brand__name span { color: var(--dark); }

.hp-nav {
  display: flex;
  gap: 1.25rem;
  margin-left: 1rem;
  flex: 1;
}
.hp-nav a, .hp-link {
  color: var(--gray-700);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.hp-nav a:hover, .hp-link:hover { color: var(--orange); }
.hp-header__actions {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.hp-btn { border-radius: 8px; text-decoration: none; }
.hp-btn--lg { padding: .8rem 1.25rem; font-size: .95rem; }
.hp-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.hp-btn--ghost:hover { background: rgba(255,255,255,.08); }
.hp-btn--on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.35);
}
.hp-btn--on-dark:hover { background: rgba(255,255,255,.1); }

.hp-menu-btn {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.hp-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--dark);
}
.hp-mobile-nav {
  display: none;
  flex-direction: column;
  gap: .75rem;
  padding: .5rem 1.25rem 1.25rem;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
}
.hp-mobile-nav.is-open {
  display: flex;
}
.hp-mobile-nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  padding: .35rem 0;
}

/* Hero — one composition, brand first, full-bleed visual plane */
.hp-hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: end;
  overflow: hidden;
  color: #fff;
}
.hp-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 70% 20%, rgba(249, 115, 22, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(249, 115, 22, 0.18), transparent 50%),
    linear-gradient(160deg, #14110e 0%, #1c1612 45%, #2a1a10 100%);
  z-index: 0;
}
.hp-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cpath d='M0 60h120M60 0v120' stroke='%23ffffff' stroke-opacity='0.035' stroke-width='1'/%3E%3C/svg%3E");
  opacity: 1;
  pointer-events: none;
}
.hp-hero__content,
.hp-hero__stage {
  position: relative;
  z-index: 1;
}
.hp-hero__content {
  padding: 4.5rem 1.5rem 4.5rem clamp(1.5rem, 6vw, 5rem);
  max-width: 640px;
  animation: hp-rise .7s ease both;
}
.hp-hero__brand {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  margin-bottom: .85rem;
}
.hp-hero__title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .9rem;
  color: #fff;
  max-width: 18ch;
}
.hp-hero__sub {
  font-size: 1.02rem;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}
.hp-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.hp-hero__stage {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  padding: 0;
  animation: hp-rise .9s .12s ease both;
  min-height: 420px;
}
.hp-stage {
  width: 100%;
  margin: 0;
  background: rgba(10, 8, 6, 0.55);
  border: none;
  border-left: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transform: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 2.5rem;
}
.hp-stage__bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1rem;
  background: #241c16;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hp-stage__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.hp-stage__bar em {
  margin-left: .6rem;
  font-style: normal;
  font-size: .75rem;
  color: rgba(255,255,255,.45);
}
.hp-stage__chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 1rem 1rem .4rem;
}
.hp-stage__chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .3rem .55rem;
}
.hp-stage__chip b {
  background: rgba(249, 115, 22, .2);
  color: #fdba74;
  font-weight: 600;
  border-radius: 999px;
  padding: 0 .4rem;
  font-size: .68rem;
}
.hp-stage__mail { padding: .75rem 1rem 1.5rem; }
.hp-stage__label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  margin: .55rem 0 .25rem;
}
.hp-stage__subject {
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
}
.hp-stage__body {
  font-size: .85rem;
  line-height: 1.5;
  color: rgba(255,255,255,.7);
}

@keyframes hp-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hp-section {
  padding: 5rem 1.25rem;
}
.hp-section--alt { background: #fff; }
.hp-section__inner {
  max-width: 1120px;
  margin: 0 auto;
}
.hp-section__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: .5rem;
}
.hp-section__sub {
  color: var(--gray-600);
  max-width: 48ch;
  margin-bottom: 2.5rem;
  line-height: 1.55;
}

.hp-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.75rem;
}
.hp-feature {
  padding: 0;
  border: none;
  background: none;
  animation: hp-rise .6s ease both;
}
.hp-feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.hp-feature p {
  color: var(--gray-600);
  font-size: .92rem;
  line-height: 1.55;
}

.hp-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: none;
}
.hp-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.hp-steps__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Syne", sans-serif;
  font-weight: 700;
}
.hp-steps h3 {
  font-size: 1.05rem;
  margin-bottom: .35rem;
}
.hp-steps p {
  color: var(--gray-600);
  font-size: .92rem;
  line-height: 1.55;
}

.hp-demo {
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(249, 115, 22, 0.35), transparent 55%),
    #14110e;
  color: #fff;
  padding: 5rem 1.25rem;
  text-align: center;
}
.hp-demo__inner { max-width: 640px; margin: 0 auto; }
.hp-demo__title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .75rem;
}
.hp-demo__sub {
  color: rgba(255,255,255,.75);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}
.hp-demo__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.hp-demo__note {
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.hp-demo__note a { color: #fdba74; }

.hp-footer {
  background: #0f0d0b;
  color: rgba(255,255,255,.7);
  padding: 3rem 1.25rem 1.5rem;
}
.hp-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.hp-footer .hp-brand__name { color: var(--orange); }
.hp-footer .hp-brand__name span { color: #fff; }
.hp-footer__owned {
  margin-top: .85rem;
  font-size: .9rem;
  line-height: 1.5;
  max-width: 28ch;
}
.hp-footer__owned a { color: #fdba74; }
.hp-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.hp-footer__cols h4 {
  font-family: "Syne", sans-serif;
  color: #fff;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.hp-footer__cols a {
  display: block;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: .88rem;
  margin-bottom: .45rem;
}
.hp-footer__cols a:hover { color: var(--orange); }
.hp-footer__bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: 1.25rem;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

@media (max-width: 900px) {
  .hp-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hp-hero__content {
    padding: 3.5rem 1.25rem 2rem;
    max-width: none;
  }
  .hp-hero__title { max-width: none; }
  .hp-hero__stage {
    padding: 0;
    min-height: 340px;
  }
  .hp-stage {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .hp-features,
  .hp-steps {
    grid-template-columns: 1fr;
  }
  .hp-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hp-nav, .hp-header__actions { display: none; }
  .hp-menu-btn { display: flex; }
  .hp-footer__cols { grid-template-columns: 1fr 1fr; }
}
