/* Projekt-Zero KVM-Panel – Aufbau wie ein Gameserver-Panel, Farben von Projekt-Zero */
:root {
  --bg: #0b0707; --side: #120b0a; --surface: #170f0e; --surface-2: #1e1311; --head: #22140f;
  --line: #3a201b; --line-soft: #2a1814; --text: #ece4e1; --muted: #a8958f; --dim: #7d6a64;
  --accent: #d4372c; --accent-2: #ff5a47; --ok: #4caf6d; --warn: #e8c36a; --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); }
a { color: var(--accent-2); text-decoration: none; }
code { font-family: var(--mono); font-size: .92em; background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); } .hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; } .nowrap { white-space: nowrap; } .r { text-align: right; }
.ico { width: 19px; height: 19px; flex: none; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 18px; color: var(--text); }
.brand .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; font: 800 21px var(--display); color: #fff;
  box-shadow: 0 6px 18px rgba(212,55,44,.35); }
.brand b { display: block; font: 800 17px/1.1 var(--display); letter-spacing: .06em; color: var(--accent-2); }
.brand small { display: block; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.side nav { padding: 4px 12px; flex: 1; }
.side-h { margin: 14px 12px 6px; font: 800 12.5px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #cdbcb6; }
.side-sep { height: 1px; background: var(--line-soft); margin: 12px 10px 4px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: #d7cac6; font-weight: 500; }
.side nav a .ico { color: var(--muted); }
.side nav a:hover { background: rgba(255,255,255,.035); color: #fff; }
.side nav a.on, .side nav a.cur { color: var(--accent-2); }
.side nav a.on { background: rgba(212,55,44,.1); }
.side nav a.on .ico, .side nav a.cur .ico { color: var(--accent-2); }
.side-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.side-foot a { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.side-foot a:hover { color: var(--text); }
.who { color: var(--muted); }
.main { min-width: 0; }
.content { padding: 26px 30px 50px; max-width: 1500px; }
.menu-btn { display: none; }

/* ---------- Kopfleiste ---------- */
.topbar { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.tb-art { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 75% -30%, rgba(212,55,44,.55), transparent 55%),
  linear-gradient(90deg, #160d0b 0%, #2a1310 55%, #3a1511 100%); }
.tb-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 2px, transparent 2px 9px); }
.tb-row { position: relative; display: flex; align-items: center; gap: 34px; flex-wrap: wrap; padding: 22px 30px; }
.tb-item { font-size: 15.5px; } .tb-item b { font-weight: 700; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.tb-toggle { display: flex; align-items: center; gap: 10px; }
.tb-state { font-weight: 500; }
.tb-busy { display: flex; align-items: center; gap: 10px; color: var(--warn); font-weight: 600; }
.switch { width: 44px; height: 24px; border-radius: 99px; border: 0; background: #4a3a36; position: relative; cursor: pointer; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #d8ccc8; transition: left .2s, background .2s; }
.switch.is-on { background: var(--ok); } .switch.is-on i { left: 23px; background: #fff; }
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.copy { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,.25); }
.copy.done { color: var(--ok); }

/* ---------- Seite ---------- */
.page-h { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.page-h h1 { margin: 0; font: 800 32px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.page-h .muted b { color: var(--text); font-weight: 500; }
.page-h-r { margin-left: auto; display: flex; align-items: center; gap: 8px; font-weight: 700; border-bottom: 2px solid var(--accent); padding-bottom: 6px; }

.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 22px; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 16px; padding: 18px 24px; background:
  radial-gradient(circle at 92% 30%, rgba(212,55,44,.12), transparent 40%), var(--head); border-bottom: 1px solid var(--line-soft); }
.card-ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), #8f1f17); box-shadow: 0 6px 16px rgba(212,55,44,.25); }
.card-ic .ico { width: 22px; height: 22px; }
.card-h h2 { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: .01em; }
.card-h p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.card-b { padding: 20px 24px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.lbl { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); } .mt { margin-top: 16px; }
.big { margin: 0 0 8px; font: 800 26px/1.15 var(--display); } .big small { font-size: 15px; color: var(--muted); font-weight: 500; }
.bigbar { position: relative; height: 46px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.bigbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(212,55,44,.55), rgba(255,90,71,.75)); transition: width .4s; }
.bigbar span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 700; }
.bar { height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.kv { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; gap: 10px 20px; margin: 0 0 14px; }
.kv dt { font-weight: 600; } .kv dd { margin: 0; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--muted); }
.pill.ok { background: rgba(76,175,109,.17); color: var(--ok); } .pill.bad { background: rgba(212,55,44,.2); color: #ff8a80; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 99px; border: 1.5px solid var(--line); background: transparent; color: var(--text);
  font: 600 14.5px var(--font); cursor: pointer; transition: .15s; }
.btn:hover { border-color: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { border-color: rgba(212,55,44,.6); color: #ff8a80; } .btn-danger:hover { background: var(--accent); color: #fff; }
.btn-ghost { border-color: #5a3a33; color: #d9ccc8; }
.btn-sm { padding: 5px 13px; font-size: 13px; } .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.wide { width: 100%; justify-content: center; padding: 12px; font-size: 16px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
form.inline, .act { display: inline; margin: 0; }
input, select, textarea { font: inherit; color: var(--text); background: #0f0908; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; } .stack label { width: 100%; }
.row-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.pwform input { padding: 5px 10px; width: 150px; font-size: 13px; }
textarea.code { width: 100%; min-height: 540px; font: 13px/1.55 var(--mono); white-space: pre; resize: vertical; tab-size: 4; margin-bottom: 14px; }

.flash { padding: 12px 16px; border-radius: 10px; margin: 0 0 18px; border: 1px solid; }
.flash.ok { border-color: rgba(76,175,109,.5); background: rgba(76,175,109,.1); }
.flash.error { border-color: rgba(212,55,44,.6); background: rgba(212,55,44,.12); }
.flash.info { border-color: rgba(232,195,106,.45); background: rgba(232,195,106,.08); }

/* ---------- Tabellen, Listen ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr.warn td { background: rgba(212,55,44,.06); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); color: #d7cac6; font-size: 14px; }
.tabs a.on { border-color: var(--accent); color: #fff; background: rgba(212,55,44,.15); }
.search { display: flex; gap: 8px; }
.stats { display: flex; gap: 34px; } .stats .lbl { display: block; margin: 0; } .stats b { font: 800 22px var(--display); }
pre.log { margin: 0; max-height: 640px; overflow: auto; background: #0d0808; border: 1px solid var(--line); border-radius: 10px; padding: 14px;
  font: 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; color: #e2d8d5; }
pre.log .e { color: #ff8a80; } pre.log .w { color: var(--warn); }
.files { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.file-list { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 20px; }
.file-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #d7cac6; font-size: 14px; }
.file-list a .ico { color: var(--muted); width: 17px; } .file-list a:hover { background: rgba(255,255,255,.035); }
.file-list a.on { background: rgba(212,55,44,.12); color: var(--accent-2); } .file-list a.on .ico { color: var(--accent-2); }
.hist { margin-top: 16px; } .hist summary { cursor: pointer; color: var(--muted); }
.hist-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.steps { padding-left: 20px; line-height: 1.9; }

/* ---------- Übersicht ---------- */
.srv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 22px; }
.srv-tile { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); color: var(--text); transition: .15s; }
.srv-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.srv-tile-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-2); }
.srv-tile-ic .ico { width: 24px; height: 24px; }
.srv-tile-txt { flex: 1; min-width: 0; } .srv-tile-txt b { display: block; font: 700 17px var(--display); } .srv-tile-txt small { color: var(--muted); }
.srv-tile .dot { width: 11px; height: 11px; border-radius: 50%; background: #c8281e; box-shadow: 0 0 0 4px rgba(200,40,30,.18); }
.srv-tile.on .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(76,175,109,.2); }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(ellipse at 50% -10%, rgba(212,55,44,.35), transparent 55%), var(--bg); }
.login-box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.login-box .brand { padding: 0 0 8px; justify-content: center; }
.login-box input { width: 100%; }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.8); }
  .menu-btn { display: block; margin: 12px 16px 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; }
  .grid2, .grid4, .files { grid-template-columns: 1fr; } .content { padding: 20px 16px; } .tb-row { padding: 18px 16px; gap: 14px 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; }
}
.qr-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.qr { border-radius: 12px; background: #fff; padding: 0; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; color: var(--text); cursor: pointer; }
label.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.inline-gap { margin: 0 0 16px; }
.btn-stop:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
