:root {
  color-scheme: light;
  --canvas: #f7f7f2;
  --surface: #fffefa;
  --ink: #172a23;
  --muted: #59675f;
  --line: #d9dfd5;
  --forest: #12382e;
  --green: #155a42;
  --green-dark: #10452f;
  --tint: #e9f1e5;
  --lilac: #c9b7e2;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "DM Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font: 400 15px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #906eb2; outline-offset: 3px; }
::selection { background: #dcebcf; color: var(--ink); }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font: normal clamp(2.55rem, 4.6vw, 4.5rem)/1.04 var(--serif); letter-spacing: -.048em; }
h2 { font: 500 1.32rem/1.24 var(--sans); letter-spacing: -.04em; }
h3 { font: 600 1rem/1.35 var(--sans); letter-spacing: -.02em; }
small { font-size: .81rem; color: var(--muted); }
button, .button { cursor: pointer; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; z-index: 5; min-width: 0; height: 100dvh; min-height: 36rem;
  display: flex; flex-direction: column; gap: 0; padding: 30px 17px 18px; overflow-y: auto;
  background: var(--forest); color: #f3f5e9; border-right: 1px solid #0e3228;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 34px; text-decoration: none; color: inherit; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 36px; display: inline-grid; place-items: center; flex: none;
  border-radius: 9px; background: #d5e7c4; color: #153d2d;
  font: 600 1.27rem/1 var(--serif); letter-spacing: -.08em;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font: 550 1.4rem/1.12 var(--sans); letter-spacing: -.065em; color: #faf9ec; }
.brand small, .brand-name small { display: block; margin-top: 4px; color: #bdcfc1; font: 500 .67rem/1.2 var(--sans); letter-spacing: .07em; }
.workspace { color: #bed1c1; font-size: .74rem; line-height: 1.4; padding: 4px 10px; }
.sidebar > .workspace { margin: 23px 2px 9px; }
.nav { margin-top: 35px; display: flex; flex-direction: column; gap: 5px; }
.workspace + .nav { margin-top: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; min-height: 43px; border-radius: 8px;
  color: #d4dfd4; text-decoration: none; font-size: .91rem; font-weight: 500; line-height: 1.25;
  transition: background-color .15s, color .15s;
}
.nav-icon, .nav-item > svg { width: 19px; height: 19px; display: inline-grid; place-items: center; color: #b5c9bb; }
.nav-icon svg { width: 19px; height: 19px; }
.nav-item.active, .nav-item[aria-current="page"] { background: #dfebcd; color: #163b2c; }
.nav-item.active .nav-icon, .nav-item[aria-current="page"] .nav-icon, .nav-item.active > svg { color: #25583f; }
.nav-item:hover { background: #254e40; color: #fff; text-decoration: none; }
.nav-item.active:hover { background: #e5efd7; color: #163b2c; }
.sidebar-foot { margin-top: auto; padding: 17px 8px 0; border-top: 1px solid #426252; }
.account { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: .85rem; overflow-wrap: anywhere; }
.account small { display: block; color: #c1cec3; font-size: .72rem; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; color: #26392d; background: #cfdbc5; font-weight: 700; font-size: .78rem; }
.logout { padding: 5px 7px; color: #dce5dc; border: 0; background: transparent; border-radius: 5px; font-size: .8rem; }
.logout:hover { color: white; background: #254e40; }
.main { min-width: 0; }
.topbar { min-height: 65px; padding: 14px clamp(20px,3.7vw,60px); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.crumb { color: var(--muted); font-size: .81rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb strong, .crumb b { color: var(--ink); font-weight: 600; }
.crumb a { text-decoration: none; }
.page { max-width: 1540px; margin: 0 auto; padding: clamp(25px,3.3vw,54px) clamp(20px,3.7vw,60px) 52px; }
.page > * + * { margin-top: 24px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head p { margin-top: 9px; max-width: 640px; color: var(--muted); }
.eyebrow { color: #526557; margin: 0 0 9px; font-size: .67rem; font-weight: 700; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; }
.head-actions, .actions, .inline, .pagination { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.head-actions { flex-shrink: 0; justify-content: end; }
.button, button:not(.logout, .menu-button, .mobile-nav, .nav-item) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; max-width: 100%; min-height: 39px;
  padding: 8px 15px; border: 1px solid #b9c7bb; border-radius: 8px; background: var(--surface); color: #234a37;
  font-size: .85rem; line-height: 1.35; font-weight: 600; text-decoration: none; text-align: center;
}
.button:hover, button:not(.logout, .menu-button, .mobile-nav, .nav-item):hover { background: #edf2e9; text-decoration: none; }
.button.primary, button.primary { color: #fff; border-color: var(--green); background: var(--green); }
.button.primary:hover, button.primary:hover { background: var(--green-dark); color: #fff; }
.button.danger, button.danger { color: #963d38; border-color: #d9b5b1; background: #fffaf7; }
.button.danger:hover, button.danger:hover { background: #f8e7e3; }
.button.small, button.small { min-height: 30px; padding: 5px 9px; font-size: .76rem; }
.button svg { width: 16px; height: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.metric, .panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric { position: relative; padding: 18px 16px 15px; }
.metric-label { color: #506155; font-size: .79rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.metric-value { display: block; margin: 13px 0 5px; color: #173a29; font: 500 clamp(1.75rem,2.8vw,2.85rem)/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.065em; }
.metric-note { color: var(--muted); font-size: .75rem; line-height: 1.4; }
.metric-icon { display: inline-grid; place-items: center; color: #3a6145; }
.metric-icon svg { width: 17px; height: 17px; }
.grid-main { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: 18px; align-items: start; }
.panel { overflow: clip; }
.panel-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 20px 22px 15px; }
.panel-head p { color: var(--muted); font-size: .83rem; margin-top: 5px; }
.panel-body { padding: 18px 22px 22px; }
.panel-head + .panel-body { padding-top: 4px; }
.panel-body > * + * { margin-top: 13px; }
.panel > .table-wrap { border-top: 1px solid var(--line); }
.chart { position: relative; padding: 12px 0 0; min-width: 0; }
.chart-bars { min-height: 144px; height: clamp(145px,15vw,207px); position: relative; display: flex; gap: clamp(2px,.4vw,7px); align-items: end; border-block-end: 1px solid var(--line); background: repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#e8ebe4 calc(25% - 1px),#e8ebe4 25%); }
.bar-day { flex: 1; height: 100%; display: flex; align-items: end; justify-content: center; gap: 1px; min-width: 0; }
.bar { display: block; flex: 1; min-width: 1px; max-width: 22px; border-radius: 3px 3px 0 0; background: #69a475; }
.bar:nth-of-type(2) { background: var(--lilac); }
.chart-axis, .legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: .73rem; padding-top: 7px; }
.legend { justify-content: start; flex-wrap: wrap; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #69a475; flex: none; }
.legend > span:nth-child(2) .dot { background: var(--lilac); }
.chart-empty { color: var(--muted); font-size: .85rem; text-align: center; }
.table-wrap { width: 100%; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .87rem; text-align: left; }
th, td { padding: 13px 17px; border-bottom: 1px solid #e3e7df; vertical-align: middle; }
th { color: #5a695d; background: #f4f6ef; font-size: .7rem; white-space: nowrap; font-weight: 650; letter-spacing: .02em; }
td { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
tbody > tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8faf5; }
td a, .row-title { color: var(--ink); font-weight: 570; text-decoration: none; }
td a:hover, .row-title:hover { color: var(--green); }
.empty { display: grid; align-content: center; justify-items: center; gap: 8px; min-height: 132px; padding: 25px 18px; text-align: center; color: var(--muted); font-size: .85rem; }
.empty p { max-width: 46ch; }
.empty strong, .empty h3 { color: var(--ink); font-size: .98rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; max-width: 100%; padding: 3px 8px; color: #485d50; background: #eef1e9; border: 1px solid #dae2d6; border-radius: 20px; font-size: .71rem; font-weight: 600; }
.badge.subscribed, .badge.completed, .badge.accepted, .badge.running { color: #23543a; background: #e5f1e3; border-color: #c5dcc3; }
.badge.queued, .badge.draft, .badge.scheduled { color: #584969; background: #f0eaf6; border-color: #e1d5ec; }
.badge.paused, .badge.pending { color: #78571e; background: #f9efda; border-color: #eedfbf; }
.badge.unsubscribed, .badge.bounced, .badge.complaint, .badge.failed { color: #894842; background: #f7ece8; border-color: #ecd4ce; }
label, .field { display: block; color: var(--ink); font-size: .84rem; font-weight: 600; }
label > span:first-child { display: inline-block; }
input:not([type=checkbox],[type=radio],[type=hidden]), select, textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #becabf; border-radius: 7px; background: #fffefa; font-size: .9rem; line-height: 1.4; font-weight: 400; }
textarea { min-height: 130px; resize: vertical; }
input[type=file] { font-size: .79rem; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); }
label > input:not([type=checkbox],[type=radio],[type=hidden]), label > select, label > textarea { margin-top: 5px; }
input::placeholder, textarea::placeholder { color: #768077; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.filters > label, .filters > .field { flex: 1 1 135px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 17px; }
.field { min-width: 0; }
.span2 { grid-column: 1 / -1; }
.help { color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.45; }
.help code, .kbd, code { font: 500 .84em/1.45 "IBM Plex Mono", ui-monospace, monospace; overflow-wrap: anywhere; }
.notice { border: 1px solid var(--line); background: #edf2e9; color: #31553b; padding: 12px 15px; border-radius: 9px; font-size: .87rem; }
.notice.success { border-color: #c3dac1; background: #eaf4e7; }
.notice.error { color: #8d3c31; border-color: #e7c9bd; background: #fff1e9; }
.stack { display: grid; gap: 13px; }
.stack > * + * { margin-top: 0; }
.item, .list-link { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 12px 0; }
.item + .item, .list-link + .list-link { border-top: 1px solid var(--line); }
.list-link { color: var(--ink); text-decoration: none; font-weight: 550; }
.pagination { justify-content: end; padding: 14px; font-size: .8rem; color: var(--muted); }
.footer { color: var(--muted); font-size: .78rem; }
.preview-email { background: #fff; padding: clamp(20px,3vw,36px); border: 1px solid var(--line); border-radius: 10px; }
.preview-email p { overflow-wrap: anywhere; }
.preview-email h3 { margin: 12px 0; font: 500 1.55rem/1.15 var(--serif); }
details { border-radius: 7px; }
summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: .84rem; }
details[open] > summary { margin-bottom: 12px; }
.hero { border-radius: var(--radius); padding: clamp(20px,3vw,38px); background: var(--forest); color: #f7f9ee; }
.hero h2 { font: 500 clamp(1.8rem,3vw,2.9rem)/1.08 var(--serif); letter-spacing: -.045em; }
.hero p { margin-top: 10px; color: #d5e2d3; }
.feature-links { display: grid; gap: 8px; }
.trend-choice { font-size: .78rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.menu-button, .mobile-nav { display: none; }
@media (min-width: 1500px) { .shell { grid-template-columns: 254px minmax(0,1fr); } .metric { padding: 20px 22px; } }
@media (max-width: 1150px) { .shell { grid-template-columns: 194px minmax(0,1fr); } .sidebar { padding-inline: 12px; } .metric-grid { gap: 9px; } .grid-main { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 13px; } .panel-head, .panel-body { padding-inline: 17px; } }
@media (max-width: 940px) { .grid-main { grid-template-columns: 1fr; } .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .head-actions { flex-shrink: 1; } }
@media (max-width: 730px) {
  .shell { display: block; }
  .sidebar { position: relative; min-height: 0; height: auto; padding: 14px 16px 0; display: grid; grid-template-columns: 1fr auto; gap: 9px; overflow: visible; }
  .sidebar > .brand { grid-column: 1; grid-row: 1; padding: 0; }
  .sidebar > .workspace { display: none; }
  .sidebar-foot { grid-column: 2; grid-row: 1; border: 0; padding: 0; margin: auto 0; }
  .sidebar-foot .account > small { display: none; }
  .sidebar-foot .account { font-size: .74rem; }
  .nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 3px; overflow: auto; max-width: 100%; margin: 0 -3px; padding: 1px 3px 9px; }
  .nav-item { flex: 0 0 auto; gap: 6px; min-height: 35px; border-radius: 6px; font-size: .81rem; padding: 7px 9px; }
  .nav-icon, .nav-item > svg, .nav-icon svg { width: 15px; height: 15px; }
  .workspace + .nav { margin-top: 0; }
  .topbar { min-height: 46px; padding: 10px 17px; }
  .page { padding: 24px 16px 40px; }
  .page > * + * { margin-top: 16px; }
  .page-head { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .head-actions { justify-content: start; }
  .panel-head { padding-top: 16px; }
}
@media (max-width: 490px) {
  .brand-name { font-size: 1.15rem; }
  .sidebar-foot .avatar, .sidebar-foot .account small { display: none; }
  .page { padding-inline: 12px; }
  .metric { padding: 13px 11px; }
  .metric-value { font-size: 1.85rem; margin-top: 9px; }
  .metric-label, .metric-note { font-size: .72rem; }
  .metric-grid { gap: 7px; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .panel-head { align-items: start; flex-wrap: wrap; }
  .panel-head, .panel-body { padding-inline: 13px; }
  .form-grid .span2 { grid-column: auto; }
  th, td { padding: 10px 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
.metric-label { justify-content: space-between; min-height: 29px; }
.metric-icon { width: 29px; height: 29px; border-radius: 9px; background: #edf3e9; }
.metric:nth-child(2) .metric-icon { background: #f0ebf6; color: #685778; }
.metric:nth-child(3) .metric-icon { background: #f1eee4; color: #736244; }
.metric:nth-child(4) .metric-icon { background: #eef1e7; color: #586944; }
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.topbar > .badge { background: transparent; color: #395246; padding: 4px 9px; border-color: #c8d2c7; }
td > small { display: block; margin-top: 3px; font-size: .77rem; }
.badge.status-subscribed, .badge.status-completed, .badge.status-accepted, .badge.status-running { color: #23543a; background: #e5f1e3; border-color: #c5dcc3; }
.badge.status-queued, .badge.status-draft, .badge.status-scheduled { color: #584969; background: #f0eaf6; border-color: #e1d5ec; }
.badge.status-paused, .badge.status-pending { color: #78571e; background: #f9efda; border-color: #eedfbf; }
.badge.status-unsubscribed, .badge.status-bounced, .badge.status-complaint, .badge.status-failed { color: #894842; background: #f7ece8; border-color: #ecd4ce; }
.panel > .chart { margin-inline: 22px; }
.panel > .chart-empty { margin: 10px 22px 0; }
.panel-body.stack > .item, .panel-body.stack > .list-link { margin: 0; }
.panel-body.stack:has(.list-link) { gap: 0; }
.panel-body .list-link.item { padding-block: 12px; font-size: .85rem; font-weight: 450; }
.list-link.item span::before { display: inline-block; content: ""; vertical-align: 1px; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background-color: #7ba887; }
.list-link.item:nth-child(2) span::before { background-color: #baa7cf; }
.list-link.item:nth-child(3) span::before { background-color: #ba8a75; }
.list-link.item:nth-child(4) span::before { background-color: #9d9969; }
.list-link.item:nth-child(5) span::before { background-color: #89929d; }
.list-link.item strong { font-variant-numeric: tabular-nums; font-weight: 600; }
input[type="file"]::file-selector-button {
  margin-inline-end: 10px; border: 1px solid #c1cec0; border-radius: 5px; padding: 5px 9px;
  background: var(--tint); color: var(--ink); font: 600 .78rem var(--sans); cursor: pointer;
}
@media(max-width: 730px) { .panel > .chart { margin-inline: 17px; } }
.sidebar-foot .account { overflow-wrap: normal; white-space: nowrap; }
.sidebar-foot .logout { white-space: nowrap; padding-inline: 3px; }
.sidebar-foot { padding-inline: 2px; }
@media (min-width: 731px) and (max-width: 1150px) { .sidebar-foot .avatar { width: 26px; height: 26px; } }
@media (max-width: 490px) { .sidebar-foot .account { display: none; } }
