/* ═══════════════════════════════════════════════════════════
   SYCHOS — "Obsidian Acid" Design System
   Display: Syne · Body: Manrope · Akzent: Acid Lime auf Obsidian
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #08090d;
  --surface: #0e1016;
  --elevated: #14171f;
  --hover: #1a1e28;
  --border: #20242f;
  --border-strong: #2d3242;
  --text: #f2f3ef;
  --text-2: #b9bdc6;
  --muted: #878d9c;
  --faint: #565c6b;
  --acid: #d8fc5c;
  --acid-dim: #b6d94a;
  --acid-soft: rgba(216, 252, 92, .1);
  --acid-glow: rgba(216, 252, 92, .25);
  --danger: #ff5c47;
  --danger-soft: rgba(255, 92, 71, .1);
  --success: #4ade80;
  --warning: #facc15;
  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 20px;
  --shadow: 0 16px 48px rgba(0, 0, 0, .55);
  --font-d: "Outfit", "Segoe UI", sans-serif;
  --font-b: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(216, 252, 92, .05), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(99, 102, 241, .07), transparent 60%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: var(--text); }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }
h1, h2, h3 { font-family: var(--font-d); letter-spacing: -.01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px; border-radius: var(--radius-s);
  border: 1px solid var(--border-strong);
  background: var(--elevated); color: var(--text-2);
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--hover); color: var(--text); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--acid); border-color: var(--acid); color: #10120a;
  box-shadow: 0 0 24px var(--acid-glow);
}
.btn-primary:hover:not(:disabled) { background: #e4ff7a; border-color: #e4ff7a; color: #10120a; }
.btn-danger { border-color: rgba(255, 92, 71, .35); color: #ff8b7a; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: #ffa396; }
.btn-full { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; }

.field {
  width: 100%; padding: 12px 15px;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius-s); font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--acid); box-shadow: 0 0 0 3px var(--acid-soft); }

.app { display: grid; grid-template-columns: 276px 1fr; height: 100vh; position: relative; z-index: 1; }
.login-screen { position: relative; z-index: 1; }
/* ── Sidebar ── */
.sidebar {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0c0d13 0%, #0a0b10 100%);
  border-right: 1px solid var(--border);
}
.sb-top { padding: 22px 16px 14px; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 0 4px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--acid); color: #10120a;
  font-family: var(--font-d); font-weight: 800; font-size: 19px;
  box-shadow: 0 0 20px var(--acid-glow);
}
.brand-name {
  font-family: var(--font-d); font-size: 17px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
}
.brand-name em { font-style: normal; color: var(--acid); }
.btn-new {
  width: 100%; padding: 12px 14px;
  background: transparent; border: 1px dashed var(--border-strong);
  border-radius: var(--radius-s); color: var(--text-2);
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  transition: all .18s;
}
.btn-new:hover { border-color: var(--acid); color: var(--acid); background: var(--acid-soft); }

.chat-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.chat-item {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: var(--radius-s); cursor: pointer;
  color: var(--text-2); font-size: 13.5px;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.chat-item:hover { background: var(--hover); color: var(--text); }
.chat-item.active { background: var(--elevated); border-color: var(--acid-glow); color: var(--text); }
.chat-item .ci-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-rename-input {
  flex: 1; min-width: 0; padding: 4px 8px;
  background: var(--bg); border: 1px solid var(--acid); border-radius: 7px;
  color: var(--text); font-size: 13px; outline: none;
}
.ci-btn {
  opacity: 0; flex-shrink: 0; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 7px;
  color: var(--faint); transition: all .12s;
}
.chat-item:hover .ci-btn { opacity: 1; }
.ci-btn:hover { background: var(--border-strong); color: var(--text); }
.ci-btn.del:hover { background: var(--danger-soft); color: #ff8b7a; }

.sb-footer { padding: 14px 16px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.credits-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-s);
  background: var(--elevated); border: 1px solid var(--border-strong);
  font-family: var(--font-d); font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.credits-pill .cr-val { color: var(--acid); font-size: 16px; text-shadow: 0 0 12px var(--acid-glow); }
.credits-pill .cr-label { color: var(--faint); font-weight: 600; margin-left: auto; font-size: 10.5px; }
.credits-pill.low { border-color: rgba(255, 92, 71, .4); }
.credits-pill.low .cr-val { color: #ff8b7a; text-shadow: none; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 2px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--acid-soft); color: var(--acid);
  border: 1px solid var(--acid-glow);
  font-family: var(--font-d); font-weight: 800; font-size: 14px;
}
.sb-user-meta { min-width: 0; flex: 1; }
.sb-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-mail { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-actions { display: flex; gap: 8px; }
/* ── Main / Header ── */
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 16, .7); backdrop-filter: blur(14px);
}
.btn-menu { display: none; background: transparent; border: none; color: var(--muted); padding: 4px; }
.hdr-title {
  flex: 1; font-family: var(--font-d); font-size: 15px; font-weight: 700;
  cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 6px 10px; border-radius: var(--radius-s); border: 1px solid transparent;
}
.hdr-title:hover { border-color: var(--border-strong); background: var(--elevated); }
.hdr-title input {
  width: 100%; background: var(--bg); border: 1px solid var(--acid); border-radius: 7px;
  color: var(--text); font-family: var(--font-d); font-size: 15px; font-weight: 700;
  padding: 4px 8px; outline: none;
}
.hdr-credits { font-family: var(--font-d); font-size: 13px; font-weight: 800; color: var(--acid); white-space: nowrap; letter-spacing: .04em; }
.sb-backdrop { display: none; }

/* ── Nachrichten ── */
.messages { flex: 1; overflow-y: auto; padding: 28px 0 10px; position: relative; z-index: 1; }
.welcome { max-width: 620px; margin: 7vh auto 0; text-align: center; padding: 0 24px; animation: rise .6s cubic-bezier(.2,.8,.3,1); }
.welcome-logo {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--acid); color: #10120a;
  font-family: var(--font-d); font-weight: 800; font-size: 26px;
  box-shadow: 0 0 36px var(--acid-glow);
}
.welcome h2 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.welcome p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sugg {
  padding: 15px 17px; border-radius: var(--radius); text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; transition: border-color .15s, color .15s, transform .15s;
}
.sugg:hover { border-color: var(--acid-glow); color: var(--text); transform: translateY(-2px); }

.msg {
  display: flex; gap: 12px; max-width: 760px;
  margin: 0 auto 18px; padding: 0 24px;
}
.msg.anim { animation: rise .35s cubic-bezier(.2,.8,.3,1); }
.msg .avatar { margin-top: 2px; }
.msg.user .avatar { background: var(--elevated); color: var(--text-2); border-color: var(--border-strong); }
.msg .bubble {
  padding: 13px 18px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; min-width: 0; max-width: 85%;
}
.msg.assistant .bubble {
  background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 4px;
}
.msg .meta { margin-top: 8px; font-family: var(--font-d); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acid-dim); }
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); opacity: .3; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
/* ── Composer ── */
.composer { padding: 10px 24px 20px; max-width: 812px; width: 100%; margin: 0 auto; position: relative; z-index: 1; }
.composer-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 3px; gap: 2px; }
.seg button {
  padding: 5px 12px; border: none; border-radius: 7px; background: transparent;
  color: var(--muted); font-family: var(--font-d); font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; transition: all .12s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--acid-soft); color: var(--acid); }
.seg-label { font-family: var(--font-d); font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.cost-hint { margin-left: auto; font-size: 12px; color: var(--muted); }
.cost-hint b { color: var(--acid); font-family: var(--font-d); }

.model-select { position: relative; }
.model-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: var(--radius-s);
  background: var(--surface); border: 1px solid var(--border-strong);
  color: var(--text); font-family: var(--font-d); font-size: 12px; font-weight: 700;
  letter-spacing: .03em;
}
.model-btn:hover { border-color: var(--acid-glow); }
.model-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 8px var(--acid-glow); }
.model-menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 250px; padding: 7px;
  background: var(--elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.model-group { padding: 7px 11px 4px; font-family: var(--font-d); font-size: 10px; font-weight: 800; color: var(--acid-dim); text-transform: uppercase; letter-spacing: .16em; }
.model-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 9px 11px; border: none; border-radius: var(--radius-s);
  background: transparent; color: var(--text-2); font-size: 13px; text-align: left;
  transition: background .12s, color .12s;
}
.model-item:hover { background: var(--hover); color: var(--text); }
.model-item.on { color: var(--acid); background: var(--acid-soft); }
.model-item .mi-cost { margin-left: auto; font-family: var(--font-d); font-size: 10.5px; font-weight: 700; color: var(--faint); letter-spacing: .05em; }

.send-row {
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-l); padding: 11px 11px 11px 19px;
  transition: border-color .18s, box-shadow .18s;
}
.send-row:focus-within { border-color: var(--acid); box-shadow: 0 0 28px rgba(216, 252, 92, .12); }
.send-row textarea {
  flex: 1; resize: none; border: none; background: transparent; outline: none;
  font-size: 14px; line-height: 1.55; max-height: 160px; padding: 6px 0;
}
.send-row textarea::placeholder { color: var(--faint); }
.btn-send {
  width: 40px; height: 40px; border: none; border-radius: var(--radius-s); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--acid); color: #10120a;
  box-shadow: 0 0 18px var(--acid-glow); transition: transform .15s, opacity .15s;
}
.btn-send:hover:not(:disabled) { transform: scale(1.06) rotate(-6deg); }
.btn-send:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
/* ── Modals ── */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 5, 8, .72); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 470px; max-height: 85vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-l); box-shadow: var(--shadow);
  animation: rise .25s cubic-bezier(.2,.8,.3,1);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-head h3 { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.modal-x { background: transparent; border: none; color: var(--faint); font-size: 17px; padding: 2px 6px; border-radius: 7px; }
.modal-x:hover { background: var(--hover); color: var(--text); }
.modal-body { padding: 16px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-body p.hint { font-size: 12.5px; color: var(--muted); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 24px 24px; }
.key-block { display: flex; flex-direction: column; gap: 7px; }
.key-block label { font-family: var(--font-d); font-size: 11.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 8px; letter-spacing: .08em; text-transform: uppercase; }
.key-status { padding: 3px 9px; border-radius: 20px; font-family: var(--font-b); font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.key-status.set { background: rgba(74, 222, 128, .12); color: var(--success); }
.key-status.unset { background: rgba(250, 204, 21, .12); color: var(--warning); }
.key-row { display: flex; gap: 8px; }
.key-row .field { flex: 1; font-family: Consolas, monospace; font-size: 12.5px; }

.ban-icon {
  width: 50px; height: 50px; border-radius: 13px; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger-soft); border: 1px solid rgba(255, 92, 71, .3);
  color: var(--danger); font-size: 24px;
}
.ban-detail {
  padding: 12px 15px; border-radius: var(--radius-s);
  background: var(--bg); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
}
.ban-detail b { color: var(--text); }

.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 17px; border-radius: var(--radius-s); font-size: 13px; font-weight: 700;
  background: var(--elevated); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); animation: rise .2s ease;
}
.toast.ok { border-color: rgba(74, 222, 128, .4); color: #86efac; }
.toast.err { border-color: rgba(255, 92, 71, .4); color: #ff8b7a; }
/* ── Login ── */
.login-screen { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 390px; padding: 34px 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-l); box-shadow: var(--shadow);
  animation: rise .5s cubic-bezier(.2,.8,.3,1);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand h1 { font-size: 30px; font-weight: 800; letter-spacing: .12em; }
.login-brand h1 em { font-style: normal; color: var(--acid); }
.login-brand p { color: var(--muted); font-size: 12px; margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-d); font-weight: 600; }
.login-card .field { margin-bottom: 11px; }
.login-err {
  display: none; padding: 11px 14px; margin-bottom: 11px;
  background: var(--danger-soft); border: 1px solid rgba(255, 92, 71, .3);
  border-radius: var(--radius-s); color: #ff8b7a; font-size: 12.5px;
}
.login-err.show { display: block; }
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-s); padding: 4px; margin-bottom: 14px;
}
.tab {
  padding: 9px; border: none; border-radius: 7px; background: transparent;
  color: var(--muted); font-family: var(--font-d); font-size: 12px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.tab.on { background: var(--elevated); color: var(--acid); }
.login-hint { text-align: center; color: var(--faint); font-size: 11.5px; margin-top: 14px; }

/* ── Admin-Bausteine ── */
/* Admin-Seite ist eine lange Dokument-Seite -> MUSS scrollen koennen
   (das Hub behaelt body { overflow: hidden }) */
body.admin-body { height: auto; min-height: 100vh; overflow-y: auto; overflow-x: hidden; }
body.admin-body .admin-head { position: sticky; top: 0; z-index: 5; }
body.admin-body .login-screen { min-height: 100vh; height: auto; }
.admin-wrap { max-width: 1120px; margin: 0 auto; padding: 26px 22px; position: relative; z-index: 1; }
.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 26px; border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 16, .7); backdrop-filter: blur(14px);
}
.admin-head .brand { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; text-align: center;
  transition: border-color .15s, transform .15s;
}
.stat:hover { border-color: var(--acid-glow); transform: translateY(-2px); }
.stat-val { font-family: var(--font-d); font-size: 26px; font-weight: 800; color: var(--acid); text-shadow: 0 0 18px var(--acid-glow); }
.stat-label { font-family: var(--font-d); font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .16em; font-weight: 700; margin-top: 5px; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-l); padding: 22px; margin-bottom: 22px;
}
.panel h2 {
  font-family: var(--font-d); font-size: 12px; color: var(--acid); text-transform: uppercase;
  letter-spacing: .18em; margin-bottom: 15px; font-weight: 800;
}
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 12px;
  font-family: var(--font-d); font-size: 10px; color: var(--faint); text-transform: uppercase;
  letter-spacing: .14em; font-weight: 700; border-bottom: 1px solid var(--border);
}
td { padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, .03); font-size: 13.5px; }
tr:hover td { background: rgba(255, 255, 255, .015); }
.email { font-family: Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.credits { color: var(--acid); font-family: var(--font-d); font-weight: 800; }
.badge { display: inline-flex; padding: 4px 11px; border-radius: 20px; font-family: var(--font-d); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.badge-online { background: rgba(74, 222, 128, .12); color: var(--success); }
.badge-offline { background: rgba(255, 255, 255, .05); color: var(--faint); }

/* ── Systemnachricht (Wartungsmodus: Server derzeit nicht erreichbar) ── */
.sys-notice {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 2147483000; max-width: min(560px, 92vw);
  background: rgba(255, 77, 56, .12); border: 1px solid var(--danger, #ff6b5b);
  color: #ffb4a8; padding: 12px 18px; border-radius: 14px;
  font-family: var(--font-b, sans-serif); font-size: 13px; font-weight: 600; line-height: 1.45;
  text-align: center; box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
}
.badge-ban { background: var(--danger-soft); color: #ff8b7a; }
.badge-admin { background: var(--acid-soft); color: var(--acid); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar .field { flex: 1; min-width: 150px; max-width: 320px; }
.empty { color: var(--faint); text-align: center; padding: 24px; font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   GLASS LAYER — Frosted-Glass-Upgrade ueber dem Base-Design
   ═══════════════════════════════════════════════════════════ */
:root {
  --glass: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  --glass-strong: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  --glass-border: 1px solid rgba(255, 255, 255, .1);
  --glass-blur: blur(22px) saturate(150%);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* Lebendiger Glass-Hintergrund: langsam wandernde Farbfelder */
body::before {
  opacity: 1;
  background:
    radial-gradient(1000px 600px at 82% -12%, rgba(216, 252, 92, .09), transparent 62%),
    radial-gradient(800px 520px at -12% 108%, rgba(99, 102, 241, .12), transparent 62%),
    radial-gradient(700px 500px at 50% 50%, rgba(6, 182, 212, .06), transparent 65%);
  will-change: transform;
  inset: -80px;
  animation: glassDrift 26s ease-in-out infinite alternate;
}
@keyframes glassDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(30px, -20px, 0); }
}

/* Universelle Glasflaechen */
.sidebar {
  background: rgba(12, 13, 19, .55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
}
.header {
  background: rgba(10, 11, 16, .4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.admin-head {
  background: rgba(10, 11, 16, .4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.login-card, .modal, .model-menu, .toast {
  background: var(--glass);
  border: var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-inner);
}
.stat, .panel {
  background: var(--glass);
  border: var(--glass-border);
  box-shadow: var(--shadow), var(--glass-inner);
}
.send-row {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--glass-inner);
}
.credits-pill, .model-btn, .seg, .btn-new, .chat-item.active {
  background: var(--glass);
  border: var(--glass-border);
  box-shadow: var(--glass-inner);
}
.btn {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--glass-inner);
}
.btn:hover { background: var(--glass-strong); }
.field, .ci-rename-input {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
}
.msg.user .bubble {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: var(--glass-inner);
}
.msg.assistant .bubble {
  background: rgba(14, 16, 22, .5);
  border: 1px solid rgba(255, 255, 255, .08);
}
/* Glass-Schatten fuer Karten + Buttons */
.welcome-logo, .brand-mark, .avatar {
  box-shadow: 0 0 24px var(--acid-glow), var(--glass-inner);
}
.sugg, .credits-pill, .stat, .panel, .modal, .send-row, .login-card {
  box-shadow: var(--shadow), var(--glass-inner);
}
.btn-send {
  box-shadow: 0 0 22px var(--acid-glow), var(--glass-inner);
}
.overlay { background: rgba(4, 5, 8, .55); backdrop-filter: blur(12px) saturate(120%); }

/* 404 im Glass-Look */
.nf-card { padding: 40px; border-radius: var(--radius-l); background: var(--glass); border: var(--glass-border); backdrop-filter: var(--glass-blur); box-shadow: var(--shadow), var(--glass-inner); }

/* ═══════════════ TYPO REFINE — saubere, moderne Schriftwirkung ═══════════════ */
body { font-size: 14.5px; letter-spacing: .005em; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; }
.brand-name { letter-spacing: .01em; text-transform: none; font-size: 18px; }
.brand-mark { font-family: var(--font-d); }
.seg button { letter-spacing: .01em; text-transform: none; font-weight: 600; }
.seg-label { letter-spacing: .02em; text-transform: none; font-size: 12px; font-weight: 600; }
.model-group { letter-spacing: .02em; text-transform: none; font-size: 11.5px; }
.model-btn { letter-spacing: 0; font-weight: 600; }
.model-item .mi-cost { letter-spacing: 0; }
.credits-pill { letter-spacing: 0; text-transform: none; font-weight: 600; }
.credits-pill .cr-label { text-transform: none; letter-spacing: 0; }
.hdr-credits { letter-spacing: 0; }
.key-block label { letter-spacing: .01em; text-transform: none; font-size: 12.5px; font-weight: 600; }
.tab { letter-spacing: .01em; text-transform: none; font-weight: 600; }
.login-brand h1 { letter-spacing: .02em; }
.login-brand p { letter-spacing: .01em; text-transform: none; font-family: var(--font-b); font-weight: 500; font-size: 13px; }
.msg .meta { letter-spacing: .02em; text-transform: none; font-family: var(--font-b); font-size: 11px; font-weight: 600; }
.badge { letter-spacing: .01em; text-transform: none; font-family: var(--font-b); font-size: 11px; }
.stat-label { letter-spacing: .02em; text-transform: none; font-family: var(--font-b); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.stat-val { letter-spacing: -.01em; }
.panel h2 { letter-spacing: .02em; text-transform: none; font-family: var(--font-b); font-size: 13.5px; font-weight: 700; color: var(--text-2); }
th { letter-spacing: .02em; text-transform: none; font-family: var(--font-b); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.nf-tag { letter-spacing: .05em; }
.nf-code { letter-spacing: -.02em; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 276px; z-index: 60;
    transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.3,1);
    box-shadow: var(--shadow);
  }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); }
  .btn-menu { display: block; }
  .suggestions { grid-template-columns: 1fr; }
  .composer { padding: 10px 14px 16px; }
  .cost-hint { width: 100%; margin-left: 0; order: 10; }
  .admin-wrap { padding: 16px 12px; }
}

/* ═══════════════════════════════════════════════════════════
   GROK-STYLE LAYER — zentrierter Hero-Composer, clean & bold
   ═══════════════════════════════════════════════════════════ */
.composer { max-width: 780px; }
.composer-card {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 28px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), var(--glass-inner);
  padding: 6px 8px 8px;
  transition: border-color .18s, box-shadow .18s;
}
.composer-card:focus-within {
  border-color: rgba(216, 252, 92, .45);
  box-shadow: 0 0 44px rgba(216, 252, 92, .12), var(--glass-inner);
}
.composer-card textarea {
  width: 100%; border: none; background: transparent; outline: none; resize: none;
  font-size: 16px; line-height: 1.55; min-height: 58px; max-height: 240px;
  padding: 14px 16px 6px;
}
.composer-card textarea::placeholder { color: var(--faint); }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 2px 4px 4px 8px; }
.composer-bar .cost-hint { margin-left: auto; font-family: var(--font-d); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.composer-bar .btn-send { width: 44px; height: 44px; border-radius: 50%; }
.composer-bar .btn-send:hover:not(:disabled) { transform: scale(1.08); }

/* Hero im Leerzustand — zentriert wie Grok */
body.empty-state .main { justify-content: center; }
body.empty-state .header {
  position: absolute; top: 0; left: 276px; right: 0;
  background: transparent; border: none; backdrop-filter: none;
}
body.empty-state .hdr-title { visibility: hidden; }
body.empty-state .messages { flex: 0 1 auto; overflow: visible; padding-top: 0; }
.welcome h2 {
  font-family: var(--font-b); font-weight: 600;
  font-size: clamp(30px, 5vw, 44px); letter-spacing: -.03em; margin-bottom: 24px;
}
.welcome p { display: none; }
.welcome .welcome-logo { display: none; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sugg {
  border-radius: 999px; padding: 10px 18px;
  background: var(--glass); border: 1px solid rgba(255, 255, 255, .1);
}
.sugg:hover { transform: translateY(-1px); border-color: var(--acid-glow); }

/* Sidebar: klare Navigation */
.sb-label {
  margin: 22px 6px 8px;
  font-family: var(--font-d); font-size: 10px; font-weight: 800;
  letter-spacing: .22em; text-transform: uppercase; color: var(--faint);
}
.btn-new { display: flex; align-items: center; gap: 10px; text-align: left; border-style: solid; }

@media (max-width: 860px) {
  body.empty-state .header { left: 0; }
}

/* ── Markdown & Code-Bloecke (Copy-Button) ── */
.msg.assistant .bubble { white-space: normal; }
.msg .bubble strong { color: var(--text); font-weight: 700; }
.msg .bubble h4 { font-family: var(--font-d); font-size: 15px; margin: 10px 0 6px; }
.msg .bubble ul { margin: 6px 0; padding-left: 20px; }
.msg .bubble li { margin: 3px 0; }
.inline-code {
  font-family: Consolas, monospace; font-size: 12.5px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--border);
  border-radius: 6px; padding: 1px 6px; color: var(--acid);
}
.code-block {
  position: relative; margin: 10px 0; padding: 14px;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--radius); overflow-x: auto;
}
.code-block code {
  font-family: Consolas, monospace; font-size: 12.5px; line-height: 1.6;
  color: var(--text-2); white-space: pre;
}
.copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 5px 11px; border-radius: 7px;
  background: var(--elevated); border: 1px solid var(--border-strong);
  color: var(--muted); font-family: var(--font-d); font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  transition: color .12s, border-color .12s, transform .12s;
}
.copy-btn:hover { color: var(--acid); border-color: var(--acid-glow); transform: translateY(-1px); }
.copy-btn:active { transform: scale(.96); }
@media (pointer: coarse) { .copy-btn { min-height: 36px; padding: 8px 14px; } }

/* ── Streaming-Cursor (Tippanimation) ── */
.msg .bubble .cursor { color: var(--acid); animation: blink 1s step-end infinite; font-weight: 700; }

/* ── Premium / Web-Suche / Think ── */
.model-item.locked { opacity: .9; }
.paid-tag {
  font-family: var(--font-d); font-size: 9px; letter-spacing: .12em;
  padding: 2px 6px; border-radius: 5px; font-style: normal; margin-left: 6px;
  background: var(--acid-soft); color: var(--acid);
}
.web-btn {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  border: 1px solid var(--border-strong); background: var(--elevated);
  font-size: 15px; color: var(--muted); transition: all .15s;
}
.web-btn:hover { color: var(--text); transform: translateY(-1px); }
.web-btn.on {
  border-color: var(--acid-glow); color: var(--acid); background: var(--acid-soft);
  box-shadow: 0 0 14px var(--acid-glow);
}
.msg .bubble .cursor.think { animation: blink 1.4s ease-in-out infinite; opacity: .7; }
@media (pointer: coarse) { .web-btn { width: 44px; height: 44px; } }

/* ═══ Accessibility & Touch ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }
@media (pointer: coarse) {
  .btn, .btn-sm, .tab, .model-item, .seg button, .sugg { min-height: 44px; }
  .ci-btn { width: 40px; height: 40px; opacity: 1; }
}

/* ── Markdown-Extras: Tabellen, Tierlisten, Code-Download, Thinking ── */
.md-table { overflow-x: auto; margin: 8px 0; border: 1px solid var(--border); border-radius: 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.md-table th, .md-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.md-table th { background: var(--elevated); color: var(--text); font-family: var(--font-d); font-size: 12px; }
.task-list { list-style: none; margin: 6px 0; }
.task-list .task.done { color: var(--faint); text-decoration: line-through; }
.dl-btn { position: absolute; top: 8px; right: 86px; background: transparent; border: 1px solid var(--border-strong); color: var(--faint); font-size: 11px; padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.dl-btn:hover { color: var(--acid); border-color: var(--acid-glow); }
.think-box { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; color: var(--faint); font-size: 12.5px; background: rgba(255,255,255,.02); }
.think-box summary { cursor: pointer; font-family: var(--font-d); letter-spacing: .05em; }
.think-body { margin-top: 6px; white-space: pre-wrap; opacity: .8; }
.mp-plan { background: var(--elevated); color: var(--acid); font-style: normal; font-family: var(--font-d); font-size: 10px; font-weight: 800; padding: 3px 7px; border-radius: 6px; letter-spacing: .05em; }
#settingsOverlay { align-items: flex-start; overflow-y: auto; background: var(--bg); }
#settingsOverlay .modal.set-modal { max-width: 920px; margin: 3vh auto; }

/* ── Footer mit Rechts-Links (Paddle-Anforderung) ── */
.site-footer { text-align: center; padding: 10px 8px 4px; font-size: 11px; color: var(--faint); }
.site-footer a { color: var(--muted); text-decoration: underline; }
.site-footer a:hover { color: var(--acid); }
.sb-footer-links { padding: 6px 4px 0; text-align: left; }

/* ── Settings (gross & mobilfreundlich) ── */
#settingsOverlay .modal { max-width: 680px; }
.set-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.set-card label { font-family: var(--font-d); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.set-card .field { width: 100%; min-height: 46px; font-size: 15px; }
.set-card .btn-sm { min-height: 44px; }
.set-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.set-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.set-stat-val { font-family: var(--font-d); font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-stat-label { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.set-danger { border-color: rgba(255, 92, 71, .35); }

/* ── Plan-Karten (Einstellungen -> Plan) ── */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; display: flex; flex-direction: column; gap: 8px;
}
.plan-card.on { border-color: var(--acid-glow); box-shadow: 0 0 24px rgba(216, 252, 92, .10); }
.plan-card.hot { border-color: rgba(216, 252, 92, .35); }
.plan-name { font-family: var(--font-d); font-weight: 800; font-size: 15px; }
.plan-price { font-family: var(--font-d); font-size: 26px; font-weight: 800; }
.plan-price span { font-size: 12px; opacity: .6; font-weight: 600; }
.plan-desc { font-size: 12.5px; color: var(--muted); }
.plan-limits { list-style: none; padding: 0; margin: 4px 0 8px; font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.plan-card .btn { margin-top: auto; }

/* ── Modell-Auswahl-Fenster ── */
.mp-group { font-family: var(--font-d); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 14px 0 8px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mp-card { text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.mp-card:hover { border-color: var(--acid-glow); }
.mp-card.on { border-color: var(--acid); background: var(--acid-soft); }
.mp-card.locked { opacity: .75; }
.mp-tags { display: flex; gap: 4px; }
.mp-meta { font-size: 11.5px; color: var(--faint); }

/* ── Stärke-Slider (wie ChatGPT) ── */
.sm-head { font-family: var(--font-d); font-size: 12px; padding: 6px 8px 10px; }
.sm-range { width: 100%; accent-color: var(--acid); }
.sm-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); padding: 2px 4px 6px; text-transform: uppercase; letter-spacing: .08em; }
.sm-desc { font-size: 12px; color: var(--muted); padding: 4px 8px 6px; }

/* ── Thinking + PDF-Download ── */
.think-label { color: var(--faint); font-style: italic; font-size: 13px; margin-bottom: 4px; }
.think-label::after { content: ""; animation: thinkdots 1.2s steps(4, end) infinite; }
@keyframes thinkdots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.meta-dl { background: transparent; border: 0; color: var(--faint); font-size: 11.5px; cursor: pointer; padding: 2px 4px; }
.meta-dl:hover { color: var(--acid); }

/* ── Bilder (Vision) ── */
.img-preview { display: flex; gap: 8px; padding: 8px 10px 0; flex-wrap: wrap; }
.img-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-strong); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; line-height: 20px; cursor: pointer; padding: 0; }
.msg-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.msg-img { max-width: 220px; max-height: 220px; border-radius: 10px; border: 1px solid var(--border-strong); cursor: zoom-in; display: block; }

/* ── ChatGPT-Look: Antworten ohne Sprechblase, normaler Fliesstext ── */
.msg.assistant { max-width: 860px; }
.msg.assistant .avatar { display: none; }
.msg.assistant .bubble {
  background: transparent; border: none; box-shadow: none;
  border-radius: 0; padding: 0; max-width: 100%; width: 100%;
  font-size: 15px; line-height: 1.75;
}
.msg.assistant .meta { padding-left: 0; padding-top: 6px; }
.msg.assistant .cursor { display: inline-block; margin-left: 2px; }

/* ── Chat robust (Handy-Fixes) ── */
.app { height: 100vh; height: 100dvh; }
.main { height: 100vh; height: 100dvh; }
.msg .bubble a, .msg .bubble .inline-code { overflow-wrap: anywhere; }
.msg .bubble .code-block { max-width: 100%; }
button, input, textarea, select, .btn, .tab, .model-item, .sugg, .ci-btn { touch-action: manipulation; }

/* ── Stripe-Style Checkout ── */
.co-page {
  width: 100%; max-width: 880px; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-l);
  overflow: hidden; box-shadow: var(--shadow); animation: rise .25s cubic-bezier(.2,.8,.3,1);
}
.co-summary { padding: 30px 28px; background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.co-brand { font-family: var(--font-d); font-weight: 800; font-size: 20px; letter-spacing: .08em; }
.co-sub { font-size: 12px; color: var(--faint); }
.co-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--text-2); }
.co-plan { font-size: 15px; color: var(--text); font-weight: 600; }
.co-discount { color: #61e294; }
.co-divider { border-top: 1px dashed var(--border-strong); margin: 4px 0; }
.co-total { font-size: 15px; color: var(--text); }
.co-total b { font-family: var(--font-d); font-size: 18px; }
.co-promo { display: flex; gap: 8px; margin-top: auto; }
.co-promo .field { flex: 1; min-width: 0; }
.co-form { padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; }
.co-form-head { display: flex; justify-content: space-between; align-items: center; }
.co-form .field { min-height: 46px; font-size: 15px; }
@media (max-width: 720px) {
  .co-page { grid-template-columns: 1fr; max-width: calc(100vw - 16px); }
  .co-summary { border-right: 0; border-bottom: 1px solid var(--border); padding: 20px; }
  .co-form { padding: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — Admin-Panel, Modals & Hub fuer Handys
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  /* Eingaben auf 16px -> kein iOS-Zoom beim Tippen */
  .field, input, textarea, select { font-size: 16px; }

  /* Admin-Kopf: bricht um, Statuszeile raus (spart Platz) */
  body.admin-body .admin-head { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  body.admin-body .admin-head .brand-name { font-size: 16px; }
  #statusText { display: none; }

  /* Stats: 2x2 statt endlos */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
  .stat { padding: 12px 8px; }
  .stat-val { font-size: 20px; }
  .stat-label { font-size: 10.5px; }

  /* Panels & Toolbars: alles volle Breite untereinander */
  body.admin-body .panel { padding: 14px 12px; }
  .panel h2 { font-size: 15px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .toolbar .field { max-width: none; width: 100%; }
  .toolbar .btn { width: 100%; }

  /* User-Tabelle: kompakt + horizontal scrollbar (Wischen moeglich) */
  body.admin-body table { font-size: 12px; }
  body.admin-body th, body.admin-body td { padding: 8px 6px; }
  .row-actions { gap: 4px; }
  .row-actions .btn-sm { padding: 6px 9px; font-size: 11.5px; min-height: 36px; }
  .badge { font-size: 10px; }

  /* Modals (Hub + Admin): volle Breite, Buttons als volle Reihe */
  .modal { max-width: calc(100vw - 24px); }
  .modal-body { padding: 12px 16px 16px; }
  .modal-foot { padding: 0 16px 16px; flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; min-width: 130px; }
  .key-row { flex-direction: column; align-items: stretch; }
  .key-row .field, .key-row .btn { width: 100%; max-width: none; }
  .plan-grid { grid-template-columns: 1fr; }
  #settingsOverlay .modal { max-width: calc(100vw - 16px); }
  .set-card { padding: 12px; }
  .set-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .msg { padding: 0 12px; gap: 8px; }
  .msg .bubble { max-width: 92%; padding: 11px 14px; }
  .model-menu { min-width: 0; width: calc(100vw - 28px); max-width: 320px; }
  .modal { max-height: 90dvh; }
  .hdr-title { cursor: default; }

  /* Hub: Sidebar-Footer (Profil/Abmelden) bricht um, nichts laeuft ueber */
  .sb-actions { flex-wrap: wrap; gap: 6px; }
  .sb-user { min-width: 140px; }
  .credits-pill { padding: 10px 12px; }
  .header { padding: 12px 14px; gap: 10px; }
  .hdr-credits { font-size: 12px; }

  /* Login-Karten: schmaler Rand */
  .login-card { padding: 26px 20px; }
}

