:root {
    --bg: #000000;
    --bg-soft: #15161a;
    --panel: #1f2025;
    --panel-2: #24252b;
    --line: #2c2d33;
    --line-strong: rgba(32, 146, 216, 0.62);
    --text: #ffffff;
    --muted: #9da5b4;
    --accent: #2092d8;
    --accent-soft: rgba(32, 146, 216, 0.12);
    --success: #5ee58f;
    --danger: #ff7b8f;
    --amber: #f7c45d;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    background: #000000;
}

a { color: var(--accent); text-decoration: none; }
pre, code { font-family: Consolas, "Courier New", monospace; }

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.sidebar {
    padding: 28px 20px;
    background: rgba(3, 7, 13, 0.86);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.tagline {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.nav a {
    display: block;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.025);
    color: var(--text);
}

.nav a:hover {
    border-color: var(--line-strong);
    background: rgba(32, 146, 216, 0.10);
}

.content { padding: 28px; }

.site-footer {
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.site-footer-inner {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0 0 10px;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

.site-footer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer-public {
    width: min(760px, 100%);
    margin: 22px auto 0;
    text-align: center;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.hero h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: 0.01em; }
.hero p { margin: 0; max-width: 860px; color: var(--muted); line-height: 1.7; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.editor-layout { grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); align-items: start; }
.grid.html-editor-layout { grid-template-columns: minmax(520px, 1.05fr) minmax(420px, 0.95fr); align-items: start; }

.panel {
    background: #1f2025;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.card,
.stat {
    background: #1f2025;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.card { margin-top: 18px; }
.grid > .card, .grid > .stat { margin-top: 0; }

.stat span,
.stat strong {
    display: block;
}

.stat span {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat strong {
    font-size: 20px;
}

.kpi { font-size: 30px; font-weight: 700; margin-top: 6px; }
.kpi-sm { font-size: 20px; font-weight: 700; margin-top: 10px; }
.muted { color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table.compact th, .table.compact td { padding: 9px 8px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select {
    width: 100%;
    background: rgba(4, 8, 14, 0.88);
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
}

.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--line-strong); }

.card label,
.stacked-form label,
.inline-edit-card label,
.incident-edit-card label {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.card input:not([type="checkbox"]),
.card textarea,
.card select,
.stacked-form input:not([type="checkbox"]),
.stacked-form textarea,
.stacked-form select,
.inline-edit-card input:not([type="checkbox"]),
.inline-edit-card textarea,
.inline-edit-card select,
.incident-edit-card input:not([type="checkbox"]),
.incident-edit-card textarea,
.incident-edit-card select {
    width: 100%;
    margin-top: 6px;
    background: rgba(4, 8, 14, 0.88);
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
}

.card textarea,
.stacked-form textarea,
.inline-edit-card textarea,
.incident-edit-card textarea {
    min-height: 110px;
    resize: vertical;
}

.card input:focus,
.card textarea:focus,
.card select:focus,
.stacked-form input:focus,
.stacked-form textarea:focus,
.stacked-form select:focus,
.inline-edit-card input:focus,
.inline-edit-card textarea:focus,
.inline-edit-card select:focus,
.incident-edit-card input:focus,
.incident-edit-card textarea:focus,
.incident-edit-card select:focus {
    border-color: var(--line-strong);
}

.btn, .subbtn {
    cursor: pointer;
    border-radius: 999px;
    font-weight: 600;
}

.btn {
    border: 0;
    padding: 12px 18px;
    background: #2092d8;
    color: #ffffff;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--line);
}

.btn.ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(32, 146, 216, 0.34);
}

.btn.warn {
    background: #f59e0b;
    color: #000000;
}

.btn.danger {
    color: #fff;
    background: linear-gradient(135deg, #d94b5b, #a92f43);
    border-color: rgba(255, 107, 122, 0.55);
}

.subbtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    border: 1px solid var(--line);
    font-size: 12px;
}

.subbtn:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.flash {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.flash.success { background: rgba(94, 229, 143, 0.1); }
.flash.error { background: rgba(255, 123, 143, 0.1); }

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-blue { background: rgba(32, 146, 216, 0.14); color: #9ecff0; }
.badge-green { background: rgba(94, 229, 143, 0.14); color: #9af1b8; }
.badge-amber { background: rgba(247, 196, 93, 0.14); color: #f9d98f; }
.badge-gray, .badge-outline { background: rgba(255, 255, 255, 0.05); color: var(--muted); }

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.login-card {
    width: min(460px, 100%);
    padding: 28px;
    border-radius: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.public-home {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 28px;
    background: #000;
    color: #fff;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.public-home-card {
    width: min(660px, 100%);
    padding: 48px;
    text-align: center;
    border: 1px solid #2c2d33;
    border-top: 4px solid #2092d8;
    border-radius: 28px;
    background: #1f2025;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.public-home-card img { display: block; max-width: 260px; max-height: 100px; margin: 0 auto 30px; }
.public-home-card h1 { margin: 8px 0 16px; font-family: "Red Hat Display", Inter, Arial, sans-serif; font-size: clamp(34px, 7vw, 58px); letter-spacing: -0.03em; }
.public-home-card p:not(.eyebrow) { max-width: 540px; margin: 0 auto 28px; color: #9da5b4; line-height: 1.7; }
.public-home-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.subscribe-card { text-align: left; }
.subscribe-card h1, .subscribe-card p { text-align: center; }
.subscribe-form { max-width: 460px; margin: 0 auto; }
.subscribe-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.checklist label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-audience-list {
    grid-template-columns: minmax(0, 1fr);
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
}

.message-audience-actions {
    display: flex;
    gap: 8px;
    margin: 0 0 10px;
}

.field .message-audience-list .message-audience-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.quick-alert-audience .message-audience-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.field .message-audience-list .message-audience-row:hover,
.field .message-audience-list .message-audience-row:has(input:checked),
.quick-alert-audience .message-audience-row:hover,
.quick-alert-audience .message-audience-row:has(input:checked) {
    border-color: rgba(32, 146, 216, 0.48);
    background: rgba(32, 146, 216, 0.10);
}

.field .message-audience-list input[type="checkbox"],
.quick-alert-audience input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0;
    accent-color: var(--accent);
}

.message-audience-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.message-audience-count {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.quick-alert-preview-shell {
    padding: 28px;
    border: 1px solid rgba(141, 160, 191, 0.16);
    border-radius: 24px;
    background: radial-gradient(circle at top, rgba(32, 146, 216, 0.10), transparent 34%), #000000;
}

.quick-alert-logo {
    text-align: center;
    margin-bottom: 18px;
}

.quick-alert-logo img {
    max-width: 210px;
    max-height: 90px;
}

.quick-alert-card {
    border: 1px solid #2c2d33;
    border-top: 4px solid #2092d8;
    border-radius: 26px;
    padding: 30px;
    background: #1f2025;
}

.quick-alert-card[data-alert-type="urgent"] { border-top-color: #ef4444; }
.quick-alert-card[data-alert-type="warning"] { border-top-color: #f59e0b; }
.quick-alert-card[data-alert-type="success"] { border-top-color: #22c55e; }

.quick-alert-kicker {
    margin-bottom: 16px;
    color: #2092d8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.quick-alert-card[data-alert-type="urgent"] .quick-alert-kicker { color: #fca5a5; }
.quick-alert-card[data-alert-type="warning"] .quick-alert-kicker { color: #fcd34d; }
.quick-alert-card[data-alert-type="success"] .quick-alert-kicker { color: #86efac; }

.quick-alert-card h1 {
    margin: 0 0 20px;
    color: #fff;
    font-size: clamp(26px, 4vw, 34px);
    line-height: 1.18;
}

.quick-alert-preview-message {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.75;
}

.preview-frame {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #02060b;
}

.preview-frame.tall { min-height: 760px; }
.preview-stack { position: sticky; top: 24px; }

.builder-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.builder-panel {
    background: linear-gradient(180deg, rgba(10, 16, 28, 0.98), rgba(6, 10, 18, 0.96));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.builder-sidebar,
.builder-inspector {
    position: sticky;
    top: 24px;
}

.builder-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.builder-panel-head h2,
.builder-utility h3 {
    margin: 0;
}

.builder-palette {
    display: grid;
    gap: 10px;
}

.builder-palette button,
.builder-media-list button {
    cursor: grab;
    width: 100%;
    min-height: 44px;
    text-align: left;
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    padding: 12px 14px;
    font-weight: 700;
}

.builder-palette button:hover,
.builder-media-list button:hover {
    border-color: var(--line-strong);
    background: rgba(32, 146, 216, 0.10);
}

.builder-utility {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.builder-utility textarea {
    width: 100%;
    min-height: 120px;
    color: var(--text);
    border: 1px solid rgba(141, 160, 191, 0.22);
    border-radius: 14px;
    background: rgba(4, 8, 14, 0.88);
    padding: 12px 14px;
    resize: vertical;
}

.builder-toolbar {
    padding-top: 6px;
}

.builder-tabs {
    margin-top: 18px;
}

.builder-tab {
    display: none;
}

.builder-tab.active {
    display: block;
}

.builder-canvas-wrap {
    min-height: 620px;
    padding: 28px 14px 34px;
    border: 1px solid #2c2d33;
    border-radius: 22px;
    background: #000000;
    overflow: auto;
}

.builder-canvas {
    display: grid;
    width: min(700px, 100%);
    max-width: 700px;
    margin: 0 auto;
    gap: 0;
    background: #000000;
}

.builder-drop-zone {
    display: grid;
    min-height: 12px;
    place-items: center;
    border: 1px dashed transparent;
    border-radius: 999px;
    color: transparent;
    transition: min-height 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.builder-drop-zone span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.builder-drop-zone.active,
.builder-canvas:hover .builder-drop-zone {
    min-height: 28px;
    border-color: rgba(32, 146, 216, 0.55);
    background: rgba(32, 146, 216, 0.1);
    color: #9ecff0;
}

.builder-drop-zone.active {
    border-color: #2092d8;
    background: rgba(32, 146, 216, 0.18);
}

.builder-block {
    position: relative;
    border: 1px solid transparent;
    border-radius: 22px;
    background: transparent;
    padding: 0;
    cursor: default;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.builder-block:hover,
.builder-block.active {
    border-color: rgba(32, 146, 216, 0.68);
    background: rgba(32, 146, 216, 0.04);
    box-shadow: 0 0 0 2px rgba(32, 146, 216, 0.10);
}

.builder-block-overlay {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease;
}

.builder-block:hover .builder-block-overlay,
.builder-block.active .builder-block-overlay {
    opacity: 1;
    pointer-events: auto;
}

.builder-block-label {
    margin-right: auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(44, 45, 51, 0.88);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.builder-block-preview {
    margin: 0;
    padding: 0;
    border-radius: 22px;
    background: transparent;
    border: 0;
    overflow: hidden;
}

.builder-email-section {
    width: 100%;
    border-collapse: separate;
    color: #ffffff;
}

.builder-block-overlay button,
.builder-drag-handle {
    cursor: pointer;
    user-select: none;
    min-height: 34px;
    color: #c7d3dd;
    border: 1px solid rgba(44, 45, 51, 0.88);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.82);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
}

.builder-drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    color: #9ecff0;
    border-color: rgba(32, 146, 216, 0.55);
}

.builder-drag-handle:active {
    cursor: grabbing;
}

.builder-block-overlay button:hover,
.builder-drag-handle:hover {
    color: #ffffff;
    border-color: #2092d8;
    background: rgba(32, 146, 216, 0.22);
}

.builder-mini-header {
    display: grid;
    min-height: 82px;
    place-items: center;
}

.builder-mini-header img {
    max-width: 230px;
    max-height: 90px;
}

.builder-mini-eyebrow {
    color: #9da5b4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.builder-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.builder-mini-grid div {
    min-height: 120px;
    padding: 14px;
    border-radius: 14px;
    background: #1f2025;
    border: 1px solid #2c2d33;
}

.builder-mini-grid b,
.builder-mini-grid strong,
.builder-mini-grid span {
    display: block;
}

.builder-mini-grid b {
    color: #2092d8;
    margin-bottom: 10px;
}

.builder-mini-grid span {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.builder-mini-image {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 16px;
}

.builder-mini-button {
    display: inline-block;
    border-radius: 999px;
    background: #2092d8;
    color: #fff;
    padding: 12px 18px;
    font-weight: 800;
}

.builder-mini-divider {
    border: 0;
    height: 1px;
    background: #2c2d33;
}

.builder-mini-pipeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
    padding: 16px;
    border: 1px solid #2c2d33;
    border-radius: 16px;
    background: #000;
}

.builder-mini-pipeline span {
    display: grid;
    gap: 8px;
    place-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.builder-mini-pipeline i {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2092d8;
}

.builder-mini-pipeline .danger i {
    background: #ef4444;
}

.builder-mini-footer {
    border-top: 1px solid #2c2d33;
    padding-top: 16px;
    text-align: center;
    color: #7f8794;
    font-size: 12px;
    line-height: 1.6;
}

.builder-mini-footer strong {
    display: block;
    color: #9da5b4;
    margin-bottom: 6px;
}

.builder-mini-footer p {
    font-size: 12px;
}

.builder-mini-stat strong {
    display: block;
    color: #fff;
    font-size: 38px;
    margin: 8px 0;
}

.builder-drop-hint {
    border: 1px dashed rgba(141, 160, 191, 0.3);
    border-radius: 16px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.builder-source {
    min-height: 720px;
}

.builder-media-list {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.builder-media-list button {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.builder-media-list img {
    width: 54px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.builder-media-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkline {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
    font-size: 13px;
}

.toolbar, .subtoolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.subtoolbar { margin: 8px 0 12px; }

.preview-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.preview-meta-card {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.preview-meta-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inline-note {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(32, 146, 216, 0.22);
    background: rgba(32, 146, 216, 0.10);
    color: var(--muted);
}

.snippet {
    white-space: pre-wrap;
    color: #d9e4f5;
    background: rgba(4, 8, 14, 0.8);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    min-height: 120px;
}

.code-editor {
    min-height: 520px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    tab-size: 2;
}

.code-editor.short { min-height: 180px; }

.rich-editor {
    min-height: 360px;
    padding: 22px;
    color: #e5eefb;
    background: #000000;
    border: 1px solid rgba(141, 160, 191, 0.22);
    border-radius: 18px;
    overflow: auto;
}

.rich-editor:focus {
    border-color: var(--line-strong);
    outline: none;
    box-shadow: 0 0 0 3px rgba(32, 146, 216, 0.10);
}

.rich-editor table { max-width: 100%; }
.rich-editor a { color: #2092d8; }

.feature-list { display: grid; gap: 10px; }

.feature-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(141, 160, 191, 0.08);
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.stats-strip div {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.stats-strip strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.stats-strip span { color: var(--muted); font-size: 13px; }

.row-selected { background: rgba(32, 146, 216, 0.10); }

.subbtn.danger { color: #ff9b9b; border-color: rgba(255, 107, 107, 0.35); }
.list-table-panel { position: relative; z-index: 30; overflow: visible; }
.bulk-action-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(32, 146, 216, 0.10); }
.bulk-action-bar select { min-width: 220px; background: rgba(4, 8, 14, 0.9); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.select-column { width: 42px; text-align: center !important; }
.select-column input { width: 17px; height: 17px; cursor: pointer; }
.contact-sort { min-width: 150px; background: rgba(4, 8, 14, 0.9); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pagination-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted); }
.row-editor { position: relative; }
.row-editor[open] { z-index: 40; }
.row-editor > summary { list-style: none; cursor: pointer; }
.row-editor > summary::-webkit-details-marker { display: none; }
.popover-form {
    position: absolute;
    z-index: 20;
    right: 0;
    top: calc(100% + 8px);
    width: min(360px, 80vw);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #1f2025;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.contact-editor { width: min(440px, 80vw); }
.rate { color: #2092d8; font-weight: 700; }
.url-cell { max-width: 420px; overflow-wrap: anywhere; }
.recipient-profile {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(130px, 1fr));
    gap: 20px;
    align-items: start;
}
.recipient-profile span, .recipient-profile strong { display: block; }
.recipient-profile strong { margin-top: 6px; }
.profile-notes { grid-column: 1 / -1; }
.survey-preview { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: #1f2025; }
.eyebrow { color: #2092d8; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 700; }
.question-preview { margin: 20px 0; padding: 18px; border-radius: 16px; border: 1px solid #2c2d33; background: #1f2025; color: #fff; font-size: 18px; }
.rating-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.rating-preview span { padding: 12px 4px; text-align: center; border: 1px solid #2b4164; border-radius: 12px; font-weight: 700; }

.status-public {
    min-height: 100vh;
    margin: 0;
    background: #000;
    color: #fff;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.status-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.status-hero {
    display: grid;
    gap: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.status-logo-link img {
    width: min(280px, 70vw);
    height: auto;
}

.status-wordmark {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-panel {
    border: 1px solid #2c2d33;
    border-radius: 26px;
    background: #1f2025;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    padding: 28px;
    margin-bottom: 22px;
}

.status-overall {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    text-align: left;
    border-top: 5px solid #2092d8;
}

.status-overall.degraded,
.status-overall.notice,
.status-overall.maintenance { border-top-color: #f59e0b; }
.status-overall.outage { border-top-color: #ef4444; }

.status-overall h1 {
    margin: 8px 0;
    font-family: "Red Hat Display", Inter, Arial, sans-serif;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.status-overall p { color: #9da5b4; }

.status-dot {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #2092d8;
    box-shadow: 0 0 0 12px rgba(32, 146, 216, 0.16);
}

.status-dot.degraded,
.status-dot.notice,
.status-dot.maintenance { background: #f59e0b; box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.12); }
.status-dot.outage { background: #ef4444; box-shadow: 0 0 0 12px rgba(239, 68, 68, 0.12); }

.status-grid-public {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
    gap: 22px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title h2 { margin: 0; }
.section-title span { color: var(--muted); font-size: 13px; }

.status-component,
.status-incident-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}

.status-component {
    padding: 16px 0;
    border-top: 1px solid #2c2d33;
}

.status-component strong,
.status-component span,
.status-incident td span { display: block; }

.status-component div > span,
.status-incident-head p { color: #9da5b4; margin: 6px 0 0; }

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
    background: #000;
    border: 1px solid #2c2d33;
    color: #c7d3dd;
}

.status-badge.operational,
.status-badge.resolved { background: rgba(34, 197, 94, 0.16); border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.status-badge.degraded,
.status-badge.maintenance,
.status-badge.info,
.status-badge.minor,
.status-badge.scheduled,
.status-badge.monitoring { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.35); color: #fde68a; }
.status-badge.outage,
.status-badge.major,
.status-badge.critical,
.status-badge.investigating,
.status-badge.identified { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.35); color: #fecaca; }

.status-incident {
    padding: 20px 0;
    border-top: 1px solid #2c2d33;
}

.status-incident h3 { margin: 0; }

.status-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.status-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(32, 146, 216, 0.12);
    color: #c7d3dd;
    font-size: 12px;
}

.status-update {
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 3px solid #2092d8;
    border-radius: 0 14px 14px 0;
    background: rgba(32, 146, 216, 0.09);
}

.status-update strong span {
    margin-left: 8px;
    color: #8fa3c2;
    font-weight: 500;
}

.status-update p { margin: 8px 0 0; color: #c7d3dd; }

.honeypot {
    position: absolute;
    left: -9999px;
}

.stacked-form {
    display: grid;
    gap: 14px;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin-top: 10px;
}

.list-check-grid {
    max-height: 220px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(4, 8, 14, 0.35);
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-grid { gap: 12px; }

.notice-box {
    padding: 12px 14px;
    border: 1px solid rgba(32, 146, 216, 0.28);
    border-radius: 16px;
    background: rgba(32, 146, 216, 0.10);
    color: #cbd5e1;
}

.inline-edit-card {
    display: grid;
    grid-template-columns: 1fr 160px 90px auto;
    gap: 10px;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid rgba(141, 160, 191, 0.14);
}

.inline-edit-card textarea,
.inline-edit-card .actions {
    grid-column: 1 / -1;
}

.status-admin-summary h2 { margin-bottom: 6px; }

.wide-field { grid-column: 1 / -1; }

.status-link {
    color: #2092d8;
    font-weight: 800;
    text-decoration: none;
}

.component-manager-row {
    grid-template-columns: minmax(220px, 1.2fr) minmax(150px, 0.7fr) minmax(90px, 0.35fr) auto;
    align-items: end;
}

.incident-edit-card {
    display: grid;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid rgba(141, 160, 191, 0.14);
}

.incident-edit-card:first-of-type,
.component-manager-row:first-of-type {
    border-top: 0;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.media-card {
    overflow: hidden;
    border: 1px solid rgba(141, 160, 191, 0.16);
    border-radius: 22px;
    background: rgba(12, 20, 34, 0.74);
}

.media-thumb {
    display: grid;
    min-height: 170px;
    place-items: center;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.88));
}

.media-thumb img {
    display: block;
    width: 100%;
    max-height: 210px;
    object-fit: contain;
}

.media-card-body {
    display: grid;
    gap: 10px;
    padding: 14px;
}

@media (max-width: 1100px) {
    .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .builder-shell { grid-template-columns: 240px minmax(0, 1fr); }
    .builder-inspector { grid-column: 1 / -1; position: static; }
}

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.editor-layout, .grid.html-editor-layout { grid-template-columns: 1fr; }
    .builder-shell { grid-template-columns: 1fr; }
    .builder-sidebar { position: static; }
    .builder-mini-grid { grid-template-columns: 1fr; }
    .preview-stack { position: static; }
    .checklist { grid-template-columns: 1fr; }
    .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recipient-profile { grid-template-columns: 1fr; }
    .profile-notes { grid-column: auto; }
    .pagination-bar { align-items: flex-start; flex-direction: column; }
    .status-grid-public,
    .inline-edit-card,
    .component-manager-row,
    .check-grid { grid-template-columns: 1fr; }
    .status-overall,
    .status-component,
    .status-incident-head { align-items: flex-start; flex-direction: column; }
}

/* Barrett template theme reset: remove the original navy/purple admin skin. */
body,
.shell,
.content {
    background: #000000;
}

.sidebar {
    background: #000000;
    border-right: 1px solid #2c2d33;
    backdrop-filter: none;
}

.brand,
.hero h1,
.panel h1,
.panel h2,
.panel h3,
.card h1,
.card h2,
.card h3,
.stat strong,
.table td,
.builder-panel h2,
.builder-panel h3 {
    color: #ffffff;
}

.brand,
.hero h1,
.public-home-card h1,
.status-overall h1,
.quick-alert-card h1 {
    font-family: "Red Hat Display", Inter, Arial, Helvetica, sans-serif;
    letter-spacing: -0.025em;
}

.tagline,
.hero p,
.muted,
.field label,
.table th,
.stat span,
.message-audience-count,
.preview-meta-card strong {
    color: #9da5b4;
}

.nav a,
.panel,
.card,
.stat,
.login-card,
.builder-panel,
.preview-meta-card,
.feature-row,
.stats-strip div,
.survey-preview,
.question-preview,
.media-card,
.popover-form,
.notice-box,
.list-check-grid,
.inline-note,
.bulk-action-bar,
.public-home-card,
.status-panel {
    background: #1f2025;
    border-color: #2c2d33;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: none;
}

.panel,
.card,
.stat,
.builder-panel,
.status-panel {
    border-radius: 26px;
}

.nav a {
    border-radius: 12px;
}

.nav a:hover,
.nav a.active,
.field .message-audience-list .message-audience-row:hover,
.field .message-audience-list .message-audience-row:has(input:checked),
.quick-alert-audience .message-audience-row:hover,
.quick-alert-audience .message-audience-row:has(input:checked),
.row-selected,
.bulk-action-bar,
.inline-note,
.notice-box {
    background: rgba(32, 146, 216, 0.10);
    border-color: rgba(32, 146, 216, 0.48);
}

a,
.rate,
.eyebrow,
.status-link,
.rich-editor a {
    color: #2092d8;
}

.btn {
    background: #2092d8;
    color: #ffffff;
    border: 1px solid #2092d8;
}

.btn.secondary,
.btn.ghost,
.subbtn,
.builder-block-overlay button {
    background: #24252b;
    color: #c7d3dd;
    border: 1px solid #2c2d33;
}

.btn.secondary:hover,
.btn.ghost:hover,
.subbtn:hover,
.builder-block-overlay button:hover {
    color: #ffffff;
    border-color: #2092d8;
    background: rgba(32, 146, 216, 0.16);
}

.btn.warn {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #000000;
}

.btn.danger,
.subbtn.danger {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.46);
    color: #fecaca;
}

.field input,
.field textarea,
.field select,
.card input:not([type="checkbox"]),
.card textarea,
.card select,
.stacked-form input:not([type="checkbox"]),
.stacked-form textarea,
.stacked-form select,
.inline-edit-card input:not([type="checkbox"]),
.inline-edit-card textarea,
.inline-edit-card select,
.incident-edit-card input:not([type="checkbox"]),
.incident-edit-card textarea,
.incident-edit-card select,
.bulk-action-bar select,
.contact-sort,
.builder-utility textarea,
.code-editor,
.rich-editor {
    background: #000000;
    color: #ffffff;
    border-color: #2c2d33;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.card input:focus,
.card textarea:focus,
.card select:focus,
.stacked-form input:focus,
.stacked-form textarea:focus,
.stacked-form select:focus,
.inline-edit-card input:focus,
.inline-edit-card textarea:focus,
.inline-edit-card select:focus,
.incident-edit-card input:focus,
.incident-edit-card textarea:focus,
.incident-edit-card select:focus,
.rich-editor:focus {
    border-color: #2092d8;
    box-shadow: 0 0 0 3px rgba(32, 146, 216, 0.14);
}

.table th,
.table td,
.feature-row,
.inline-edit-card,
.incident-edit-card,
.status-component,
.status-incident {
    border-color: #2c2d33;
}

.badge-blue,
.status-tags span {
    background: rgba(32, 146, 216, 0.14);
    color: #9ecff0;
}

.badge-green,
.status-badge.operational,
.status-badge.resolved {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
}

.badge-amber {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
}

.badge-gray,
.badge-outline {
    background: #24252b;
    color: #9da5b4;
}

.quick-alert-preview-shell,
.builder-canvas-wrap,
.media-thumb {
    background: #000000;
    border-color: #2c2d33;
}

.quick-alert-card {
    background: #1f2025;
    border-color: #2c2d33;
    border-top-color: #2092d8;
}

.quick-alert-kicker {
    color: #9da5b4;
}

.quick-alert-preview-message,
.snippet,
.status-update p,
.notice-box {
    color: #c7d3dd;
}

.preview-frame {
    background: #000000;
    border-color: #2c2d33;
}

.builder-block {
    background: transparent;
    border-color: transparent;
}

.builder-block:hover,
.builder-block.active {
    border-color: #2092d8;
    box-shadow: 0 0 0 3px rgba(32, 146, 216, 0.14);
}

.builder-block-preview {
    background: transparent;
    border-color: transparent;
}

.builder-palette button,
.builder-media-list button {
    background: #24252b;
    border-color: #2c2d33;
}

.builder-palette button:hover,
.builder-media-list button:hover {
    background: rgba(32, 146, 216, 0.14);
    border-color: #2092d8;
}

.builder-drag-handle,
.builder-drop-zone.active,
.builder-canvas:hover .builder-drop-zone {
    border-color: rgba(32, 146, 216, 0.58);
    background: rgba(32, 146, 216, 0.12);
    color: #9ecff0;
}

.builder-mini-grid div,
.builder-mini-pipeline,
.builder-mini-footer,
.rating-preview span {
    background: #1f2025;
    border-color: #2c2d33;
}

.builder-mini-grid b,
.builder-mini-button,
.builder-mini-pipeline i {
    background: #2092d8;
    color: #ffffff;
}

.builder-mini-grid b {
    background: transparent;
    color: #2092d8;
}

.builder-mini-divider,
.status-update {
    background: #2c2d33;
}

.status-public,
.public-home {
    background: #000000;
}

.status-dot {
    background: #2092d8;
    box-shadow: 0 0 0 12px rgba(32, 146, 216, 0.16);
}

.status-overall {
    border-top-color: #2092d8;
}

.status-update {
    border-left-color: #2092d8;
    background: rgba(32, 146, 216, 0.09);
}

.popover-form {
    background: #1f2025;
}

.flash {
    border-color: #2c2d33;
    background: #1f2025;
}

.flash.success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.12);
}

.flash.error {
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(239, 68, 68, 0.12);
}
