:root {
  --accent: #1f4e79;
  --accent-dark: #163a5c;
  --send: #15803d;       /* green — immediate send */
  --send-dark: #126a34;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e9ee;
  --bg: #f1f4f8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 18px 56px;
}

/* ── header ── */
.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.eyebrow { font-size: 13px; color: var(--muted); letter-spacing: .02em; }
h1 { font-size: 26px; margin: 2px 0 0; color: var(--accent); }
h2 { font-size: 17px; margin: 0; }
.muted { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

/* ── cards ── */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card.narrow { width: 100%; max-width: 360px; text-align: center; }

/* ── step header (numbered) ── */
.step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.step-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inline-end { margin-inline-start: auto; }

/* ── inputs ── */
.emails { display: flex; flex-direction: column; gap: 10px; }
input {
  width: 100%;
  font-size: 15px;
  font-family: inherit;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 78, 121, .12); }
.field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.time { max-width: 160px; }
.time.block { max-width: 100%; }

/* ── buttons ── */
.btn {
  display: inline-block;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: filter .15s, background .15s;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.block { display: block; width: 100%; margin-bottom: 8px; }
/* one-off send — secondary: green outline, present but not shouting */
.btn-send-outline { background: #fff; color: var(--send); border-color: var(--send); font-size: 16px; }
.btn-send-outline:hover { background: #f0fdf4; }
.btn-schedule { background: var(--accent); color: #fff; font-size: 16px; }
.btn-schedule:hover { background: var(--accent-dark); }
.btn.ghost { background: #fff; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: #f8fafc; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* ── action panel (one-off send) ── */
.action { margin-bottom: 0; }
.act-send { border-top: 3px solid var(--send); }
.action-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.action-head .ico { font-size: 20px; }

/* ── zone divider — separates recurring settings from the one-off send ── */
.zone-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.zone-divider::before,
.zone-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── campaign picker ── */
.campaigns { margin: 4px 0 0; }
.acct-group { margin-bottom: 14px; }
.acct-group:last-child { margin-bottom: 0; }
.acct-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 6px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.camp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.camp-row:hover { background: #f8fafc; }
.camp-row input { width: auto; margin: 0; flex: none; transform: scale(1.15); accent-color: var(--accent); }
.camp-name { flex: 1; font-size: 14px; color: var(--ink); }

.chip {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-leads { background: #e7eefc; color: #1f4e79; }
.chip-sales { background: #fdeede; color: #b45309; }
.chip-traffic { background: #ede9fe; color: #6d28d9; }
.chip-other { background: #eef2f7; color: #475569; }

/* ── save settings card (primary action) ── */
.save-card { text-align: center; }
.save-card .btn { font-size: 16px; }
.save-note { margin: 10px 0 0; font-size: 13px; }

/* ── messages ── */
.msg { margin-top: 10px; font-size: 14px; min-height: 18px; font-weight: 600; }
.msg.ok { color: var(--send); }
.msg.error { color: #c0392b; }
.warn { color: #b45309; font-weight: 600; }

/* ── unsaved-changes modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
  text-align: right;
}
.modal h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.modal .muted { margin-bottom: 18px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-actions .btn { width: 100%; }

/* ── login ── */
.card.narrow input { margin-bottom: 12px; }
.card.narrow .btn { width: 100%; }
