:root {
  --bg: #f6f7fb; --surface: #fff; --text: #1b1f2a; --muted: #5f6878; --line: #e3e6ee;
  --brand: #3b5bdb; --brand-ink: #fff; --brand-soft: #e8edff;
  --ok: #2b8a3e; --ok-soft: #e6f6ea; --warn: #b35c00; --warn-soft: #fff1df;
  --bad: #c92a2a; --bad-soft: #ffe8e8; --night: #5f3dc4; --night-soft: #efe9ff;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 2px 8px rgba(20, 30, 60, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b; --surface: #1a1e27; --text: #e8ebf2; --muted: #9aa3b5; --line: #2b313e;
    --brand: #7b93ff; --brand-ink: #0d1020; --brand-soft: #232b4a;
    --ok: #69db7c; --ok-soft: #1b3324; --warn: #ffa94d; --warn-soft: #3a2a14;
    --bad: #ff8787; --bad-soft: #3d1d1d; --night: #b197fc; --night-soft: #2a2245;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .inner { max-width: 1040px; margin: 0 auto; padding: .75rem 16px; display: flex; align-items: center; gap: 1rem; }
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; gap: .45rem; align-items: center; }
.logo .mark { width: 28px; height: 28px; border-radius: 8px; }
.topbar .spacer { flex: 1; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 1.25rem 16px 4rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .6rem; }

.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); padding: .5rem .85rem; border-radius: 9px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: .3rem .6rem; font-size: .85rem; }
.btn.link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 500; }
form.inline { display: inline; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .5rem .65rem; max-width: 100%; }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label.field { display: block; margin-bottom: .8rem; }
label.field > span { display: block; font-weight: 600; margin-bottom: .25rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem 0; }
.check input { margin-top: .25rem; }

.pill { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.timeup { background: var(--warn-soft); color: var(--warn); }
.pill.downtime { background: var(--night-soft); color: var(--night); }
.pill.paused { background: var(--bad-soft); color: var(--bad); }
.pill.neutral { background: var(--brand-soft); color: var(--brand); }

.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: .4rem 0; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.warn > i { background: var(--warn); }
.bar.full > i { background: var(--bad); }

.flash { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--bad-soft); color: var(--bad); }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs a { padding: .6rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.request { border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; padding: .8rem 1rem; background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .25rem .2rem .65rem; border-radius: 99px; background: var(--brand-soft); font-size: .88rem; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .3rem; }
.code { font: 700 2.2rem/1 ui-monospace, Menlo, monospace; letter-spacing: .25em; padding: .8rem 1rem; background: var(--brand-soft); border-radius: 12px; display: inline-block; }
.big { font-size: 1.8rem; font-weight: 700; }
.days label { display: inline-flex; align-items: center; gap: .2rem; margin-right: .5rem; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: .5rem; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; color: var(--muted); height: 100%; justify-content: flex-end; }
.chart .col i { width: 100%; max-width: 42px; background: var(--brand); border-radius: 6px 6px 2px 2px; min-height: 2px; }

.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: 2.2rem; }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }
.auth { max-width: 420px; margin: 2rem auto; }

@media (max-width: 600px) {
  h1 { font-size: 1.35rem; }
  .hero h1 { font-size: 1.7rem; }
  .card { padding: 1rem; }
}

.topbar .inner a:not(.logo):not(.btn) { text-decoration: none; font-weight: 600; }
.install-step { display: flex; gap: .8rem; align-items: flex-start; margin: .7rem 0; }
.install-step .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 700; display: grid; place-items: center; }
.notice { background: var(--brand-soft); border-radius: 10px; padding: .8rem 1rem; }
code.cmd { display: block; padding: .6rem .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; white-space: nowrap; font-size: .85rem; }
@media (max-width: 600px) { .topbar .inner { gap: .6rem; } .topbar .inner a:not(.logo):not(.btn) { font-size: .9rem; } }

[hidden] { display: none !important; }
