:root {
  --bg: #f4f3ef; --panel: #fff; --side: #ecebe6; --input: #fff; --text: #1b1c1a; --muted: #6f6d66; --line: #dad8d0;
  --accent: #cf4a15; --accent-h: #b53f10; --accent-soft: rgba(207, 74, 21, .1); --accent-ink: #a83b0e;
  --ok: #1c7c46; --warn: #a86400; --bad: #c23a3a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121314; --panel: #1a1b1d; --side: #16171a; --input: #121314; --text: #e9e7e2; --muted: #8e8b83; --line: #2b2d30;
    --accent: #ef6a35; --accent-h: #ff7c4a; --accent-soft: rgba(239, 106, 53, .14); --accent-ink: #ff9a6e;
    --ok: #4cc27f; --warn: #e0a23a; --bad: #ef6a6a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121314; --panel: #1a1b1d; --side: #16171a; --input: #121314; --text: #e9e7e2; --muted: #8e8b83; --line: #2b2d30;
  --accent: #ef6a35; --accent-h: #ff7c4a; --accent-soft: rgba(239, 106, 53, .14); --accent-ink: #ff9a6e;
  --ok: #4cc27f; --warn: #e0a23a; --bad: #ef6a6a; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.35rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .9rem; font-weight: 600; }
h3 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .92em; background: rgba(127, 127, 127, .14); padding: .1em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small, small { font-size: .8rem; color: var(--muted); }
.fatal { padding: 2rem; color: var(--bad); text-align: center; }
.empty { color: var(--muted); padding: 1rem 0; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Shell: Seitenleiste + Inhalt */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 14px 12px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 2px; }
.side::-webkit-scrollbar { display: none; }
.side-brand { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 6px 8px 18px; min-height: 76px; font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -.01em; }
.side-brand:hover { text-decoration: none; }
.side-brand img { width: auto; height: auto; max-height: 72px; max-width: 100%; object-fit: contain; object-position: left center; display: block; }
.side-group { margin: 16px 0 4px; padding: 0 10px; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav:hover { background: rgba(127, 127, 127, .12); color: var(--text); text-decoration: none; }
.nav.on { background: var(--accent-soft); color: var(--accent-ink); }
.content { min-width: 0; display: flex; flex-direction: column; }
.top { height: 54px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 22px;
  border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.balance { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text); padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); white-space: nowrap; }
.balance:hover { text-decoration: none; border-color: var(--accent); }
.iconbtn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line);
  border-radius: 6px; background: var(--panel); color: var(--text); cursor: pointer; padding: 0; }
.iconbtn:hover { border-color: var(--accent); color: var(--accent); }
.userwrap { position: relative; }
.usermenu { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; color: var(--text);
  font: inherit; font-weight: 500; padding: 3px 6px; border-radius: 6px; }
.usermenu:hover { background: rgba(127, 127, 127, .12); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, .18); padding: 5px; display: flex; flex-direction: column; z-index: 30; }
.menu a, .linkbtn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; color: var(--text); background: none;
  border: 0; text-align: left; font: inherit; cursor: pointer; width: 100%; }
.menu a:hover, .linkbtn:hover { background: rgba(127, 127, 127, .14); text-decoration: none; }
.linkbtn.danger { color: var(--bad); }
.avatar { border-radius: 50%; object-fit: cover; display: inline-block; }
.avatar.ph { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; }
.wrap { max-width: 1760px; width: 100%; padding: 24px clamp(14px, 2.2vw, 36px) 56px; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 18px; flex-wrap: wrap; }
.back { font-size: .8rem; color: var(--muted); display: inline-block; margin-bottom: 4px; }
.crumbs { font-family: var(--mono); font-size: .88rem; word-break: break-all; }
/* Karten & Raster */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cards .card { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.grid2, .grid3, .grid4, .grid5 { display: grid; gap: 14px; }
.grid2 { grid-template-columns: repeat(2, 1fr); } .grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); } .grid5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 800px) { .grid2, .grid3, .grid4, .grid5 { grid-template-columns: 1fr; } }
.emptybox { text-align: center; padding: 48px 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.emptybox p { margin: 0 0 14px; }
.price { font-size: 1.1rem; margin-top: auto; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; margin: 0; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; text-align: right; }
.bal { display: flex; flex-direction: column; justify-content: center; }
.bignum { font-size: 2.2rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.infobar { display: flex; gap: 32px; flex-wrap: wrap; align-items: center; }
.narrow { max-width: 900px; }
.center { text-align: center; justify-content: center; }
.srv.suspended { border-color: var(--bad); }

/* Hinweise */
.notice { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; border-radius: 4px; margin: 0 0 12px; }
.notice.bad { border-left-color: var(--bad); background: rgba(194, 58, 58, .1); }
.banner { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--bad); background: rgba(194, 58, 58, .08);
  border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; }
.banner .ico { color: var(--bad); width: 22px; height: 22px; margin-top: 1px; }
.banner strong { display: block; margin-bottom: 2px; }
.banner .row { margin-top: 10px; }
.error { color: var(--bad); font-size: .88rem; min-height: 0; }
.error:empty { display: none; }

/* Anmeldung */
.authwrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.authcard { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
.brandline { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 700; font-size: 1.25rem; letter-spacing: -.01em; }
.brandline img { max-height: 84px; max-width: 280px; width: auto; height: auto; object-fit: contain; display: block; }
.authcard h2 { text-align: center; margin-bottom: 16px; }
.authcard .btn { width: 100%; margin-top: 4px; }
.authlinks { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; margin-top: 14px; }
.auththeme { position: fixed; top: 14px; right: 14px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.lbl { font-weight: 600; font-size: .82rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--input); border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 10px; width: 100%; min-width: 0; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=file] { padding: 5px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; padding: 10px 12px; }
legend { font-weight: 600; font-size: .82rem; padding: 0 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; margin: 2px 14px 2px 0; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; }
.editor { font-family: var(--mono); font-size: .84rem; min-height: 320px; resize: vertical; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; cursor: pointer; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 3px; }
.pwbox { font-family: var(--mono); font-size: 1.1rem; letter-spacing: .04em; background: var(--input); border: 1px dashed var(--line);
  padding: 12px; border-radius: 6px; word-break: break-all; user-select: all; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
  padding: 7px 13px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.btn .ico { width: 16px; height: 16px; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(.92); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 9px; font-size: .8rem; }
.btn.small .ico { width: 14px; height: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Zeilen / Toolbar */
.row { display: flex; align-items: center; }
.gap { gap: 8px; } .row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input { max-width: 320px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* Tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 2px 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab .ico { width: 16px; height: 16px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }

/* Tabellen */
.tablewrap { overflow-x: auto; scrollbar-width: thin; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(127, 127, 127, .06); }

/* Tags */
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: .75rem; font-weight: 600; background: rgba(127, 127, 127, .18); }
.tag.ok { background: rgba(28, 124, 70, .16); color: var(--ok); }
.tag.warn { background: rgba(168, 100, 0, .16); color: var(--warn); }
.tag.bad { background: rgba(194, 58, 58, .16); color: var(--bad); }
.tag.info { background: var(--accent-soft); color: var(--accent-ink); }

/* Design-Einstellungen */
.brandprev { display: flex; align-items: center; justify-content: center; min-height: 100px; padding: 14px; border: 1px solid var(--line); border-radius: 6px;
  background: repeating-conic-gradient(rgba(127, 127, 127, .13) 0% 25%, transparent 0% 50%) 50% / 16px 16px; margin-bottom: 10px; }
.brandprev img { max-width: 100%; max-height: 90px; object-fit: contain; }
.brandprev.fav img { width: 64px; height: 64px; image-rendering: auto; }

/* Konsole */
.console, .testout, .pre { font-family: var(--mono); font-size: .8rem; background: #0d0f12; color: #d5dbe8; border-radius: 6px; padding: 12px; margin: 0;
  white-space: pre-wrap; word-break: break-all; overflow: auto; border: 1px solid #23262b; }
.console { height: 420px; margin-top: 8px; }
.testout { max-height: 240px; margin-top: 8px; }
.cmd { font-family: var(--mono); margin-top: 8px; }
.consolebar { margin-bottom: 4px; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* Dialoge & Toasts */
.modal-back { position: fixed; inset: 0; background: rgba(6, 8, 12, .6); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; width: 100%; max-width: 480px; box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.modal.wide { max-width: 860px; }
.modal h3 { font-size: 1.05rem; margin-bottom: 12px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { white-space: pre-line; background: #2a2c30; color: #fff; padding: 10px 14px; border-radius: 6px; max-width: 360px; border-left: 3px solid var(--accent); }
.toast.ok { border-left-color: #4cc27f; } .toast.err { border-left-color: #ef6a6a; } .toast.warn { border-left-color: #e8b04a; }
.baledit { display: inline-flex; align-items: center; gap: 6px; }
.baledit input { width: 110px; }

/* Dropdown mit Suchfilter */
.combo { position: relative; }
.combo-input { padding-right: 30px; cursor: pointer; }
.combo > .ico { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); width: 16px; height: 16px; }
.combo-list { position: absolute; z-index: 45; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow-y: auto; margin: 0; padding: 4px;
  list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); }
.combo-item { padding: 6px 9px; border-radius: 4px; cursor: pointer; }
.combo-item.act { background: rgba(127, 127, 127, .2); }
.combo-item.sel { color: var(--accent-ink); font-weight: 600; }
.combo-empty { padding: 8px 9px; color: var(--muted); }

/* ---------- Ergänzungen: Layout, Mobil, Server-Kopf, Schalter ---------- */
.burger, .top-brand, .scrim { display: none; }
.top { gap: 12px; }
.top-brand { align-items: center; gap: 8px; font-weight: 700; color: var(--text); min-width: 0; }
.top-brand:hover { text-decoration: none; }
.top-brand img { max-height: 36px; max-width: 150px; width: auto; height: auto; object-fit: contain; display: block; }
.top-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 14px; align-items: start; }
.cols > .card { margin: 0; }
.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Server verwalten – Kopfbereich */
.svhead { padding: 18px 20px; }
.svhead-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.svhead-title { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.svhead-title h1 { font-size: 1.6rem; overflow-wrap: anywhere; }
.svinfo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.svitem { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.svitem .lbl { color: var(--muted); font-weight: 500; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.svval { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; min-width: 0; }
.svval code { font-size: .95rem; overflow-wrap: anywhere; }
.meter { flex-basis: 100%; height: 6px; border-radius: 99px; background: rgba(127, 127, 127, .2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.meter.warn span { background: var(--warn); } .meter.bad span { background: var(--bad); }

/* Tabs als Pillen (Server verwalten) */
.tabs.pills { border-bottom: 0; gap: 6px; margin-bottom: 16px; }
.tabs.pills .tab { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); padding: 7px 14px; margin-bottom: 0; }
.tabs.pills .tab:hover { border-color: var(--muted); }
.tabs.pills .tab.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* Zugangsdaten, Gefahrenbereich */
.cred { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.cred code { padding: 6px 9px; }
.danger-zone { border-color: rgba(194, 58, 58, .55); }
.danger-zone h3 { color: var(--bad); }

/* Schalter */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 10px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.slider { position: relative; width: 44px; height: 24px; border-radius: 99px; background: rgba(127, 127, 127, .4); transition: background .15s; flex: none; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { font-weight: 600; }

/* Dialoge: Einblenden + "Plopp" bei Klick daneben */
.modal-back { animation: fadein .15s ease-out; }
.modal { animation: pop .18s ease-out; }
.modal.bump { animation: bump .32s cubic-bezier(.36, .07, .19, .97); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.045); } 55% { transform: scale(.985); } 80% { transform: scale(1.015); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .modal-back, .modal, .modal.bump { animation: none; } }

/* ---------- Mobil / Tablet ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .burger, .top-brand { display: inline-flex; }
  .side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(290px, 84vw); height: 100%; transform: translateX(-102%); transition: transform .22s ease;
    border-right: 1px solid var(--line); box-shadow: none; }
  .nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(6, 8, 12, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .nav-open { overflow: hidden; }
  .nav { padding: 11px 12px; }
  .top { padding: 0 12px; position: sticky; }
  .usermenu > span { display: none; }
  .wrap { padding: 16px 12px 40px; }
  .side-brand { min-height: 64px; }
}
@media (max-width: 720px) {
  h1 { font-size: 1.2rem; }
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  .balance { padding: 4px 8px; }
  .top-brand span { display: none; }
  .svhead { padding: 14px; }
  .svhead-title h1 { font-size: 1.3rem; }
  .svinfo { grid-template-columns: 1fr; }
  .tabs.pills { gap: 6px; }
  .tabs.pills .tab { padding: 7px 11px; }
  .console { height: 52vh; }
  .toolbar input { max-width: none; flex: 1 1 100%; }
  .pagehead { margin-bottom: 12px; }
  .modal-back { padding: 12px; }
  .modal { padding: 16px; }
  .actions .btn { flex: 1 1 auto; }
  .authcard { padding: 20px; }
  .infobar { gap: 16px; }
  #toasts { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; }
  /* Tabellen als Karten */
  .tablewrap { border: 0; background: transparent; overflow: visible; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin-bottom: 10px; }
  tbody tr:hover { background: var(--panel); }
  td { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px dashed var(--line); padding: 8px 0; text-align: right; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; text-align: left; flex: none; }
  td[data-label=""]::before { content: none; }
  td[data-label=""] { justify-content: flex-start; flex-wrap: wrap; }
}

/* ---------- Server verwalten: kompakter Kopf ---------- */
.svhead { padding: 10px 14px; margin-bottom: 12px; }
.svhead-top { margin-bottom: 8px; gap: 10px; align-items: center; }
.svhead-title { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.svhead-title h1 { font-size: 1.3rem; line-height: 1.2; }
.backbtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted); font-size: 1.2rem; line-height: 1; flex: none; }
.backbtn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.svinfo { gap: 8px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.svitem { padding: 5px 10px; gap: 0; }
.svitem .lbl { font-size: .68rem; }
.svval { font-size: .92rem; gap: 6px; min-height: 26px; }
.svval .btn.small { padding: 2px 6px; }
.svhead .meter { height: 4px; }
.tabs.pills { margin-bottom: 12px; }
.tabs.pills .tab { padding: 5px 12px; }

/* ---------- Konsole: Kennzahlen ---------- */
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-head { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat-head .ico { color: var(--accent); }
.stat-val { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.stat-sub { font-size: .76rem; color: var(--muted); min-height: 1.1em; overflow-wrap: anywhere; }
.stat .meter { flex-basis: auto; height: 5px; margin-top: 6px; }

/* ---------- Rechte-Auswahl (Benutzer einladen) ---------- */
.permgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.permgroup { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.permhead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(127, 127, 127, .1); border-bottom: 1px solid var(--line); cursor: pointer; }
.permhead .ico { color: var(--accent); }
.permitems { display: flex; flex-direction: column; padding: 6px 10px 8px; }
.permitem { margin: 2px 0; }

/* ---------- Sonstiges ---------- */
.section-title { font-size: 1.05rem; margin: 26px 0 6px; }
.owner-line { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.owner-line strong { color: var(--text); }
@media (max-width: 720px) {
  .svinfo { grid-template-columns: 1fr 1fr; }
  .statgrid { grid-template-columns: 1fr 1fr; }
  .permgrid { grid-template-columns: 1fr; }
}

/* ---------- Tickets ---------- */
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.nav .badge[hidden] { display: none; }
.unread { font-weight: 700; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: middle; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { font: inherit; font-weight: 600; padding: 6px 12px; border: 0; background: none; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent-soft); color: var(--accent-ink); }

.ticketwrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.ticketmain { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ticketwrap .card { margin: 0; }
.ticketkv { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  height: clamp(320px, calc(100vh - 380px), 720px); overflow-y: auto; scrollbar-width: thin; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 86%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.msg.mine .bubble { background: var(--accent-soft); border-color: rgba(207, 74, 21, .35); }
.msg.staff:not(.mine) .bubble { border-color: var(--accent); }
.msg.internal .bubble { background: rgba(168, 100, 0, .12); border: 1px dashed var(--warn); }
.msg-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 3px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.msg-atts img { display: block; max-width: 220px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); object-fit: cover; }
.chat-event { align-self: center; text-align: center; font-size: .8rem; color: var(--muted); padding: 2px 10px; border-radius: 99px; background: rgba(127, 127, 127, .12); max-width: 92%; }
.chat-event.internal { background: rgba(168, 100, 0, .12); color: var(--warn); }
.composer { display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.composer[hidden] { display: none; }
.composer textarea { resize: vertical; min-height: 64px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 84px; }
.thumb img { width: 84px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumb-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.thumb-x:hover { border-color: var(--bad); color: var(--bad); }
.thumb-n { display: block; font-size: .68rem; color: var(--muted); text-align: center; }
@media (max-width: 900px) {
  .ticketwrap { grid-template-columns: 1fr; }
  .ticketwrap .card { order: -1; }
  .chat { height: clamp(300px, calc(100vh - 420px), 600px); }
}
@media (max-width: 720px) {
  .msg { max-width: 100%; }
  .msg-atts img { max-width: 100%; }
  .seg { width: 100%; }
  .seg button { flex: 1; padding: 8px 6px; }
}

/* Seitenleiste: Fußzeile */
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 12px 10px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.side-foot:hover { color: var(--text); text-decoration: none; }
.side-foot span { text-decoration: none; }
.ico.gh, .side-foot .ico { fill: currentColor; stroke: none; }

/* ---------- Kacheln mit Hintergrundbild (Shop / Meine Server) ---------- */
.card.hasbg { position: relative; overflow: hidden; isolation: isolate; border-color: color-mix(in srgb, var(--line) 70%, transparent); }
.card.hasbg::before { content: ""; position: absolute; inset: -4px; z-index: -2; background: var(--bg-img) center / cover no-repeat; filter: blur(2px); transform: scale(1.02); }
.card.hasbg::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 30%, transparent) 0%, color-mix(in srgb, var(--panel) 66%, transparent) 45%, color-mix(in srgb, var(--panel) 92%, transparent) 100%); }
.card.hasbg .muted, .card.hasbg .specs dt { color: color-mix(in srgb, var(--text) 68%, transparent); }
.card.hasbg h3 { text-shadow: 0 1px 8px color-mix(in srgb, var(--panel) 80%, transparent); }
.shopgrid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card.offer { min-height: 300px; }

/* Modell-Auswahl */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-weight: 600; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.card.hasbg .chip { background: color-mix(in srgb, var(--panel) 80%, transparent); }
.card.hasbg .chip.on { background: var(--accent-soft); }

/* Modellwechsel */
.modellist { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.modelopt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.modelopt.upgrade { border-left: 3px solid var(--ok); }
.modelopt.downgrade { border-left: 3px solid var(--warn); }
.modelopt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 720px) { .modelopt { flex-direction: column; align-items: stretch; } }

/* Modell-Editor (Admin) */
.varlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.varrow { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 2px; background: var(--bg); }
.varrm { display: flex; align-items: flex-end; justify-content: flex-end; padding-bottom: 12px; }

/* Modell-Editor: Kopfzeile mit Sortierung */
.varhead { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.varno { overflow-wrap: anywhere; }

/* ---------- Gutscheine / Kaufdialog ---------- */
.sumbox { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sumrow { display: flex; justify-content: space-between; gap: 14px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.sumrow:last-of-type { border-bottom: 0; }
.row.end { align-items: flex-end; }

/* ---------- Zahlungsarten ---------- */
.paymethods { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.paymethod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.paymethod .ico { width: 28px; height: 28px; color: var(--muted); }
.paymethod:hover { border-color: var(--muted); }
.paymethod.on { border-color: var(--accent); background: var(--accent-soft); }
.paymethod.on .ico { color: var(--accent); }
.paymethod .small { color: var(--muted); }

.langsel { width: auto; min-width: 110px; padding: 6px 8px; margin-right: 8px; }
.auththeme { display: flex; align-items: center; }
.mailtpl { margin-bottom: 10px; }
.mailtpl summary { cursor: pointer; display: flex; gap: 10px; align-items: center; }
.monoarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; width: 100%; }
.ph { display: inline-block; margin: 2px 6px 2px 0; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--input); }
