:root {
    color-scheme: light;
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #eaf0f8;
    --sidebar: #0d1729;
    --sidebar-soft: #17243a;
    --text: #13213a;
    --muted: #64748b;
    --border: #dce4ef;
    --border-strong: #cbd6e4;
    --primary: #0b6fdc;
    --primary-dark: #075ab5;
    --network: #18a6d9;
    --success: #0f9f6e;
    --warning: #d97706;
    --danger: #dc3f4b;
    --purple: #7c4dff;
    --shadow: 0 18px 45px rgba(31, 53, 89, 0.08);
    --shadow-small: 0 8px 24px rgba(31, 53, 89, 0.08);
    --radius: 10px;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c1422;
    --surface: #121e30;
    --surface-soft: #17253a;
    --surface-strong: #1c2d45;
    --sidebar: #08101d;
    --sidebar-soft: #142238;
    --text: #edf4ff;
    --muted: #9fb0c7;
    --border: #263a54;
    --border-strong: #37506e;
    --primary: #48a6ff;
    --primary-dark: #2587e3;
    --network: #38c7ec;
    --success: #2dc991;
    --warning: #f5a524;
    --danger: #f56b76;
    --purple: #a98aff;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
    --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(30, 95, 150, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 95, 150, .035) 1px, transparent 1px),
        radial-gradient(circle at 75% -10%, rgba(36, 107, 253, 0.11), transparent 32rem),
        var(--bg);
    background-size: 28px 28px, 28px 28px, auto, auto;
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 260px;
    display: flex;
    flex-direction: column;
    padding: 26px 18px 20px;
    color: #d8e5f7;
    background: linear-gradient(180deg, var(--sidebar), #0a1322 72%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
.brand-mark { width: 45px; height: 45px; padding: 7px; color: #7ddcff; fill: rgba(24,166,217,.22); stroke: currentColor; stroke-width: 1.6; background: rgba(24,166,217,.08); border: 1px solid rgba(125,220,255,.25); }
.brand strong { display: block; color: white; letter-spacing: 0.075em; font-size: 15px; }
.brand small { display: block; margin-top: 2px; color: #89a0bd; font-size: 12px; }
.network-line { height: 18px; margin: -10px 10px 4px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.network-line::before { content:""; position:absolute; left:4px; right:4px; height:1px; background:linear-gradient(90deg, transparent, #275b79, transparent); }
.network-line span { z-index:1; width:5px; height:5px; border-radius:50%; background:#3bbfe7; box-shadow:0 0 10px rgba(59,191,231,.7); }

.nav { flex: 1; overflow-y: auto; }
.nav-label {
    margin: 22px 12px 8px; color: #607792; font-size: 10px;
    font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
}
.nav-link {
    display: flex; align-items: center; gap: 12px; min-height: 44px;
    margin: 4px 0; padding: 9px 12px; border-radius: 11px;
    color: #aabbd1; font-size: 14px; font-weight: 600; transition: 0.18s ease;
}
.nav-link:hover { color: white; background: rgba(255, 255, 255, 0.06); }
.nav-link.active { color: white; background: linear-gradient(90deg, rgba(36, 107, 253, 0.32), rgba(36, 107, 253, 0.10)); }
.nav-icon {
    min-width: 28px; color: #6d88aa; font-size: 10px; font-weight: 800;
    letter-spacing: 0.05em;
}
.nav-link.active .nav-icon { color: #82a9ff; }

.sidebar-footer {
    display: flex; align-items: center; gap: 10px; padding: 14px;
    border: 1px solid rgba(125, 220, 255, 0.12); border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
}
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; color: #eaf2ff; }
.sidebar-footer small { color: #7187a3; font-size: 10px; margin-top: 2px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #31d69a; box-shadow: 0 0 0 5px rgba(49, 214, 154, 0.12); }

.main-column { min-height: 100vh; margin-left: 260px; }
.topbar {
    position: sticky; top: 0; z-index: 20; height: 72px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 0 34px; background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
}
.topbar-context { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.environment-pill { display:inline-flex;align-items:center;gap:7px;padding:6px 10px;color:var(--primary);background:rgba(36,107,253,.09);border-radius:4px;font-weight:800;letter-spacing:.04em;text-transform:uppercase; }
.pulse-dot { width:7px;height:7px;border-radius:50%;background:var(--success);box-shadow:0 0 0 4px color-mix(in srgb,var(--success) 15%,transparent); }
.topbar-separator { width: 1px; height: 18px; background: var(--border-strong); }
.theme-toggle, .icon-button {
    border: 1px solid var(--border); color: var(--text); background: var(--surface);
    border-radius: 5px; padding: 9px 13px; cursor: pointer; font-weight: 700;
}
.theme-toggle:hover, .icon-button:hover { border-color: var(--primary); color: var(--primary); }
.mobile-menu { display: none; }
.topbar-actions { display:flex;align-items:center;gap:10px; }
.utc-clock { color:var(--muted);font-size:11px;letter-spacing:.06em; }
.live-state { padding:5px 8px;border:1px solid color-mix(in srgb,var(--success) 32%,var(--border));color:var(--success);background:color-mix(in srgb,var(--success) 7%,transparent);font-size:9px;font-weight:900;letter-spacing:.12em; }
.live-state.offline { color:var(--warning);border-color:color-mix(in srgb,var(--warning) 40%,var(--border)); }

.page { width: min(1500px, calc(100% - 64px)); margin: 0 auto; padding: 38px 0 64px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.page-header h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.035em; }
.page-description { max-width: 720px; margin: 11px 0 0; color: var(--muted); font-size: 15px; }
.page-actions, .action-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.panel {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.panel::before { content:"";display:block;height:2px;background:linear-gradient(90deg,var(--primary),var(--network),transparent 68%);opacity:.65; }
.panel + .panel { margin-top: 22px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--border); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 18px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.panel-body { padding: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
    position: relative; min-height: 130px; padding: 20px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
    box-shadow: var(--shadow-small);
}
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -45px; top: -45px; transform:rotate(45deg); background: var(--stat-color, var(--primary)); opacity: 0.09; }
.stat-code { display:block;margin-bottom:9px;color:var(--stat-color,var(--primary));font:800 9px/1 "SFMono-Regular",Consolas,monospace;letter-spacing:.12em; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { display: block; margin-top: 15px; font-size: 32px; line-height: 1; letter-spacing: -0.04em; }
.stat-card.blue { --stat-color: var(--primary); }
.stat-card.green { --stat-color: var(--success); }
.stat-card.orange { --stat-color: var(--warning); }
.stat-card.red { --stat-color: var(--danger); }
.stat-card.purple { --stat-color: var(--purple); }
.stat-card.slate { --stat-color: var(--muted); }

.workflow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.workflow-card { display: flex; flex-direction: column; min-height: 180px; padding: 20px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); }
.step-number { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary); background: rgba(36, 107, 253, 0.10); border-radius: 3px; font-size: 11px; font-weight: 900; }
.workflow-card h3 { margin: 15px 0 6px; font-size: 16px; }
.workflow-card p { flex: 1; margin: 0 0 18px; color: var(--muted); font-size: 13px; }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 5px;
    color: white; background: var(--primary); cursor: pointer; font-weight: 750; font-size: 13px;
    transition: 0.18s ease;
}
.button:hover { transform: translateY(-1px); background: var(--primary-dark); box-shadow: 0 8px 18px rgba(36, 107, 253, 0.18); }
.button.secondary { color: var(--text); background: var(--surface); border-color: var(--border-strong); box-shadow: none; }
.button.secondary:hover { color: var(--primary); border-color: var(--primary); }
.button.success { background: var(--success); }
.button.warning { background: var(--warning); }
.button.danger { background: var(--danger); }
.button.purple { background: var(--purple); }
.button.small { min-height: 34px; padding: 7px 11px; font-size: 12px; border-radius: 4px; }
.button:disabled { opacity: 0.48; cursor: not-allowed; transform: none; box-shadow: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-field { min-width: 0; }
.form-field.full { grid-column: 1 / -1; }
.form-field label, .field-label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 750; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
input, select, textarea {
    width: 100%; min-height: 44px; padding: 10px 12px;
    color: var(--text); background: var(--surface-soft); border: 1px solid var(--border-strong);
    border-radius: 10px; outline: none; transition: 0.16s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(36, 107, 253, 0.10); }
textarea { min-height: 190px; resize: vertical; }
input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--primary); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.checkbox-row label { margin: 0; cursor: pointer; }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 13px 16px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--border); text-align: left; font-size: 10px; font-weight: 850; letter-spacing: 0.075em; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-soft) 75%, transparent); }
.table-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 220px; }
.table-actions form { display: inline-flex; margin: 0; }
.truncate { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--surface-strong); color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success, .badge.sent, .badge.online, .badge.running, .badge.valid { color: var(--success); background: color-mix(in srgb, var(--success) 11%, transparent); }
.badge.warning, .badge.pending, .badge.retry, .badge.paused, .badge.review { color: var(--warning); background: color-mix(in srgb, var(--warning) 11%, transparent); }
.badge.danger, .badge.failed, .badge.offline, .badge.invalid { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.badge.processing, .badge.ready, .badge.info { color: var(--primary); background: color-mix(in srgb, var(--primary) 11%, transparent); }
.badge.suppressed { color: var(--muted); background:var(--surface-strong); }
.badge.provider-limited, .badge.cooling-down, .badge.rate-limited { color: var(--warning); background: color-mix(in srgb, var(--warning) 11%, transparent); }

.notice { padding: 15px 17px; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 13px; }
.notice.warning { border-left-color: var(--warning); }
.notice.danger { border-left-color: var(--danger); }
.notice strong { color: var(--text); }

.empty-state { padding: 54px 24px; text-align: center; color: var(--muted); }
.empty-state.compact { padding:24px;grid-column:1/-1; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--text); font-size: 16px; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-top: 1px solid var(--border); }
.pagination-links { display: flex; gap: 8px; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.activity-list { display: grid; gap: 0; }
.activity-row { display: grid; grid-template-columns: 90px 110px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.activity-row:last-child { border-bottom: 0; }
.activity-row time, .activity-row .source { color: var(--muted); }

.delivery-console-panel { overflow:hidden; }
.delivery-console { max-height:420px;overflow:auto;padding:10px 18px 18px;background:#07111f;color:#dce9f8;font-family:"Cascadia Code",Consolas,"Courier New",monospace; }
.delivery-line { display:grid;grid-template-columns:72px minmax(150px,.8fr) minmax(240px,1.35fr) 100px minmax(200px,1fr);gap:14px;align-items:center;padding:11px 0;border-bottom:1px solid rgba(148,180,218,.16);font-size:12px; }
.delivery-line:last-child { border-bottom:0; }
.delivery-line time { color:#79a7d8; }
.delivery-worker { color:#7dd3fc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.delivery-recipient { color:#f8fbff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.delivery-detail { color:#9bb1c9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.console-empty { padding:24px 0;color:#9bb1c9; }

.live-pill { display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid color-mix(in srgb,var(--success) 34%,var(--border));color:var(--success);background:color-mix(in srgb,var(--success) 7%,transparent);font-size:10px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap; }
.live-pill > span { width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px color-mix(in srgb,currentColor 13%,transparent); }
.live-pill.offline { color:var(--warning); }
.smtp-node-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px; }
.smtp-node { position:relative;min-width:0;padding:17px;border:1px solid var(--border);background:linear-gradient(145deg,var(--surface-soft),var(--surface));box-shadow:inset 3px 0 0 var(--network); }
.smtp-node-head,.node-metrics { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.node-id { color:var(--network);font:850 10px/1 "SFMono-Regular",Consolas,monospace;letter-spacing:.1em; }
.smtp-node h3 { margin:18px 0 4px;font-size:16px; }
.smtp-node p { margin:0;color:var(--muted);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.meter { height:5px;margin:18px 0 8px;background:var(--surface-strong);overflow:hidden; }
.meter span { display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--network)); }
.node-metrics { color:var(--muted);font-size:10px;font-weight:700; }
.smtp-node .node-warning { margin-top:12px;padding-top:10px;border-top:1px solid var(--border);color:var(--warning); }
.smtp-advisories { margin-top:8px;max-width:260px; }
.smtp-advisories summary { color:var(--warning);font-size:11px;font-weight:800;cursor:pointer; }
.smtp-advisories p { margin:7px 0 0;color:var(--muted);font-size:11px; }

.builder-layout { display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);gap:20px;align-items:start; }
.builder-controls { min-width:0; }
.builder-preview-stack { display:grid;gap:20px;position:sticky;top:92px;min-width:0; }
.editor-field { margin-top:22px; }
.editor-toolbar { display:flex;gap:6px;flex-wrap:wrap;padding:9px;border:1px solid var(--border-strong);border-bottom:0;background:var(--surface-strong); }
.editor-toolbar button { min-height:32px;padding:5px 9px;border:1px solid var(--border);border-radius:3px;color:var(--text);background:var(--surface);cursor:pointer;font-size:11px;font-weight:700; }
.editor-toolbar button:hover { color:var(--primary);border-color:var(--primary); }
.message-editor { min-height:300px;padding:22px;border:1px solid var(--border-strong);background:var(--surface);outline:none;overflow:auto;line-height:1.65; }
.message-editor:focus { border-color:var(--primary);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent); }
.message-editor h1,.message-editor h2,.message-editor h3 { color:var(--text); }
.html-source-editor { min-height:420px;font-family:"Cascadia Code",Consolas,"Courier New",monospace;font-size:13px;line-height:1.55;tab-size:2;white-space:pre; }
.preview-panel iframe { display:block;width:100%;height:500px;border:0;background:white; }
.text-preview { min-height:210px;max-height:330px;margin:0;padding:20px;overflow:auto;white-space:pre-wrap;color:var(--text);background:var(--surface-soft);font:12px/1.65 "SFMono-Regular",Consolas,monospace; }
.builder-status { margin-left:auto;font-size:11px;font-weight:700; }
.inline-advisory { margin-top:10px;padding:10px 12px;border-left:3px solid var(--primary);background:var(--surface-soft);color:var(--muted);font-size:11px; }
.inline-advisory.warning { border-left-color:var(--warning); }
.worker-choice-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:9px; }
.worker-choice { display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid var(--border);background:var(--surface-soft);cursor:pointer; }
.worker-choice:has(input:checked) { border-color:var(--primary);box-shadow:inset 3px 0 0 var(--primary); }
.worker-choice input { width:auto;margin-top:3px; }

.sidebar-scrim { display: none; }

@media (max-width: 1050px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
    .main-column { margin-left: 0; }
    .mobile-menu { display: inline-flex; }
    body.sidebar-open .sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(1, 8, 18, 0.55); }
    .builder-layout { grid-template-columns:1fr; }
    .builder-preview-stack { position:static;grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
    .topbar { height: 64px; padding: 0 18px; }
    .topbar-context { display: none; }
    .utc-clock,.live-state { display:none; }
    .page { width: min(100% - 28px, 1500px); padding-top: 26px; }
    .page-header { flex-direction: column; }
    .page-actions { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field.full { grid-column: auto; }
    .panel-header { align-items: flex-start; flex-direction: column; }
    .activity-row { grid-template-columns: 1fr; gap: 3px; }
    .delivery-line { grid-template-columns:1fr;gap:4px; }
    .builder-preview-stack { grid-template-columns:1fr; }
    .builder-status { width:100%;margin-left:0; }
}

/* Live dashboard SMTP controls and conservative connection-health display. */
.smtp-health-line { display:flex;align-items:center;gap:9px;margin-top:12px;min-width:0; }
.smtp-health-detail { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:10px;font-weight:650; }
.smtp-node-actions { display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:14px;padding-top:13px;border-top:1px solid var(--border); }
.smtp-node-actions form { margin:0; }
.smtp-node-actions .button { min-height:30px; }
.smtp-node-footnote { margin-top:9px !important;color:var(--muted) !important;font-size:10px !important; }
.badge.slate, .badge.stopped, .badge.inactive { color:var(--muted);background:var(--surface-strong); }

.smtp-diagnostic-panel {
    grid-column: 1 / -1;
    margin-top: 26px;
    padding: 20px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
}
.smtp-diagnostic-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}
.smtp-diagnostic-heading h3 { margin: 0; font-size: 18px; }
.smtp-diagnostic-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; max-width: 760px; }
.smtp-diagnostic-fields { margin-top: 18px; }
.smtp-diagnostic-actions { margin-top: 16px; }
.smtp-save-readiness { color: var(--muted); font-size: 12px; font-weight: 700; }
.smtp-save-readiness.ready { color: var(--success); }
.smtp-save-readiness.blocked { color: var(--danger); }
.smtp-diagnostic-result {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.smtp-diagnostic-summary { padding: 18px; border-bottom: 1px solid var(--border); }
.smtp-diagnostic-summary h4 { margin: 0 0 6px; font-size: 16px; }
.smtp-diagnostic-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.smtp-readiness-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:14px; }
.smtp-readiness-card { padding:12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-soft); }
.smtp-readiness-card strong { display:block; font-size:18px; }
.smtp-readiness-card span { color:var(--muted); font-size:11px; }
.smtp-diagnostic-checks { display:grid; }
.smtp-diagnostic-check { display:grid; grid-template-columns:minmax(150px,.45fr) minmax(0,1fr); gap:14px; padding:14px 18px; border-bottom:1px solid var(--border); }
.smtp-diagnostic-check:last-child { border-bottom:0; }
.smtp-diagnostic-check p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.smtp-diagnostic-check .badge { width:max-content; }
@media (max-width: 720px) {
    .smtp-diagnostic-heading { flex-direction:column; }
    .smtp-readiness-grid { grid-template-columns:1fr; }
    .smtp-diagnostic-check { grid-template-columns:1fr; }
}

/* Production access */
.topbar-user{font-size:12px;font-weight:800;letter-spacing:.04em;padding:7px 10px;border:1px solid var(--border);border-radius:999px;white-space:nowrap}
.topbar-logout{margin:0;display:inline-flex}
