:root {
  color-scheme: light;
  --background: #f3f5f6;
  --paper: #fff;
  --ink: #202d2b;
  --muted: #54645f;
  --line: #dfe6e4;
  --accent: #13604d;
  --accent-dark: #0d4b3b;
  --sidebar: #172c27;
  --sidebar-light: #dce9e2;
  --radius: 12px;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; color: var(--ink); background: var(--background); }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid #358b73; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.65rem); letter-spacing: -.045em; line-height: 1.13; overflow-wrap: anywhere; }
h2 { font-size: 1.14rem; letter-spacing: -.015em; line-height: 1.25; }
small { font-size: .81rem; color: var(--muted); }
code { font: .86em ui-monospace, SFMono-Regular, monospace; }
.shell { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { display: flex; position: sticky; top: 0; flex-direction: column; height: 100dvh; background: var(--sidebar); color: var(--sidebar-light); padding: 28px 16px 18px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 28px; color: #fff; text-decoration: none; font-size: 1.02rem; font-weight: 730; letter-spacing: -.025em; white-space: nowrap; }
.brand:hover { color: #fff; }
.monogram { flex: 0 0 auto; display: grid; place-items: center; width: 41px; height: 41px; border: 1px solid #7aab9b; border-radius: 9px; color: #d2eadf; font: 730 .96rem/1 Georgia, serif; letter-spacing: .07em; }
.brand small, .account small { display: block; color: #b7c9c1; font-size: .78rem; font-weight: 450; letter-spacing: 0; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; min-height: 43px; border-radius: 8px; padding: 8px 13px; text-decoration: none; color: var(--sidebar-light); font-size: .91rem; font-weight: 570; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { color: #fff; background: #29443c; }
.sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 #88c4ae; }
.account { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 2px 0; border-top: 1px solid #426056; }
.avatar { width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center; background: #385c50; color: #fff; font-weight: 650; }
.account-name { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: .87rem; color: #fff; }
.logout { background: transparent; color: var(--sidebar-light); border: 0; border-radius: 6px; padding: 5px; font-size: .84rem; }
.logout:hover { background: #29443c; }
.workspace { width: 100%; max-width: 1530px; padding: 46px clamp(24px, 4vw, 64px) 48px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.page-heading p { color: var(--muted); margin-top: 8px; max-width: 64ch; }
.breadcrumb { display: inline-block; margin-bottom: 14px; font-size: .88rem; font-weight: 650; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 14px; border: 1px solid #cddbd5; border-radius: 8px; color: var(--ink); background: var(--paper); font-size: .91rem; font-weight: 640; text-align: center; text-decoration: none; white-space: nowrap; }
.button:hover { color: var(--accent-dark); background: #eff6f3; }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); color: white; }
.button.danger { color: #8f372c; border-color: #edcdc8; }
.button.danger:hover { background: #fff4f2; }
.text-button { color: var(--accent-dark); border: 0; background: transparent; text-decoration: underline; }
.notifications { margin-bottom: 16px; }
.notice { border-radius: 9px; padding: 12px 15px; border: 1px solid #c1ddd2; background: #e9f4ee; color: #244f40; font-size: .9rem; margin-bottom: 18px; overflow-wrap: anywhere; }
.notice.error { border-color: #e7c3bd; background: #fff2ef; color: #8a302a; }
.notice.compact { margin: 12px 20px; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.metric { border: 1px solid var(--line); border-top: 3px solid #9ab8b0; border-radius: var(--radius); background: var(--paper); padding: 12px 15px 10px; min-height: 92px; }
.metric span { display: block; color: var(--muted); font-size: .88rem; font-weight: 580; }
.metric strong { display: block; color: var(--ink); font-size: 1.72rem; font-weight: 710; letter-spacing: -.045em; line-height: 1.3; margin-top: 4px; }
.tint-check { border-top-color: #5b9a83; }
.tint-return, .tint-alert { border-top-color: #c1a08b; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(245px, 1fr); gap: 18px; align-items: start; }
.config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.import-grid { display: grid; grid-template-columns: minmax(245px, 1fr) minmax(0, 1.65fr); align-items: start; gap: 18px; }
.stack { display: grid; gap: 18px; min-width: 0; }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); overflow: hidden; }
.surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 20px; min-height: 60px; }
.surface-heading a { font-size: .88rem; font-weight: 620; }
.surface-body { padding: 12px 20px 20px; }
.table-wrap { overflow-x: auto; }
.report-table { max-height: 330px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th { padding: 10px 15px; color: var(--muted); background: #f5f8f7; font-size: .81rem; font-weight: 675; white-space: nowrap; }
td { padding: 12px 15px; border-top: 1px solid #eaf0ed; overflow-wrap: anywhere; }
td:first-child, th:first-child { padding-left: 20px; }
td:last-child, th:last-child { padding-right: 20px; }
td small { display: block; margin-top: 2px; }
.row-link { font-weight: 650; }
.empty { color: var(--muted); padding: 26px 20px; font-size: .92rem; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 6px; background: #eaf0ee; color: #415b52; font-size: .79rem; font-weight: 650; line-height: 1.25; }
.badge.delivered, .badge.approved, .badge.completed, .badge.accepted { background: #def0e8; color: #215c46; }
.badge.pending, .badge.unknown, .badge.paused, .badge.delayed { background: #fcf2dd; color: #695118; }
.badge.sending, .badge.running, .badge.scheduled, .badge.queued { background: #e7eff8; color: #335984; }
.badge.hard_bounce, .badge.complaint, .badge.rejected, .badge.failed, .badge.revoked { background: #fae8e3; color: #873d34; }
.status-list { margin: 0; padding: 0 20px 8px; }
.status-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #ecf0ee; font-size: .88rem; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.code-value { font-family: ui-monospace, SFMono-Regular, monospace; font-size: .78rem; }
.form-surface { padding: 20px; }
.form-surface h2 { margin-bottom: 13px; }
.form-stack { display: grid; gap: 12px; justify-items: start; }
.form-stack > p { width: 100%; }
.form-stack label { display: block; margin-bottom: 4px; color: #30423d; font-size: .9rem; font-weight: 610; }
input:not([type=checkbox], [type=radio], [type=hidden]), textarea, select { padding: 8px 10px; background: #fff; color: var(--ink); border: 1px solid #becdc7; border-radius: 7px; min-height: 40px; max-width: 100%; width: 100%; }
input[type=checkbox] { accent-color: var(--accent); }
fieldset { border: 0; margin: 0; padding: 0; }
fieldset legend { font-weight: 620; font-size: .9rem; }
fieldset div label { display: inline-block; margin-right: 8px; }
textarea { resize: vertical; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline select { width: auto; }
.inline label, .holiday { font-size: .89rem; }
.holiday { min-height: 34px; }
.helptext, .muted { font-size: .88rem; color: var(--muted); }
.form-stack .helptext { display: block; margin-top: 4px; }
.errorlist { color: #8a302a; font-size: .89rem; margin: 0; padding-left: 23px; overflow-wrap: anywhere; }
.form-stack + .muted, .muted + .form-stack { margin-top: 14px; }
.spaced { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.campaign-actions { margin-bottom: 19px; }
.tabs { display: flex; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid #ccd8d4; }
.tabs a { color: var(--muted); padding: 8px 2px; font-size: .93rem; font-weight: 640; text-decoration: none; }
.tabs a[aria-current=page] { color: var(--accent-dark); border-bottom: 3px solid var(--accent); }
.summary-row { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: baseline; padding: 9px 20px 15px; color: var(--muted); font-size: .88rem; }
.summary-row.inset { padding: 0 0 16px; }
.summary-row strong { color: var(--ink); font-size: 1rem; margin-left: 3px; }
.message-preview { padding: 0 20px 20px; }
.message-subject { margin-bottom: 13px; border-bottom: 1px solid var(--line); padding: 4px 0 11px; font-weight: 700; overflow-wrap: anywhere; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .94rem; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 13px; color: var(--muted); font-size: .87rem; }
.version-list { margin: 0; padding: 0; list-style: none; }
.version-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 630; }
.login-layout { min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login-intro { display: grid; align-content: center; justify-items: start; padding: 12%; gap: 13px; background: var(--sidebar); color: #fff; }
.login-intro .monogram { width: 54px; height: 54px; font-size: 1.15rem; margin-bottom: 6px; }
.login-intro h1 { font-size: clamp(2.1rem, 4vw, 3.5rem); }
.login-intro p { color: #c4dad0; }
.login-box { align-self: center; justify-self: center; width: min(85%, 430px); padding: 30px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.login-box h2 { margin-bottom: 20px; }
@media (max-width: 1120px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 180px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand { padding-inline: 2px; gap: 8px; }
  .dashboard-grid, .import-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 16px 10px; }
  .brand { padding: 0 0 10px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar nav a { min-height: 34px; padding: 4px 8px; font-size: .88rem; }
  .sidebar nav a[aria-current="page"] { box-shadow: none; }
  .account { margin-top: 10px; padding-top: 8px; }
  .workspace { padding: 22px 15px 36px; }
  .page-heading { flex-wrap: wrap; align-items: start; margin-bottom: 17px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { min-height: 79px; padding: 8px 10px; }
  .surface-heading { flex-wrap: wrap; padding-inline: 14px; }
  .login-layout { grid-template-columns: 1fr; align-content: start; }
  .login-intro { padding: 32px 20px; }
  .login-box { width: calc(100% - 32px); margin: 18px auto; padding: 22px; }
}
