/* ==========================================================================
   Wyvern Control Panel – Stylesheet
   Dunkles Design, keine externen Ressourcen (DSGVO-freundlich).
   ========================================================================== */

:root {
    --bg: #0a0d09;
    --bg-2: #0e120d;
    --surface: #141a12;
    --surface-2: #1a2118;
    --surface-3: #222b1f;
    --border: #252f22;
    --border-strong: #35412f;
    --text: #e9eee5;
    --text-2: #b7c2b0;
    --muted: #8a9583;
    --faint: #5f6b58;
    --accent: #6fc400;
    --on-accent: #0e1a00;
    --accent-hover: color-mix(in srgb, var(--accent) 85%, black);
    --accent-text: color-mix(in srgb, var(--accent) 50%, white);
    --accent-text-strong: color-mix(in srgb, var(--accent) 28%, white);
    --grad-a: #c9fc01;
    --grad-b: #4aa500;
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --series-a: #4f9a12;
    --series-b: #b85c9e;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --blue: #3b82f6;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
    --sidebar-w: 260px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-text-strong); }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-3); padding: .12em .4em; border-radius: 6px; }
img, svg { display: block; }
.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-red { color: #f87171; }
.text-green { color: var(--green); }
.pre-line { white-space: pre-line; }
.gradient-text {
    background: linear-gradient(120deg, var(--grad-a) 10%, var(--grad-b) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border: 1px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; font-size: .92rem; line-height: 1;
    color: var(--text); background: var(--surface-2);
    cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, transform .1s, color .15s;
}
.btn:hover { color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-danger { background: rgba(239, 68, 68, .14); color: #fca5a5; border-color: rgba(239, 68, 68, .3); }
.btn-danger:hover { background: rgba(239, 68, 68, .24); color: #fecaca; }
.btn-sm { height: 32px; padding: 0 12px; font-size: .84rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-icon {
    display: inline-grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid transparent; border-radius: var(--radius); background: transparent;
    color: var(--muted); cursor: pointer; transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--surface-2); color: var(--text); }
.btn-icon-sm { width: 28px; height: 28px; border-radius: 8px; }

/* ---------- Formulare ---------- */

.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.grow { flex: 1; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > .form-group { flex: 1 1 220px; }
.form-row > .w-port { flex: 0 0 110px; }
label, .label { font-size: .86rem; font-weight: 600; color: var(--text-2); }
.hint { font-size: .8rem; color: var(--muted); }

.input {
    width: 100%; height: 42px; padding: 0 14px;
    background: var(--bg-2); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius);
    font: inherit; font-size: .93rem;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.55; }
select.input {
    appearance: none; padding-right: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a90a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.input-sm { height: 36px; font-size: .86rem; border-radius: 10px; }
.input-lg { height: 50px; font-size: 1.02rem; }
.input-mono { font-family: var(--mono); font-size: .86rem; }
.input-group { display: flex; gap: 8px; }
.input-group .btn { height: 42px; }

.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.checkbox input, .choice input { accent-color: var(--accent); width: 17px; height: 17px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.choice {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-2);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice.disabled { opacity: .45; cursor: not-allowed; }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-section { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.sticky-actions { position: sticky; bottom: 16px; z-index: 5; }
.sticky-actions .btn { box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .8); }

/* ---------- Alerts & Badges ---------- */

.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius); border: 1px solid;
    font-size: .92rem; line-height: 1.5;
}
.alert .icon { margin-top: 2px; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.alert-success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .28); color: #86efac; }
.alert-error { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .28); color: #fca5a5; }
.alert-warning { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .28); color: #fcd34d; }
.alert-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent-text); }
.alert[data-dismiss] { cursor: pointer; }

.badge {
    display: inline-flex; align-items: center; gap: 5px;
    height: 24px; padding: 0 9px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: middle;
    border: 1px solid;
}
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .25); color: #86efac; }
.badge-red { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .25); color: #fca5a5; }
.badge-amber { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .25); color: #fcd34d; }
.badge-blue { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, transparent); color: var(--accent-text); }
.badge-violet { background: rgba(139, 92, 246, .14); border-color: rgba(139, 92, 246, .3); color: #c4b5fd; }
.badge-gray { background: rgba(148, 163, 184, .1); border-color: rgba(148, 163, 184, .2); color: #a1a8ba; }
h1 .badge { font-size: .8rem; margin-left: 6px; }

/* ---------- Karten ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    min-width: 0;
}
.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1.02rem; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 22px; }
.card-form { max-width: 860px; }
.card-danger { border-color: rgba(239, 68, 68, .28); }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; font-weight: 600; }

.empty { display: grid; place-items: center; gap: 8px; padding: 42px 20px; color: var(--muted); text-align: center; }
.empty .icon { color: var(--faint); }

/* ---------- Grids ---------- */

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-dash { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-detail { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.grid-editor { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- Tabellen ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    text-align: left; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr { cursor: pointer; transition: background .12s; }
.table-hover tbody tr:hover, .table tbody tr:hover { background: rgba(255, 255, 255, .02); }
.table-compact td, .table-compact th { padding: 9px 14px; }
.table th.center, .table td.center { text-align: center; }
.table td.center .icon, .table th.center .badge { margin: 0 auto; }
.table .actions { text-align: right; white-space: nowrap; }
.table .cell-wrap { min-width: 200px; max-width: 420px; }
.row-muted td { opacity: .55; }
.user-cell, .player-link { display: inline-flex; align-items: center; gap: 10px; }
.player-link { font-weight: 600; color: var(--text); }
.player-link:hover { color: var(--accent-text); }

.avatar {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), rgba(34, 211, 238, .18));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    font-weight: 700; font-size: .9rem; color: var(--accent-text-strong);
}
.avatar-sm { width: 26px; height: 26px; border-radius: 8px; font-size: .72rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.4rem; }

/* ---------- Listen ---------- */

.list { list-style: none; margin: 0; padding: 6px; }
.list-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: var(--radius); color: var(--text); transition: background .12s;
}
.list-item:hover { background: var(--surface-2); color: var(--text); }
.list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.list-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Öffentliche Webseite
   ========================================================================== */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(9, 12, 8, .72);
    backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand small { color: var(--muted); font-weight: 600; }
.logo { border-radius: 9px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
    padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 550; font-size: .94rem;
    transition: color .15s, background .15s;
}
.nav-links a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-cta { margin-left: 10px; }
.nav-cta-next { margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; border-radius: 10px; cursor: pointer; }

.hero, .page-hero { position: relative; overflow: hidden; }
/* Hero füllt den ersten Bildschirm, mit schmalem Rand rundherum */
.hero { padding: clamp(16px, 2.5vw, 36px); text-align: center; overflow: visible; }
.page-hero { padding: 80px 0 30px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.glow-a { width: 560px; height: 420px; background: color-mix(in srgb, var(--accent) 70%, black); top: -180px; left: 50%; transform: translateX(-80%); }
.glow-b { width: 480px; height: 360px; background: color-mix(in srgb, var(--grad-b) 55%, black); top: -120px; left: 50%; transform: translateX(10%); opacity: .35; }
.page-hero .glow-a { opacity: .28; }
.hero-card {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    min-height: calc(100vh - 70px - 2 * clamp(16px, 2.5vw, 36px));
    min-height: calc(100svh - 70px - 2 * clamp(16px, 2.5vw, 36px));
    padding: clamp(64px, 10vw, 120px) 24px clamp(56px, 8vw, 100px);
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
    background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--grad-b) 22%, var(--surface)) 0%, var(--surface) 55%, var(--bg-2) 100%);
    box-shadow: 0 40px 90px -45px rgba(0, 0, 0, .9);
}
/* Hintergrundbild (Spawn) + Abdunklung für gute Lesbarkeit */
.hero-card.has-image::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background: var(--hero-image) center / cover no-repeat;
}
.hero-card.has-image::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(80% 70% at 50% 45%, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .8) 100%);
}
.hero-card .hero-bg { z-index: -1; }
/* Mit Bild keine farbigen Glows – sonst bekommt das Foto einen Grünstich */
.hero-card.has-image .glow { display: none; }
/* Seigaiha – traditionelles japanisches Wellenmuster, dezent am unteren Rand */
.waves {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='30'%3E%3Cg fill='none' stroke='%23c9fc01' stroke-opacity='.09' stroke-width='1'%3E%3Cpath d='M2 30a28 28 0 0 1 56 0M10 30a20 20 0 0 1 40 0M18 30a12 12 0 0 1 24 0M26 30a4 4 0 0 1 8 0'/%3E%3Cpath d='M-28 15a28 28 0 0 1 56 0M-20 15a20 20 0 0 1 40 0M-12 15a12 12 0 0 1 24 0M-4 15a4 4 0 0 1 8 0M32 15a28 28 0 0 1 56 0M40 15a20 20 0 0 1 40 0M48 15a12 12 0 0 1 24 0M56 15a4 4 0 0 1 8 0'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 60px 30px;
    mask-image: linear-gradient(0deg, #000 0%, transparent 55%);
    -webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 55%);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-card .hero-text { color: var(--text-2); }
.hero-card.has-image h1, .hero-card.has-image .lead, .hero-card.has-image .hero-text { text-shadow: 0 2px 18px rgba(0, 0, 0, .55); }
.hero h1 { font-size: clamp(2.2rem, 9vw, 5rem); overflow-wrap: anywhere; font-weight: 850; letter-spacing: -.04em; margin: 22px 0 14px; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--text); font-weight: 550; }
.hero-text { max-width: 600px; margin-top: 12px; font-size: 1.02rem; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 16px 7px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
    font-size: .86rem; color: var(--text-2); font-weight: 550;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.status-dot.online { background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--red); }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.ip-box {
    display: inline-flex; align-items: center; gap: 14px; margin-top: 34px;
    padding: 8px 8px 8px 20px; border-radius: var(--radius-lg);
    background: rgba(12, 17, 10, .72); border: 1px solid var(--border-strong);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    font: inherit; color: var(--text); cursor: pointer;
    box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.ip-box:hover { border-color: var(--accent); transform: translateY(-1px); }
.ip-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ip-value { font-family: var(--mono); font-size: 1.08rem; font-weight: 600; }
.ip-action {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--radius);
    background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: .86rem;
}
.ip-box.copied .ip-action { background: var(--green); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }

.section { padding: 70px 0; }
.section-tight { padding: 10px 0 80px; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-top: 6px; }
.section-kicker { color: var(--accent-text); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }

.mode-card {
    padding: 26px; border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--surface), rgba(18, 24, 16, .5));
    border: 1px solid var(--border);
    transition: transform .2s, border-color .2s;
}
.mode-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.mode-card h3 { font-size: 1.14rem; margin: 16px 0 6px; }
.mode-icon, .stat-icon {
    display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.mode-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.mode-grid .mode-card { flex: 1 1 280px; max-width: 520px; }

.join-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.join-card { padding: 26px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); }
.join-title { display: flex; align-items: center; gap: 10px; font-size: 1.14rem; margin-bottom: 18px; }
.join-title .icon { color: var(--accent-text); }
.join-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.join-steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start; }
.join-steps p { margin: 0; padding-top: 7px; color: var(--text-2); overflow-wrap: anywhere; }
.join-note { text-align: center; margin-top: 22px; }

.step-num {
    display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(180deg, var(--grad-a), var(--grad-b)); font-weight: 800; color: var(--on-accent);
}

.site-footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 40px; background: var(--bg-2); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: center; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand p { font-size: .84rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: .92rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; font-size: .82rem; padding-top: 16px; border-top: 1px solid var(--border); }

/* ---------- Fließtext (Regelwerk, Impressum, Datenschutz) ---------- */

.prose { padding: clamp(22px, 4vw, 44px); color: var(--text-2); font-size: 1rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4, .prose h5 { color: var(--text); margin-top: 2em; scroll-margin-top: 90px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.4rem; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.15rem; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--grad-a); }
.prose blockquote {
    margin-left: 0; margin-right: 0; padding: 14px 18px;
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-left: 3px solid var(--accent);
    border-radius: var(--radius); color: var(--text);
}
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose-sm { font-size: .9rem; padding: 22px; }
.prose-sm h2 { font-size: 1.15rem; }

/* ==========================================================================
   Login, Installer, Fehlerseiten
   ========================================================================== */

body.auth { min-height: 100vh; }
.auth-glow {
    position: fixed; inset: 0; pointer-events: none;
    background: radial-gradient(600px 400px at 50% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
                radial-gradient(500px 360px at 80% 110%, rgba(14, 116, 144, .22), transparent 70%);
}
.auth-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.auth-card {
    width: 100%; max-width: 420px; padding: 34px;
    background: rgba(18, 24, 16, .88); border: 1px solid var(--border); border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
    display: flex; flex-direction: column; gap: 18px;
}
.install-card { max-width: 680px; }
.auth-head { display: flex; align-items: center; gap: 14px; }
.auth-head h1 { font-size: 1.4rem; }
.auth-back { text-align: center; font-size: .88rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); font-size: .9rem; }
.checklist li.ok .icon { color: var(--green); }
.checklist li.fail { border-color: rgba(239, 68, 68, .35); }
.checklist li.fail .icon { color: var(--red); }
.error-card { text-align: center; align-items: center; }
.error-code { font-size: 4.5rem; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.error-actions { display: flex; gap: 10px; }
.error-details { width: 100%; text-align: left; font-size: .8rem; background: var(--bg-2); padding: 12px; border-radius: var(--radius); overflow: auto; }

/* ==========================================================================
   Panel
   ========================================================================== */

body.panel { min-height: 100vh; }
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; width: var(--sidebar-w);
    display: flex; flex-direction: column;
    background: var(--bg-2); border-right: 1px solid var(--border);
    transition: transform .25s ease;
}
.sidebar-brand { padding: 22px 22px 18px; }
.sidebar-brand span { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.02rem; }
.sidebar-brand small { font-size: .74rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-section { padding: 18px 12px 6px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px;
    border-radius: var(--radius); color: var(--text-2); font-weight: 550; font-size: .93rem;
    transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); }
.nav-item.active .icon { color: var(--accent-text); }
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--amber); color: #1c1403; font-size: .74rem; font-weight: 800; display: grid; place-items: center; }
.sidebar-foot { display: flex; align-items: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); }
.user-card { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); color: var(--text); min-width: 0; }
.user-card:hover, .user-card.active { background: var(--surface); color: var(--text); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--muted); font-size: .76rem; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
    height: 66px; padding: 0 28px;
    background: rgba(9, 12, 8, .78); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.topbar-search {
    flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px;
    height: 40px; padding: 0 14px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.topbar-search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.topbar-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: .92rem; }
.topbar .btn { margin-left: auto; }
.content { flex: 1; width: 100%; max-width: 1320px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.panel-footer { padding: 18px 28px; font-size: .78rem; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.65rem; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.page-head p { margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: .84rem; color: var(--muted); margin-bottom: 6px; font-weight: 550; }
.back-link:hover { color: var(--text); }
.player-head { display: flex; align-items: center; gap: 16px; }

.stat-card {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
    padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
    color: var(--text); transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); color: var(--text); }
.stat-card .stat-icon { grid-row: span 2; }
.stat-label { font-size: .84rem; color: var(--muted); font-weight: 550; }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tone-amber { background: rgba(245, 158, 11, .12); color: #fcd34d; border-color: rgba(245, 158, 11, .25); }
.tone-blue { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.tone-red { background: rgba(239, 68, 68, .12); color: #fca5a5; border-color: rgba(239, 68, 68, .25); }
.tone-violet { background: rgba(139, 92, 246, .14); color: #c4b5fd; border-color: rgba(139, 92, 246, .25); }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.mini-stats > div { display: flex; flex-direction: column; padding: 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); }

/* Aktivitätsdiagramm */
.legend { display: flex; gap: 14px; font-size: .82rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.swatch-a { background: var(--series-a); }
.swatch-b { background: var(--series-b); }
.chart { position: relative; display: flex; align-items: stretch; gap: 4px; height: 200px; padding-bottom: 24px; }
.chart-grid { position: absolute; inset: 0 0 24px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid span { border-top: 1px dashed rgba(255, 255, 255, .06); }
.chart-grid span:last-child { border-top: 1px solid var(--border-strong); }
.chart-col { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; border-radius: 8px; outline: none; }
.chart-col:hover, .chart-col:focus { background: rgba(255, 255, 255, .03); }
.chart-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 3px; }
.bar { width: min(12px, 40%); min-height: 0; border-radius: 4px 4px 0 0; transition: filter .15s; }
.bar-a { background: var(--series-a); }
.bar-b { background: var(--series-b); }
.chart-col:hover .bar, .chart-col:focus .bar { filter: brightness(1.2); }
.chart-label { position: absolute; bottom: -22px; font-size: .72rem; color: var(--muted); }
.chart-tip {
    position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translate(-50%, -6px);
    display: none; flex-direction: column; gap: 3px; z-index: 5; white-space: nowrap;
    padding: 10px 12px; border-radius: var(--radius); background: var(--surface-3); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow); font-size: .8rem; color: var(--text-2); pointer-events: none;
}
.chart-tip strong { color: var(--text); }
.chart-tip span { display: flex; align-items: center; gap: 6px; }
.chart-tip b { margin-left: auto; padding-left: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-col:hover .chart-tip, .chart-col:focus .chart-tip { display: flex; }
.chart-col:first-child .chart-tip, .chart-col:nth-child(2) .chart-tip { left: 0; transform: translate(0, -6px); }
.chart-col:last-child .chart-tip { left: auto; right: 0; transform: translate(0, -6px); }
.chart-table { margin-top: 18px; }
.chart-table summary { cursor: pointer; font-size: .84rem; color: var(--muted); font-weight: 550; }
.chart-table summary:hover { color: var(--text); }
.chart-table .table { margin-top: 10px; }

.server-card { display: flex; flex-direction: column; gap: 18px; }
.server-row { display: flex; align-items: center; gap: 12px; }
.server-row > div { flex: 1; min-width: 0; }
.server-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.server-players { display: flex; align-items: baseline; gap: 8px; padding: 18px; border-radius: var(--radius); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), rgba(14, 165, 198, .08)); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.server-players .stat-value { font-size: 2.2rem; }
.server-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.server-meta > div { display: flex; flex-direction: column; }

/* Toolbar, Tabs, Suche */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.toolbar-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); overflow-x: auto; max-width: 100%; }
.tab { padding: 7px 14px; border-radius: 10px; font-size: .87rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); }
.search-inline { position: relative; display: flex; align-items: center; }
.search-inline .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search-inline .input { padding-left: 38px; height: 38px; width: 260px; max-width: 100%; }
.player-search { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.player-search .input { flex: 1; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 12px; }
.player-tile { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); min-width: 0; }
.player-tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }

.pager { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: .86rem; }

/* Details & Kommentare */
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0 0 18px; }
.details dt { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.details dd { margin: 4px 0 0; font-weight: 550; }
.description { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); white-space: normal; overflow-wrap: anywhere; }
.timeline, .notes { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline-system { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; font-size: .85rem; color: var(--text-2); padding-left: 12px; }
.timeline-system time { white-space: nowrap; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 4px var(--surface); }
.comment { display: flex; gap: 12px; }
.comment-body, .note { flex: 1; min-width: 0; padding: 12px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.comment-head time { margin-right: auto; }
.comment-body p, .note p { color: var(--text-2); overflow-wrap: anywhere; }
.comment-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.note-form { margin-bottom: 18px; }

/* Dialog */
.dialog {
    width: min(460px, calc(100% - 32px)); padding: 26px; border-radius: var(--radius-xl);
    background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9);
}
.dialog::backdrop { background: rgba(4, 6, 3, .7); backdrop-filter: blur(4px); }
.dialog h2 { font-size: 1.2rem; }

.page-card .stat-icon { width: 42px; height: 42px; }
.md-help td { padding: 6px 8px; }
.md-help td:first-child { white-space: nowrap; }

.sidebar-backdrop { display: none; }

/* ==========================================================================
   Teamliste, Ränge, Bewerbungen
   ========================================================================== */

.rank-badge {
    background: color-mix(in srgb, var(--rank) 16%, transparent);
    border-color: color-mix(in srgb, var(--rank) 38%, transparent);
    color: color-mix(in srgb, var(--rank) 55%, white);
}
.rank-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.rank-chip {
    display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); font-size: .86rem; font-weight: 600;
}
.rank-chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--rank) 50%, transparent); }
.rank-chip.active { color: var(--text); border-color: var(--rank); background: color-mix(in srgb, var(--rank) 14%, transparent); }
.rank-chip b { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rank); }
.grid-ranks { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rank-section + .rank-section { margin-top: 32px; }
.rank-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rank-section-head h2 { font-size: 1.1rem; }
.rank-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.rank-card { border-top: 3px solid var(--rank); }
.rank-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rank-meta { display: grid; gap: 8px; margin: 0; }
.rank-meta > div { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.rank-meta dt { color: var(--muted); }
.rank-meta dd { margin: 0; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.form-row > .w-color { flex: 0 0 90px; }
.form-row > .w-group { flex: 0 1 200px; }
.form-row > .w-count { flex: 0 0 90px; }
.input-color { padding: 4px; cursor: pointer; }
.input.center { text-align: center; letter-spacing: .08em; }

.sync-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.sync-list li { display: flex; align-items: center; gap: 8px; }
.sync-list li.ok { color: var(--text); }
.sync-list li.ok .icon { color: var(--green); }
.sync-result { padding: 12px 14px; border-radius: var(--radius); border: 1px solid; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.sync-result.ok { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.sync-result.fail { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .28); }
.sync-result p { color: var(--text-2); }

.grid-forms { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.form-card-head { display: flex; gap: 6px; flex-wrap: wrap; }
.form-card .card-title a { color: var(--text); }
.form-card .card-title a:hover { color: var(--accent-text); }
.form-card .mini-stats { margin: 0; }
.tab-count { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: .74rem; color: var(--muted); }
.tab.active .tab-count { background: var(--accent-soft); color: var(--accent-text); }

.token-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.token-list li { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); }
.token-list li.used { opacity: .6; }
.token-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.token-main code { align-self: flex-start; font-size: .86rem; }
.token-main small { overflow-wrap: anywhere; }

.answers { list-style: none; counter-reset: q; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.answers li { counter-increment: q; }
.answer-q { font-weight: 650; color: var(--text); margin-bottom: 8px; }
.answer-q::before { content: counter(q) ". "; color: var(--accent-text); }
.answer-a { padding: 12px 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); overflow-wrap: anywhere; }
.answer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-grid-3 .choice { padding: 10px; font-size: .86rem; font-weight: 600; justify-content: center; }

/* Formular-Baukasten */
.builder { display: flex; flex-direction: column; gap: 12px; }
.builder:empty::before { content: "Noch keine Fragen – füge unten die erste hinzu."; color: var(--muted); font-size: .9rem; padding: 18px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.question { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--border); }
.question:focus-within { border-color: var(--border-strong); }
.question-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.question-head .input-sm { width: auto; min-width: 170px; }
.question-num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .84rem; }
.question-tools { margin-left: auto; display: flex; gap: 2px; }
.question-options { display: flex; flex-direction: column; gap: 8px; padding-left: 14px; border-left: 2px solid var(--accent-soft); }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.option-row { display: flex; gap: 6px; align-items: center; }
.option-row .input { height: 36px; }

/* Öffentliche Bewerbung */
.apply-card { display: flex; align-items: center; gap: 16px; padding: 20px 22px; color: var(--text); transition: border-color .15s, transform .15s; }
.apply-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); transform: translateY(-2px); }
.apply-card .list-main strong { font-size: 1.05rem; }
.thanks-card, .unlock-card { padding: clamp(24px, 5vw, 44px); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.unlock-card { max-width: 480px; margin: 0 auto; width: 100%; }
.thanks-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.thanks-card h1 { font-size: 1.7rem; }
.center-row { justify-content: center; margin-top: 8px; }
.choice-list { display: grid; gap: 8px; }
.req { color: #f87171; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.page-hero .back-link { margin-bottom: 10px; }

/* Farbthemen */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.theme-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; font-weight: 600; }
.theme-choice input { position: absolute; opacity: 0; }
.theme-choice:has(input:checked) { border-color: var(--text-2); background: var(--surface-2); }
.theme-choice:has(input:focus-visible) { box-shadow: var(--focus); }
.theme-swatch { width: 44px; height: 44px; border-radius: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .grid-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-dash, .grid-detail, .grid-editor { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(4, 6, 3, .6); }
    .main { margin-left: 0; }
    .menu-btn { display: inline-grid; }
    .topbar { padding: 0 16px; }
    .content { padding: 20px 16px; }
    .grid-2, .grid-3, .join-grid { grid-template-columns: minmax(0, 1fr); }

    .nav-toggle { display: inline-grid; }
    .nav-links {
        position: absolute; top: 70px; left: 12px; right: 12px;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 10px;
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
        box-shadow: var(--shadow); display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a:not(.btn) { padding: 12px 14px; }
    .nav-cta { margin: 6px 0 0; height: 44px; }
}

@media (max-width: 600px) {
    body { font-size: 14.5px; }
    .container { padding: 0 16px; }
    .hero-card { border-radius: 22px; padding: 56px 16px 48px; }
    .ip-box { flex-wrap: wrap; justify-content: center; padding: 14px; gap: 10px; }
    .ip-label { width: 100%; }
    .stat-card { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 16px; }
    .stat-card .stat-icon { grid-row: auto; width: 38px; height: 38px; }
    .timeline-system time { grid-column: 2; }
    .details { grid-template-columns: minmax(0, 1fr); }
    .choice-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .question-head .input-sm { min-width: 0; flex: 1; }
    .footer-inner { grid-template-columns: minmax(0, 1fr); }
    .card-header, .card-body { padding-left: 16px; padding-right: 16px; }
    .auth-card { padding: 24px 18px; }
    .hide-sm { display: none; }
    .search-inline, .search-inline .input { width: 100%; }
    .toolbar-filters { width: 100%; }
    .player-search { flex-wrap: wrap; }
    .player-search .btn { width: 100%; }
    .chart-label { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* WyvernBans-Anbindung */
.bridge-status { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .25); color: #86efac; font-size: .84rem; font-weight: 600; }
.wb-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: .72rem; font-weight: 600; }
.tag-red { background: rgba(239, 68, 68, .14); color: #fca5a5; }

.logo-img { object-fit: contain; border-radius: 9px; }

/* Bild-Uploads in den Einstellungen */
.upload-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.upload-row .grow { flex: 1 1 260px; }
.upload-preview {
    display: grid; place-items: center; flex-shrink: 0;
    border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-2) center / cover no-repeat;
}
.upload-preview-wide { width: 220px; aspect-ratio: 16 / 9; }
.upload-preview-square { width: 88px; height: 88px; background-size: contain; background-origin: content-box; padding: 10px; }
input[type="file"].input { height: auto; padding: 9px 12px; cursor: pointer; }
input[type="file"].input::file-selector-button {
    margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 8px;
    background: var(--surface-3); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
