* { box-sizing: border-box; }
:root {
  --bg: #f4f6fb;
  --bg-2: #eef2f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #e7ecf3;
  --line-2: #d8e1ec;
  --text: #101828;
  --muted: #667085;
  --soft: #98a2b3;
  --mint: #4bb97f;
  --mint-2: #12b76a;
  --mint-soft: #ecfdf3;
  --lav: #7f56d9;
  --lav-2: #9b8af0;
  --lav-soft: #f4f3ff;
  --red: #f97066;
  --red-soft: #fef3f2;
  --yellow: #fdb022;
  --yellow-soft: #fffaeb;
  --shadow: 0 16px 48px rgba(16,24,40,.08);
  --shadow-lg: 0 24px 80px rgba(16,24,40,.11);
  --radius: 24px;
}
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 650px at 5% -10%, rgba(75,185,127,.18), transparent 58%),
    radial-gradient(900px 650px at 100% -10%, rgba(127,86,217,.14), transparent 56%),
    linear-gradient(180deg, #f8f9fd 0%, #f2f5fb 52%, #edf2f8 100%);
  font-family: Onest, system-ui, -apple-system, Segoe UI, sans-serif;
}
a { color: inherit; text-decoration: none; }
code { color: var(--lav); background: rgba(127,86,217,.08); padding: 2px 8px; border-radius: 8px; }
svg { flex: 0 0 auto; }
.shell { display: grid; grid-template-columns: 304px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px;
  border-right: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 18px;
}
.brand {
  display: grid; gap: 10px; padding: 12px 10px 16px;
  border-bottom: 1px solid rgba(216,225,236,.72);
}
.brand-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-logo { width: 164px; max-width: 100%; height: auto; display: block; }
.brand-pill { color: #067647; background: var(--mint-soft); border: 1px solid #abefc6; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.brand-sub { color: var(--muted); font-size: 12px; line-height: 1.55; }
.nav { display: grid; gap: 8px; }
.nav a, .soft, .ghost, button, input, textarea, select { font: inherit; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; border: 1px solid transparent; border-radius: 17px;
  color: #475467; transition: .18s ease; font-weight: 700;
}
.nav a svg { width: 18px; height: 18px; color: #98a2b3; transition: .18s ease; }
.nav a:hover { background: rgba(255,255,255,.82); border-color: rgba(75,185,127,.12); color: var(--text); }
.nav a:hover svg { color: var(--mint); }
.nav a.active {
  background: linear-gradient(135deg, rgba(75,185,127,.11), rgba(127,86,217,.08));
  border-color: rgba(75,185,127,.18);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 10px 24px rgba(16,24,40,.05);
}
.nav a.active svg { color: var(--lav); }
.sidebar-note {
  margin-top: auto; border: 1px solid rgba(216,225,236,.82); border-radius: 22px; padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(248,250,252,.78));
  display: grid; gap: 8px; color: var(--muted);
}
.sidebar-note-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ok { color: var(--mint-2); }
.warn { color: var(--yellow); }
.content { padding: 34px; max-width: 1320px; width: 100%; }
.hero-card, .page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-bottom: 22px;
}
.hero-card, .page-panel {
  position: relative; overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 34px;
  background:
    radial-gradient(820px 340px at 2% 0%, rgba(75,185,127,.12), transparent 50%),
    radial-gradient(620px 280px at 100% 0%, rgba(127,86,217,.10), transparent 48%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(252,252,254,.92) 100%);
  box-shadow: var(--shadow-lg);
}
.hero-card:after, .page-panel:after {
  content: ""; position: absolute; inset: auto 30px 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(75,185,127,.35), rgba(127,86,217,.35), transparent);
}
.hero-copy { position: relative; z-index: 1; }
.hero-action { position: relative; z-index: 1; display: grid; gap: 12px; min-width: 220px; }
.eyebrow { color: var(--mint-2); font-weight: 800; letter-spacing: .11em; text-transform: uppercase; font-size: 11px; margin: 0 0 12px; }
h1 { font-family: Unbounded, sans-serif; font-size: clamp(30px, 4vw, 48px); line-height: 1.03; letter-spacing: -.055em; margin: 0; }
h2 { font-family: Unbounded, sans-serif; font-size: 18px; letter-spacing: -.04em; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); line-height: 1.72; max-width: 760px; margin: 14px 0 0; }
.kicker { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:#ecfdf3; color:#067647; font-weight:800; font-size:12px; margin-bottom:14px; border:1px solid #abefc6; }
.kicker.lav { background: var(--lav-soft); color: #6941c6; border-color:#d9d6fe; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat, .card, .mini-card {
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--radius);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.stat { padding: 22px; position: relative; overflow: hidden; }
.stat:before { content:""; position:absolute; top:0; left:0; right:0; height:3px; background: linear-gradient(90deg, var(--mint), var(--lav)); opacity:.72; }
.stat span { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.stat strong { font-family: Unbounded, sans-serif; font-size: 34px; letter-spacing: -.04em; color: var(--text); }
.stat:nth-child(1) strong { color: var(--mint-2); }
.stat:nth-child(2) strong { color: var(--lav); }
.stat:nth-child(3) strong { color: var(--text); }
.stat:nth-child(4) strong { color: var(--red); }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 10px; }
.icon-box { width: 42px; height: 42px; display:inline-grid; place-items:center; border-radius: 14px; background: linear-gradient(135deg, rgba(75,185,127,.10), rgba(127,86,217,.10)); color: var(--lav); border:1px solid rgba(127,86,217,.12); }
.icon-box svg { width:20px; height:20px; }
.check-list { display: grid; gap: 14px; color: #344054; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; background: #cdd5df; }
.dot.green { background: var(--mint-2); box-shadow: 0 0 0 6px rgba(18,183,106,.10); }
.dot.red { background: var(--red); box-shadow: 0 0 0 6px rgba(249,112,102,.10); }
.actions-col { display: grid; gap: 10px; }
.primary, button.primary, button[type=submit]:not(.ghost):not(.danger-btn) {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px;
  background: linear-gradient(135deg, var(--mint), var(--lav)); color: #ffffff;
  border: 0; border-radius: 15px; padding: 12px 18px; font-weight: 800; cursor: pointer;
  box-shadow: 0 14px 34px rgba(127,86,217,.18);
}
.primary:hover { filter: brightness(1.02); transform: translateY(-1px); }
.primary.danger { background: linear-gradient(135deg, #ff8a7a, #f97066); color: #ffffff; }
.soft, .ghost, .danger-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  background: rgba(255,255,255,.84); border: 1px solid var(--line); color: #475467;
  border-radius: 14px; padding: 10px 14px; cursor: pointer; font-weight: 700;
}
.soft:hover, .ghost:hover, .danger-btn:hover { border-color: var(--line-2); background: #ffffff; }
.ghost.full { width: 100%; }
.danger-btn { color: #b42318; background: rgba(249,112,102,.08); border-color: rgba(249,112,102,.18); }
.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { padding: 13px 15px; border-radius: 15px; border: 1px solid var(--line); background: rgba(255,255,255,.86); color: #344054; box-shadow: var(--shadow); }
.flash.success { border-color: rgba(18,183,106,.20); background: rgba(236,253,243,.96); }
.flash.danger { border-color: rgba(249,112,102,.24); background: rgba(254,243,242,.96); }
.flash.warning { border-color: rgba(253,176,34,.24); background: rgba(255,250,235,.96); }
.table-wrap { overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 14px; border-bottom: 1px solid #f2f4f7; vertical-align: top; }
th { color: var(--soft); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: #fcfcfd; }
td { color: #344054; }
td small { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.empty-state { display:grid; place-items:center; gap:10px; padding:38px 22px; text-align:center; color: var(--muted); }
.empty-state svg { width:42px; height:42px; color: var(--lav); }
.empty-state strong { color:var(--text); font-family:Unbounded,sans-serif; letter-spacing:-.03em; }
.err { color: #b42318; max-width: 320px; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.badge.sent { color: #067647; background: #ecfdf3; }
.badge.failed { color: #b42318; background: #fef3f2; }
.badge.neutral { color:#475467; background:#f2f4f7; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-stack { display: grid; gap: 14px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; margin-top: 8px; }
label { display: grid; gap: 8px; color: #475467; font-size: 13px; font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 15px; background: #ffffff; color: var(--text); outline: 0; padding: 13px 14px; }
input:focus, textarea:focus, select:focus { border-color: rgba(127,86,217,.28); box-shadow: 0 0 0 4px rgba(127,86,217,.08); }
textarea { resize: vertical; min-height: 120px; }
.search { display: flex; gap: 10px; min-width: min(420px, 100%); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.campaign-grid .card { min-height: 295px; }
.launch-box { border: 1px dashed rgba(127,86,217,.24); border-radius: 22px; padding: 22px; display: grid; place-items: center; text-align: center; gap: 3px; background: linear-gradient(135deg, rgba(75,185,127,.06), rgba(127,86,217,.06)); }
.launch-box span, .launch-box small { color: var(--muted); }
.launch-box strong { font-family: Unbounded, sans-serif; font-size: 54px; color: var(--lav); letter-spacing: -.06em; }
.preview-card iframe { width: 100%; min-height: 760px; border: 0; border-radius: 20px; background: #ffffff; box-shadow: inset 0 0 0 1px var(--line); }
.login-body { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(480px, 100%); border: 1px solid rgba(255,255,255,.86); border-radius: 32px; padding: 28px; background: rgba(255,255,255,.88); box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.login-card h1 { font-size: 34px; }
.login-card p { color: var(--muted); margin: 0; }
.login-card button { width: 100%; }
.login-brand { padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.helper-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.mini-card { padding:16px; }
.mini-card strong { display:flex; align-items:center; gap:8px; font-size:14px; margin-bottom:6px; }
.mini-card p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.smtp-preset { display:grid; gap:10px; margin-top:14px; padding:16px; border:1px solid #d9d6fe; border-radius:20px; background:var(--lav-soft); }
.smtp-preset code { background:#ffffff; }
.step-list { display:grid; gap:10px; }
.step-item { display:flex; gap:12px; align-items:flex-start; color:#475467; }
.step-num { width:26px; height:26px; border-radius:999px; display:grid; place-items:center; background:linear-gradient(135deg,var(--mint),var(--lav)); color:#fff; font-weight:800; font-size:12px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.72); }
  .brand { padding-bottom: 12px; }
  .nav { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sidebar-note, .sidebar form { display: none; }
  .content { padding: 22px; }
  .hero-card, .page-head { align-items: flex-start; flex-direction: column; }
  .hero-action { min-width: 0; width: 100%; }
  .stats-grid, .grid.two, .grid.three, .form-grid, .helper-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .search, .row-actions { flex-direction: column; min-width: 100%; }
}
@media (max-width: 560px) {
  .nav { grid-template-columns: 1fr 1fr; }
  .hero-card, .page-panel, .card, .stat { border-radius: 20px; padding: 18px; }
  .content { padding: 16px; }
  h1 { font-size: 32px; }
  .brand-logo { width: 140px; }
}
