:root {
  font-family: Inter, "Segoe UI", sans-serif;
  color: #21313a;
  background: #f5f7f7;
  font-synthesis: none;
  --ink: #211d30;
  --muted: #566872;
  --border: #dce4e6;
  --purple: #164d58;
  --soft: #e8f1f1;
  --sidebar: #fff;
  --white: #fff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #9371e6; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3.7vw, 2.45rem); letter-spacing: -.05em; line-height: 1.1; }
h2 { font-size: 1.06rem; letter-spacing: -.015em; }
small { font-size: .79rem; }
.muted { color: var(--muted); }
.error { color: #a22649; }
.loading { padding: 3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.brand { display: flex; align-items: center; gap: .8rem; font-size: 1.17rem; font-weight: 750; letter-spacing: -.02em; }
.brand small { display: block; margin-top: .19rem; font-size: .62rem; letter-spacing: .14em; color: #c7b9e0; }
.brand-mark { flex: none; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .72rem; background: #744fe0; }
.brand-mark i { width: 1.15rem; height: .82rem; border: 1.5px solid #fff; border-radius: .14rem; overflow: hidden; position: relative; }
.brand-mark i::before { content: ""; position: absolute; top: -.48rem; left: .14rem; width: .7rem; height: .7rem; transform: rotate(45deg); border-bottom: 1.5px solid white; border-right: 1.5px solid white; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .62rem .95rem; border: 1px solid transparent; border-radius: .65rem; font-size: .875rem; font-weight: 700; line-height: 1.25; }
.primary { background: var(--purple); color: #fff; box-shadow: 0 2px 3px #35235e24; }
.primary:hover { background: #46299c; }
.secondary { background: #fff; color: var(--ink); border-color: #dcd5e8; }
.secondary:hover { background: #f5f0fb; }
.danger { background: #a22649; color: #fff; }
.text-button { border: 0; background: transparent; padding: .4rem .25rem; color: var(--purple); font-weight: 700; font-size: .83rem; text-align: left; }
.text-button:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.login-visual { isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; padding: clamp(1.6rem, 5vw, 5rem); min-height: 30rem; color: #fff; background: linear-gradient(155deg, #201833 25%, #392465 100%); }
.login-copy { max-width: 32rem; padding: 3rem 0 5rem; }
.login-copy h1 { font-size: clamp(2.5rem, 5.2vw, 5rem); margin: .9rem 0 1rem; }
.login-copy p { color: #e0d5f4; max-width: 25rem; line-height: 1.6; }
.eyebrow { color: #c6afff; font-size: .72rem; font-weight: 750; letter-spacing: .16em; }
.login-decoration { position: absolute; z-index: -1; width: 21rem; height: 21rem; right: -5rem; bottom: -7rem; transform: rotate(-24deg); }
.login-decoration div { position: absolute; inset: 0; border: 1px solid #a686fa48; border-radius: 3rem; }
.login-decoration div:nth-child(2) { transform: translate(-2rem, -2rem); background: #7350c526; }
.login-decoration div:nth-child(3) { transform: translate(-4rem, -4rem); background: #7350c51f; }
.login-panel { display: grid; place-items: center; padding: clamp(1.3rem, 5vw, 5rem); }
.login-form { width: min(100%, 26rem); display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2.2rem); background: #fff; border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: 0 12px 36px #27183b0b; }
.login-form h2 { font-size: 1.7rem; letter-spacing: -.04em; }
.login-form p { line-height: 1.45; }
.login-form .error:empty { display: none; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.layout { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; background: var(--sidebar); color: #fff; padding: 1.4rem 1rem 1rem; }
.sidebar .brand { margin: 0 .35rem 2.2rem; }
.sidebar nav { display: grid; gap: .32rem; }
.sidebar nav button { display: flex; align-items: center; min-height: 43px; gap: .65rem; border: 0; border-radius: .62rem; padding: .55rem .68rem; background: transparent; color: #e0d8ed; text-align: left; font-size: .9rem; font-weight: 650; }
.sidebar nav button:hover { background: #342747; }
.sidebar nav button[aria-current] { background: #49346e; color: #fff; }
.nav-icon { display: inline-grid; place-items: center; width: 1.2rem; font-size: 1.12rem; color: #c1a9ff; }
.sidebar-footer { display: flex; align-items: center; gap: .6rem; margin-top: auto; border-top: 1px solid #483b59; padding: 1rem .2rem .1rem; font-size: .84rem; }
.sidebar-footer small { display: block; margin-top: .15rem; color: #c7b9e0; }
.avatar { display: grid; place-items: center; background: #483367; border-radius: .65rem; color: #efdcff; width: 2.25rem; height: 2.25rem; font-weight: 750; }
.sign-out { margin-left: auto; min-width: 34px; min-height: 34px; color: #fff; border: 0; border-radius: .4rem; background: transparent; font-size: 1.35rem; }
.sign-out:hover { background: #49346e; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 59px; padding: .55rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--border); background: #fff; font-size: .82rem; color: var(--muted); }
.topbar span span { color: #a9a0b7; margin: 0 .35rem; }
.demo-badge { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; border-radius: 2rem; padding: .34rem .6rem; background: #f3edff; color: #4f3486; font-weight: 700; font-size: .74rem; }
.demo-badge i { width: .46rem; height: .46rem; border-radius: 50%; background: #805ad0; }
.page { max-width: 1290px; margin: auto; padding: clamp(1.2rem, 4vw, 3.1rem); }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: .9rem 1.5rem; margin-bottom: 1.55rem; }
.page-title p { margin-top: .55rem; line-height: 1.45; color: var(--muted); }
.page-title > button { flex: none; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.card, .stat { background: #fff; border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 4px 12px #37245906; }
.stat { padding: 1.15rem; }
.stat h2 { font-size: .89rem; color: #554f66; }
.stat strong { display: block; margin: .55rem 0; font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat p, .quota-bar p { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.stat.accent { background: #eee8fc; border-color: #d9caf8; color: #492995; }
.stat.accent h2, .stat.accent p { color: #503985; }
.quota-bar { margin-top: 1rem; padding: 1rem 1.15rem; }
.quota-bar > div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .55rem; }
progress { display: block; appearance: none; width: 100%; height: .52rem; border: 0; border-radius: .8rem; overflow: hidden; background: #eee9f5; color: #744fd0; }
progress::-webkit-progress-bar { background: #eee9f5; }
progress::-webkit-progress-value { background: #744fd0; border-radius: .8rem; }
progress::-moz-progress-bar { background: #744fd0; border-radius: .8rem; }
.quota-bar p { margin-top: .45rem; }
.history { margin-top: 1.15rem; }
.history > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: .86rem; }
th { text-align: left; background: #f8f6fb; color: #554e65; font-size: .74rem; }
td, th { padding: .76rem 1.15rem; border-top: 1px solid #eeeaf3; vertical-align: middle; }
td small { display: block; margin-top: .18rem; color: var(--muted); }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; padding: .31rem .53rem; border-radius: .65rem; white-space: nowrap; background: #efeaf5; color: #504860; font-size: .73rem; font-weight: 700; }
.status.sent { color: #195443; background: #e2f4ed; }
.status.scheduled { color: #513090; background: #efe6fc; }
.status.blocked { color: #882641; background: #fce8ee; }
.empty { padding: 1.1rem; color: var(--muted); }
.filter { display: flex; flex-direction: row; align-items: center; gap: .5rem; font-size: .81rem; }
.filter select { min-height: 36px; }

.list-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: .9rem; }
.list-card { display: grid; gap: .5rem; justify-items: start; padding: 1.2rem; }
.list-card p { font-size: .86rem; }
.list-icon { display: grid; place-items: center; border-radius: .7rem; width: 2.2rem; height: 2.2rem; background: var(--soft); color: var(--purple); font-size: 1.35rem; }
.composer { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(235px, 1fr); gap: .9rem; align-items: start; }
.sender-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: .9rem; align-items: start; }
.quota-plan { margin-top: 1rem; }
.report-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; line-height: 1.55; }
.monthly-report { display: grid; gap: .75rem; margin-top: 1.1rem; min-width: 0; }
.monthly-report-heading { padding: .9rem 1rem; border-left: 4px solid var(--purple); border-radius: .25rem; background: var(--soft); color: var(--purple); }
.monthly-report-heading p { margin: 0 0 .2rem; color: #34565d; font-size: .77rem; }
.monthly-report-heading h2 { font-size: 1.4rem; }
.monthly-customer { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: .42rem; background: #fff; }
.monthly-customer-heading { padding: .78rem .9rem; overflow-wrap: anywhere; }
.monthly-customer-heading h3 { font-size: 1rem; font-weight: 650; }
.monthly-customer-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .77rem; line-height: 1.55; }
.monthly-report table { min-width: 0; }
.monthly-report td, .monthly-report th { padding: .48rem .9rem; }
.monthly-customer thead th { color: #34565d; }
.monthly-customer tbody th { background: #fff; color: inherit; font-size: inherit; font-weight: 400; }
.monthly-empty { color: var(--muted); }
.monthly-customer tfoot :is(th, td) { background: var(--soft); color: var(--purple); font-size: inherit; font-weight: 650; }
.monthly-grand-total { overflow: hidden; border-radius: .42rem; }
.monthly-grand-total :is(th, td) { padding: .72rem .9rem; border: 0; background: var(--purple); color: #fff; font-size: .88rem; }
.monthly-grand-total strong { font-size: 1.1rem; }
dialog:has(.monthly-report) { width: min(48rem, calc(100% - 1.5rem)); }
dialog .report-meta { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.verification-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.verification-row > div { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.verification-row small { display: block; color: var(--muted); margin-top: .25rem; }
.verification-row .button { min-height: 36px; }
.compose-side { display: grid; gap: .9rem; }
.form-card { padding: 1.1rem; display: grid; gap: .9rem; }
.sender { display: flex; flex-wrap: wrap; gap: .3rem .65rem; padding: .65rem .8rem; background: #f7f4fc; border-radius: .6rem; font-size: .85rem; color: #554e65; }
.sender strong { color: var(--ink); }
label { display: grid; gap: .32rem; font-size: .88rem; font-weight: 650; }
input:not([type="checkbox"], [type="radio"]), textarea, select { width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid #dcd5e7; border-radius: .52rem; background: #fff; color: var(--ink); }
textarea { min-height: 13rem; resize: vertical; line-height: 1.5; }
.editor { display: grid; gap: .45rem; }
.variable-tools, .sample-picker { display: grid; gap: .45rem .65rem; padding: .7rem; background: #f7f4fc; border-radius: .6rem; }
.variable-tools { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.variable-tools small { grid-column: 1 / -1; }
.sample-picker { margin: .65rem 0; }
dialog #sample-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
@media (max-width: 450px) {
  .variable-tools, dialog #sample-search { grid-template-columns: 1fr; }
}

body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; font-size: .9rem; }
#app { flex: 1; display: grid; }
h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 650; letter-spacing: -.025em; }
h2 { font-weight: 650; }
.brand { font-size: .98rem; font-weight: 500; color: var(--ink); }
.brand strong { font-weight: 690; margin-left: .28em; }
.login { display: grid; grid-template-columns: 1fr; min-height: 0; }
.login-panel { padding: 1.5rem; }
.login-form { max-width: 24rem; gap: .8rem; border-radius: .42rem; box-shadow: none; }
.demo-accounts { display: flex; flex-wrap: wrap; }
.demo-accounts .button { font-size: .75rem; }
.layout { min-height: 0; grid-template-columns: 204px minmax(0, 1fr); }
.sidebar { height: auto; min-height: 0; position: static; border-right: 1px solid var(--border); color: var(--ink); }
.sidebar .brand { margin: 0 .3rem 1.35rem; }
.sidebar nav button { min-height: 36px; border-radius: .25rem; color: #34474f; font-weight: 550; font-size: .83rem; }
.sidebar nav button[aria-current], .sidebar nav button:hover { color: #164d58; background: #e8f1f1; }
.nav-icon { color: #52737a; font-size: .95rem; }
.sidebar-footer { border-color: var(--border); color: var(--ink); }
.avatar { background: var(--soft); color: var(--purple); font-size: .74rem; border-radius: .3rem; }
.sign-out { color: var(--ink); }
.sign-out:hover { background: var(--soft); }
.topbar { min-height: 49px; }
.page { padding: clamp(1rem, 3vw, 2.25rem); }
.page-title { margin-bottom: 1.05rem; }
.button { min-height: 36px; padding: .45rem .7rem; border-radius: .3rem; font-size: .81rem; font-weight: 640; }
.primary { box-shadow: none; }
.primary:hover { background: #123e48; }
.secondary { border-color: var(--border); }
.secondary:hover { background: var(--soft); }
.card, .stat { border-radius: .42rem; box-shadow: none; }
.stat { padding: .9rem; }
.stat strong { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.02em; }
.stat.accent, .submit-card { border-color: #c5dadb; background: #edf5f5; color: #164d58; }
.stat.accent h2, .stat.accent p { color: #275962; }
.sender, .variable-tools, .sample-picker, th { background: #f1f5f5; }
.form-card { padding: .95rem; gap: .75rem; }
input:not([type="checkbox"], [type="radio"]), textarea, select { min-height: 36px; border-color: #cdd8db; border-radius: .25rem; }
td, th { padding: .62rem .9rem; border-color: #e8eded; }
.demo-badge { border-radius: .25rem; color: #35535d; background: #edf2f2; }
.status.scheduled { color: #305963; background: #e8f1f1; }
progress::-webkit-progress-value { background: #42757d; }
progress::-moz-progress-bar { background: #42757d; }
.security-card { margin-top: 1rem; }
.copyright { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem;
  padding: .65rem 1rem; border-top: 1px solid var(--border); background: #fff; color: var(--muted); font-size: .74rem; }
.copyright img { width: auto; height: 21px; max-width: 80px; object-fit: contain; }
.copyright a, .privacy-page a { color: var(--purple); }
.privacy-page { width: min(42rem, calc(100% - 2rem)); margin: 2rem auto; justify-self: center; line-height: 1.55; }
@media (max-width: 760px) {
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar .brand { margin: 0; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.format-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.format-tools button { min-height: 36px; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: .45rem; background: #fff; color: var(--ink); font-size: .8rem; }
.format-tools button:hover { background: var(--soft); }
.newsletter-body { min-height: 14rem; padding: .85rem; border: 1px solid #cdd8db; border-radius: .25rem; background: #fff; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.newsletter-body:empty::before, .newsletter-body:has(> div:only-child > br:only-child)::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; position: absolute; }
.newsletter-body h3 { margin: .4rem 0; }
.newsletter-body ul { margin: .3rem 0; padding-left: 1.5rem; }
.newsletter-body a { color: inherit; text-decoration: underline; }
.editor-image { display: inline-block; color: var(--muted); }
.editor-image img { max-width: 100%; height: auto; vertical-align: middle; }
.text-color-icon { border-bottom: 2px solid #164d58; font-weight: 750; }
.highlight-icon { padding-inline: .15rem; background: #fff0b3; font-weight: 750; }
.editor-colors { padding: .55rem .68rem; border: 1px solid var(--border); border-radius: .3rem; background: #f5f8f8; font-size: .8rem; }
.color-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .4rem; }
.color-swatches button[data-value^="#"] { width: 1.8rem; height: 1.8rem; border: 1px solid #59666b70; border-radius: .25rem; }
.color-clear { background: #fff; border: 1px solid var(--border); border-radius: .25rem; padding: .28rem .45rem; }
.custom-color { display: flex; align-items: center; gap: .35rem; margin-inline-start: .25rem; font-size: .8rem; }
.color-swatches .custom-color input { padding: .1rem; width: 2rem; min-height: 1.65rem; }
.attachment-card { margin-top: .9rem; }
.attachment-card p { margin-top: .3rem; font-size: .82rem; }
.attachment-card ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.attachment-card li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .35rem .8rem; padding: .55rem 0; border-bottom: 1px solid var(--border); }
.attachment-card li span { overflow-wrap: anywhere; }
.attachment-card li small { margin-left: .5rem; color: var(--muted); white-space: nowrap; }
.attachment-card input[type="file"] { font-weight: 400; }
.attachment-card [role="status"]:empty { display: none; }
.image-slot { display: flex; align-items: center; gap: .5rem; }
.image-slot img { width: 42px; height: 32px; object-fit: contain; }
.image-slot small { white-space: normal; }
#color-form input[type="color"] { max-width: 6rem; }
.mail-body img { max-width: 100%; height: auto; vertical-align: middle; }
.mail-body table[role="presentation"] { min-width: 0; }
.mail-body table[role="presentation"] > tbody > tr > td { padding: 1rem; border: 0; }
.mail-body hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
.mail-body a { color: var(--purple); }
dialog form .error:empty { display: none; }
dialog textarea[name="signature"] { min-height: 7rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { margin-bottom: .55rem; padding: 0; font-weight: 750; }
.optional { color: var(--muted); font-size: .74rem; }
.pick { display: flex; align-items: center; gap: .5rem; min-height: 39px; padding: .25rem 0; cursor: pointer; }
.pick input { width: 1rem; height: 1rem; accent-color: var(--purple); }
.pick small { margin-left: auto; color: var(--muted); }
#schedule-field { margin-top: .5rem; }
.estimate strong, .estimate small { display: block; }
.estimate small { margin-top: .28rem; }
.submit-card { background: #f2ebfd; border-color: #ded0f8; }

dialog { width: min(36rem, calc(100% - 1.5rem)); max-height: calc(100vh - 2rem); border: 1px solid var(--border); border-radius: 1rem; padding: 1.2rem; color: var(--ink); box-shadow: 0 20px 60px #1c103458; }
dialog::backdrop { background: #24173599; }
dialog > header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; }
dialog .close { border: 0; background: #f0eaf7; border-radius: .5rem; width: 2.1rem; height: 2.1rem; font-size: 1.4rem; }
dialog p { margin: .7rem 0; line-height: 1.45; }
dialog .actions { margin-top: 1rem; justify-content: flex-end; }
dialog form { display: grid; gap: .75rem; }
dialog form > button { justify-self: end; }
.mail-meta { display: grid; gap: .25rem; font-size: .83rem; color: var(--muted); padding: .7rem 0; }
.mail-body { border: 1px solid #e5ddef; border-radius: .75rem; padding: 1.15rem; overflow-wrap: anywhere; }
.mail-body p { white-space: pre-wrap; }
.mail-brand { color: var(--purple); font-weight: 750; border-bottom: 1px solid var(--border); padding-bottom: .65rem; margin-bottom: .7rem; }
#notice { position: fixed; z-index: 10; right: 1rem; bottom: 1rem; max-width: min(32rem, calc(100% - 2rem)); padding: .85rem 1rem; border-radius: .7rem; background: #271d3a; color: #fff; box-shadow: 0 6px 30px #21133532; font-size: .88rem; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 195px minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; padding: .7rem .8rem; display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
  .sidebar .brand { margin: 0; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar nav button { font-size: .79rem; padding: .35rem .45rem; min-height: 34px; }
  .sidebar-footer { padding: 0; margin: 0; border: 0; }
  .sidebar-footer .avatar, .sidebar-footer div:not(.avatar) { display: none; }
  .composer { grid-template-columns: 1fr; }
  .login { display: block; }
  .login-visual { min-height: 0; }
  .login-copy { padding: 2rem 0 1rem; }
  .login-copy h1 { font-size: 2.65rem; }
}
@media (max-width: 450px) {
  .page-title { align-items: flex-start; flex-direction: column; }
  .topbar { font-size: .73rem; }
  .stat { padding: .86rem; }
  .table-scroll { max-width: calc(100vw - 2.4rem); }
}

:root {
  background: #f8f9f8;
  color: #24312e;
  --ink: #24312e;
  --muted: #53635e;
  --border: #dce3df;
  --purple: #28564c;
  --soft: #edf2ef;
}
:focus-visible { outline: 2px solid #387d6c; outline-offset: 2px; }
h1 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); line-height: 1.2; font-weight: 630; }
h2 { font-size: 1rem; font-weight: 630; }
.brand { font-size: .96rem; }
.brand strong { margin: 0; }
.button { border-radius: .2rem; min-height: 36px; }
.primary:hover { background: #204238; }
.text-button { font-weight: 600; }
.layout { grid-template-columns: 12.5rem minmax(0, 1fr); }
.sidebar { padding: 1.15rem .85rem .85rem; }
.sidebar .brand { margin: .12rem .55rem 1.15rem; }
.sidebar nav { gap: .14rem; }
.sidebar nav button { gap: .55rem; border-left: 2px solid transparent; min-height: 35px; }
.sidebar nav button[aria-current] { border-left-color: var(--purple); background: var(--soft); color: var(--purple); }
.sidebar-footer { padding: .7rem .55rem 0; }
.nav-icon { color: var(--muted); }
.topbar { min-height: 44px; padding: .4rem clamp(1rem, 3vw, 2rem); }
.demo-badge { color: var(--muted); background: transparent; padding: .15rem 0; font-weight: 550; }
.page { max-width: 71rem; padding: clamp(.9rem, 2.6vw, 2rem); }
.page-title { padding-bottom: .95rem; margin-bottom: .95rem; border-bottom: 1px solid var(--border); }
.page-title p { margin-top: .3rem; font-size: .84rem; }
.card { border-radius: .25rem; }
.quota-summary .stats { margin: 0; gap: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quota-summary .stat { border: 0; border-radius: 0; padding: .8rem .9rem; }
.quota-summary .stat + .stat { border-left: 1px solid var(--border); }
.quota-summary .stat dt { font-size: .78rem; color: var(--muted); }
.quota-summary .stat dd { margin: .28rem 0 0; font-size: 1.45rem; font-weight: 620; font-variant-numeric: tabular-nums; }
.quota-summary .stat:last-child dd { color: var(--purple); }
.quota-summary .quota-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(5rem, 28%); gap: .75rem; align-items: center; margin: 0; padding: .58rem .9rem; border-top: 1px solid var(--border); }
.quota-summary .quota-bar p { margin: 0; }
progress { height: .28rem; }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { background: #568475; }
progress::-moz-progress-bar { background: #568475; }
.history > header { padding: .68rem .9rem; }
table { min-width: 35rem; }
th { background: #f3f6f4; color: var(--muted); font-weight: 620; }
td, th { padding: .52rem .85rem; border-color: #e4eae6; }
tbody tr:hover { background: #fafbf9; }
.status, .status.sent, .status.scheduled, .status.blocked { gap: .4rem; align-items: center; background: transparent; padding: 0; color: var(--muted); font-weight: 550; }
.status::before { content: ''; width: .38rem; height: .38rem; border-radius: 50%; background: #76847d; }
.status.sent::before { background: #427c58; }
.status.scheduled::before { background: #92702b; }
.status.blocked::before { background: #a04444; }
.form-card { padding: .85rem; gap: .62rem; }
.sender, .variable-tools, .sample-picker { background: #f3f6f4; border-radius: .2rem; }
label { font-weight: 580; }
.newsletter-body, input:not([type="checkbox"], [type="radio"]), textarea, select { border-color: #c9d3cd; }
.format-tools button { min-height: 34px; border-radius: .2rem; }
.submit-card { background: #fff; border-color: var(--border); }
.monthly-report-heading { border-left: 2px solid var(--purple); background: #f1f5f2; }
.monthly-customer { border-radius: .25rem; }
.monthly-grand-total { border: 1px solid var(--border); border-radius: .25rem; }
.monthly-grand-total :is(th, td) { background: #f1f5f2; color: var(--purple); }
.login-form { width: min(100%, 22rem); padding: 1.5rem; border-radius: .25rem; }
.login-form .brand { padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.login-form h1 { margin-top: .18rem; }
.login-form .text-button { justify-self: start; }
dialog { border-radius: .3rem; box-shadow: 0 8px 22px #15292326; }
dialog::backdrop { background: #1c302868; }
dialog .close { background: var(--soft); border-radius: .2rem; }
.mail-body { border-color: var(--border); border-radius: .25rem; }
#notice { background: #2d4940; border-radius: .25rem; box-shadow: none; }
@media (max-width: 760px) {
  .sidebar .brand { margin: 0; align-self: center; }
  .sidebar-footer { padding: 0; }
  .quota-summary .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quota-summary .stat:nth-child(3) { border-left: 0; }
  .quota-summary .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}
