:root {
  color-scheme: dark;
  --bg: #0e1014;
  --surface: #171a20;
  --surface-raised: #20242c;
  --line: #363b45;
  --text: #f5f7fa;
  --muted: #aeb6c3;
  --brand: #ff8a1f;
  --danger: #ffaaa0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top right, #30200f, var(--bg) 49%); color: var(--text); }
.shell { max-width: 1000px; margin: auto; padding: 48px 24px; }
.login-card { max-width: 430px; margin: 9vh auto; padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px #0008; }
.eyebrow { letter-spacing: .12em; font-size: .72rem; font-weight: 800; color: var(--brand); margin: 0 0 8px; }
.login-card h1, .topbar h1 { margin: 0; font-size: 2rem; }
.login-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: 16px; margin-top: 26px; }
label { display: grid; gap: 7px; font-size: .9rem; color: var(--muted); }
input { background: #0d0f13; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 11px; }
input:focus { outline: 2px solid var(--brand); outline-offset: 2px; }
button { border: 0; border-radius: 8px; background: var(--brand); color: #211000; padding: 11px 16px; font-weight: 800; cursor: pointer; }
button:hover:not(:disabled) { background: #ffb44a; }
button:disabled { opacity: .45; cursor: not-allowed; }
.quiet { background: transparent; border: 1px solid var(--line); color: var(--text); }
.quiet:hover:not(:disabled) { border-color: var(--brand); background: #272b33; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }
.topbar, .panel-heading, .special-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--line); margin: 32px 0 24px; }
.tab { background: transparent; color: var(--muted); border-radius: 7px 7px 0 0; }
.tab:hover:not(:disabled) { background: #272b33; }
.tab.active { color: var(--brand); box-shadow: inset 0 -3px var(--brand); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.panel h2, .panel h3 { margin: 0; }
.panel-heading p, .special-card p, .empty p { color: var(--muted); line-height: 1.5; }
.section-list { display: grid; gap: 10px; margin-top: 22px; }
.section { display: flex; align-items: center; gap: 13px; background: var(--surface-raised); border: 1px solid var(--line); padding: 13px; border-radius: 10px; }
.section[draggable=true] { cursor: grab; }
.handle { color: var(--brand); font-size: 1.3rem; }
.section-name { flex: 1; }
.switch { display: flex; align-items: center; gap: 8px; color: var(--text); }
.switch input { accent-color: var(--brand); }
.special-card, .empty { margin-top: 20px; padding: 20px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
.notice { color: var(--muted); font-size: .9rem; margin: 18px 0 0; }
.status-list { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 24px 0; }
.status-list dt { color: var(--muted); }
.status-list dd { margin: 0; color: var(--brand); font-weight: 700; }
.alerts-list { display: grid; gap: 12px; margin-top: 20px; }
.alert-actions { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.alert-actions label { color: var(--muted); }
.alert-actions select { background: #0d0f13; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 10px; }
.alert-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 10px; }
.alert-card-actions { display: flex; align-items: center; gap: 8px; }
.danger { color: #ffb4a8; border-color: #7b372d; }
.danger:hover { background: #4a211b; }
.alert-card h3 { margin: 0 0 5px; }
.alert-card p { color: var(--muted); margin: 0; }
.alert-card button { align-self: center; }
.alert-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.alert-editor .wide { grid-column: 1 / -1; }
.alert-editor select { background: #0d0f13; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 11px; }
@media (max-width: 620px) { .alert-editor { grid-template-columns: 1fr; } .alert-editor .wide { grid-column: auto; } }
@media (max-width: 620px) { .shell { padding: 24px 14px; } .topbar, .panel-heading, .special-card { align-items: flex-start; flex-direction: column; } .tabs { overflow: auto; } .panel { padding: 18px; } }
