:root {
  --ink: #17211f;
  --muted: #65706d;
  --bg: #f4f7f4;
  --surface: #ffffff;
  --line: #dfe7e3;
  --brand: #08795f;
  --brand-2: #0e9b77;
  --navy: #10231f;
  --gold: #f0b429;
  --coral: #ed5d4b;
  --blue: #286be8;
  --danger: #c43b32;
  --shadow: 0 24px 60px rgba(16, 35, 31, .10);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; color: var(--ink); outline: 0; }
input, select { min-height: 44px; padding: 0 12px; }
textarea { padding: 12px; line-height: 1.55; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(8,121,95,.13); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius); font-weight: 800; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--brand); color: white; }
.btn.primary:hover { background: #06624d; }
.btn.subtle { background: white; border-color: var(--line); color: var(--ink); }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.16); color: #dcebe6; }
.topbar .btn.ghost { background: white; border-color: var(--line); color: var(--ink); }
.btn.full { width: 100%; }
.admin-shell { display: grid; grid-template-columns: 286px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 22px 16px; background: var(--navy); color: #eaf4f1; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.brand strong { display: block; font-size: 20px; line-height: 1; }
.brand small { color: #a9c4bc; }
.nav-group { margin: 18px 10px 8px; color: #8eb0a6; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: var(--radius); color: #dbe9e5; font-weight: 700; }
.nav a span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.08); font-size: 12px; }
.nav a.active, .nav a:hover { background: rgba(255,255,255,.10); color: white; }
.main { min-width: 0; padding-bottom: 48px; }
.topbar { position: sticky; top: 0; z-index: 5; min-height: 76px; display: flex; align-items: center; gap: 14px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(244,247,244,.92); backdrop-filter: blur(14px); }
.icon-btn { display: none; border: 0; background: white; width: 42px; height: 42px; border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hamburger { position: relative; display: block; width: 18px; height: 14px; }
.hamburger::before, .hamburger::after, .hamburger i { position: absolute; left: 0; width: 18px; height: 2px; border-radius: 999px; background: var(--ink); content: ""; }
.hamburger::before { top: 0; }
.hamburger i { top: 6px; }
.hamburger::after { bottom: 0; }
.search { flex: 1; max-width: 560px; }
.search input { background: white; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mail-mode { padding: 9px 11px; border-radius: 999px; background: #dff5ec; color: #075c49; font-size: 12px; font-weight: 900; }
.tenant-switcher select { min-height: 40px; min-width: 170px; background: white; font-weight: 800; }
.profile { display: flex; align-items: center; gap: 9px; }
.profile span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: white; font-weight: 900; }
.page-hero { margin: 28px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, #ffffff 0%, #f2fbf7 62%, #fff8e3 100%); box-shadow: var(--shadow); display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; }
.page-hero.compact { padding: 24px; }
.page-hero h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; }
.page-hero p { max-width: 760px; color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: 12px; font-weight: 950; text-transform: uppercase; }
.hero-actions, .form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.metric-grid { margin: 0 28px 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-grid article { min-height: 138px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.metric-grid span { color: var(--muted); font-weight: 800; }
.metric-grid strong { display: block; margin: 18px 0 7px; font-size: 34px; line-height: 1; }
.metric-grid small { color: var(--muted); }
.dashboard-grid, .builder-grid { margin: 0 28px 20px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .75fr); gap: 18px; align-items: start; }
.content-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { margin: 0; }
.card-head span, .card-head a { color: var(--muted); font-weight: 800; font-size: 13px; }
.readiness-list { display: grid; gap: 12px; }
.readiness-list p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.readiness-list span { color: var(--muted); }
.list-stack { display: grid; gap: 10px; }
.list-stack a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); }
.list-stack strong, .list-stack span { min-width: 0; overflow-wrap: anywhere; }
.list-stack span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; background: #fbfdfc; }
.status-badge { display: inline-flex; min-height: 28px; align-items: center; padding: 0 10px; border-radius: 999px; background: #eef3f1; color: #40504c; font-size: 12px; font-weight: 900; }
.status-sent, .status-active, .status-qualified { background: #daf4eb; color: #075c49; }
.status-draft, .status-queued, .status-open, .status-new { background: #fff3d6; color: #755600; }
.status-failed, .status-suppressed, .status-danger { background: #ffe2de; color: #8b2119; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 850; }
.span-2 { grid-column: 1 / -1; }
.preview-card iframe { width: 100%; min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.flash { margin: 16px 28px 0; padding: 13px 15px; border-radius: var(--radius); background: #e2f5eb; color: #075c49; border: 1px solid #bae6d4; }
.flash.danger { background: #ffe2de; color: #8b2119; border-color: #ffc3bb; }
.empty { color: var(--muted); text-align: center; }
.pricing-grid { margin: 0 28px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pricing-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.pricing-card.featured { border-color: rgba(8,121,95,.45); background: linear-gradient(180deg, #ffffff 0%, #eefbf6 100%); }
.pricing-card h2 { margin: 10px 0; }
.pricing-card strong { display: block; font-size: 26px; margin-bottom: 10px; }
.pricing-card p { min-height: 58px; color: var(--muted); line-height: 1.45; }
.pricing-card ul { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.pricing-card li { padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfdfc; }
.plan-code { display: inline-flex; padding: 7px 9px; border-radius: 999px; background: #dff5ec; color: #075c49; font-size: 11px; font-weight: 950; }
.usage-meter { display: grid; gap: 9px; margin-bottom: 16px; }
.usage-meter div { display: flex; justify-content: space-between; gap: 12px; }
.usage-meter span { color: var(--muted); font-weight: 800; }
.usage-meter b { display: block; height: 10px; border-radius: 999px; background: #edf3ef; overflow: hidden; }
.usage-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--gold), var(--coral)); }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form select { min-width: 130px; }
.code-block { margin: 0; padding: 16px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #10231f; color: #eaf4f1; line-height: 1.6; }
@media (max-width: 1100px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 286px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .icon-btn { display: inline-grid; place-items: center; }
  .metric-grid, .dashboard-grid, .builder-grid, .pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .topbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .top-actions { margin-left: 0; flex-wrap: wrap; overflow: visible; width: 100%; }
  .top-actions > .btn, .top-actions > .mail-mode { flex: 1 1 142px; }
  .profile { flex: 1 1 142px; justify-content: center; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
  .page-hero { margin: 16px; flex-direction: column; align-items: flex-start; }
  .metric-grid, .dashboard-grid, .builder-grid, .pricing-grid { margin: 0 16px 16px; grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
