/* Cotti Control - Optik nach FeatherPanel
   Fast schwarz, Violet als einziger Akzent, Karten als eigene Flächen mit 1px Border. */
:root {
  --bg: #08080a;
  --bg-elev: #0b0b0f;
  --card: rgba(8, 8, 8, .76);
  --card-solid: #0b0b0f;
  --surface-2: #121218;
  --surface-3: #17171f;
  --border: #212121;
  --border-soft: #1a1a1f;
  --text: #f9fafb;
  --text-2: #c9ced8;
  --muted: #9aa1ac;
  --muted-2: #6f7683;
  --accent: #7c3bed;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(124, 59, 237, .12);
  --ok: #22c55e;
  --warn: #f5a524;
  --bad: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .55);
  --font: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.012em; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.error { color: #ff8a9a; font-size: 12.5px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26262e; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #33333d; }

/* ---------------------------------------------------------------- Shell */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.side-wrap { padding: 12px 0 12px 12px; }

.side {
  position: sticky; top: 12px;
  display: flex; flex-direction: column; gap: 14px;
  height: calc(100vh - 24px);
  padding: 14px 12px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  z-index: 30;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 8px; color: var(--text); }
.side-brand strong { display: block; font-size: 13.5px; font-weight: 600; }
.side-brand .muted { font-size: 11px; }
.ver-badge {
  margin-left: auto;
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 6px;
  color: #b795ff; background: var(--accent-soft); border: 1px solid rgba(124, 59, 237, .28);
}

.mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--accent-2), #5a22c9);
  color: #fff; font-weight: 800; font-size: 14px;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; padding-right: 2px; }
.nav-cap {
  margin: 12px 10px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  color: var(--text-2); font-size: 13.5px;
  transition: background .13s ease, color .13s ease;
}
.nav-item:hover { background: var(--surface-2); color: #fff; }
.nav-item.active { background: var(--accent-soft); color: #b795ff; }
.nav-item svg { width: 17px; height: 17px; fill: currentColor; opacity: .75; flex: 0 0 17px; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  font-style: normal; font-size: 10px; font-weight: 600;
  padding: 1px 7px; border-radius: 6px;
  color: #b795ff; background: var(--accent-soft); border: 1px solid rgba(124, 59, 237, .25);
}
.nav-badge.green { color: #7ff0bd; background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .28); }
.nav-badge.blue { color: #8bb8ff; background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .28); }
.nav-badge:empty { display: none; }

.side-foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; gap: 8px;
}

.content { min-width: 0; display: flex; flex-direction: column; padding: 0 12px 12px 12px; }

/* ---------------------------------------------------------------- Kopfzeile */
.topbar {
  position: sticky; top: 12px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
  padding: 10px 14px;
  min-height: 56px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.page-title { min-width: 0; max-width: 210px; }
.page-title strong { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title .tiny { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search {
  flex: 1 1 260px; min-width: 160px; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: #101014;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 34px;
}
.search svg { width: 15px; height: 15px; fill: var(--muted-2); flex: 0 0 15px; }
.search input {
  flex: 1; min-width: 0;
  background: none; border: 0; padding: 0; height: 32px;
  color: var(--text); font-size: 12.5px; outline: none; box-shadow: none;
}
.search input:focus { border: 0; box-shadow: none; }
.search kbd {
  font: 600 10px/1 var(--font); color: var(--muted-2);
  border: 1px solid var(--border); border-radius: 5px; padding: 3px 5px;
  background: #0c0c10;
}

.icon-btn {
  display: none; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text-2); cursor: pointer;
  padding: 0;
}
.icon-btn svg { width: 17px; height: 17px; fill: currentColor; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px;
  background: #101014;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px; color: var(--text-2);
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .16); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(245, 165, 36, .16); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(239, 68, 68, .16); }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 3px 4px 3px 3px; }
.user-chip .avatar {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(150deg, var(--accent-2), #5a22c9);
  color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.user-chip strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.user-chip .tiny { font-size: 10.5px; color: var(--accent-2); }

/* ---------------------------------------------------------------- Buttons */
button, .btn {
  font: inherit; font-size: 12.5px;
  border-radius: 9px;
  padding: 8px 13px;
  cursor: pointer;
  transition: background .13s ease, border-color .13s ease, transform .06s ease;
}
button:active { transform: translateY(1px); }
button.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: 1px solid #6f2fd8;
  color: #fff; font-weight: 600;
}
button.primary:hover { filter: brightness(1.08); }
button.ghost {
  background: #101014;
  border: 1px solid var(--border);
  color: var(--text-2);
}
button.ghost:hover { background: var(--surface-3); color: #fff; }
button.tiny { padding: 5px 10px; font-size: 11.5px; background: #101014; border: 1px solid var(--border); color: var(--text-2); }
button.danger { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .4); color: #ff9aa5; }
button.wide { width: 100%; }
button:disabled { opacity: .5; cursor: default; }
select.role-select { padding: 5px 8px; font-size: 12px; width: auto; }
button.chip { padding: 4px 9px; font-size: 11px; background: #101014; border: 1px solid var(--border); color: var(--text-2); border-radius: 7px; }

/* ---------------------------------------------------------------- Formular */
input, select, textarea {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 9px 11px;
  background: #101014;
  border: 1px solid #26262e;
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border-color .13s ease, box-shadow .13s ease;
}
input::placeholder { color: #5f6672; }
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 59, 237, .16);
}
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
label { display: block; margin: 12px 0 6px; font-size: 12px; color: var(--text-2); }

/* ---------------------------------------------------------------- Inhalt */
main { padding: 12px 0 28px; display: flex; flex-direction: column; gap: 12px; }
#security-view { padding: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }

.panel {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.panel-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2 { font-size: 15px; font-weight: 600; }
.panel-head .muted { margin-left: auto; }
.panel-head button + .muted { margin-left: 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; }

.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  background:
    radial-gradient(700px 200px at 12% -40%, rgba(124, 59, 237, .18), transparent 70%),
    var(--card);
}
.welcome h1 { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.welcome .w-copy p { margin: 6px 0 0; font-size: 13px; }
.welcome .w-time { text-align: right; }
.welcome .w-time strong { display: block; font-size: 28px; font-weight: 650; letter-spacing: -.02em; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: flex; flex-direction: column; gap: 3px;
}
.kpi .label { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.kpi strong { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.kpi .sub { font-size: 11.5px; color: var(--muted); }

.bar { margin-top: 9px; height: 4px; border-radius: 999px; background: #1b1b22; overflow: hidden; }
.bar i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .45s ease;
}

/* ---------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2);
  padding: 0 10px 9px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 10px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255, 255, 255, .02); }
td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent;
}
.badge.ok { background: rgba(34, 197, 94, .12); color: #7ff0bd; border-color: rgba(34, 197, 94, .26); }
.badge.warn { background: rgba(245, 165, 36, .12); color: #ffcf7d; border-color: rgba(245, 165, 36, .28); }
.badge.bad { background: rgba(239, 68, 68, .12); color: #ff9aa5; border-color: rgba(239, 68, 68, .28); }

/* ---------------------------------------------------------------- Serverkarten */
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.host {
  background: #0d0d12;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.host:hover { border-color: rgba(124, 59, 237, .5); background: #101017; transform: translateY(-1px); }
.host-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.host-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.host-name h3 { font-size: 13px; font-weight: 600; }
.host-name .ip { display: block; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.host-os { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #14141b; flex: 0 0 26px; }
.host-os svg { width: 15px; height: 15px; }
.host-st {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600; text-transform: capitalize;
  color: var(--muted); white-space: nowrap;
}
.host .role { margin-top: 9px; font-size: 11.5px; color: var(--muted); min-height: 17px; }
.host .metrics { display: flex; gap: 16px; margin-top: 9px; font-size: 11px; color: var(--muted-2); }
.host .metrics b { display: block; font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.host canvas { margin-top: 8px; width: 100%; height: 34px; }
.host .ports { margin-top: 8px; }

.port {
  display: inline-block; padding: 1px 6px; margin: 2px 3px 0 0;
  border-radius: 5px; font-size: 10.5px; font-variant-numeric: tabular-nums;
  background: #101017; border: 1px solid var(--border); color: var(--muted);
}
.port.up { border-color: rgba(34, 197, 94, .3); color: #7ff0bd; }
.port.down { border-color: rgba(239, 68, 68, .25); color: #ff9aa5; opacity: .8; }
.port-row { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------------------------------------------------------------- Netz/System/MC */
.net-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 12px; }
.net-stats div { display: flex; flex-direction: column; }
.net-stats strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.sys-item { background: #0d0d12; border: 1px solid var(--border-soft); border-radius: 12px; padding: 11px 12px; }
.sys-item strong { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
canvas { max-width: 100%; }
.spark { width: 100%; height: 46px; }
.iface-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.iface-list span {
  font-size: 10.5px; color: var(--muted); padding: 2px 7px;
  border: 1px solid var(--border); border-radius: 5px; background: #101017;
}

.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mc { background: #0d0d12; border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px; }
.mc.off { opacity: .62; }
.mc .nm { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; }
.mc .pl { font-size: 19px; font-weight: 650; margin-top: 8px; font-variant-numeric: tabular-nums; }
.mc .ver { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* ---------------------------------------------------------------- Login */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 480px at 16% -12%, rgba(124, 59, 237, .2), transparent 70%),
    radial-gradient(760px 380px at 90% 112%, rgba(124, 59, 237, .12), transparent 70%),
    var(--bg);
}
.login-card {
  width: min(420px, 100%);
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
}
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-card .brand h1 { font-size: 18px; }
.login-card .brand p { margin: 2px 0 0; font-size: 12px; }
.login-card .switch { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- Overlay */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(4, 4, 6, .74);
  backdrop-filter: blur(6px);
  animation: fadeIn .16s ease;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(820px, 100%);
  max-height: min(90vh, 980px);
  display: flex; flex-direction: column;
  background: var(--card-solid);
  border: 1px solid #26262e;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: modalIn .2s cubic-bezier(.2, .8, .3, 1);
}
.modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0f0f15, var(--card-solid));
}
.m-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.m-logo {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-soft); border: 1px solid rgba(124, 59, 237, .28);
  color: #b795ff; flex: 0 0 40px;
}
.m-logo svg { width: 20px; height: 20px; }
.m-title h2 { font-size: 15.5px; font-weight: 600; }
.m-title .tiny { font-size: 11.5px; }
.m-x { display: grid; margin-left: auto; }
.modal-body {
  padding: 18px 18px 20px;
  overflow-y: auto;
  flex: 1 1 auto;      /* nimmt den freien Platz, Fusszeile bleibt sichtbar */
  min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.m-empty {
  display: grid; place-items: center; min-height: 96px; text-align: center;
  border: 1px dashed var(--border); border-radius: 10px;
  color: var(--muted-2); font-size: 12px; padding: 14px;
}
.pct { font-weight: 600; font-variant-numeric: tabular-nums; }
.pct.ok { color: #7ff0bd; }
.pct.warn { color: #ffcf7d; }
.pct.bad { color: #ff9aa5; }

.modal-section { border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; background: #0d0d12; }
.modal-section h3 {
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 10px;
}
.dl { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.6fr); gap: 8px 16px; margin: 0; }
@media (min-width: 760px) {
  /* zwei Paare nebeneinander: halbiert die Hoehe, der Verlauf passt ins Bild */
  .dl { grid-template-columns: minmax(110px, .7fr) minmax(0, 1.5fr) minmax(110px, .7fr) minmax(0, 1.5fr); }
}
.dl dt { font-size: 12px; color: var(--muted); }
.dl dd { margin: 0; font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.dl dd code { font-size: 11px; color: var(--text-2); }

.modal-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #0a0a0e;
}
.modal-foot #m-foot-note { margin-right: auto; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Diverses */
.qr-box { width: 190px; height: 190px; background: #fff; border-radius: 12px; display: grid; place-items: center; padding: 8px; }
.qr-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.secret { display: inline-block; background: #101017; border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; font-size: 12px; letter-spacing: .04em; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.inline-form input { width: auto; flex: 1 1 200px; }
.pw-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.host-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.host-form button { margin-top: 2px; }
.steps { margin: 8px 0 12px 18px; padding: 0; font-size: 12.5px; color: var(--text-2); }
.steps li { margin-bottom: 4px; }
.totp-status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0d0d12; border: 1px solid var(--border-soft); border-radius: 10px; font-size: 12.5px; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 2px 2px 0; }
.scan-result { background: #0d0d12; border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; font-size: 12px; white-space: pre-wrap; }
.warn-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px;
  background: rgba(245, 165, 36, .09);
  border: 1px solid rgba(245, 165, 36, .3);
  border-radius: 12px;
  color: #ffd79a; font-size: 12.5px;
}
.warn-banner button { background: rgba(245, 165, 36, .16); border: 1px solid rgba(245, 165, 36, .4); color: #ffd79a; }

/* ---------------------------------------------------------------- Mobil */
@media (max-width: 1440px) {
  .page-title .tiny { display: none; }
  #security-btn { display: none; }
}
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .search { display: none; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side-wrap {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: 288px; padding: 10px;
    pointer-events: none;           /* geschlossen keine Klicks abfangen */
  }
  .side {
    position: static; height: calc(100vh - 20px); width: 268px;
    transform: translateX(-115%);
    visibility: hidden;
    transition: transform .2s ease, visibility .2s ease;
    box-shadow: 0 0 60px rgba(0, 0, 0, .7);
  }
  .side.open { transform: none; visibility: visible; pointer-events: auto; }
  .icon-btn { display: grid; }
  .content { padding: 0 10px 10px; }
  .topbar { top: 8px; margin-top: 8px; padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .page-title .tiny { display: none; }
  .topbar-right { gap: 6px; }
  .topbar-right button.ghost { padding: 7px 10px; font-size: 11.5px; }
  .user-chip { display: none; }
  main, #security-view { padding-top: 8px; }
  .pw-grid, .host-form { grid-template-columns: minmax(0, 1fr); }
  .welcome { padding: 18px; }
  .welcome h1 { font-size: 21px; }
  .welcome .w-time strong { font-size: 22px; }
  .modal { padding: 0; align-items: end; }
  .modal-card {
    width: 100%; max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: sheetIn .22s cubic-bezier(.2, .8, .3, 1);
  }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dt { margin-top: 6px; }
}

@keyframes sheetIn { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .pill#clock { display: none; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot button { flex: 1 1 0; }
}

/* ---------------------------------------------------------------- Server-Detail (Overlay) */
.srv-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 7px;
  background: #101017; border: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}

.gauge-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gauge {
  display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden;
  padding: 12px 14px;
  background: #0d0d12;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.gauge .ring { position: relative; width: 56px; height: 56px; flex: 0 0 56px; }
.gauge .ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #1c1c24; stroke-width: 5; }
.ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .5s ease; }
.ring-fg.ok { stroke: #22c55e; }
.ring-fg.warn { stroke: #f5a524; }
.ring-fg.bad { stroke: #ef4444; }
.ring-fg.accent { stroke: var(--accent-2); }
.ring-val {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.gauge-meta { min-width: 0; }
.gauge-label { display: block; font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; }
.gauge-sub { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  padding: 0; border: 0; border-bottom: 1px solid var(--border);
  background: none;
}
.tab {
  flex: 0 0 auto;
  padding: 9px 12px; border-radius: 0;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
}
.tab:hover { color: #fff; }
.tab.active { color: #fff; border-bottom-color: var(--accent-2); background: none; }
.tab em {
  font-style: normal; font-size: 10px; margin-left: 5px;
  padding: 1px 5px; border-radius: 5px;
  background: rgba(255, 255, 255, .06); color: var(--muted);
}
.tab.active em { background: rgba(124, 59, 237, .25); color: #d9c6ff; }

.pane { animation: fadeIn .16s ease; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.port-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: #0d0d12; border: 1px solid var(--border); border-radius: 11px;
}
.port-card .pc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: 0 0 7px; }
.port-card.up .pc-dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.port-card.down .pc-dot { background: var(--bad); box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.port-card .pc-main { display: flex; flex-direction: column; min-width: 0; }
.port-card .pc-main strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.port-card .pc-main span { font-size: 11px; color: var(--muted-2); }
.port-card .pc-state { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

#m-foot-note code { font-size: 11.5px; color: var(--text-2); }

@media (max-width: 760px) {
  .gauge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gauge { padding: 10px; gap: 9px; }
  .gauge .ring, .gauge .ring svg { width: 46px; height: 46px; }
  .gauge .ring { flex-basis: 46px; }
  .ring-val { font-size: 11.5px; }
  .tabs { position: sticky; top: 0; z-index: 2; }
}

/* Gruppen im Overlay */
.pane.groups { display: flex; flex-direction: column; gap: 14px; }
.group h4 {
  margin: 0 0 8px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-2);
}
.group .dl { grid-template-columns: minmax(120px, .8fr) minmax(0, 1.6fr); }
.gauge.info { border-style: solid; border-color: var(--border); }
.gauge.info .info-val {
  display: grid; place-items: center;
  width: 56px; height: 56px; flex: 0 0 56px;
  font-size: 22px; font-weight: 650; color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}

/* Kompakte Fusszeile auf kleinen Geraeten: nur Aktualisieren und die Hauptaktion */
@media (max-width: 560px) {
  .modal-foot { flex-wrap: nowrap; gap: 6px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  #m-foot-note, #m-copy, #m-close { display: none; }
  #m-refresh { flex: 0 0 auto; }
  #m-ssh { flex: 1 1 auto; }
}

/* Kleine Tabelle im Overlay */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table thead th {
  text-align: left; font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted-2); padding: 0 8px 8px; border-bottom: 1px solid var(--border);
}
.mini-table tbody td { padding: 8px; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.mini-table tbody tr:last-child td { border-bottom: 0; }
.mini-table tbody tr:hover { background: rgba(255, 255, 255, .02); }

/* Dateien und Container im Overlay */
.files-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; font-size: 12px; }
.crumb { background: #101017; border: 1px solid var(--border); color: var(--text-2); padding: 3px 6px; border-radius: 7px; font-size: 11.5px; }
.crumb:hover { border-color: var(--accent); color: #fff; }
.crumb-sep { color: var(--muted-2); margin: 0 1px; }
.crumb-label { color: var(--muted-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }
.file-list { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-height: 320px; overflow-y: auto; }
.file-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 80px 84px; gap: 8px; align-items: center; padding: 7px 11px; border-bottom: 1px solid var(--border-soft); cursor: pointer; font-size: 12.5px; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: rgba(124, 59, 237, .08); }
.file-row.dir .f-name { color: #c4a6ff; font-weight: 600; }
.file-row .f-icon { color: var(--muted-2); font-size: 11px; }
.file-row .f-size, .file-row .f-time { text-align: right; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.file-row .f-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview {
  margin: 10px 0 0; padding: 12px; max-height: 260px; overflow: auto;
  background: #0a0a0e; border: 1px solid var(--border); border-radius: 12px;
  font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-2); white-space: pre-wrap;
}
.cont-list { display: flex; flex-direction: column; gap: 6px; }
.cont-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: #0d0d12; cursor: pointer; }
.cont-row:hover { border-color: rgba(124, 59, 237, .5); }
.cont-main { min-width: 0; flex: 1; }
.cont-main strong { display: block; font-size: 12.5px; }
.cont-main .tiny { font-size: 10.5px; }
.mount-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mount-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 11px; background: #0d0d12; }
.mount-row strong { font-size: 12px; }
.mount-row button { margin-left: auto; }

.crumb-roots { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.crumb-path { display: flex; align-items: center; gap: 0; flex-wrap: wrap; margin-top: 2px; }
.files-bar { flex-direction: column; align-items: flex-start; }

.cont-row.native { opacity: .72; cursor: default; }
.cont-row.native:hover { border-color: var(--border); }

/* Dateimanager im Stil des Panels */
.fm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fm-bar .files-bar { flex: 1 1 auto; margin: 0; }
.fm-actions { display: flex; gap: 6px; margin-left: auto; }
.fm-actions button { padding: 6px 10px; font-size: 11.5px; }
.file-head {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) 90px 130px 28px;
  gap: 8px; padding: 7px 11px;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted-2);
  border-bottom: 1px solid var(--border); background: #0b0b10;
}
.file-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 90px 130px 28px; gap: 8px; align-items: center;
  padding: 7px 11px; border-bottom: 1px solid var(--border-soft); cursor: pointer; font-size: 12.5px; }
.file-row:hover { background: rgba(124, 59, 237, .08); }
.file-row .f-ico { width: 16px; height: 16px; border-radius: 4px; display: block; background: #22222c; }
.file-row .f-ico.dir { background: var(--accent); opacity: .85; }
.file-row .f-ico.code { background: #2a6fdb; opacity: .8; }
.file-row .f-ico.img { background: #1f9d6b; opacity: .8; }
.file-row .f-ico.file { background: #3a3a48; }
.file-row .f-size, .file-row .f-time { text-align: right; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.file-row .f-menu { background: none; border: 0; color: var(--muted); padding: 0 4px; font-size: 15px; line-height: 1; }
.file-row .f-menu:hover { color: #fff; }
.editor { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #0a0a0e; }
.editor-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.editor-head code { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-head button:first-of-type { margin-left: auto; }
#fm-text {
  width: 100%; min-height: 240px; border: 0; border-radius: 0; resize: vertical;
  background: #0a0a0e; color: var(--text-2); padding: 12px;
  font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
}
#fm-text:focus { box-shadow: none; border: 0; }

/* Server-Seite mit eigener Adresse */
.srv-page-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 12px;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px;
}
.srv-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srv-id h1 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.srv-id .m-logo { width: 38px; height: 38px; }
.srv-actions { margin-left: auto; display: flex; gap: 8px; }
.srv-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.srv-tab {
  padding: 9px 13px; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 600; text-decoration: none;
}
.srv-tab:hover { color: #fff; }
.srv-tab.active { color: #fff; border-bottom-color: var(--accent-2); }
.srv-pane { display: flex; flex-direction: column; gap: 12px; }
.srv-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.term-frame { width: 100%; height: 460px; border: 1px solid var(--border); border-radius: 12px; background: #0a0a0e; }
.group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2); margin: 14px 0 8px; }
@media (max-width: 760px) {
  .srv-actions { width: 100%; margin-left: 0; }
  .srv-actions button { flex: 1 1 0; }
  .term-frame { height: 320px; }
}
