:root{
  --bg:#0e0e11; --panel:#15151a; --panel-2:#1a1a20; --accent:#e53935; --accent-2:#ff6b6b;
  --ok:#22c55e; --warn:#f59e0b; --err:#ef4444;
  --text:#f1f1f3; --muted:#9aa0a6; --line:#23232a; --shadow:0 10px 30px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font-family:Inter,system-ui,Segoe UI,Arial;
  background:radial-gradient(1200px 800px at 10% -10%, #17171d 0%, #0e0e11 50%) fixed;
  color:var(--text);
}
a{color:inherit}

.header{
  position:sticky; top:0; z-index:40;
  padding:18px 16px; border-bottom:1px solid var(--line);
  background:linear-gradient(90deg,#0e0e11, #17171d 55%, #0e0e11);
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.brand{display:flex; align-items:center; gap:12px; font-weight:800; letter-spacing:.5px}
.brand .logo{
  width:36px; height:36px; border-radius:50%;
  background:conic-gradient(from 210deg, var(--accent), #751616 40%, #2b0f10 60%);
  display:grid; place-items:center; font-size:14px; font-weight:900;
  box-shadow:0 6px 16px rgba(229,57,53,.25), inset 0 0 20px rgba(0,0,0,.45);
}
.brand .title{font-size:18px}
.header .right .btn{margin-left:8px}

.wrap{max-width:1150px; padding:20px 16px; margin:0 auto}
.panel{
  background:linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--line); border-radius:16px; padding:18px; box-shadow:var(--shadow);
}
h2{margin:0 0 12px 0; font-size:20px}
.table{width:100%; border-collapse:separate; border-spacing:0 10px}
.table thead th{font-size:12px; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); text-align:left; padding:0 10px}
.table tbody td{
  background:#141419; border:1px solid var(--line);
  padding:12px 10px; vertical-align:middle;
}
.table tbody tr td:first-child{border-top-left-radius:12px; border-bottom-left-radius:12px}
.table tbody tr td:last-child{border-top-right-radius:12px; border-bottom-right-radius:12px}
.actions{display:flex; flex-wrap:wrap; gap:8px}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:10px; border:1px solid #2a2a33; background:#1b1b21;
  color:var(--text); text-decoration:none; cursor:pointer; transition:.15s transform, .15s border-color;
  user-select:none;
}
.btn:hover{border-color:#3c3c47; transform:translateY(-1px)}
.btn:disabled{opacity:.55; cursor:not-allowed; transform:none}
.btn.acc{background:linear-gradient(180deg, var(--accent), #b52d2a); border-color:#922825}
.btn.ok{background:#17331f; border-color:#204a2b}
.btn.warn{background:#3b2d10; border-color:#5a430f}
.btn.neu{background:#1b1b21}
.icon{opacity:.9}

.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px; font-size:12px; line-height:1;
  border:1px solid #2a2a33; background:#121217; color:var(--muted);
}
.badge.ok{color:#b5f7c9; background:#132417; border-color:#214125}
.badge.err{color:#ffd0d0; background:#2a1515; border-color:#4a2323}
.badge.warn{color:#ffe1b0; background:#2c210f; border-color:#4a3a16}

.footer{color:var(--muted); text-align:center; padding:28px}

.row{display:flex; gap:16px; flex-wrap:wrap}
.col{flex:1 1 480px}

.flash{margin:0 0 16px; padding:12px; border-radius:10px; background:#2a1212; border:1px solid #4f1d1d; color:#e0b5b5}

/* Modal */
.modal-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; align-items:center; justify-content:center; z-index:60}
.modal{width:min(900px, 90vw); max-height:80vh; overflow:auto; background:#111116; border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow)}
.modal .modal-head{display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--line)}
.modal .modal-body{padding:16px}
.modal pre{margin:0; padding:12px; background:#0c0c10; border:1px solid #1f1f28; border-radius:10px; white-space:pre-wrap; color:#cfd3ff}

/* Toast */
.toast{position:fixed; right:16px; bottom:16px; display:flex; flex-direction:column; gap:10px; z-index:70}
.toast .t{padding:10px 14px; border-radius:10px; border:1px solid #2a2a33; background:#16161c; box-shadow:var(--shadow)}
.t.ok{border-color:#214125; background:#132417; color:#c2ffd8}
.t.err{border-color:#4a2323; background:#2a1515; color:#ffd6d6}

/* Inputs (Login-Seite bleibt kompatibel) */
.input{width:100%; padding:12px; border-radius:10px; border:1px solid #2a2a33; background:#111116; color:var(--text)}
/* MC-Style */
.console.mc { background:#0a0f0a; border-color:#153015; }
.console.mc .console-log { color:#9df79d; line-height:1.25; }
.console .ts    { color:#6c7a6c; }   /* [21:26:01]  */
.console .thr   { color:#55cccc; }   /* [Server thread] */
.console .lvlI  { color:#6df36d; }   /* INFO  */
.console .lvlW  { color:#ffd45e; }   /* WARN  */
.console .lvlE  { color:#ff6b6b; }   /* ERROR */
.console .mod   { color:#b58cff; }   /* [minecraft/…] */
.console .cmd   { color:#8ad2ff; }   /* > eingegebener Befehl */
.console .sys   { color:#aaaaaa; font-style:italic; } /* Systemmeldungen */
/* ==== Servers Grid – Tuning ==== */

/* systemd-Chip komplett ausblenden */
.srv-foot .srv-chip { display: none !important; }

/* kompaktere Cards + schöner Schatten */
.srv-card{
  border-radius:16px;
  padding:16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* Header dichter, Status-Badge schwebend oben rechts */
.srv-top{ margin-bottom:8px; }
.srv-status{ position:absolute; top:10px; right:12px; }

/* Icon optisch runder + feiner Ring */
.srv-icon{ width:32px; height:32px; border-radius:10px; box-shadow: 0 0 0 1px #2a2a33, 0 4px 10px rgba(0,0,0,.25); }

/* Typo feintunen */
.srv-name{ font-weight:800; font-size:16px; letter-spacing:.2px; }
.srv-sub{ font-size:12px; opacity:.8; }

/* Badges etwas kleiner & knackiger */
.srv-badge{ padding:3px 9px; font-size:12px; border-radius:999px; }
.srv-badge--ok{ background:#0d2013; border-color:#1b5a33; color:#8bf0b5; }
.srv-badge--err{ background:#281212; border-color:#5a2020; color:#ff9696; }
.srv-badge--unk{ background:#161624; border-color:#2b2b3a; color:#cfd2e6; }

/* Buttons gleich hoch, pilliger */
.srv-actions{ margin-top:10px; gap:8px; }
.srv-actions .btn{ height:34px; padding:6px 12px; border-radius:12px; }

/* Footer: nur „Öffnen“ rechts */
.srv-foot{ margin-top:10px; justify-content:flex-end; }

/* Grid etwas luftiger auf großen Screens */
.srv-grid{ gap:18px; }

/* ==== Navigation (Dashboard Header) ==== */
.header .nav .btn {
  background: #17171f;
  border: 1px solid #262633;
  border-radius: 12px;
}
.header .nav .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.header .nav .btn.active {
  background: #20202a;
  border-color: #3a3a4a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
/* ====== LAYOUT: Header • Sidebar • Main • Footer ====== */
.layout-shell{min-height:100vh;display:flex;flex-direction:column;background:#0f0f14}
.layout-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#121217;border-bottom:1px solid #1f1f27}
.brand{display:flex;align-items:center;gap:12px}
.logo{width:32px;height:32px;border-radius:8px;background:#d11;display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff}
.brand-text{font-weight:800;letter-spacing:.3px}
.header-right{display:flex;gap:10px;align-items:center}
.header-right .who{opacity:.85}

.layout-body{display:grid;grid-template-columns:280px 1fr;gap:18px;flex:1;max-width:1400px;width:100%;margin:18px auto;padding:0 16px}
.layout-sidebar{position:sticky;top:12px;height:calc(100vh - 24px - 48px); /* header + footer margin */
  overflow:auto;background:linear-gradient(180deg,#121218,#141620);border:1px solid #202231;border-radius:14px;padding:10px;box-shadow:0 10px 28px rgba(0,0,0,.28)}
.layout-main{min-height:600px}

/* Footer */
.layout-footer{padding:12px 16px;border-top:1px solid #1f1f27;background:#101015;opacity:.9}

/* ====== SIDEBAR NAV ====== */
.side{display:block}
.side-sep{border:0;border-top:1px solid #26283a;margin:8px 4px}

.side-link{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid transparent;border-radius:12px;color:#e8e9ef;text-decoration:none}
.side-link .ico{opacity:.85}
.side-link:hover{background:#181a25;border-color:#2a2c3f}
.side-link.is-active{background:#1a1d2a;border-color:#33364a;box-shadow:inset 0 0 0 1px rgba(255,255,255,.04)}
.side-link .side-icon{width:18px;height:18px;border-radius:4px;object-fit:cover;box-shadow:0 0 0 1px #2b2b3a}

.side-section{margin:6px 2px 10px;border:1px solid #202231;border-radius:12px;background:#131520}
.side-section.open .chev{transform:rotate(90deg)}
.side-title{display:flex;align-items:center;gap:10px;cursor:pointer;padding:10px 12px;font-weight:700;user-select:none}
.side-title .chev{margin-left:auto;transition:transform .18s ease;opacity:.7}
.side-list{list-style:none;margin:0;padding:6px}
.side-list li{margin:2px 0}
.side-empty{opacity:.7;padding:8px 12px}

/* ====== PANELS (Main) ====== */
.panel{background:linear-gradient(180deg,#15151a,#1a1a20);border:1px solid #23232a;border-radius:16px;padding:16px;box-shadow:0 10px 30px rgba(0,0,0,.35)}

/* ====== OPTIONAL: Buttons in Header/Sidebar etwas runder ====== */
.header .btn, .side .btn{border-radius:12px}

/* ==== Account / Settings ==== */
.settings-card{padding:18px}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.settings-title{display:flex;align-items:center;gap:12px}
.settings-ico{width:36px;height:36px;border-radius:10px;background:#181a25;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1px #2a2c3f}
.settings-sub{opacity:.8;font-size:13px;margin-top:2px}

/* Form Layout */
.form{display:block}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width: 720px){ .grid-2{grid-template-columns:1fr} }

.form-group{display:flex;flex-direction:column;gap:6px}
.label{font-weight:700;font-size:14px}
.hint{font-size:12px;opacity:.75}

.form-actions{display:flex;gap:10px;margin-top:12px}
.sep{border:0;border-top:1px solid #26283a;margin:16px 0}

/* Flash */
.flash{border:1px solid #2a2c3f;border-radius:10px;padding:10px 12px;margin:8px 0}
.flash.ok{background:#0f2314;border-color:#1e5d37;color:#8ef0b7}
.flash.err{background:#2a1414;border-color:#6a2323;color:#ff9a9a}

/* --- Fix: Layout darf schrumpfen, nichts sprengt die Breite --- */
.layout-main { 
  min-width: 0;              /* wichtig bei Flex-Layouts */
}

.card, .console {
  max-width: 100%;
  overflow: hidden;          /* Sicherheit: nix außerhalb rendern */
}

/* Konsole: lange Zeilen handhaben, ohne das Layout zu sprengen */
.console-log {
  max-width: 100%;
  width: 100%;
  /* Variante A: Horizontal scrollen (Terminal-typisch, behält exakte Formatierung) */
  white-space: pre;          /* keine automatischen Umbrüche */
  overflow-x: auto;          /* horizontaler Scrollbalken statt Layout-Weitung */
  overflow-y: auto;          /* vertikal wie gehabt */
}

/* Falls du lieber weiche Umbrüche in der Konsole möchtest (statt Scrollen),
   nimm diese Variante B und entferne die 4 Zeilen oben zu white-space/overflow-x:
.console-log {
  white-space: pre-wrap;     /* erhält Spaces/Zeilenumbrüche, bricht lange Wörter */
  word-break: break-word;    /* bricht sehr lange Tokens (z.B. NBT-Strings) */
}
*/

/* Eingabezeile & Buttons passen sich an die Breite an */
.console-input {
  flex-wrap: nowrap;
}
.console-input .input {
  min-width: 0;              /* verhindert, dass das Input-Feld zu breit wird */
}
