/* mcpanel – Oberfläche. Keine externen Fonts/Assets (CSP: nur 'self'). */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f8f9fb; --fg: #18202c; --muted: #6b7584; --border: #e2e6ec;
  --accent: #2f7d55; --accent-2: #3d9a6b; --accent-soft: #e5f3ec; --accent-fg: #fff;
  --danger: #c0392b; --danger-soft: #fbe9e7; --warn: #b7791f; --warn-soft: #fdf3e1; --ok: #23824f; --ok-soft: #e3f4ea;
  --info: #2f6fb5; --info-soft: #e6f0fb;
  --c-gray: #6b7584; --c-blue: #2f6fb5; --c-green: #23824f; --c-orange: #c56a12; --c-red: #c0392b; --c-purple: #7b4bb8;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --sidebar: 236px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --surface: #171e27; --surface-2: #1c2530; --fg: #e5e9ef; --muted: #96a0ae; --border: #28323f;
    --accent: #45b07a; --accent-2: #5cc58f; --accent-soft: #183326; --accent-fg: #07120c;
    --danger: #ef6b5b; --danger-soft: #3a1c19; --warn: #e3a945; --warn-soft: #3a2c12; --ok: #4cc283; --ok-soft: #15301f;
    --info: #6aa7ea; --info-soft: #172a40; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --c-gray: #96a0ae; --c-blue: #6aa7ea; --c-green: #4cc283; --c-orange: #ec9a4a; --c-red: #ef6b5b; --c-purple: #b18ae6;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.01em; } h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
p { margin: .4rem 0; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 14px; height: 14px; vertical-align: -2px; } .icon.lg { width: 22px; height: 22px; }
.icon.fill { fill: currentColor; }

/* -- Layout ------------------------------------------------------------------------------------------------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; font-weight: 700; font-size: 1.05rem; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #6b8f2f); display: grid; place-items: center; color: #fff; }
.nav { padding: .3rem .7rem; overflow-y: auto; flex: 1; }
.nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem .55rem .35rem; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .48rem .6rem; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { border-top: 1px solid var(--border); padding: .7rem; display: flex; align-items: center; gap: .5rem; }
.sidebar-foot .who { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; color: var(--fg); }
.sidebar-foot .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mobilebar { display: none; }
.content { padding: 1.6rem 2rem 3rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.content.narrow { max-width: 760px; }
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 30; transform: translateX(-100%); transition: transform .15s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .mobilebar { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .content { padding: 1rem; }
}

/* -- Seitenkopf ----------------------------------------------------------------------------------------------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: .25rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; display: flex; align-items: center; gap: .3rem; }
.crumbs a { color: var(--muted); }

/* -- Karten, Raster ------------------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.card.narrow-card { max-width: 420px; margin: 8vh auto; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stack > * + * { margin-top: .75rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .mono, code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 0 .3em; border-radius: 4px; }
.hidden { display: none !important; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

/* -- Buttons -------------------------------------------------------------------------------------------------- */
.btn, button { font: inherit; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; padding: .48rem .9rem; border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover, button:hover { filter: brightness(1.06); text-decoration: none; }
.btn.secondary, button.secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn.secondary:hover, button.secondary:hover { background: var(--surface-2); }
.btn.ghost, button.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: .4rem .55rem; }
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn.danger, button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-outline, button.danger-outline { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.sm, button.sm { padding: .3rem .6rem; font-size: .85rem; }
button.link { background: none; border: none; color: var(--accent); padding: 0; font-weight: 500; }
button.link.danger-text { color: var(--danger); }
button:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; filter: none; }
form.inline { display: inline; }
.btn-group { display: inline-flex; gap: .4rem; flex-wrap: wrap; }

/* -- Formulare ------------------------------------------------------------------------------------------------ */
label { display: block; font-weight: 600; font-size: .88rem; margin: .8rem 0 .3rem; }
.field-help { font-size: .82rem; color: var(--muted); margin-top: .25rem; font-weight: 400; }
input, select, textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .65rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=file] { padding: .4rem; }
label.check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; margin: .55rem 0; }
label.check input { margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 1rem; }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.input-group { display: flex; } .input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .input-group .addon { border: 1px solid var(--border); border-left: 0; padding: .5rem .7rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--muted); }

/* Schalter */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; border-radius: 22px; background: var(--border); transition: .15s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: var(--shadow); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }

/* Auswahlkarten (Radio) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice .choice-body { display: block; border: 1.5px solid var(--border); border-radius: var(--radius); padding: .85rem .95rem; cursor: pointer; background: var(--surface); height: 100%; font-weight: 400; margin: 0; }
.choice .choice-body strong { display: flex; align-items: center; gap: .5rem; margin-bottom: .2rem; }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); }

/* -- Tabellen ------------------------------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }

/* -- Badges, Pills, Chips ------------------------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 600; border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.badge.ok, .badge.running, .badge.active, .badge.done { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.badge.failed, .badge.error, .badge.denied, .badge.danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.badge.starting, .badge.stopping, .badge.queued, .badge.installing, .badge.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.badge.info, .badge.running-job { color: var(--info); background: var(--info-soft); border-color: transparent; }
.badge.c-gray { color: var(--c-gray); } .badge.c-blue { color: var(--c-blue); background: var(--info-soft); border-color: transparent; }
.badge.c-green { color: var(--c-green); background: var(--ok-soft); border-color: transparent; }
.badge.c-orange { color: var(--c-orange); background: var(--warn-soft); border-color: transparent; }
.badge.c-red { color: var(--c-red); background: var(--danger-soft); border-color: transparent; }
.badge.c-purple { color: var(--c-purple); }
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .85rem; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--surface-2); }
.status.running .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2s infinite; }
.status.starting .dot, .status.stopping .dot, .status.installing .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.status.failed .dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.status.running { color: var(--ok); } .status.failed { color: var(--danger); } .status.starting, .status.stopping, .status.installing { color: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px var(--ok-soft); } }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mono); font-size: .76rem; padding: .05rem .45rem; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); margin: .1rem .15rem .1rem 0; white-space: nowrap; }
.chip.danger { border-color: var(--danger); color: var(--danger); }
.chip.path { color: var(--info); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .8rem; flex: none; text-transform: uppercase; }
.avatar.ext { background: var(--warn-soft); color: var(--warn); } .avatar.admin { background: var(--danger-soft); color: var(--danger); }

/* -- Meldungen ------------------------------------------------------------------------------------------------ */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 50; max-width: min(440px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.15); animation: slidein .2s; }
.toast.success { border-left: 4px solid var(--ok); } .toast.error { border-left: 4px solid var(--danger); } .toast.warning { border-left: 4px solid var(--warn); } .toast.info { border-left: 4px solid var(--info); }
.toast .close { margin-left: auto; }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } }
.callout { display: flex; gap: .7rem; padding: .8rem 1rem; border-radius: var(--radius); background: var(--info-soft); color: var(--fg); margin-bottom: 1rem; }
.callout .icon { color: var(--info); margin-top: .1rem; }
.callout.warn { background: var(--warn-soft); } .callout.warn .icon { color: var(--warn); }
.callout.danger { background: var(--danger-soft); } .callout.danger .icon { color: var(--danger); }
.callout.ok { background: var(--ok-soft); } .callout.ok .icon { color: var(--ok); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; stroke-width: 1.5; margin-bottom: .5rem; }

/* -- Server ---------------------------------------------------------------------------------------------------- */
.server-card { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--fg); transition: border-color .1s, transform .1s; }
.server-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.server-card .title { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.02rem; }
.server-card .title .icon { color: var(--accent); }
.server-card .meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.server-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.server-head .ident { display: flex; align-items: center; gap: .9rem; flex: 1; min-width: 260px; }
.server-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.address { display: inline-flex; align-items: center; gap: .3rem; font-family: var(--mono); font-size: .85rem; color: var(--muted); }
.copy { cursor: pointer; border: 0; background: none; color: var(--muted); padding: .15rem; }
.copy:hover { color: var(--accent); background: none; }
.meter { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.meter.warn > span { background: var(--warn); } .meter.danger > span { background: var(--danger); }
.meter-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; }
.tile .label { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .8rem; }
.tile .value { font-size: 1.25rem; font-weight: 700; margin: .2rem 0 .35rem; }
.tabs { display: flex; gap: .15rem; border-bottom: 1px solid var(--border); margin-bottom: 1.2rem; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Konsole */
.terminal { background: #0b1017; border-radius: var(--radius); overflow: hidden; border: 1px solid #1e2733; }
.terminal-bar { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; background: #121a24; color: #9aa6b5; font-size: .82rem; }
.console { margin: 0; padding: .8rem 1rem; height: 62vh; overflow: auto; color: #d6dee9; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; background: transparent; border: 0; }
.console-input { display: flex; gap: .5rem; padding: .6rem; background: #121a24; border-top: 1px solid #1e2733; }
.console-input input { font-family: var(--mono); background: #0b1017; color: #e5e9ef; border-color: #263140; }
.console-input .prompt { color: var(--accent-2); font-family: var(--mono); align-self: center; }

/* Logs/Jobs */
pre.log { background: #0b1017; color: #cfd8e3; padding: .7rem .9rem; border-radius: var(--radius-sm); max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .8rem; margin: .5rem 0 0; }
.job { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; margin: .5rem 0; background: var(--surface-2); }
.job-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
progress { width: 100%; height: 6px; margin-top: .45rem; accent-color: var(--accent); }

/* Dateien */
.filebar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.breadcrumbs { display: flex; align-items: center; gap: .2rem; font-family: var(--mono); font-size: .9rem; flex-wrap: wrap; }
.breadcrumbs a { padding: .1rem .3rem; border-radius: 4px; }
.breadcrumbs a:hover { background: var(--surface-2); text-decoration: none; }
.fname { display: flex; align-items: center; gap: .55rem; }
.fname .icon.dir { color: var(--warn); } .fname .icon.file { color: var(--muted); } .fname .icon.link { color: var(--info); }
.CodeMirror { height: 68vh; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
textarea.editor { min-height: 60vh; font-family: var(--mono); }

/* Konfiguration (server.properties) */
.prop-row { display: grid; grid-template-columns: minmax(200px, 1.1fr) minmax(200px, 1fr) auto; gap: .9rem; align-items: center; padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.prop-row:last-child { border-bottom: 0; }
.prop-row .pkey { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.prop-row .plabel { font-weight: 600; }
.prop-row.locked .pvalue { color: var(--muted); }
.prop-row.changed { background: var(--accent-soft); }
.prop-group-title { padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.level { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; }
.level.free { color: var(--ok); background: var(--ok-soft); } .level.protected { color: var(--warn); background: var(--warn-soft); }
.level.locked { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); } .level.hidden { color: var(--muted); }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: .8rem 1rem; display: flex; gap: .6rem; justify-content: flex-end; align-items: center; z-index: 5; }
@media (max-width: 700px) { .prop-row { grid-template-columns: 1fr; gap: .4rem; } }

/* Rechte-Matrix */
.matrix th.cat, .matrix td.cell { text-align: center; }
.matrix th.cat { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.matrix th.cat .icon { display: block; margin: 0 auto .15rem; }
.cell .mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; }
.mark.full { background: var(--ok-soft); color: var(--ok); } .mark.partial { background: var(--warn-soft); color: var(--warn); }
.mark.none { color: var(--border); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.perm-cat { border: 1px solid var(--border); border-radius: var(--radius); padding: .7rem .85rem; background: var(--surface-2); }
.perm-cat h3 { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.perm-item { display: flex; gap: .55rem; align-items: flex-start; margin: .4rem 0; font-weight: 400; font-size: .88rem; }
.perm-item input[type=checkbox] { margin-top: .2rem; }
.perm-item .pname { font-family: var(--mono); font-size: .75rem; color: var(--muted); display: block; }
.perm-item.danger .ptext { color: var(--danger); }
.preset-card { display: flex; flex-direction: column; gap: .6rem; }
.preset-card .head { display: flex; align-items: center; gap: .55rem; }
.preset-swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--c-gray); flex: none; }
.preset-swatch.gray { background: var(--c-gray); } .preset-swatch.blue { background: var(--c-blue); } .preset-swatch.green { background: var(--c-green); }
.preset-swatch.orange { background: var(--c-orange); } .preset-swatch.red { background: var(--c-red); } .preset-swatch.purple { background: var(--c-purple); }
.result { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.2rem; border-radius: var(--radius); font-size: 1.05rem; font-weight: 700; }
.result.yes { background: var(--ok-soft); color: var(--ok); } .result.no { background: var(--danger-soft); color: var(--danger); }
ul.reasons { margin: .4rem 0 0; padding-left: 1.2rem; } ul.reasons li { margin: .2rem 0; }

/* Dialog */
dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--fg); padding: 1.3rem 1.4rem; max-width: 440px; width: calc(100% - 2rem); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 15, 22, .45); }
dialog h2 { display: flex; align-items: center; gap: .5rem; }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 20% 10%, var(--accent-soft), transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .brand { justify-content: center; padding: 0 0 1rem; font-size: 1.3rem; }

/* Balkenbreiten (CSP: keine style-Attribute) */
.meter > span.w0 { width: 0%; } .meter > span.w5 { width: 5%; } .meter > span.w10 { width: 10%; } .meter > span.w15 { width: 15%; } .meter > span.w20 { width: 20%; } .meter > span.w25 { width: 25%; } .meter > span.w30 { width: 30%; } .meter > span.w35 { width: 35%; } .meter > span.w40 { width: 40%; } .meter > span.w45 { width: 45%; } .meter > span.w50 { width: 50%; } .meter > span.w55 { width: 55%; } .meter > span.w60 { width: 60%; } .meter > span.w65 { width: 65%; } .meter > span.w70 { width: 70%; } .meter > span.w75 { width: 75%; } .meter > span.w80 { width: 80%; } .meter > span.w85 { width: 85%; } .meter > span.w90 { width: 90%; } .meter > span.w95 { width: 95%; } .meter > span.w100 { width: 100%; }
.empty-action { text-align: center; margin-top: -1rem; padding-bottom: 1rem; }
.status.stopped .dot, .status.unknown .dot { background: var(--muted); }
.console-status.ok { color: var(--accent-2); } .console-status.warn { color: #e3a945; } .console-status.error { color: #ef6b5b; }
/* Live-Karten und Graphen */
.card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: end; }
.spark { width: 100%; height: 28px; display: block; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.chart-title { font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.chart { min-height: 180px; }
.uplot, .uplot * { font-family: inherit; }
.u-legend { font-size: .78rem; color: var(--muted); }
/* Drag & Drop */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.6rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); cursor: pointer; font-weight: 400; margin: 0 0 .5rem; transition: border-color .1s, background .1s; }
.dropzone .icon { color: var(--accent); width: 30px; height: 30px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dz-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px minmax(90px, auto); gap: .6rem; align-items: center; padding: .35rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.upload-list li .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.upload-list li progress { margin: 0; }
.upload-list li.ok span:last-child { color: var(--ok); } .upload-list li.err, .upload-list li.err span:last-child { color: var(--danger); }
.prop-row .pvalue { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.prop-row .pvalue > input, .prop-row .pvalue > select { flex: 1; min-width: 140px; }
.prop-warning { flex-basis: 100%; margin: .2rem 0 0; font-size: .84rem; padding: .55rem .7rem; }
.prop-row.unlocked { background: var(--warn-soft); }
.override-confirm { margin: 0; color: var(--warn); }
