:root {
  --ink: #edf2ec;
  --muted: #93a096;
  --panel: #111713;
  --panel-2: #171f1a;
  --line: #2a352e;
  --moss: #91b78a;
  --moss-deep: #456b4a;
  --amber: #d8b36a;
  --red: #d37b75;
  --background: #080c09;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(circle at 85% -10%, #1c2d21 0, transparent 34rem), var(--background); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, sans-serif; min-height: 100vh; }
button, input, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--moss-deep); border-radius: 8px; padding: .72rem 1rem; background: var(--moss); color: #071009; font-weight: 700; }
button:hover { filter: brightness(1.08); }
button:disabled { cursor: wait; opacity: .55; }
button.secondary { background: #1d2a21; color: var(--ink); border-color: #415547; }
button.quiet { background: transparent; color: var(--muted); border-color: var(--line); }
button.danger { background: #301c1a; color: #f1bab5; border-color: #73413c; }
h1, h2 { font-family: Georgia, serif; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); } h1 span { color: var(--moss); font-weight: 400; }
h2 { font-size: 1.45rem; }
.eyebrow { color: var(--moss); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 2rem; }
.login-card { width: min(440px, 100%); padding: 2.25rem; border: 1px solid var(--line); background: rgba(17, 23, 19, .94); border-radius: 16px; box-shadow: 0 24px 80px #0008; }
form { display: grid; gap: 1rem; margin-top: 1.5rem; }
label { color: var(--muted); display: grid; gap: .45rem; font-size: .83rem; font-weight: 650; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #090e0b; color: var(--ink); padding: .72rem .8rem; outline: none; }
input:focus, textarea:focus { border-color: var(--moss); box-shadow: 0 0 0 3px #91b78a22; }
textarea { min-height: 96px; resize: vertical; }
.checkbox { display: flex; align-items: center; gap: .55rem; }.checkbox input { width: auto; }
.error { color: #efa7a1; min-height: 1.25rem; }
#dashboard-view { width: min(1480px, calc(100% - 3rem)); margin: 0 auto; padding: 2.5rem 0 5rem; }
header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.header-actions, .button-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
nav { display: flex; overflow-x: auto; gap: .25rem; margin: 2.5rem 0 1.5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.nav-button { flex: 0 0 auto; background: transparent; border: 0; border-radius: 5px; color: var(--muted); padding: .7rem 1rem; }
.nav-button.active { background: var(--panel-2); color: var(--ink); }
.panel { display: none; animation: appear .18s ease; }.panel.active { display: block; }
@keyframes appear { from { opacity: .3; transform: translateY(5px); } }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.surface, .metric-card { background: linear-gradient(145deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 1.3rem; }
.metric-card .value { font: 2.15rem Georgia, serif; margin-top: .5rem; }.metric-card .caption { color: var(--muted); font-size: .8rem; }
.wide { margin-top: 1rem; }.surface-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.detail-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }.detail-grid dt { color: var(--muted); font-size: .75rem; }.detail-grid dd { margin: .3rem 0 0; }
.pill { border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: .35rem .65rem; font-size: .75rem; }.pill.good { color: var(--moss); border-color: var(--moss-deep); }.pill.bad { color: var(--red); border-color: #73413c; }
.table-shell { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }th { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }th, td { border-bottom: 1px solid var(--line); padding: .85rem 1rem; vertical-align: top; }tr:last-child td { border: 0; }td code { color: #b9d6b4; }
.banner { border: 1px solid; border-radius: 8px; margin-bottom: 1rem; padding: .8rem 1rem; }.banner.error { background: #301c1a; border-color: #73413c; }.banner.success { color: #bde0b7; background: #17251a; border-color: #456b4a; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart-surface { min-width: 0; }
.chart-surface .surface-heading { align-items: flex-start; gap: 1rem; }
.bar-chart { height: 180px; display: flex; align-items: stretch; gap: 3px; padding-top: 1rem; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 44px, #ffffff0a 45px); }
.chart-column { flex: 1 1 0; min-width: 3px; display: flex; flex-direction: column-reverse; justify-content: flex-start; position: relative; }
.chart-column:hover { background: #ffffff0a; }
.chart-segment { width: 100%; min-height: 0; border-radius: 2px 2px 0 0; }
.chart-segment.sent { background: var(--moss); }.chart-segment.failed { background: var(--red); }.chart-segment.test { background: #7aa5c9; }
.chart-segment.production { background: var(--moss); }.chart-segment.sandbox { background: var(--amber); }.chart-segment.warning { background: var(--amber); }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; color: var(--muted); font-size: .68rem; }
.legend span::before { content: ''; display: inline-block; width: .55rem; height: .55rem; margin-right: .3rem; border-radius: 2px; background: currentColor; }
.legend .sent, .legend .production { color: var(--moss); }.legend .failed { color: var(--red); }.legend .test { color: #7aa5c9; }.legend .sandbox, .legend .warning { color: var(--amber); }
.settings-form { margin-top: 0; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: grid; gap: .8rem; padding: 1rem; }
legend { color: var(--moss); font-size: .75rem; font-weight: 800; letter-spacing: .1em; padding: 0 .4rem; text-transform: uppercase; }
.field-help { color: var(--muted); font-size: .72rem; font-weight: 400; }
.policy-list { color: var(--muted); line-height: 1.55; }
.policy-list p { border-bottom: 1px solid var(--line); margin: 0; padding: 1rem 0; }.policy-list p:last-child { border: 0; }
.history-heading { margin-top: 2rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow: auto; color: #b9c4bb; background: #090e0b; border: 1px solid var(--line); border-radius: 7px; padding: 1rem; }
@media (max-width: 1100px) { .chart-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.split-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { #dashboard-view { width: min(100% - 1.25rem, 1480px); padding-top: 1rem; } header { align-items: flex-start; flex-direction: column; }.header-actions { width: 100%; }.card-grid { grid-template-columns: 1fr; }.detail-grid { grid-template-columns: 1fr; } }
