/* Servant – mobil zuerst, Hell/Dunkel */
:root {
  --bg: #f4f6f8; --surface: #ffffff; --text: #1b2430; --muted: #5d6b7a; --border: #dde3ea;
  --primary: #1f6feb; --primary-text: #fff; --ok: #1a7f37; --warn: #b26a00; --error: #c62828;
  --ok-bg: #e6f4ea; --warn-bg: #fff4e0; --error-bg: #fdecea; --badge-bg: #eef1f4;
  --radius: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141a; --surface: #18202a; --text: #e6edf3; --muted: #93a1b0; --border: #2a3542;
    --primary: #4c8dff; --ok: #3fb950; --warn: #e3a008; --error: #f47067;
    --ok-bg: #12261a; --warn-bg: #2b2210; --error-bg: #2d1517; --badge-bg: #222c37; --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141a; --surface: #18202a; --text: #e6edf3; --muted: #93a1b0; --border: #2a3542;
  --primary: #4c8dff; --ok: #3fb950; --warn: #e3a008; --error: #f47067;
  --ok-bg: #12261a; --warn-bg: #2b2210; --error-bg: #2d1517; --badge-bg: #222c37; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .9em; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem;
          padding: .5rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.mainnav a { padding: .4rem .7rem; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.mainnav a[aria-current="page"] { background: var(--badge-bg); color: var(--text); font-weight: 600; }
.logo-static { margin-left: auto; }
.menu { position: relative; margin-left: auto; }
.logo-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; display: block; }
.logo-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; background: var(--surface);
              border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.18);
              padding: .4rem; display: flex; flex-direction: column; }
.menu-panel a, .menu-panel .linklike { padding: .55rem .75rem; border-radius: 8px; color: var(--text); text-align: left; }
.menu-panel a:hover, .menu-panel .linklike:hover { background: var(--badge-bg); text-decoration: none; }
.menu-panel form { margin: 0; display: flex; }
.menu-panel form .linklike { flex: 1; }
.menu-sep { font-size: .75rem; color: var(--muted); padding: .5rem .75rem .2rem; text-transform: uppercase; letter-spacing: .05em; }
.linklike { border: 0; background: none; font: inherit; cursor: pointer; }
.linklike.danger { color: var(--error); }

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 1rem; flex: 1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        box-shadow: var(--shadow); padding: 1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
.grid .card { margin: 0; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.head-row h1 { margin-bottom: .5rem; }

.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.kv li:last-child { border-bottom: 0; }
.kv li > span:first-child { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
         background: var(--badge-bg); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.error { background: var(--error-bg); color: var(--error); }
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.error { background: var(--error-bg); color: var(--error); white-space: pre-wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.stack { display: flex; flex-direction: column; gap: .9rem; }
.row2, .row3 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
                          border-radius: 8px; padding: .55rem .7rem; width: 100%; font-weight: 400; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
textarea.mono { font-family: var(--mono); font-size: .88rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem; margin: 0;
           display: flex; flex-direction: column; gap: .75rem; }
legend { font-weight: 700; padding: 0 .4rem; }
.stepup input { border-color: var(--warn); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600;
       padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
       color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.actions form { margin: 0; }
.errbox, .detail { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .75rem;
                   overflow-x: auto; font-family: var(--mono); font-size: .8rem; white-space: pre-wrap; margin: .75rem 0 0; }
.danger-zone summary { cursor: pointer; color: var(--error); font-weight: 600; }

/* Tabellen: Desktop Tabelle, Handy Karten */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border);
         border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 719px) {
  .table.cards, .table.cards tbody, .table.cards tr, .table.cards td { display: block; width: 100%; }
  .table.cards { background: none; border: 0; }
  .table.cards thead { display: none; }
  .table.cards tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
                    margin-bottom: .75rem; padding: .4rem .2rem; box-shadow: var(--shadow); }
  .table.cards td { border: 0; padding: .3rem .8rem; display: flex; justify-content: space-between; gap: 1rem; }
  .table.cards td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; flex-shrink: 0; }
  .table.cards td > * { text-align: right; }
}

.auth { max-width: 380px; margin: 2rem auto; background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); text-align: left; }
.auth.wide { max-width: 520px; }
.auth-logo { display: block; margin: 0 auto 1rem; }
.auth h1 { text-align: center; }
.qr { display: flex; justify-content: center; margin: 1rem 0; }
.qr svg { width: 220px; height: auto; background: #fff; border-radius: 8px; }
.secret { word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 1rem 0; }
.codes code { display: block; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .35rem; text-align: center; }

.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1rem;
          color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); background: var(--surface); }
.footer a { color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.heart { fill: #e25555; vertical-align: -2px; }
.to-top { position: fixed; right: 1rem; bottom: 1rem; width: 44px; height: 44px; border-radius: 50%;
          border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.2rem;
          cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.more-btn { margin-top: .5rem; }
[hidden] { display: none !important; }
.busy { opacity: .6; pointer-events: none; }
.kv li > span:last-child, .kv li > a + span { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-start; justify-content: flex-end; }
.inline-actions form { margin: 0; }
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
details.pop[open] > form { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 5; min-width: 260px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); text-align: left; }
.danger-text { color: var(--error); }
.small-btn { padding: .2rem .6rem; font-size: .85rem; margin-left: .5rem; }
pre.log { max-height: 420px; overflow: auto; white-space: pre; }
.kv li form { margin: 0; }
@media (max-width: 719px) {
  details.pop[open] > form { position: static; margin-top: .4rem; min-width: 0; }
  .inline-actions { justify-content: flex-start; }
}
.table { margin-bottom: 1rem; }
@media (max-width: 719px) {
  .topbar { flex-wrap: wrap; row-gap: .4rem; }
  .mainnav { order: 3; flex-basis: 100%; margin: 0 -.25rem; }
}
@media (max-width: 719px) {
  .mainnav { flex-wrap: wrap; overflow: visible; gap: .15rem; }
  .mainnav a { padding: .35rem .55rem; font-size: .95rem; }
}

/* ---------------------------------------------------- 0.4: Dateien, Logs, Statistik */
.crumbs { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; margin: 0 0 1rem;
          font-family: var(--mono); font-size: .9rem; }
.crumbs span { color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.toolbar .tool { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0; flex: 1 1 300px; }
.toolbar .tool input:not([type=checkbox]) { flex: 1 1 160px; width: auto; }
.toolbar input[type=file] { padding: .35rem; }
.files .ico { display: inline-block; width: 1.3em; }
.files tr.up td { padding-top: .4rem; padding-bottom: .4rem; }
details.pop[open] > .pop-body { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 5; min-width: 320px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); text-align: left; }
.row-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.row-form input:not([type=checkbox]) { flex: 1; min-width: 0; }
.row-form .btn { white-space: nowrap; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; }
.tabs a { padding: .4rem .8rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.tabs a.muted { color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar input { flex: 1 1 220px; width: auto; }
.filter-bar select { width: auto; }
.logview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem;
           font-family: var(--mono); font-size: .8rem; line-height: 1.45; overflow-x: auto; max-height: 75vh; margin: 0; }
.logview span { display: block; white-space: pre; }
.logview .s4 { color: var(--warn); }
.logview .s5 { color: var(--error); font-weight: 600; }
.editor-form { display: flex; flex-direction: column; gap: .5rem; }
.editor-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; position: sticky; top: 3.4rem; z-index: 4;
              background: var(--bg); padding: .4rem 0; }
.editor-bar .spacer { flex: 1; }
.editor-text { min-height: 70vh; }
.editor-form .CodeMirror { height: 72vh; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--mono); font-size: .88rem; }
iframe.report { width: 100%; height: 80vh; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
@media (max-width: 719px) {
  details.pop[open] > .pop-body { position: static; margin-top: .4rem; min-width: 0; }
  .row-form { flex-wrap: wrap; }
  .editor-form .CodeMirror { height: 65vh; font-size: .82rem; }
  .editor-bar { top: 5.6rem; }
}
.toolbar input[type=file] { max-width: 100%; min-width: 0; }
@media (max-width: 719px) {
  .table.cards td:empty { display: none; }
  .toolbar input[type=file] { width: 100%; }
}

/* --------------------------------------------- Logo + Tab-Leiste unten (wie Postamt) */
.logo-btn img, .logo-static, .auth-logo { border-radius: 50%; }
.logo-btn { box-shadow: 0 0 0 4px var(--badge-bg); }
.tabbar, .more-sheet { display: none; }
@media (max-width: 719px) {
  .mainnav { display: none; }
  .topbar { flex-wrap: nowrap; padding: .6rem 1rem; }
  .brand span { font-size: 1.2rem; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0;
            z-index: 20; background: var(--surface); border-top: 1px solid var(--border);
            padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem;
            padding: .55rem 0 .5rem; color: var(--muted); font: inherit; font-size: .72rem; background: none; border: 0;
            cursor: pointer; text-decoration: none; min-width: 0; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7;
                stroke-linecap: round; stroke-linejoin: round; }
  .tabbar svg .dot { fill: currentColor; stroke: none; }
  .tabbar [aria-current="page"] { color: var(--primary); }
  .tabbar [aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 3px;
            background: var(--primary); }
  .more-sheet:not([hidden]) { display: flex; flex-direction: column; position: fixed; right: .5rem; z-index: 21;
            bottom: calc(72px + env(safe-area-inset-bottom)); min-width: 200px; background: var(--surface);
            border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: .4rem; }
  .more-sheet a { padding: .7rem .9rem; border-radius: 8px; color: var(--text); }
  .more-sheet a:hover { background: var(--badge-bg); text-decoration: none; }
  .to-top { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 1rem; }
}

/* 0.4.4: Aufklapp-Menüs in Tabellen nicht abschneiden */
.table { overflow: visible; }
.table thead th:first-child { border-top-left-radius: var(--radius); }
.table thead th:last-child { border-top-right-radius: var(--radius); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
details.pop[open] { z-index: 30; }

/* 0.4.7: Webroot-Auswahl */
.input-row { display: flex; gap: .5rem; }
.input-row input { flex: 1; min-width: 0; }
.input-row .btn { white-space: nowrap; }
.dirpicker { margin: 0; padding: .75rem; }
.dirpicker-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.dirpicker-head .crumbs { margin: 0; }
.dirpicker-head .crumbs a { cursor: pointer; }
.dirpicker-list { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 280px; overflow-y: auto;
                  border: 1px solid var(--border); border-radius: 8px; }
.dirpicker-list li { border-bottom: 1px solid var(--border); }
.dirpicker-list li:last-child { border-bottom: 0; }
.dirpicker-list button { width: 100%; text-align: left; background: none; border: 0; padding: .55rem .75rem;
                         font: inherit; color: var(--text); cursor: pointer; }
.dirpicker-list button:hover, .dirpicker-list button:focus-visible { background: var(--badge-bg); }

/* 0.4.8: Entpacken */
.extract-form { gap: .45rem; }
.sep { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; width: 100%; }
input[type="radio"] { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }

/* 0.6.0: Sicherheit */
.pending { border-color: var(--warn); }
.fw-rules input, .fw-rules select { min-width: 0; }
.fw-rules td { vertical-align: middle; }
.ip-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ip-row form { margin: 0; }
.jail-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between;
            padding: .35rem 0; border-bottom: 1px solid var(--border); }
.jail-row:last-child { border-bottom: 0; }
label.inline { flex-direction: row; align-items: center; gap: .4rem; font-weight: 500; }
label.inline input { width: 4.5rem; }
@media (max-width: 719px) { .table.cards.fw-rules td > * { text-align: left; } .table.cards.fw-rules td { flex-direction: column; } }

/* 0.6.0: Compose-Vorschläge */
.hints { list-style: none; margin: 0; padding: 0; }
.hint { border-left: 3px solid var(--border); padding: .5rem .75rem; margin: .5rem 0; background: var(--surface); border-radius: 0 8px 8px 0; }
.hint.error { border-left-color: var(--error); }
.hint.warn { border-left-color: var(--warn); }
.hint.done { opacity: .6; }
.hint p { margin: .3rem 0; }
.hint-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.hint-fix { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; overflow-x: auto; }
.hint-fix code { white-space: pre; }
.snippet { margin: .3rem 0 0; padding: .4rem .6rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; overflow-x: auto; }
button.linkish { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-decoration: underline; font: inherit; }

/* 0.6.1: Domainliste gruppiert */
.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 3px; background: var(--muted); vertical-align: middle; margin-right: .35rem; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.error { background: var(--error); } .dot.off { background: var(--border); }
.domains-table tbody.dgroup { border-top: 2px solid var(--border); }
.domains-table tr.sub td:first-child { padding-left: 1.6rem; }
.domains-table .sub-mark { color: var(--muted); margin-right: .25rem; }
.domains-table .alias { margin-left: 1.05rem; }
button.linkish.sub-toggle { margin-left: .5rem; color: var(--muted); text-decoration: none; }
.sub-toggle::before { content: "▾ "; } .sub-toggle[aria-expanded="false"]::before { content: "▸ "; }
.domains-table tr.group-toggle td { padding: .1rem .75rem .1rem 1.6rem; border-bottom: 0; }
.domains-table tr.ghost td { color: var(--muted); }
.mono-ish { font-family: var(--mono); font-size: .82rem; word-break: break-all; }
.filter-bar input[type=search] { flex: 1; min-width: 12rem; }
@media (max-width: 719px) {
  /* kompakte Zeilen statt großer Karten */
  .table.cards.domains-table tbody.dgroup { display: block; background: var(--surface); border: 1px solid var(--border);
                                           border-radius: var(--radius); margin-bottom: .75rem; padding: .3rem 0; }
  .table.cards.domains-table tr { border: 0; margin: 0; border-radius: 0; background: none; padding: 0;
                                  display: flex; align-items: center; justify-content: space-between; }
  .table.cards.domains-table td { padding: .3rem .75rem; display: block; width: auto; }
  .table.cards.domains-table td::before { content: none; }
  .table.cards.domains-table td[data-label="Ziel"], .table.cards.domains-table td[data-label="Art"] { display: none; }
  .table.cards.domains-table td[data-label="Domain"] { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .table.cards.domains-table tr.sub td:first-child { padding-left: 1.4rem; }
  .table.cards.domains-table tr.ghost td:not(:first-child) { display: none; }
}

/* 0.6.1: Übersicht */
.ov-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
@media (min-width: 900px) { .ov-grid { grid-template-columns: 1fr 1fr; } .ov-grid .span2 { grid-column: span 2; } }
.ov-grid > .card { margin: 0; }
.gauges { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .gauges { grid-template-columns: repeat(4, 1fr); } }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 120px; height: auto; }
.gauge .track { fill: none; stroke: var(--border); stroke-width: 10; }
.gauge .val { fill: none; stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%;
              transition: stroke-dasharray .6s ease; }
.gauge .val.ok, .bar rect.ok { stroke: var(--ok); fill: var(--ok); }
.gauge .val.warn, .bar rect.warn { stroke: var(--warn); fill: var(--warn); }
.gauge .val.error, .bar rect.error { stroke: var(--error); fill: var(--error); }
.gauge .val.ok, .gauge .val.warn, .gauge .val.error { fill: none; }
.gauge text { fill: var(--text); font-size: 20px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.gauge .g-label { font-weight: 600; margin-top: .2rem; }
.gauge .g-sub { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.bar { width: 100%; height: 8px; display: block; border-radius: 4px; background: var(--border); }
.bar rect { rx: 4px; }
.disk { margin: .55rem 0; }
.disk-head { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.svc { width: 100%; border-collapse: collapse; font-size: .92rem; }
.svc td { padding: .35rem .25rem; border-bottom: 1px solid var(--border); }
.svc tr:last-child td { border-bottom: 0; }
.svc td.st { white-space: nowrap; }
.svc .port { font-family: var(--mono); font-size: .8rem; color: var(--muted); white-space: nowrap; text-align: right; }
.svc .port .closed { color: var(--error); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: block; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--bg); }
.tile:hover { text-decoration: none; border-color: var(--primary); }
.tile .n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.tile .l { color: var(--muted); font-size: .85rem; }
.tile .x { font-size: .8rem; margin-top: .15rem; }
.donut-wrap { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.donut-wrap svg { width: 140px; height: 140px; flex-shrink: 0; }
.donut .seg { fill: none; stroke-width: 18; transform: rotate(-90deg); transform-origin: 50% 50%; }
.donut .track { fill: none; stroke: var(--border); stroke-width: 18; }
.donut text { fill: var(--text); text-anchor: middle; dominant-baseline: central; }
.donut .big { font-size: 15px; font-weight: 700; } .donut .small-t { font-size: 9px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 12rem; font-size: .9rem; }
.legend li { display: flex; justify-content: space-between; gap: .75rem; padding: .2rem 0; border-bottom: 1px solid var(--border); }
.legend li:last-child { border-bottom: 0; font-weight: 600; }
.sw { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; margin-right: .4rem; vertical-align: middle; }
.c1 { stroke: #1f6feb; background: #1f6feb; } .c2 { stroke: #8250df; background: #8250df; } .c3 { stroke: #d1242f; background: #d1242f; }
.c4 { stroke: #0598bc; background: #0598bc; } .c5 { stroke: #bf8700; background: #bf8700; } .c6 { stroke: #1a7f37; background: #1a7f37; }
.c7 { stroke: #8c959f; background: #8c959f; }
.sysinfo li span:last-child { text-align: right; overflow-wrap: anywhere; }
.versions { columns: 2 14rem; column-gap: 1.5rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.versions li { display: flex; justify-content: space-between; gap: .5rem; padding: .22rem 0; border-bottom: 1px solid var(--border); break-inside: avoid; }
.versions li span:last-child { font-family: var(--mono); font-size: .82rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.card-head h2 { margin-bottom: .6rem; }
.pre-line { white-space: pre-line; }

/* 0.7.0: Umzug */
.inline-form { display: inline; margin: 0; }
.mig-table td form { margin: 0; }
.card h3 { font-size: 1rem; margin: 1.2rem 0 .4rem; }

/* 0.8.0: Traffic */
.chips { display: flex; gap: .3rem; flex-wrap: wrap; }
.chips a { padding: .15rem .6rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; color: var(--text); }
.chips a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.tr-totals { display: grid; grid-template-columns: 1fr; gap: .6rem; margin-bottom: .8rem; }
@media (min-width: 640px) { .tr-totals { grid-template-columns: 1fr 1fr; } }
.tile.static:hover { border-color: var(--border); }
.tile .small-n { font-size: 1.2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.c1-t { color: #1f6feb; } .c5-t { color: #bf8700; }
.tr-top th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .3rem .25rem; }
.tr-top .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tr-top .tr-name { display: block; overflow-wrap: anywhere; }
.tr-top .bar { margin-top: .2rem; height: 5px; }
.tr-chart { width: 100%; height: auto; margin-top: .8rem; }
.tr-chart rect.c1 { fill: #1f6feb; } .tr-chart rect.c5 { fill: #bf8700; }
.tr-chart text { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.tr-chart line { stroke: var(--border); }
@media (max-width: 639px) { .tr-top th:nth-child(4), .tr-top td:nth-child(4) { display: none; } }
.bar rect.c1 { fill: #1f6feb; }
