:root {
  --ink: #171512;
  --muted: #746e64;
  --navy: #171512;
  --line: #ded5c5;
  --paper: #eee9dc;
  --panel: #fffdf8;
  --field: #f8f4eb;
  --brand: #171512;
  --brand-dark: #000000;
  --coral: #ad5a4a;
  --amber: #9b773f;
  --ok: #6b7a58;
  --shadow: 0 16px 40px rgba(53, 44, 29, .08);
  --sm-shadow: 0 7px 20px rgba(53, 44, 29, .055);
  --ui-bg: #eee9dc;
  --ui-sidebar: #f8f4e9;
  --ui-surface: #fffdf8;
  --ui-surface-soft: #f3eee3;
  --ui-ink: #111111;
  --ui-muted: #746f65;
  --ui-faint: #aaa397;
  --ui-border: #dfd8ca;
  --ui-blue: #111111;
  --ui-blue-dark: #2a2721;
  --ui-blue-soft: #eee7d8;
  --ui-green: #657357;
  --ui-green-soft: #e6ecdf;
  --ui-red: #b55446;
  --ui-red-soft: #f5e4df;
  --ui-yellow: #a4773a;
  --ui-black: #080808;
  --ui-radius: 18px;
  --ui-shadow: 0 16px 40px rgba(41, 52, 96, .07);
  --ui-shadow-sm: 0 7px 20px rgba(41, 52, 96, .055);
}
* { box-sizing: border-box; }
html { background: var(--ui-bg); }
body { margin: 0; background: var(--ui-bg); color: var(--ui-ink); font-family: "Aptos", "Segoe UI", sans-serif; font-size: 14px; }
h1, h2, h3, .metric-card strong, .login-card h1 { font-family: "Aptos Display", "Aptos", "Segoe UI", sans-serif; }
h1, h2, h3 { text-shadow: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
svg.lucide { width: 18px; height: 18px; display: block; stroke: currentColor; }
.nav a svg.lucide { width: 19px; height: 19px; }
.metric-icon svg.lucide { width: 19px; height: 19px; }
.campaign-mark svg.lucide { width: 16px; height: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; }
.text-link svg.lucide { width: 14px; height: 14px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); background: var(--ui-bg); }
.side { position: sticky; top: 0; z-index: 3; height: 100vh; width: 238px; padding: 28px 16px 18px; display: flex; flex-direction: column; gap: 26px; background: var(--ui-sidebar); border-right: 1px solid var(--ui-border); color: var(--ui-ink); }
.brand { display: flex; align-items: center; justify-content: center; padding: 0; }
.brand img { display: block; width: 142px; height: auto; }
.brand b { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ui-black) url('/assets/brand-logo.png') center / 100% 100% no-repeat; color: transparent; font-size: 0; font-weight: 800; box-shadow: 0 5px 12px rgba(17,17,17,.14); }
.brand span { display: none; }
.nav { display: grid; gap: 5px; padding: 10px 8px; border: 1px solid var(--ui-border); border-radius: 16px; background: #f5f0e6; }
.nav::before { content: "WORKSPACE"; display: block; padding: 0 13px 7px; color: var(--ui-faint); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.nav a, .logout { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px; color: var(--ui-muted); background: transparent; font-weight: 700; cursor: pointer; transition: background .18s, color .18s, transform .18s, box-shadow .18s; }
.nav a i { width: 20px; font-style: normal; font-size: 19px; line-height: 1; text-align: center; }
.nav a span { display: block; font-size: 13px; }
.nav a:hover, .logout:hover { color: var(--ui-blue); background: var(--ui-blue-soft); }
.nav a.active { color: #fff; background: var(--ui-blue); box-shadow: 0 6px 12px rgba(17,17,17,.14); }
.side-account { width: 100%; margin-top: auto; padding: 15px 13px 12px; border: 1px solid var(--ui-border); border-radius: 16px; background: #f3eee3; color: var(--ui-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.account-kicker { display: flex; align-items: center; gap: 7px; color: var(--ui-muted); font-size: 10px; }
.account-kicker .status-dot { width: 6px; height: 6px; box-shadow: 0 0 0 3px var(--ui-green-soft); }
.account-profile { display: flex; align-items: center; gap: 10px; margin: 12px 0 16px; }
.account-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 11px; background: var(--ui-black); color: #fff; font-size: 12px; font-weight: 850; letter-spacing: .02em; }
.account-profile strong { display: block; max-width: 135px; overflow: hidden; color: var(--ui-ink); font-size: 13px; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.account-profile small { display: block; margin-top: 2px; color: var(--ui-muted); font-size: 10px; font-weight: 600; letter-spacing: 0; }
.side-account form { margin: 0 !important; }
.logout { width: 100%; min-height: 34px; justify-content: flex-start; padding: 0 4px; border-radius: 8px; font-size: 12px; }
.logout svg.lucide { width: 18px; height: 18px; }
.logout .logout-arrow { width: 14px; height: 14px; margin-left: auto; opacity: .55; }
.main { min-width: 0; max-width: 1700px; padding: 28px clamp(24px, 4vw, 62px) 70px; }
.main::before { content: ""; display: block; width: 46px; height: 3px; margin: 0 0 24px; border-radius: 99px; background: var(--ui-black); }
.workspace-bar { min-height: 58px; margin: 0 0 36px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--ui-border); border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: var(--ui-shadow-sm); }
.workspace-bar > div:first-child { display: grid; gap: 2px; }
.workspace-heading { display: flex !important; align-items: center; gap: 13px; }
.sidebar-toggle { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ui-border); border-radius: 10px; background: var(--ui-surface); color: var(--ui-muted); cursor: pointer; transition: color .2s, background .2s, transform .2s; }
.sidebar-toggle:hover { color: var(--ui-ink); background: var(--ui-surface-soft); transform: translateY(-1px); }
.sidebar-toggle svg { width: 17px; height: 17px; }
.workspace-eyebrow, .section-kicker { color: var(--ui-muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.workspace-bar strong { font-size: 14px; letter-spacing: -.01em; }
.workspace-status { display: flex; align-items: center; gap: 8px; color: var(--ui-green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ui-green); box-shadow: 0 0 0 4px rgba(17,148,109,.12); }
.flash { margin-bottom: 18px; border-radius: 12px; box-shadow: none; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 26px; }
.dash-head h1 { margin: 7px 0 4px; color: var(--ui-ink); font-size: clamp(30px, 3.2vw, 46px); font-weight: 800; letter-spacing: -.055em; line-height: 1.03; }
.dash-head p { margin: 0; color: var(--ui-muted); font-size: 14px; }
.btn { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: var(--ui-blue); box-shadow: 0 9px 18px rgba(40,88,237,.22); font-weight: 800; }
.btn:hover { background: var(--ui-blue-dark); transform: translateY(-1px); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.metric-card, .panel { border: 1px solid rgba(228,231,240,.95); border-radius: var(--ui-radius); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
.metric-card { min-height: 176px; padding: 20px 21px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -30px; bottom: -50px; width: 120px; height: 120px; border: 1px solid #e7dece; border-radius: 50%; opacity: .9; }
.metric-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 21px; border-radius: 12px; background: var(--ui-blue-soft); color: var(--ui-blue); font-size: 19px; font-weight: 800; }
.metric-card > span { display: block; color: var(--ui-muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.metric-card strong { display: block; margin: 7px 0 3px; color: var(--ui-ink); font-size: 32px; font-weight: 850; letter-spacing: -.055em; line-height: 1; }
.metric-card small { color: var(--ui-faint); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .72fr); gap: 16px; margin-top: 16px; }
.panel { padding: 25px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.panel-heading h2, .status-card h2 { margin: 6px 0 0; color: var(--ui-ink); font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
.select-pill { padding: 9px 12px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-muted); background: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chart-panel { min-height: 360px; }
.chart-area { height: 244px; display: flex; align-items: end; gap: clamp(13px, 2vw, 26px); padding: 16px 8px 0; border-top: 1px solid #eee8dc; background: repeating-linear-gradient(to top, transparent 0 49px, #f0eadf 50px); }
.chart-col { min-width: 0; height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 7px; }
.chart-col strong { color: var(--ui-muted); font-size: 10px; font-weight: 700; }
.chart-bar { width: min(38px, 78%); height: 76%; display: flex; align-items: end; overflow: hidden; border-radius: 9px 9px 4px 4px; background: #e5e8f1; }
.chart-bar i { display: block; width: 100%; min-height: 9px; border-radius: 9px 9px 4px 4px; background: var(--ui-blue); box-shadow: 0 8px 16px rgba(17,17,17,.18); }
.chart-col small { color: var(--ui-muted); font-size: 10px; font-weight: 700; }
.status-card { min-height: 360px; padding: 26px; border-radius: 20px; background: var(--ui-black); color: #fff; box-shadow: var(--ui-shadow); }
.status-card .section-kicker { color: rgba(255,255,255,.46); }
.status-card-top { display: flex; align-items: center; justify-content: space-between; }
.status-card h2 { max-width: 270px; margin-top: 30px; color: #fff; font-size: 28px; letter-spacing: -.045em; }
.status-card p { max-width: 310px; margin: 9px 0 28px; color: rgba(255,255,255,.62); font-size: 13px; line-height: 1.55; }
.status-line { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.13); color: rgba(255,255,255,.58); font-size: 12px; }
.status-line strong { color: #fff; }
.status-link { display: inline-flex; margin-top: 24px; color: #fff; font-size: 12px; font-weight: 800; }
.dashboard-lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(310px, .8fr); gap: 16px; margin-top: 16px; }
.campaign-list, .event-list { display: grid; gap: 1px; }
.campaign-row, .event-row { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid #eef0f5; color: inherit; text-decoration: none; }
.campaign-row:hover { color: var(--ui-blue); }
.campaign-mark { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 10px; background: var(--ui-blue-soft); color: var(--ui-blue); font-weight: 800; }
.campaign-name, .event-row > span:nth-child(2) { min-width: 0; flex: 1; }
.campaign-name strong, .event-row strong { display: block; overflow: hidden; color: var(--ui-ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.campaign-name small, .event-row small { display: block; margin-top: 4px; overflow: hidden; color: var(--ui-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.campaign-progress { width: 120px; flex: 0 0 auto; }
.campaign-progress b { display: block; margin-bottom: 6px; color: var(--ui-muted); font-size: 10px; font-weight: 700; text-align: right; }
.campaign-progress em { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #e8ebf2; }
.campaign-progress em i { display: block; height: 100%; border-radius: inherit; background: var(--ui-blue); }
.event-status { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ui-green); box-shadow: 0 0 0 4px var(--ui-green-soft); }
.event-status.failure { background: var(--ui-red); box-shadow: 0 0 0 4px var(--ui-red-soft); }
.event-row time { color: var(--ui-muted); font-size: 10px; white-space: nowrap; }
.text-link { color: var(--ui-blue); font-size: 12px; font-weight: 800; }
.empty-state { color: var(--ui-muted); font-size: 13px; }
.shell, .side, .brand img, .nav a span, .side-account { transition: width .28s ease, max-height .28s ease, opacity .2s ease, transform .28s ease, padding .28s ease; }
.shell.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.shell.sidebar-collapsed .side { width: 84px; padding: 24px 12px 20px; align-items: center; }
.shell.sidebar-collapsed .brand img { width: 42px; }
.shell.sidebar-collapsed .nav::before, .shell.sidebar-collapsed .nav a span, .shell.sidebar-collapsed .side-account { display: none; }
.shell.sidebar-collapsed .nav { width: 100%; }
.shell.sidebar-collapsed .nav a, .shell.sidebar-collapsed .logout { width: 48px; justify-content: center; padding: 0; }
.shell.sidebar-collapsed .nav a.active { box-shadow: none; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.topbar h1 { margin: 0; color: var(--ui-ink); font-size: clamp(28px, 3vw, 42px); font-weight: 800; letter-spacing: -.055em; line-height: 1.04; }
.topbar p { margin: 8px 0 0; color: var(--ui-muted); }
.main .panel, .main .card, .main .campaign-step, .main .signature-editor, .main .template-workbench > *, .main .signature-workbench > * { border-color: var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); background: var(--ui-surface); }
.main .panel > h2, .main .card > h2 { color: var(--ui-ink); font-weight: 800; letter-spacing: -.03em; }
.main .actions { gap: 9px; }
.main > .topbar { padding-bottom: 2px; }
.main > .topbar .actions { align-items: flex-end; }
.main > .topbar .actions form { margin: 0; }
.main > .topbar .actions .btn, .main > .topbar > .btn { white-space: nowrap; }
.main > .grid.stats { gap: 15px; }
.main > .grid.stats .stat { min-height: 126px; padding: 20px; }
.main > .grid.stats .stat .num { color: var(--ui-ink); font-family: "Aptos Display", "Aptos", sans-serif; font-size: 30px; font-weight: 850; }
.main > .grid.stats .stat .label { margin-top: 9px; color: var(--ui-muted); font-size: 11px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.main > .panel:has(table) { overflow-x: auto; }
.main > .panel:has(table) table { min-width: 760px; }
.main .ops-strip { border-radius: 15px; box-shadow: var(--ui-shadow-sm); }
.main .ops-strip strong { color: var(--ui-ink); font-size: 14px; }
.main .ops-strip span { color: var(--ui-muted); }
.main .campaign-builder, .main .template-workbench, .main .signature-workbench { align-items: start; }
.main .campaign-step, .main .signature-editor, .main .template-workbench > .panel { overflow: hidden; }
.main .step-head { border-color: var(--ui-border); }
.main .step-num { background: var(--ui-ink); color: var(--ui-bg); }
.main .editor-head { padding: 23px 25px; }
.main .editor-head h2 { color: var(--ui-ink); font-size: 21px; }
.main .signature-list { gap: 15px; }
.main .signature-choice { gap: 16px; }
.main .signature-mini-preview { min-height: 180px; border-color: var(--ui-border); background: var(--ui-surface-soft); }
.main .signature-choice .actions .btn { min-height: 38px; padding: 8px 12px; font-size: 12px; }
.main .rich-editor { border-color: var(--ui-border); background: var(--ui-surface); }
.main .template-preview-panel, .main .signature-preview-panel { top: 28px; }
.main .template-preview-panel .preview-head h2, .main .signature-preview-panel h2 { font-size: 21px; }
.main .email-lines { min-height: 260px; }
.main .form-grid > label { min-width: 0; }
.main .form-grid > .full:not(label) { min-width: 0; }
.main .logo-panel.simple { background: var(--ui-surface-soft); }
.main .current-logo img { max-height: 100px; object-fit: contain; }
.main .btn.secondary, .main button.secondary { color: var(--ui-ink); border-color: var(--ui-border); background: var(--ui-surface); }
.main .btn.secondary:hover, .main button.secondary:hover { border-color: var(--ui-ink); background: var(--ui-surface-soft); }
.main input, .main select, .main textarea { border: 1px solid var(--ui-border); border-radius: 10px; background: #fff; color: var(--ui-ink); }
.main input:focus, .main select:focus, .main textarea:focus { border-color: var(--ui-blue); box-shadow: 0 0 0 3px rgba(40,88,237,.12); outline: 0; }
.main table { border-color: var(--ui-border); }
.main th { color: var(--ui-muted); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.main td { border-color: #eef0f5; }
.main .badge.ok { background: var(--ui-green-soft); color: var(--ui-green); }
.main .badge.danger { background: var(--ui-red-soft); color: var(--ui-red); }
.main .badge.warn { background: #fbf1df; color: var(--ui-yellow); }
.main .ops-strip.is-ok { border-color: #b9e5d4; border-left-color: var(--ui-green); background: #f0fbf7; }
.main .risk { border-left-color: var(--ui-red); background: #fff7f8; }
.main .btn.danger, .main button.danger, .main .btn.warn, .main button.warn { background: var(--ui-red); border-color: var(--ui-red); }
.main label { color: var(--ui-ink); font-weight: 750; }
.main .field-help, .main .muted { color: var(--ui-muted); }
.main .editor-toolbar, .main .plain-details, .main .switch-row, .main .logo-panel, .main .save-strip { border-color: var(--ui-border); background: var(--ui-surface-soft); }
.main .editor-toolbar button { border-color: transparent; background: #ece5d7; color: var(--ui-ink); }
.main .editor-toolbar button:hover { border-color: var(--ui-border); background: var(--ui-surface); }
.main .progress-cell progress { accent-color: var(--ui-blue); }
.main .campaign-summary { border-top-color: var(--ui-ink); }
.main .send-total { border-color: #c9d4bb; background: #f1f4eb; }
.main .send-total span { color: var(--ui-green); }
.main .editor-head { border-color: var(--ui-border); background: var(--ui-surface-soft); }
.main .signature-preview, .main .template-preview-panel .preview { border-color: var(--ui-border); background: var(--ui-surface); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--ui-bg); }
.login-card { width: min(480px, 100%); padding: 48px 48px 44px; border: 1px solid var(--ui-border); border-radius: 26px; background: var(--ui-surface); box-shadow: 0 24px 65px rgba(41,52,96,.12); }
.login-mark { display: block; margin: 0 0 38px; color: var(--ui-blue); text-align: center; }
.login-mark img { display: block; width: min(214px, 72%); height: auto; margin: 0 auto; }
.login-intro { margin: 0 0 28px; }
.login-intro h1 { color: var(--ui-ink); font-size: 36px; letter-spacing: -.05em; }
.login-card .btn { width: 100%; min-height: 48px; margin-top: 4px; }
@media (max-width: 1160px) { .shell { grid-template-columns: 84px minmax(0, 1fr); } .side { width: 84px; padding: 24px 12px; align-items: center; } .brand { padding: 0; } .brand img { width: 42px; } .brand span, .nav::before, .nav a span, .side-account, .logout span, .logout .logout-arrow { display: none; } .nav { width: 100%; padding: 0; border: 0; background: transparent; } .nav a, .logout { width: 48px; height: 48px; justify-content: center; padding: 0; } .nav a.active { box-shadow: none; } .logout { font-size: 0; } .shell.sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); } .shell.sidebar-collapsed .side { width: 0; padding-left: 0; padding-right: 0; overflow: hidden; opacity: 0; } }
@media (max-width: 960px) { .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-grid, .dashboard-lower { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .shell { display: block; } .side { position: sticky; top: 0; z-index: 5; width: 100%; height: 68px; flex-direction: row; justify-content: space-between; padding: 12px 16px; overflow: hidden; opacity: 1; } .nav { width: auto; display: flex; gap: 3px; } .nav a, .logout { width: 40px; height: 40px; border-radius: 10px; } .nav a i { font-size: 17px; } .side-account { display: none; } .shell.sidebar-collapsed { display: block; } .shell.sidebar-collapsed .side { width: 100%; height: 0; min-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; } .main { padding: 20px 16px 44px; } .workspace-bar { margin-bottom: 26px; padding: 0 13px; } .workspace-status { display: none; } .dash-head { align-items: flex-start; flex-direction: column; } .dash-head .btn { width: 100%; text-align: center; } .metric-card { min-height: 154px; padding: 17px; } .metric-icon { margin-bottom: 15px; } .panel, .status-card { padding: 19px; } .campaign-progress { width: 82px; } .event-row time { display: none; } }
@media (max-width: 680px) { .topbar { align-items: stretch; } .topbar .actions { display: grid; grid-template-columns: 1fr; } .topbar .actions .btn, .topbar .actions form, .topbar .actions form .btn { width: 100%; } .form-grid, .rate-grid, .campaign-actions, .grid.two, .template-workbench, .signature-workbench, .signature-workbench.simple { grid-template-columns: 1fr; } .panel-heading { align-items: flex-start; } .panel-heading .text-link { white-space: nowrap; } .campaign-row { align-items: flex-start; } .campaign-progress { margin-left: auto; } .ops-strip { align-items: flex-start; flex-direction: column; } .ops-time { text-align: left; } .result-head { flex-direction: column; } .send-total { width: 100%; } .main > .panel:has(table) table { min-width: 680px; } }

/* Dashboard cards: compact operational modules, not decorative placeholders. */
.metric-grid { gap: 12px; }
.metric-card {
  min-height: 188px;
  padding: 18px 19px 16px;
  border: 1px solid #ded6c8;
  border-radius: 14px;
  background: #fbf8f1;
  box-shadow: 0 8px 18px rgba(55, 44, 27, .045);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.metric-card:hover { border-color: #c9bead; box-shadow: 0 13px 25px rgba(55, 44, 27, .085); transform: translateY(-2px); }
.metric-card::after { display: none; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.metric-icon { width: 35px; height: 35px; margin: 0; border: 1px solid #e2d9c9; border-radius: 10px; background: #f0eadc; color: var(--ui-ink); }
.metric-period { padding: 5px 7px; border: 1px solid #e2d9c9; border-radius: 6px; color: var(--ui-muted); background: transparent; font-size: 9px; font-weight: 850; letter-spacing: .08em; line-height: 1; text-transform: uppercase; }
.metric-label { display: block; margin-bottom: 9px; color: var(--ui-muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; line-height: 1.25; text-transform: uppercase; }
.metric-card strong { margin: 0; font-size: 36px; letter-spacing: -.065em; line-height: .95; }
.metric-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 12px; border-top: 1px solid #e9e2d7; }
.metric-bottom small { color: var(--ui-muted); font-size: 10px; line-height: 1.2; }
.metric-signal { display: block; width: 42px; height: 5px; border-radius: 2px; background: #cfc6b6; }
.metric-live .metric-icon { color: var(--ui-green); background: var(--ui-green-soft); border-color: #d2ddc9; }
.metric-live .metric-signal { background: var(--ui-green); }
.metric-total .metric-icon { color: #fff; background: var(--ui-ink); border-color: var(--ui-ink); }
.metric-total .metric-signal { width: 48px; background: var(--ui-ink); }
.metric-contacts .metric-icon { color: var(--ui-yellow); background: #f4ebda; border-color: #e6d8bd; }
.metric-contacts .metric-signal { width: 34px; background: var(--ui-yellow); }
.metric-alert { background: #fcf7f0; border-color: #eadaca; }
.metric-alert .metric-icon { color: var(--ui-red); background: var(--ui-red-soft); border-color: #edd2ca; }
.metric-alert .metric-signal { width: 22px; background: var(--ui-red); }

.dashboard-grid, .dashboard-lower { gap: 12px; }
.panel, .status-card { border-radius: 14px; box-shadow: 0 8px 20px rgba(55, 44, 27, .05); }
.panel { padding: 23px; }
.panel-heading { margin-bottom: 25px; padding-bottom: 14px; border-bottom: 1px solid #e9e2d7; }
.panel-heading h2, .status-card h2 { font-size: 21px; letter-spacing: -.045em; }
.chart-panel { min-height: 366px; }
.chart-area { height: 250px; padding-top: 18px; border-top: 0; background: repeating-linear-gradient(to top, transparent 0 49px, #eee7dc 50px); }
.chart-bar { width: min(34px, 74%); border-radius: 5px 5px 2px 2px; background: #e9e2d7; }
.chart-bar i { border-radius: 5px 5px 2px 2px; background: var(--ui-ink); box-shadow: none; }
.status-card { min-height: 366px; padding: 25px; border: 1px solid #080808; }
.status-card-top { padding-bottom: 17px; border-bottom: 1px solid rgba(255,255,255,.13); }
.status-card h2 { margin-top: 25px; font-size: 27px; }
.status-card p { margin-bottom: 24px; }
.status-line { padding: 13px 0; }
.status-link { margin-top: 21px; }
.campaign-row, .event-row { padding: 16px 0; border-top-color: #e9e2d7; }
.campaign-mark { width: 33px; height: 33px; border-radius: 9px; background: #f0eadc; color: var(--ui-ink); }
.campaign-progress em { background: #e7dfd2; }
.campaign-progress em i { background: var(--ui-ink); }
.event-status { box-shadow: 0 0 0 4px #e6ecdf; }
.event-status.failure { box-shadow: 0 0 0 4px var(--ui-red-soft); }
@media (max-width: 680px) {
  .metric-card { min-height: 166px; padding: 16px; }
  .metric-top { margin-bottom: 20px; }
  .metric-card strong { font-size: 31px; }
  .metric-bottom { margin-top: 19px; }
  .panel-heading { margin-bottom: 19px; }
}

/* Final dashboard polish: each metric has its own operational meaning. */
.metric-card { border-top-width: 3px; border-top-color: #cfc6b6; }
.metric-card.metric-live { border-top-color: var(--ui-green); }
.metric-card.metric-total { border-top-color: var(--ui-ink); }
.metric-card.metric-contacts { border-top-color: var(--ui-yellow); }
.metric-card.metric-alert { border-top-color: var(--ui-red); }
.metric-card .metric-label { max-width: 190px; }
.metric-card strong { font-variant-numeric: tabular-nums; }
.metric-card.metric-alert strong { color: var(--ui-red); }
.metric-card.metric-alert .metric-bottom { border-top-color: #eadaca; }
.chart-panel, .status-card { position: relative; }
.chart-panel::before, .status-card::before { content: ""; position: absolute; top: 0; left: 23px; width: 38px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ui-ink); }
.status-card::before { left: 25px; background: #c9d8bc; }
.dashboard-lower .panel { min-height: 250px; }
.insight-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 12px; margin-top: 12px; }
.insight-grid .panel { min-height: 244px; }
.panel-caption { color: var(--ui-faint); font-size: 10px; font-weight: 750; }
.delivery-content { display: grid; grid-template-columns: 144px minmax(0, 1fr); align-items: center; gap: 25px; min-height: 145px; }
.delivery-ring { --progress: 0%; display: grid; place-content: center; width: 128px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--ui-green) 0 var(--progress), #e7dfd2 var(--progress) 100%); position: relative; text-align: center; }
.delivery-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--ui-surface); }
.delivery-ring strong, .delivery-ring small { position: relative; z-index: 1; }
.delivery-ring strong { font-size: 27px; letter-spacing: -.055em; line-height: 1; }
.delivery-ring small { margin-top: 5px; color: var(--ui-muted); font-size: 10px; font-weight: 750; }
.delivery-total { display: flex; align-items: baseline; gap: 9px; margin-bottom: 17px; }
.delivery-total strong { font-size: 26px; letter-spacing: -.05em; }
.delivery-total span { color: var(--ui-muted); font-size: 11px; }
.stacked-bar { display: flex; height: 9px; overflow: hidden; border-radius: 2px; background: #e7dfd2; }
.stacked-bar i { display: block; min-width: 0; }
.stacked-success { background: var(--ui-green); }
.stacked-failed { background: var(--ui-red); }
.stacked-pending { background: var(--ui-yellow); }
.delivery-legend { display: flex; flex-wrap: wrap; gap: 12px 17px; margin-top: 13px; }
.delivery-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--ui-muted); font-size: 10px; }
.delivery-legend b { color: var(--ui-ink); }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.success { background: var(--ui-green); }
.legend-dot.failed { background: var(--ui-red); }
.legend-dot.pending { background: var(--ui-yellow); }
.live-label { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid #d2ddc9; border-radius: 6px; color: var(--ui-green); background: var(--ui-green-soft); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.live-label i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.queue-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 2px 0 26px; }
.queue-metrics > div { min-width: 0; padding: 0 16px; border-left: 1px solid #e9e2d7; }
.queue-metrics > div:first-child { padding-left: 0; border-left: 0; }
.queue-metrics span, .queue-metrics small { display: block; color: var(--ui-muted); font-size: 10px; }
.queue-metrics strong { display: block; margin: 8px 0 4px; font-size: 25px; letter-spacing: -.05em; }
.queue-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid #e9e2d7; color: var(--ui-muted); font-size: 11px; }
.queue-foot .status-dot { width: 6px; height: 6px; box-shadow: none; }
.queue-foot .text-link { margin-left: auto; white-space: nowrap; }
.delivery-panel, .queue-panel { background: #fbf8f1; }
.delivery-ring { background: conic-gradient(var(--ui-green) 0 var(--progress), #ded5c5 var(--progress) 100%); }
.delivery-ring::after { background: #fbf8f1; }
.stacked-bar { border: 1px solid #dcd2c2; background: #ece5d9; }
.queue-metrics strong { font-variant-numeric: tabular-nums; }
.campaign-row { gap: 10px; }
.campaign-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; color: inherit; }
.campaign-test-form { flex: 0 0 auto; margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 31px; padding: 0 9px; border: 1px solid #d8cebf; border-radius: 7px; color: var(--ui-muted); background: #f6f0e5; font-size: 10px; font-weight: 850; cursor: pointer; transition: color .18s, border-color .18s, background .18s, transform .18s; }
.icon-btn svg { width: 13px; height: 13px; }
.icon-btn:hover { border-color: var(--ui-ink); color: var(--ui-ink); background: #fffdf8; transform: translateY(-1px); }
.campaign-test { letter-spacing: .02em; }
.metric-card.metric-live { background: #f4f7ee; border-color: #d1dbc6; }
.metric-card.metric-live .metric-label, .metric-card.metric-live .metric-bottom small { color: #66715b; }
.metric-card.metric-total { border-color: #111; background: #111; color: #fff; box-shadow: 0 12px 24px rgba(17,17,17,.14); }
.metric-card.metric-total .metric-icon { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: #fff; }
.metric-card.metric-total .metric-period { border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.68); }
.metric-card.metric-total .metric-label, .metric-card.metric-total .metric-bottom small { color: rgba(255,255,255,.62); }
.metric-card.metric-total strong { color: #fff; }
.metric-card.metric-total .metric-bottom { border-top-color: rgba(255,255,255,.17); }
.metric-card.metric-total .metric-signal { background: #d9dfc9; }
.metric-card.metric-contacts { background: #f7f0e2; border-color: #e5d8bf; }
.metric-card.metric-contacts .metric-label { color: #806f58; }
.metric-card.metric-alert { background: #fbefeb; border-color: #e7cfc6; }
.metric-card.metric-alert .metric-label, .metric-card.metric-alert .metric-bottom small { color: #8d6259; }
.metric-card.metric-alert .metric-period { border-color: #e7cfc6; color: #8d6259; }
.delivery-panel { border-left: 4px solid var(--ui-green); }
.queue-panel { border-left: 4px solid var(--ui-yellow); }
.delivery-panel .panel-heading, .queue-panel .panel-heading { padding-bottom: 16px; }
.campaign-test-form .icon-btn { border-color: #c7bba9; background: #fffaf0; color: #564e43; }
.campaign-test-form .icon-btn:hover { border-color: var(--ui-ink); background: var(--ui-ink); color: #fff; }
@media (max-width: 960px) { .insight-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .delivery-content { grid-template-columns: 1fr; justify-items: center; } .delivery-breakdown { width: 100%; } .queue-metrics > div { padding: 0 8px; } .queue-foot { align-items: flex-start; flex-wrap: wrap; } .queue-foot .text-link { margin-left: 0; width: 100%; } .campaign-main { align-items: flex-start; } .campaign-progress { width: 72px; } .icon-btn { padding: 0 7px; } .icon-btn span { display: none; } }
