:root {
    color-scheme: light;
    --ink: #17212b;
    --muted: #667085;
    --line: #e4e7ec;
    --paper: #ffffff;
    --canvas: #f4f6f8;
    --navy: #12344d;
    --teal: #087f75;
    --amber: #b54708;
    --red: #b42318;
    --green: #067647;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: #175cd3; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { background: var(--navy); color: white; padding: 15px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 760; letter-spacing: .01em; }
.mode { border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 750; background: #fef0c7; color: #7a2e0e; }
.mode.live { background: #d1fadf; color: #05603a; }
.container { width: min(1160px, calc(100% - 32px)); margin: 28px auto 60px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 2px 7px rgba(16, 24, 40, .04); }
.panel + .panel { margin-top: 18px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
h1 { margin: 0 0 5px; font-size: 27px; line-height: 1.2; }
h2 { margin: 0 0 14px; font-size: 19px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.dashboard-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.dashboard-tab { display: block; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: #e9eef2; color: var(--ink); }
.dashboard-tab:hover { border-color: #98a2b3; text-decoration: none; }
.dashboard-tab.active { border-color: var(--navy); background: var(--paper); box-shadow: inset 0 3px 0 var(--navy), 0 2px 7px rgba(16, 24, 40, .06); }
.tab-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 760; }
.tab-heading strong { min-width: 31px; border-radius: 999px; padding: 2px 9px; background: var(--navy); color: white; text-align: center; font-size: 14px; }
.tab-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.tab-detail b { color: var(--teal); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat strong { display: block; font-size: 21px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.highlight strong { color: var(--teal); }
.stat.attention { border-color: #fda29b; background: #fff7f6; }
.stat.attention strong { color: var(--red); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-heading h2 { margin-bottom: 3px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 720; background: #eef2f6; color: #344054; }
.badge.safe_approved, .badge.approve, .badge.sent { background: #dcfae6; color: var(--green); }
.badge.needs_review, .badge.review, .badge.requested, .badge.test_sent { background: #fef0c7; color: var(--amber); }
.badge.denied, .badge.send_failed { background: #fee4e2; color: var(--red); }
.badge.not_requested { background: #eef2f6; color: #475467; }
.table-wrap { overflow-x: auto; }
.table-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }
.system-info { border-top: 1px solid var(--line); padding-top: 12px; }
.grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.field { margin-bottom: 14px; }
.field dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.field dd { margin: 3px 0 0; word-break: break-word; }
.reason { border-left: 4px solid var(--line); padding: 8px 12px; margin: 8px 0; background: #fafafa; }
.reason.review { border-color: #f79009; }
.reason.block { border-color: #d92d20; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button, .button { border: 0; border-radius: 9px; padding: 10px 15px; font: inherit; font-weight: 700; cursor: pointer; background: var(--navy); color: white; }
button.danger { background: var(--red); }
button.secondary, .button.secondary { background: #e9eef2; color: var(--ink); }
.login { width: min(420px, calc(100% - 32px)); margin: 10vh auto; }
label { display: block; font-weight: 650; margin-bottom: 6px; }
input { width: 100%; border: 1px solid #98a2b3; border-radius: 8px; padding: 11px; font: inherit; margin-bottom: 14px; }
.alert { border-radius: 9px; padding: 10px 12px; background: #fee4e2; color: #912018; margin-bottom: 14px; }
.empty { padding: 36px 10px; text-align: center; color: var(--muted); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; background: #f8fafc; padding: 12px; border-radius: 8px; }
@media (max-width: 760px) { .dashboard-tabs { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } .grid { grid-template-columns: 1fr; } .container { width: min(100% - 20px, 1160px); } .panel { padding: 16px; } table { font-size: 13px; } th:nth-child(3), td:nth-child(3) { display: none; } }
