:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #0c0d10;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --line: #2a2e37;
  --text: #f4f5f7;
  --muted: #9299a7;
  --accent: #ffcf33;
  --accent-ink: #14120a;
  --danger: #ff6b73;
  --success: #45d39c;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 15% 0%, #24200f 0, var(--bg) 32rem); color: var(--text); }
button, input, select { font: inherit; }
button { border: 0; border-radius: 10px; padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(1.06); }
button:disabled { cursor: not-allowed; opacity: .45; }
button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
button.danger { background: #3a1c21; color: #ffabb0; border: 1px solid #683039; }
.shell { width: min(1440px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.hidden { display: none !important; }
.auth-card { width: min(420px, 100%); margin: 10vh auto; padding: 2rem; background: rgba(20,22,27,.96); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 80px #0008; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 1.4rem; font-weight: 900; }
h1, h2 { margin: .45rem 0; letter-spacing: -.025em; }
h1 { font-size: clamp(1.55rem, 3vw, 2.2rem); }
h2 { font-size: 1.15rem; }
.muted, small { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .18em; }
label { display: grid; gap: .45rem; color: #c8ccd4; font-size: .88rem; font-weight: 650; }
input, select { width: 100%; padding: .72rem .8rem; border-radius: 9px; border: 1px solid var(--line); background: #101217; color: var(--text); outline: none; }
input:focus, select:focus { border-color: #8f782b; box-shadow: 0 0 0 3px #ffcf3317; }
select[multiple] { min-height: 8rem; }
#login-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.error { color: #ff9ca2; min-height: 1.2rem; margin: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.header-actions, .button-row { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.profile-pill { border: 1px solid var(--line); background: var(--surface); padding: .6rem .8rem; border-radius: 999px; color: #d8dbe2; }
.tabs { display: flex; gap: .4rem; padding: .4rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; margin-bottom: 1rem; }
.tab { white-space: nowrap; background: transparent; color: var(--muted); }
.tab.active { background: var(--surface-2); color: var(--text); }
.panel { background: rgba(20,22,27,.94); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.3rem; border-bottom: 1px solid var(--line); }
.panel-heading p { margin: .2rem 0 0; font-size: .85rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: .82rem 1rem; text-align: left; border-bottom: 1px solid #22262e; vertical-align: middle; font-size: .84rem; }
th { color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .04em; background: #111318; position: sticky; top: 0; }
td code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #bdc3ce; }
td .row-actions { display: flex; gap: .4rem; }
td .row-actions button { padding: .42rem .58rem; font-size: .76rem; }
.state { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .28rem .55rem; color: #cbd0d8; background: #1a1d23; white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #858b97; }
.state.online::before, .state.succeeded::before { background: var(--success); }
.state.running::before, .state.applied::before { background: var(--accent); }
.state.failed::before, .state.stopped::before { background: var(--danger); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.notice { margin: 0 0 1rem; border: 1px solid #5a4b18; background: #2b2512; color: #ffe797; padding: .8rem 1rem; border-radius: 10px; }
.notice.error-notice { border-color: #623139; background: #321b20; color: #ffb2b8; }
.task-form { padding: 1rem 1.3rem 0; }
fieldset { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: .85rem; align-items: end; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
legend { color: var(--accent); padding: 0 .45rem; font-weight: 750; }
.task-form .wide { grid-row: span 2; }
.filters { display: flex; gap: .8rem; padding: 1rem 1.3rem; }
.filters label { min-width: 180px; }
dialog { width: min(520px, calc(100% - 2rem)); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px #000c; }
dialog::backdrop { background: #000a; }
.dialog-form { display: grid; gap: .9rem; }
@media (max-width: 980px) { fieldset { grid-template-columns: repeat(2, 1fr); } .task-form .wide { grid-row: auto; grid-column: 1 / -1; } }
@media (max-width: 700px) { .shell { width: min(100% - 1rem, 1440px); padding-top: .75rem; } .topbar, .panel-heading { align-items: flex-start; flex-direction: column; } .header-actions { width: 100%; } .header-actions button { flex: 1; } fieldset { grid-template-columns: 1fr; } .task-form .wide { grid-column: auto; } .filters { flex-direction: column; } }
