:root { --bg: #f4f6f9; --card: #fff; --ink: #1b2433; --muted: #5a6474; --line: #dde2e8; --brand: #1a2d51; --accent: #244439;
  --ok: #1d7a4c; --okbg: #e3f3ea; --warn: #8a4b08; --warnbg: #fff1d6; --bad: #9b1c1c; --badbg: #fdecec; --code: #eef1f5; }
@media (prefers-color-scheme: dark) { :root { --bg: #0f1522; --card: #172033; --ink: #e4e9f2; --muted: #93a0b5; --line: #273349;
  --brand: #9fb7e8; --accent: #7fc4a4; --okbg: #143526; --ok: #7fd3a6; --warnbg: #3a2c10; --warn: #f0c46c; --badbg: #3d1717; --bad: #f19a9a; --code: #22304a; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 "Segoe UI", system-ui, sans-serif; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
code { background: var(--code); padding: 0 4px; border-radius: 4px; font: 12px Consolas, monospace; }
.muted { color: var(--muted); } .small { font-size: 12px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .top { background: #1a2d51; } }
.top h1 { margin: 0; font-size: 20px; } .top .muted { color: #cdd6e6; }
.actions { display: flex; gap: 8px; }
button { font: inherit; cursor: pointer; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 7px 14px; }
button.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
main { padding: 18px 24px 40px; max-width: 1700px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow-x: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 10px; padding: 12px 14px; text-align: left; cursor: pointer; }
.kpi:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); } .kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.green { border-left-color: var(--ok); } .kpi.yellow { border-left-color: #d69e2e; } .kpi.red { border-left-color: var(--bad); }
.kpi .v { font-size: 26px; font-weight: 700; line-height: 1.1; } .kpi .l { font-size: 13px; font-weight: 600; }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filters input[type=search] { flex: 1; min-width: 240px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; }
.chips { display: flex; gap: 6px; } .chip { padding: 5px 12px; border-radius: 16px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip[data-l=red] { color: var(--bad); } .chip[data-l=yellow] { color: #b7791f; } .chip[data-l=green] { color: var(--ok); }
.chip.on[data-l] { color: #fff; }
.check { display: flex; gap: 6px; align-items: center; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
#tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.row { cursor: pointer; } tr.row:hover td { background: rgba(127,140,160,.07); } tr.row.open td { background: rgba(127,140,160,.1); }
tr.detail td { background: rgba(127,140,160,.05); }
.kv th { text-align: left; width: 170px; color: var(--muted); font-weight: 600; padding: 4px 8px; vertical-align: top; }
.kv td { padding: 4px 8px; border: 0 !important; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
.dot.green { background: var(--ok); } .dot.yellow { background: #d69e2e; } .dot.red { background: var(--bad); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--code); white-space: nowrap; }
.badge.ok { background: var(--okbg); color: var(--ok); } .badge.warn { background: var(--warnbg); color: var(--warn); } .badge.bad { background: var(--badbg); color: var(--bad); }
.ct { margin-bottom: 4px; } .warntxt { color: var(--warn); } .badtxt { color: var(--bad); }
.alert { background: var(--badbg); color: var(--bad); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; }
.cols { columns: 3 260px; margin: 8px 0 0; padding-left: 18px; } summary { cursor: pointer; font-weight: 600; }
body.login { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: 340px; display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.login-card h1 { margin: 0; color: var(--brand); }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login-card input { padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.login-card button { background: var(--brand); color: #fff; border: 0; padding: 10px; }
@media (max-width: 760px) { main { padding: 12px; } .top { padding: 12px; } }
.host { font-size: 11px; color: var(--muted); }
h2.sec { font-size: 16px; margin: 22px 0 10px; color: var(--brand); }
.servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 14px; margin-bottom: 16px; }
.server { margin: 0; } .srv-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; } .right { margin-left: auto; }
.bar { display: inline-block; width: 140px; height: 8px; background: var(--code); border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.bar > div { height: 100%; } .bar .ok { background: var(--ok); } .bar .warn { background: #d69e2e; } .bar .bad { background: var(--bad); }
@media (max-width: 760px) { .servers { grid-template-columns: 1fr; } }
.gitcol { text-align: center; white-space: nowrap; } .gitcol input { width: 16px; height: 16px; cursor: pointer; }
.auto { display: block; font-size: 10px; color: var(--muted); }
button.mini { padding: 1px 8px; font-size: 12px; border-radius: 6px; background: var(--brand); color: #fff; border: 0; margin-left: 4px; }
#nogit li { margin-bottom: 4px; break-inside: avoid; }
.site { margin-bottom: 4px; white-space: nowrap; } .site a { margin-right: 4px; }
#certs th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
#certs td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* faner */
.tabs { display: flex; gap: 2px; padding: 0 24px; background: var(--brand); position: sticky; top: 0; z-index: 5; overflow-x: auto; }
@media (prefers-color-scheme: dark) { .tabs { background: #1a2d51; } }
.tabs button { background: transparent; color: #cdd6e6; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 14px; white-space: nowrap; }
.tabs button:hover { color: #fff; } .tabs button.on { color: #fff; border-bottom-color: #7fc4a4; font-weight: 600; }
.cnt { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 700; background: rgba(127,140,160,.25); text-align: center; }
.cnt:empty { display: none; } .cnt.red { background: var(--bad); color: #fff; } .cnt.yellow { background: #d69e2e; color: #fff; }
/* overblik */
.grid2 { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } }
.card-h { font-size: 15px; margin: 0 0 10px; color: var(--brand); display: flex; gap: 8px; align-items: center; }
.todo { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; }
.todo li { display: flex; gap: 8px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.todo li:hover { background: rgba(127,140,160,.08); } .todo li .dot { flex: none; margin-top: 0; width: 10px; height: 10px; }
.todo li b { white-space: nowrap; }
.mini-t td { padding: 6px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
button.link { background: none; border: 0; color: var(--brand); padding: 8px 0 0; font-size: 13px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tbody tr:nth-child(even) td { background: rgba(127,140,160,.035); }
@media (max-width: 760px) { .tabs { padding: 0 8px; } }
.msg { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .kpi { padding: 10px; } .kpi .v { font-size: 22px; }
  .top { flex-wrap: wrap; gap: 8px; } .top #gen { display: none; } .actions button { padding: 5px 10px; }
}

/* oppetid */
.up { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; margin-right: 2px; background: var(--line); }
.up.up { background: var(--ok); } .up.down { background: var(--bad); box-shadow: 0 0 0 3px var(--badbg); } .up.pending { background: #d69e2e; }
.upbar { display: inline-flex; gap: 1px; height: 14px; align-items: stretch; vertical-align: middle; }
.upbar i { width: 3px; border-radius: 1px; background: var(--line); } .upbar i.g { background: var(--ok); } .upbar i.y { background: #d69e2e; } .upbar i.r { background: var(--bad); }
.events { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; } .events li { padding: 4px 0; border-bottom: 1px solid var(--line); }
#certs td:nth-child(2) { white-space: nowrap; } .server-port { white-space: nowrap; }
