/* NTSL Dashboard – Farbkonzept der Nightshade Legion */
:root {
    --ntsl-blue: #6482d2;
    --ntsl-steel: #646e78;
    --ntsl-copper: #bea06e;

    --bg: #070b14;
    --bg-glow: rgba(100, 130, 210, 0.16);
    --panel: #0e1525;
    --panel-raised: #141d31;
    --border: rgba(100, 110, 120, 0.38);
    --border-strong: rgba(100, 110, 120, 0.65);
    --text: #e7eaf0;
    --text-muted: #9aa4b0;
    --blue-soft: rgba(100, 130, 210, 0.16);
    --copper-soft: rgba(190, 160, 110, 0.15);
    --success: #5fb98a;
    --success-soft: rgba(95, 185, 138, 0.15);
    --warning: #d9b25c;
    --danger: #d86a6a;
    --danger-soft: rgba(216, 106, 106, 0.15);
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

* { box-sizing: border-box; }

/* hidden-Attribut muss auch gegen Klassen mit eigener display-Angabe gewinnen */
[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

/* Hintergrund als feste Ebene statt background-attachment: fixed –
   das kann iOS nicht und lässt dort fest positionierte Leisten beim
   Scrollen mitwandern. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1200px 600px at 15% -10%, var(--bg-glow), transparent 60%),
        radial-gradient(900px 500px at 110% 10%, rgba(190, 160, 110, 0.07), transparent 60%),
        var(--bg);
}
body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ntsl-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: 0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }

:focus-visible { outline: 2px solid var(--ntsl-blue); outline-offset: 2px; }

/* ---------- Start / Login ---------- */
.boot, .login {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px;
    text-align: center;
}
.boot { color: var(--text-muted); }
.boot-logo { width: 96px; height: 96px; opacity: 0.85; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .boot-logo { animation: none; } }

.login-logo {
    width: min(260px, 60vw);
    height: auto;
    filter: drop-shadow(0 0 40px rgba(100, 130, 210, 0.35));
}
.eyebrow {
    color: var(--ntsl-copper);
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 0.78rem;
    font-weight: 600;
}
.login h1 { font-size: 2rem; }
.login p { color: var(--text-muted); max-width: 420px; margin: 0; }
.login .alert { max-width: 420px; }
.noscript { text-align: center; padding: 40px; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: rgba(7, 11, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text .eyebrow { font-size: 0.66rem; letter-spacing: 0.28em; }
.brand-text strong { font-size: 1rem; }
.topbar .spacer { flex: 1; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
}
.user-chip img { width: 30px; height: 30px; border-radius: 50%; }
.user-chip .name { font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.body { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 0; }

.sidebar {
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sidebar .section-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 14px 12px 6px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    border-left: 3px solid transparent;
}
.nav-link:hover { background: var(--panel-raised); text-decoration: none; }
.nav-link.active {
    background: var(--blue-soft);
    border-left-color: var(--ntsl-copper);
    color: #fff;
}
.nav-link .icon { width: 20px; text-align: center; }

.main { padding: 28px 32px 48px; min-width: 0; }
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head p { margin: 4px 0 0; color: var(--text-muted); }
.page-head h1::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--ntsl-copper);
}

/* ---------- Karten & Raster ---------- */
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }

.card {
    background: linear-gradient(180deg, var(--panel-raised), var(--panel));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.card > h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 18px 20px 0; }

.stat .label { color: var(--text-muted); font-size: 0.82rem; }
.stat .value { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.stat .value.copper { color: var(--ntsl-copper); }
.stat .value.blue { color: var(--ntsl-blue); }
.stat .sub { color: var(--text-muted); font-size: 0.82rem; }

.empty { color: var(--text-muted); padding: 6px 0; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:hover { background: rgba(100, 130, 210, 0.05); }
tbody tr:last-child td { border-bottom: none; }
td.nowrap { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person img { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.list { list-style: none; margin: 0; padding: 0; }
.list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.list li:last-child { border-bottom: none; }
.list .meta { color: var(--text-muted); font-size: 0.84rem; }
.list li > :last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex: none;
}
.list li > :first-child { min-width: 0; }
.list li > .booking-amount { flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.booking-list li > :first-child { overflow-wrap: anywhere; }
.list.booking-list li { flex-wrap: nowrap; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--panel-raised);
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.badge.blue { background: var(--blue-soft); border-color: rgba(100, 130, 210, 0.45); color: #b8c8f2; }
.badge.copper { background: var(--copper-soft); border-color: rgba(190, 160, 110, 0.5); color: var(--ntsl-copper); }
.badge.success { background: var(--success-soft); border-color: rgba(95, 185, 138, 0.45); color: var(--success); }
.badge.danger { background: var(--danger-soft); border-color: rgba(216, 106, 106, 0.45); color: var(--danger); }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--danger); font-weight: 600; }

/* ---------- Events ---------- */
.event-card { display: flex; flex-direction: column; gap: 10px; }
.event-date {
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
    color: var(--ntsl-copper);
    font-weight: 600;
    font-size: 0.86rem;
}
.event-card p { margin: 0; color: var(--text-muted); white-space: pre-line; overflow-wrap: anywhere; }
.event-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.event-card .actions { margin-top: auto; }

/* ---------- Formulare ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: var(--panel-raised);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { border-color: var(--ntsl-blue); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--ntsl-blue); border-color: var(--ntsl-blue); color: #0b1020; }
.btn.primary:hover { background: #7591da; }
.btn.copper { background: transparent; border-color: var(--ntsl-copper); color: var(--ntsl-copper); }
.btn.copper:hover { background: var(--copper-soft); }
.btn.discord { background: #5865f2; border-color: #5865f2; color: #fff; padding: 12px 22px; font-size: 1rem; }
.btn.discord:hover { background: #6b77f4; }
.btn.small { padding: 5px 11px; font-size: 0.84rem; }
.btn.ghost { background: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 0.84rem; color: var(--text-muted); font-weight: 600; }
.field .hint { font-size: 0.8rem; color: var(--text-muted); }
input[type="text"], input[type="url"], input[type="time"], input[type="password"], input[type="number"], input[type="search"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: #0a101d;
    color: var(--text);
    font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--ntsl-blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--ntsl-blue); }

.picker {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #0a101d;
    padding: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
}
/* Auswahl als kompakte Chips: spart auf dem Handy viel Scrollweg. */
.picker label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    cursor: pointer;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--text);
    max-width: 100%;
    transition: border-color 0.15s, background 0.15s;
}
.picker label:hover { background: var(--panel-raised); border-color: var(--border-strong); }
.picker label:has(input:checked) {
    border-color: rgba(100, 130, 210, 0.7);
    background: var(--blue-soft);
}
.picker label:focus-within { outline: 2px solid var(--ntsl-blue); outline-offset: 1px; }
.picker .meta { font-size: 0.78rem; }
.picker > .empty { padding: 2px 4px; }
.picker input { accent-color: var(--ntsl-blue); }
.role-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ntsl-steel); flex: none; }

.config-section + .config-section { margin-top: 16px; }

.search-results { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.search-results:empty { display: none; }
.search-results button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--panel);
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.search-results li:last-child button { border-bottom: 0; }
.search-results button:hover { background: var(--panel-raised); }
.search-results img { width: 24px; height: 24px; border-radius: 50%; }
.selected-member { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--ntsl-blue); border-radius: var(--radius-sm); background: var(--blue-soft); }
.selected-member img { width: 26px; height: 26px; border-radius: 50%; }
.selected-member .spacer { flex: 1; }

/* ---------- Dialog ---------- */
dialog {
    width: min(560px, calc(100vw - 32px));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--text);
    padding: 22px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
dialog::backdrop { background: rgba(3, 6, 12, 0.7); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 16px; }

/* ---------- Hinweise ---------- */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--panel);
    margin-bottom: 16px;
}
.alert.error { border-color: rgba(216, 106, 106, 0.55); background: var(--danger-soft); }
.alert.success { border-color: rgba(95, 185, 138, 0.55); background: var(--success-soft); }

.toast-area {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}
.toast {
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    background: var(--panel-raised);
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--ntsl-blue);
    box-shadow: var(--shadow);
    max-width: 360px;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

.loading {
    color: var(--text-muted); padding: 40px 0;
    display: flex; align-items: center; gap: 12px;
}
.loading::before {
    content: ""; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid var(--border-strong); border-top-color: var(--ntsl-copper);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }

/* Speichern-Leiste bleibt bei langen Formularen sichtbar. */
.form-actions.sticky {
    position: sticky; bottom: 0; z-index: 5;
    margin: 16px -4px 0; padding: 12px 4px;
    background: linear-gradient(180deg, transparent, var(--bg) 30%);
}
.stat .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.older-releases > summary {
    cursor: pointer; color: var(--ntsl-blue); font-weight: 600;
    padding: 10px 0; list-style-position: inside;
}
.older-releases[open] > summary { margin-bottom: 12px; }

/* ---------- Mobil ---------- */
/* Untere Navigationsleiste und „Mehr“-Menü – nur auf dem Handy sichtbar */
.bottom-nav { display: none; }

.sheet {
    margin: auto auto 0;
    width: 100%;
    max-width: 520px;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    padding: 8px 12px calc(16px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sheet:not([open]) { display: none; }
.sheet-handle {
    width: 42px;
    height: 5px;
    border-radius: 3px;
    background: var(--border-strong);
    margin: 4px auto 10px;
}
.sheet-label {
    color: var(--text-muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 12px 12px 4px;
}
.sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}
.sheet-item:hover, .sheet-item:active { background: var(--panel-raised); text-decoration: none; }
.sheet-item.active { background: var(--blue-soft); }
.sheet-item.danger { color: var(--danger); }
.sheet-item .check { margin-left: auto; color: var(--ntsl-copper); }

@media (max-width: 860px) {
    body { font-size: 16px; }

    .shell { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    .form-actions.sticky { bottom: calc(64px + env(safe-area-inset-bottom)); }
    .form-actions.sticky .btn { flex: 1; }
    .grid.stats > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .body { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: none; }

    /* Kopfzeile: kompakt, mit Rand für Notch/Statusleiste */
    .topbar {
        padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
        gap: 10px;
    }
    .brand-text .eyebrow { display: none; }
    .topbar select { max-width: 45vw; }
    .user-chip { padding: 3px; }
    .user-chip .name, .user-chip .badge { display: none; }
    .topbar .logout { display: none; }

    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: rgba(10, 15, 27, 0.94);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
    }
    .tab {
        flex: 1 1 0;
        min-width: 0;
        min-height: 52px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--text-muted);
        font: inherit;
        font-size: 0.7rem;
        font-weight: 600;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .tab:hover { text-decoration: none; }
    .tab-icon { font-size: 1.2rem; line-height: 1; }
    .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tab.active { color: var(--ntsl-copper); background: var(--copper-soft); }

    .main { padding: 18px 14px 28px; }
    .page-head { margin-bottom: 16px; }
    .page-head h1 { font-size: 1.3rem; }
    .page-head > div:last-child:not(:first-child) { width: 100%; }

    .card { padding: 16px; border-radius: 12px; }
    .card.flush > h2 { padding: 16px 16px 0; }
    .grid { gap: 12px; }
    .grid.two { grid-template-columns: 1fr; }
    .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .stat .value { font-size: 1.5rem; }
    .list li { flex-wrap: wrap; }

    /* Größere Tippflächen; 16px verhindert das automatische Zoomen auf iOS */
    .btn { min-height: 44px; padding: 10px 16px; }
    .btn.small { min-height: 38px; padding: 7px 12px; font-size: 0.9rem; }
    input[type="text"], input[type="url"], input[type="time"], input[type="password"], input[type="number"], input[type="search"], input[type="datetime-local"], select, textarea {
        font-size: 16px;
        min-height: 46px;
    }
    .form-actions .btn { flex: 1 1 auto; }
    .picker label { min-height: 40px; }

    /* Tabellen als Kartenliste */
    .table-wrap { overflow: visible; }
    table.responsive thead { display: none; }
    table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
    table.responsive tr {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border);
    }
    table.responsive tbody tr:last-child { border-bottom: none; }
    table.responsive td {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        padding: 4px 0;
        border: 0;
        text-align: right;
    }
    table.responsive td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: left;
        flex: none;
        margin-right: auto;
    }
    table.responsive td[data-label=""]::before,
    table.responsive td[colspan]::before { content: none; }
    table.responsive td[data-label=""] { justify-content: flex-end; padding-top: 8px; }
    table.responsive td[colspan] { justify-content: flex-start; text-align: left; }
    /* Erste Spalte wird zum Kartentitel */
    table.responsive td:first-child {
        display: block;
        text-align: left;
        font-size: 1.02rem;
        font-weight: 650;
        color: var(--text);
        padding-bottom: 8px;
    }
    table.responsive td:first-child::before { content: none; }
    table.responsive td:first-child .meta { font-weight: 400; }
    table.responsive td:first-child > div { text-align: left; }
    table.responsive td .person { justify-content: flex-end; }
    table.responsive td > div { text-align: right; }

    /* Dialoge gleiten von unten herein */
    dialog:not(.sheet) {
        margin: auto auto 0;
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 18px 18px 0 0;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    }
    .toast-area { left: 14px; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); }
    .toast { max-width: none; }
}

@media (min-width: 861px) {
    .sheet { margin: auto; border-radius: var(--radius); border-bottom: 1px solid var(--border-strong); }
}

.meta { color: var(--text-muted); font-size: 0.84rem; }
.card-body { padding: 0 20px 18px; }
.hint { font-size: 0.8rem; color: var(--text-muted); margin: 10px 0 0; }

/* ---------- Ergänzungen: Kartenkopf, Filter, Audit-Log ---------- */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select { max-width: 240px; }
.filters input { flex: 1 1 220px; }
.audit-list { display: flex; flex-direction: column; gap: 10px; }
.audit-entry { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.audit-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.audit-entry .badge { align-self: flex-start; }
.audit-details {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: inherit;
    font-size: 0.88rem;
    color: var(--text-muted);
}
@media (max-width: 860px) {
    .filters select { max-width: none; flex: 1 1 100%; }
}
form > .field + .field { margin-top: 14px; }
@media (max-width: 860px) {
    table.responsive td:first-child .person { justify-content: flex-start; }
}

/* ---------- Version und Ansprechpartner ---------- */
.support-note { color: var(--text-muted); font-size: 0.8rem; line-height: 1.45; }
.support-note strong { color: var(--ntsl-copper); font-weight: 600; }
.support-note .version { color: var(--text); font-weight: 600; letter-spacing: 0.02em; }
.sidebar-footer {
    margin-top: auto;
    padding: 14px 12px 0;
    border-top: 1px solid var(--border);
}
.sidebar { min-height: calc(100vh - 61px); position: sticky; top: 61px; align-self: start; }
.login-footer { margin-top: 18px; text-align: center; }
.sheet-footer { padding: 14px 14px 0; margin-top: 6px; border-top: 1px solid var(--border); }
.support-note.inline { margin-top: 4px; }

/* ---------- Hinweis auf neue Version ---------- */
.update-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    max-width: calc(100vw - 28px);
    padding: 10px 12px 10px 16px;
    border-radius: var(--radius);
    background: var(--panel-raised);
    border: 1px solid var(--ntsl-copper);
    box-shadow: var(--shadow);
}
.update-text { font-weight: 600; }
.update-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 860px) {
    .update-banner {
        left: 14px;
        right: 14px;
        transform: none;
        width: auto;
        bottom: calc(80px + env(safe-area-inset-bottom));
        flex-wrap: wrap;
    }
    .update-actions { margin-left: auto; }
}

/* ---------- Event planen ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-strong); background: #0a101d; font-size: 0.9rem;
}
.chip-toggle input { accent-color: var(--ntsl-blue); }
.chip-toggle:has(input:checked) { border-color: var(--ntsl-blue); background: var(--blue-soft); }
.slot-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.slot-list:empty::before { content: "Noch keine Subzuweisungen."; color: var(--text-muted); font-size: 0.9rem; }
.slot-row { display: grid; grid-template-columns: 70px minmax(0, 2fr) 90px minmax(0, 2fr) auto; gap: 8px; align-items: center; }
.slot-actions { justify-content: space-between; align-items: center; }
.toggle + .toggle { margin-top: 6px; }
@media (max-width: 860px) {
    .slot-row {
        grid-template-columns: 64px minmax(0, 1fr) 80px;
        padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    }
    .slot-row .slot-role { grid-column: 1 / 3; }
}
input[type="datetime-local"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }
.form-grid + .field, .form-grid + .form-grid, .field + .form-grid, .hint + .slot-list { margin-top: 14px; }

/* ---------- Neuigkeiten ---------- */
.support-note a.version { color: var(--text); text-decoration: none; }
.support-note a.version:hover { color: var(--ntsl-copper); }
.nav-link .badge { margin-left: auto; }
.tab-icon { position: relative; }
.tab-dot {
    position: absolute; top: -2px; right: -8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ntsl-copper); box-shadow: 0 0 0 2px var(--bg);
}
.version-card { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.version-card .label { color: var(--text-muted); font-size: 0.82rem; }
.version-number { font-size: 1.8rem; font-weight: 700; color: var(--ntsl-copper); line-height: 1.2; }
.version-card .support-note { margin-left: auto; text-align: right; }
.release-list { display: flex; flex-direction: column; gap: 12px; }
.release.current { border-color: rgba(190, 160, 110, 0.55); }
.release-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.release-head .meta { margin-left: auto; }
.release-section + .release-section { margin-top: 10px; }
.release-section-title {
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.12em;
    margin: 6px 0 4px; color: var(--ntsl-blue);
}
.release-section-title.fixed { color: var(--success); }
.release-items { margin: 0; padding-left: 20px; }
.release-items li { margin: 4px 0; }
.release-items code {
    font-size: 0.9em; padding: 1px 6px; border-radius: 4px;
    background: var(--panel); border: 1px solid var(--border);
}
@media (max-width: 860px) {
    .version-card .support-note { margin-left: 0; text-align: left; }
    .release-head .meta { margin-left: 0; width: 100%; }
}

/* ---------- Eventvorlagen ---------- */
.template-card { display: flex; flex-direction: column; gap: 10px; }
.template-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.template-head h2 { margin: 0; }
.template-description { margin: 0; color: var(--text-muted); white-space: pre-line; overflow-wrap: anywhere; }
.template-card .form-actions { margin-top: auto; }
.btn.danger-btn { background: var(--danger); border-color: var(--danger); color: #1a0b0b; }

/* ---------- Konfiguration: Reiter, KI, UEX, Global Chat ---------- */
.subtabs {
    display: flex; gap: 6px; margin-bottom: 16px;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
    padding: 8px 14px; border-radius: 8px 8px 0 0; color: var(--text-muted);
    text-decoration: none; font-weight: 600; white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.subtab:hover { color: var(--text); background: var(--panel-raised); }
.subtab.active { color: var(--ntsl-copper); border-bottom-color: var(--ntsl-copper); }
.config-section + .config-section, .grid.stats + .config-section,
.grid.stats + div + .config-section { margin-top: 16px; }
.grid.stats + div:not(:empty) { margin-top: 12px; }
.config-section h2 .meta { margin-left: auto; font-weight: 400; }
.section-intro { margin: -4px 0 12px; }
.config-split { margin-top: 14px; }
.config-split .field + .field { margin-top: 10px; }
.form-status:not(:empty) { margin-bottom: 12px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .grow { flex: 1 1 240px; }
.add-entry { margin-top: 14px; }
.add-entry > summary {
    cursor: pointer; color: var(--ntsl-blue); font-weight: 600; padding: 4px 0;
    list-style-position: inside;
}
.add-entry[open] > summary { margin-bottom: 12px; }
.knowledge-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.knowledge-item {
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
    background: var(--panel);
}
.knowledge-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.knowledge-head .btn { margin-left: auto; }
.knowledge-head a { color: var(--text); text-decoration: none; }
.knowledge-head a:hover strong { color: var(--ntsl-copper); }
.knowledge-text { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--text-muted); }
.knowledge-text.internal { color: var(--ntsl-copper); }
.channel-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.channel-line .btn { margin-left: auto; }
.server-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.server-list li { display: flex; align-items: center; gap: 12px; }
.server-list li .badge, .server-list li > .btn { margin-left: auto; flex: none; }
.server-list li > div { min-width: 0; }
.server-list img, .server-icon {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
}
.server-icon {
    display: grid; place-items: center; background: var(--blue-soft);
    color: var(--ntsl-blue); font-weight: 700;
}
.card-body { padding: 0 20px 18px; }
.card code {
    font-size: 0.9em; padding: 1px 6px; border-radius: 4px;
    background: var(--panel); border: 1px solid var(--border);
}
@media (max-width: 860px) {
    .channel-line .btn, .knowledge-head .btn { margin-left: 0; }
    .inline-form .btn { width: 100%; }
}
.stat .value { overflow-wrap: anywhere; }
.hint.spaced { margin-bottom: 14px; }
.channel-line + .alert { margin-bottom: 14px; }
.toggle + .form-grid { margin-top: 12px; }
/* Chips: Häkchen statt sichtbarer Checkbox – die Checkbox bleibt für Tastatur und Screenreader erhalten. */
.picker label { position: relative; }
.picker label > input[type="checkbox"] {
    position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.picker label:has(input:checked)::after { content: "✓"; color: var(--ntsl-blue); font-weight: 700; margin-left: 2px; }
.card .form-actions.sticky { background: linear-gradient(180deg, transparent, var(--panel) 35%); margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }

/* ======================================================================
   Animationen
   Alle Bewegungen nur, wenn im System nicht „Bewegung reduzieren“ aktiv ist.
   Für Verschiebungen wird die Eigenschaft `translate` genutzt, damit
   vorhandene `transform`-Angaben (z. B. Zentrierung) erhalten bleiben.
   ====================================================================== */
:root {
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fade-up { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; scale: 0.96; translate: 0 8px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes slide-in-right { from { opacity: 0; translate: 24px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes slide-out-right { to { opacity: 0; translate: 24px 0; } }
@keyframes slide-up { from { translate: 0 100%; } to { translate: 0 0; } }
@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(190, 160, 110, 0); }
    50% { box-shadow: 0 0 0 4px rgba(190, 160, 110, 0.18); }
}
@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}
@keyframes halo {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(100, 130, 210, 0.30)); }
    50% { filter: drop-shadow(0 0 55px rgba(100, 130, 210, 0.55)); }
}
@keyframes progress {
    0% { left: -40%; width: 40%; }
    60% { left: 40%; width: 50%; }
    100% { left: 100%; width: 30%; }
}
@keyframes shine {
    from { background-position: -200% 0; }
    to { background-position: 200% 0; }
}

/* Ladebalken oben beim Seitenwechsel (Inhalt ohne Bewegung: einfach sichtbar) */
.route-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 200;
    overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.route-progress.active { opacity: 1; }
.route-progress::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(90deg, transparent, var(--ntsl-copper), var(--ntsl-blue), transparent);
}

@media (prefers-reduced-motion: no-preference) {
    /* --- Seitenwechsel: Inhalte gleiten gestaffelt herein --- */
    .main > * { animation: fade-up 0.45s var(--ease-out) backwards; }
    .main > *:nth-child(2) { animation-delay: 0.04s; }
    .main > *:nth-child(3) { animation-delay: 0.08s; }
    .main > *:nth-child(4) { animation-delay: 0.12s; }
    .main > *:nth-child(5) { animation-delay: 0.16s; }
    .main > *:nth-child(6) { animation-delay: 0.20s; }
    .main > *:nth-child(n+7) { animation-delay: 0.24s; }
    .main > .loading { animation: fade-in 0.3s 0.15s backwards; }

    /* Karten in Rastern erscheinen nacheinander */
    .grid > .card, .release-list > .card, .knowledge-list > li, .server-list > li {
        animation: pop-in 0.5s var(--ease-out) backwards;
    }
    .grid > :nth-child(2), .release-list > :nth-child(2), .knowledge-list > :nth-child(2), .server-list > :nth-child(2) { animation-delay: 0.05s; }
    .grid > :nth-child(3), .release-list > :nth-child(3), .knowledge-list > :nth-child(3), .server-list > :nth-child(3) { animation-delay: 0.10s; }
    .grid > :nth-child(4), .release-list > :nth-child(4), .knowledge-list > :nth-child(4), .server-list > :nth-child(4) { animation-delay: 0.15s; }
    .grid > :nth-child(5), .knowledge-list > :nth-child(5), .server-list > :nth-child(5) { animation-delay: 0.20s; }
    .grid > :nth-child(6), .knowledge-list > :nth-child(6), .server-list > :nth-child(6) { animation-delay: 0.25s; }
    .grid > :nth-child(n+7), .knowledge-list > :nth-child(n+7), .server-list > :nth-child(n+7) { animation-delay: 0.30s; }

    /* Tabellenzeilen blenden weich ein */
    tbody tr { animation: fade-in 0.4s var(--ease-out) backwards; }
    tbody tr:nth-child(2) { animation-delay: 0.03s; }
    tbody tr:nth-child(3) { animation-delay: 0.06s; }
    tbody tr:nth-child(4) { animation-delay: 0.09s; }
    tbody tr:nth-child(5) { animation-delay: 0.12s; }
    tbody tr:nth-child(n+6) { animation-delay: 0.15s; }

    /* --- Karten: leichtes Anheben mit Lichtkante --- */
    .card {
        transition: border-color 0.25s, box-shadow 0.25s var(--ease-out), translate 0.25s var(--ease-out);
    }
    @media (hover: hover) { .grid > .card:hover, .release-list > .card:hover, .event-card:hover, .template-card:hover {
        translate: 0 -3px;
        border-color: rgba(100, 130, 210, 0.45);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(100, 130, 210, 0.12);
    } }
    .grid.stats > .stat { position: relative; overflow: hidden; }
    .grid.stats > .stat::after {
        content: ""; position: absolute; inset: 0; pointer-events: none;
        background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
        background-size: 200% 100%; background-position: -200% 0;
    }
    @media (hover: hover) { .grid.stats > .stat:hover::after { animation: shine 0.9s var(--ease-out); } }

    /* --- Knöpfe: weiche Übergänge und spürbarer Druck --- */
    .btn {
        transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.2s, scale 0.12s var(--ease-out);
    }
    .btn:active:not(:disabled) { scale: 0.96; }
    .btn.primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(100, 130, 210, 0.35); }
    .btn.discord:hover { box-shadow: 0 6px 22px rgba(88, 101, 242, 0.45); }

    /* --- Navigation --- */
    .nav-link { transition: background 0.2s, color 0.2s, border-color 0.2s, padding-left 0.2s var(--ease-out); }
    @media (hover: hover) { .nav-link:hover:not(.active) { padding-left: 16px; } }
    .nav-link .icon { transition: scale 0.2s var(--ease-spring), color 0.2s; }
    .nav-link:hover .icon, .nav-link.active .icon { scale: 1.18; color: var(--ntsl-copper); }
    .nav-link .badge.copper, .tab-dot { animation: glow-pulse 2.4s ease-in-out infinite; }
    .tab { transition: color 0.2s, background 0.2s; }
    .tab .tab-icon { transition: scale 0.25s var(--ease-spring); }
    .tab.active .tab-icon { scale: 1.15; }
    .subtab { transition: color 0.2s, background 0.2s, border-color 0.25s var(--ease-out); }

    /* --- Dialoge, Menü-Sheet, Hinweise --- */
    dialog[open] { animation: pop-in 0.28s var(--ease-out); }
    dialog[open]::backdrop { animation: fade-in 0.25s ease-out; }
    .sheet[open] { animation: slide-up 0.32s var(--ease-out); }
    .toast { animation: slide-in-right 0.35s var(--ease-spring) backwards; }
    .toast.leaving { animation: slide-out-right 0.25s ease-in forwards; }
    .update-banner { animation: rise 0.45s var(--ease-spring) backwards; }
    .alert { animation: fade-up 0.3s var(--ease-out) backwards; }

    /* Aufklappbereiche („+ Eintrag hinzufügen“, ältere Versionen) */
    details[open] > :not(summary) { animation: fade-up 0.3s var(--ease-out) backwards; }
    details > summary { transition: color 0.2s; }
    details > summary:hover { color: #8fa6e6; }

    /* Auswahl-Chips und Eingaben */
    .picker label { transition: border-color 0.15s, background 0.15s, scale 0.12s var(--ease-out); }
    .picker label:active { scale: 0.96; }
    input, select, textarea { transition: border-color 0.2s, box-shadow 0.2s; }
    tbody tr { transition: background 0.15s; }

    /* --- Anmeldeseite: schwebendes Wappen mit pulsierendem Leuchten --- */
    .login-logo { animation: float 6s ease-in-out infinite, halo 6s ease-in-out infinite; }
    .login > * { animation: fade-up 0.6s var(--ease-out) backwards; }
    .login > *:nth-child(2) { animation-delay: 0.08s; }
    .login > *:nth-child(3) { animation-delay: 0.16s; }
    .login > *:nth-child(4) { animation-delay: 0.24s; }
    .login > *:nth-child(5) { animation-delay: 0.32s; }
    .login > *:nth-child(n+6) { animation-delay: 0.40s; }
    .login > .login-logo { animation: fade-up 0.6s var(--ease-out) backwards, float 6s 0.6s ease-in-out infinite, halo 6s ease-in-out infinite; }

    /* Ladebalken bewegt sich nur mit Animationen */
    .route-progress.active::before { animation: progress 1.1s ease-in-out infinite; width: 40%; }
}

/* ---------- Bewerbungen ---------- */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 0.88rem; font-weight: 600;
    border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { border-color: rgba(100, 130, 210, 0.7); background: var(--blue-soft); color: var(--text); }
.chip-count {
    min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
    background: var(--panel-raised); font-size: 0.78rem; color: var(--text-muted);
}
.chip.active .chip-count { background: rgba(100, 130, 210, 0.3); color: #fff; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--panel-raised); }
.applicant-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.stepper { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; gap: 0; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.step::before {
    content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
    background: var(--border-strong); z-index: 0;
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--ntsl-blue); }
.step-dot {
    position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
    background: var(--panel); border: 2px solid var(--border-strong); color: var(--text-muted);
}
.step.done .step-dot { background: var(--ntsl-blue); border-color: var(--ntsl-blue); color: #0b1020; }
.step.current .step-dot { border-color: var(--ntsl-copper); color: var(--ntsl-copper); box-shadow: 0 0 0 4px var(--copper-soft); }
.step-label { font-size: 0.82rem; color: var(--text-muted); }
.step.current .step-label { color: var(--text); font-weight: 700; }
.status-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-buttons .btn.current { border-color: var(--ntsl-copper); color: var(--ntsl-copper); opacity: 1; cursor: default; }
.btn.danger-outline { border-color: rgba(216, 106, 106, 0.6); color: var(--danger); background: transparent; }
.btn.danger-outline:hover { background: var(--danger-soft); border-color: var(--danger); }
.card .toggle { margin-top: 10px; }
.card > .field { margin-top: 4px; }
.note-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.note { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.note-head .btn { margin-left: auto; }
.note-text { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Kalender-Abo ---------- */
.calendar-dialog > * + * { margin-top: 12px; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.84rem; }
.form-actions.start { justify-content: flex-start; }
@media (max-width: 860px) {
    .stepper .step-label { font-size: 0.72rem; }
    .copy-row { flex-direction: column; }
}

/* ---------- Assistent „Neuer Shopartikel“ ---------- */
dialog:has(.wizard) { width: min(680px, calc(100vw - 32px)); }
.wizard > * + * { margin-top: 12px; }
.wizard form > * + * { margin-top: 12px; }
.wizard-steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 6px; counter-reset: step; }
.wizard-steps li {
    flex: 1; text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
    padding: 6px 4px; border-bottom: 2px solid var(--border-strong); counter-increment: step;
}
.wizard-steps li::before { content: counter(step) ". "; }
.wizard-steps li.active { color: var(--ntsl-copper); border-color: var(--ntsl-copper); }
.wizard-steps li.done { color: var(--text); border-color: var(--ntsl-blue); }
.toggle-list { display: flex; flex-direction: column; gap: 8px; }
.toggle-list .toggle + .toggle { margin-top: 0; }
.match-list { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; padding-right: 2px; }
.match {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px; cursor: pointer;
    border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
    transition: border-color 0.15s, background 0.15s;
}
.match:hover { border-color: var(--border-strong); }
.match.selected { border-color: rgba(100, 130, 210, 0.7); background: var(--blue-soft); }
.match input { margin-top: 4px; accent-color: var(--ntsl-blue); }
.match-body { min-width: 0; }
.match-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.match-text { margin: 4px 0; color: var(--text-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.choice-list { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.choice-list .btn { justify-content: flex-start; white-space: normal; text-align: left; }

/* ---------- Banner-Upload ---------- */
.uploader {
    display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px 28px;
    padding: 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--panel);
}
.file-input { font: inherit; color: var(--text-muted); max-width: 100%; }
.file-input::file-selector-button {
    font: inherit; font-weight: 600; margin-right: 12px; padding: 7px 14px; cursor: pointer;
    border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--panel-raised); color: var(--text);
}
.file-input::file-selector-button:hover { border-color: var(--ntsl-blue); }
.banner-preview { max-width: 100%; max-height: 220px; border-radius: var(--radius-sm); border: 1px solid var(--border); object-fit: cover; }
.hint.error-text { color: var(--danger); }
.hint.success-text { color: var(--success); }
.card > .uploader { margin-left: 0; }

/* ---------- Ticket-Verläufe ---------- */
.search-bar { margin-bottom: 14px; }
.search-bar input { width: 100%; }
.search-card { margin-bottom: 16px; }
.hit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hit { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); }
.hit:hover { border-color: rgba(100, 130, 210, 0.6); text-decoration: none; }
.hit-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hit-snippet { margin: 6px 0 0; color: var(--text-muted); font-size: 0.9rem; overflow-wrap: anywhere; }
mark { background: rgba(190, 160, 110, 0.35); color: var(--text); border-radius: 3px; padding: 0 2px; }
.chat-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.chat-toolbar input { flex: 1 1 240px; }
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chat-day {
    text-align: center; font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em;
    margin: 14px 0 6px; display: flex; align-items: center; gap: 12px;
}
.chat-day::before, .chat-day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.chat-msg { display: flex; gap: 12px; padding: 6px 8px; border-radius: 8px; }
.chat-msg:not(.grouped) { margin-top: 6px; }
.chat-msg:hover { background: var(--panel); }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.chat-avatar.spacer { height: 0; }
.chat-body { min-width: 0; flex: 1; }
.chat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-msg.opener .chat-head strong { color: var(--ntsl-copper); }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.chat-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
td.nowrap { white-space: nowrap; }

/* ---------- Flotte ---------- */
.ship-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ship { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); flex-wrap: wrap; }
.ship-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ship-main strong + .meta { margin-top: -2px; }
.ship-actions { display: flex; gap: 6px; }
.fleet-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.fleet-model { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; }
.fleet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fleet-count { font-weight: 800; color: var(--ntsl-copper); }
.owners { display: flex; flex-wrap: wrap; gap: 6px; }
.owner { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--panel-raised); border: 1px solid var(--border); }
.owner img { width: 20px; height: 20px; border-radius: 50%; }
.finder-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.finder-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }

/* ---------- Statistik ---------- */
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--panel); }
.seg { padding: 6px 14px; border-radius: 999px; color: var(--text-muted); font-weight: 600; font-size: 0.88rem; }
.seg:hover { color: var(--text); text-decoration: none; }
.seg.active { background: var(--blue-soft); color: var(--text); }
.grid.two + .grid.two, .grid.stats + .grid.two { margin-top: 16px; }
.chart { display: flex; flex-direction: column; gap: 8px; }
.chart-scroll { overflow-x: auto; }
.chart-canvas { position: relative; min-width: 460px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: rgba(100, 110, 120, 0.22); stroke-width: 1; }
.chart-axis { stroke: rgba(100, 110, 120, 0.5); stroke-width: 1; }
.chart-tick { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.chart-hit { fill: transparent; }
.chart-band.active .chart-hit { fill: rgba(255, 255, 255, 0.04); }
.chart-bar { transition: opacity 0.15s; }
.chart-svg:hover .chart-band:not(.active) .chart-bar { opacity: 0.55; }
.chart-tooltip {
    position: absolute; z-index: 5; min-width: 160px; pointer-events: none;
    padding: 8px 10px; border-radius: 8px; background: var(--panel-raised); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow); font-size: 0.84rem;
}
.tt-row { display: flex; align-items: center; gap: 6px; color: var(--text-muted); margin-top: 3px; }
.tt-row strong { color: var(--text); margin-left: auto; }
.tt-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-legend { display: flex; gap: 16px; font-size: 0.84rem; color: var(--text-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-table > summary { cursor: pointer; color: var(--text-muted); font-size: 0.84rem; }
.chart-table table { margin-top: 8px; }
.reliability { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rel-bar { width: 56px; height: 6px; border-radius: 3px; background: var(--panel-raised); overflow: hidden; }
.rel-fill { display: block; height: 100%; background: #6482d2; border-radius: 3px; }
.inactive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.inactive-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--border); }

/* ---------- RSI ---------- */
.rsi-card + .rsi-card { margin-top: 16px; }
.code-box { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.code-box code {
    font-size: 1.4rem; font-weight: 800; letter-spacing: 0.12em; padding: 8px 16px; border-radius: 8px;
    background: var(--copper-soft); border: 1px solid rgba(190, 160, 110, 0.5); color: var(--ntsl-copper);
}
.rsi-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rsi-handle { font-size: 1.3rem; font-weight: 800; }
.reminder-details { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.reminder-details .field { min-width: 180px; }
.howto { margin: 0 0 14px; padding-left: 20px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.fy-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.owner.unmatched { border-style: dashed; color: var(--text-muted); padding-left: 8px; }
.fleet-assign { margin-top: 16px; }
.fy-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.fy-app { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.fy-app > summary { cursor: pointer; color: var(--ntsl-blue); font-weight: 600; padding: 4px 0; }
.fy-app[open] > summary { margin-bottom: 12px; }
.fy-app code.grow { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; background: var(--panel-raised); border-radius: 8px; }

/* Shop: Spielwerte und Crafting-Qualität */
.craft-box:empty { display: none; }
.craft-box { margin-top: 14px; }
.craft-panel { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.craft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.craft-head a { margin-left: auto; }
.craft-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; }
.craft-stats li { display: flex; flex-direction: column; gap: 1px; font-size: 0.9rem; }
.craft-quality { display: flex; flex-direction: column; gap: 10px; }
.craft-quality[hidden] { display: none; }
.craft-sliders { display: flex; flex-direction: column; gap: 8px; }
.craft-slider { display: flex; align-items: center; gap: 10px; }
.craft-slider input[type="range"] { flex: 1; min-width: 0; accent-color: var(--ntsl-blue); }
.craft-slider .craft-number { width: 108px; flex: none; }
.craft-effects { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.craft-group { background: rgba(100, 130, 210, 0.06); border-radius: 10px; padding: 10px 12px; }
.craft-group-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.craft-mods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 0.88rem; }
.craft-mods li { display: flex; justify-content: space-between; gap: 10px; }
.craft-delta { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-muted); }
.craft-delta.good { color: var(--success); }
.craft-delta.bad { color: var(--danger); }
.item-details { max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Onboarding ---------- */
dialog.onboarding { width: min(600px, calc(100vw - 32px)); }
dialog.onboarding > h2 { display: none; }
.onboarding-body { display: flex; flex-direction: column; gap: 12px; }
.onboarding-body h3 { margin: 0; font-size: 1.25rem; }
.onboarding-body p { margin: 0; line-height: 1.55; }
.onboarding-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.5rem; color: var(--ntsl-blue); background: var(--blue-soft); border: 1px solid rgba(100, 130, 210, 0.45);
}
.onboarding-areas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; }
.onboarding-areas li {
    display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
}
.onboarding-areas .area-icon { color: var(--ntsl-copper); font-size: 1.15rem; text-align: center; }
.onboarding-areas p.meta { margin-top: 2px; font-size: 0.86rem; }
.onboarding-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.onboarding-foot .form-actions { margin: 0; flex-wrap: wrap; }
.onboarding-dots { display: flex; gap: 6px; }
.onboarding-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background 0.2s, transform 0.2s; }
.onboarding-dots .dot.done { background: rgba(100, 130, 210, 0.55); }
.onboarding-dots .dot.active { background: var(--ntsl-blue); transform: scale(1.25); }
.link-button {
    background: none; border: 0; padding: 0; margin-top: 4px; font: inherit; color: var(--ntsl-blue);
    cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: #8fa6e6; }
@media (max-width: 520px) {
    .onboarding-areas li { grid-template-columns: 28px 1fr; }
    .onboarding-areas li .btn { grid-column: 2; justify-self: start; }
    .onboarding-foot { flex-direction: column; align-items: stretch; }
    .onboarding-dots { justify-content: center; }
}
.craft-panel.missing { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.craft-panel .required { color: var(--danger); }
.craft-slider input[type="range"].unset { opacity: 0.45; }

/* ---------- Geplante Nachrichten ---------- */
.schedule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.schedule-item {
    display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: start;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
}
.schedule-item.off { opacity: 0.6; }
.schedule-time { display: flex; flex-direction: column; gap: 2px; }
.schedule-time strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; color: var(--ntsl-blue); }
.schedule-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schedule-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-muted); font-size: 0.92rem; }
.schedule-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip {
    min-width: 42px; padding: 7px 0; border-radius: 999px; border: 1px solid var(--border-strong);
    background: transparent; color: var(--text-muted); font: inherit; font-weight: 600; cursor: pointer;
}
.day-chip.active { background: var(--blue-soft); border-color: rgba(100, 130, 210, 0.7); color: var(--text); }
.day-presets { display: flex; gap: 14px; margin-top: 6px; font-size: 0.85rem; }

/* ---------- Ankündigungen ---------- */
.announce-grid { align-items: start; }
.when-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.when-row input[type="datetime-local"] { width: auto; }
.embed-preview { display: flex; flex-direction: column; gap: 6px; }
.embed-mention { color: #c9cdfb; font-weight: 600; }
.embed-mention:empty { display: none; }
.embed {
    border-left: 4px solid #5865f2; background: rgba(255, 255, 255, 0.03); border-radius: 6px;
    padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.embed-title { font-weight: 700; }
.embed-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.93rem; line-height: 1.5; max-height: 360px; overflow-y: auto; }
.embed-footer { font-size: 0.78rem; }
.announcement-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.announcement { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.announcement-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.announcement-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-muted); font-size: 0.92rem; }
.announcement-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .schedule-item { grid-template-columns: 1fr; }
    .schedule-actions { justify-content: flex-start; }
}
.dirty-note { color: var(--ntsl-copper); font-weight: 600; font-size: 0.88rem; margin-right: auto; align-self: center; }
.dirty-note[hidden] { display: none; }

/* ---------- Wartung und Meldungen ---------- */
.maintenance-banner {
    background: var(--copper-soft); border-bottom: 1px solid rgba(190, 160, 110, 0.5); color: var(--ntsl-copper);
    padding: 8px 20px; font-size: 0.9rem; font-weight: 600; text-align: center;
}
.maintenance-page .alert { text-align: left; }
.feedback-button { margin-top: 8px; }
.day-chip.wide { min-width: 0; padding: 7px 16px; }
.feedback-updates { display: flex; flex-direction: column; gap: 1px; }
.feedback-update {
    display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 10px 20px; background: var(--success-soft); border-bottom: 1px solid rgba(95, 185, 138, 0.4);
}
.feedback-update.copper { background: var(--copper-soft); border-bottom-color: rgba(190, 160, 110, 0.5); }
.feedback-update-text { flex: 1; min-width: 220px; }
.feedback-update-text p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Zusagen im Dashboard ---------- */
.rsvp { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.rsvp-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.slot-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.slot-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
    border: 1px solid var(--border-strong); background: transparent; color: var(--text); font: inherit; font-size: 0.88rem; cursor: pointer;
}
.slot-chip.active { background: var(--blue-soft); border-color: rgba(100, 130, 210, 0.7); }
.slot-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.slot-count { color: var(--text-muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.btn.success-btn { background: var(--success-soft); border-color: rgba(95, 185, 138, 0.6); color: var(--success); }

/* ---------- Shop für Mitglieder ---------- */
.store-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.store-bar input[type="search"] { max-width: 320px; flex: 1; }
.store-balance { display: flex; flex-direction: column; }
.store-balance strong { font-size: 1.3rem; color: var(--ntsl-copper); font-variant-numeric: tabular-nums; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.store-item { display: flex; flex-direction: column; gap: 10px; }
.store-item.sold-out { opacity: 0.6; }
.store-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.store-head h3 { margin: 0 0 2px; font-size: 1.05rem; }
.store-price { font-size: 1.15rem; font-weight: 700; color: var(--ntsl-copper); white-space: nowrap; font-variant-numeric: tabular-nums; }
.store-text { margin: 0; color: var(--text-muted); font-size: 0.92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.store-details summary { cursor: pointer; color: var(--ntsl-blue); font-size: 0.9rem; }
.store-details pre { white-space: pre-wrap; font: inherit; font-size: 0.85rem; color: var(--text-muted); margin: 8px 0 0; }
.store-item .actions { margin-top: auto; justify-content: flex-end; }
.meta.negative { color: var(--danger); }
.store-item .actions, .event-card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Profil ---------- */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(190, 160, 110, 0.6); }
.profile-id { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.profile-id h2 { margin: 0; }
.profile-events, .profile-tx, .profile-inventory { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.profile-events li, .profile-tx li, .profile-inventory li {
    display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.profile-events li:last-child, .profile-tx li:last-child, .profile-inventory li:last-child { border-bottom: 0; }
.profile-balance { font-size: 1.8rem; font-weight: 700; color: var(--ntsl-copper); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.profile-tx .tx { font-variant-numeric: tabular-nums; font-weight: 600; }
.profile-tx .tx.positive { color: var(--success); }
.profile-tx .tx.negative { color: var(--danger); }
.card h3 { margin: 16px 0 6px; font-size: 0.95rem; }
.person-link { color: inherit; text-decoration: none; }
.person-link:hover .person span { text-decoration: underline; }
.profile-row { margin-bottom: 14px; }

/* ---------- Erfolge ---------- */
.achievements { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.achievement {
    display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); filter: grayscale(0.9); opacity: 0.75;
}
.achievement.earned { filter: none; opacity: 1; border-color: rgba(190, 160, 110, 0.55); background: var(--copper-soft); }
.achievement.is-new { box-shadow: 0 0 0 2px var(--ntsl-copper); }
.achievement-icon { font-size: 1.6rem; line-height: 1; }
.achievement-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; align-self: stretch; }
.achievement-text strong { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.achievement-progress { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.achievement-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.achievement-bar span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ntsl-blue); }
.achievement.earned .achievement-bar span { background: var(--ntsl-copper); }
.achievement-count { flex: none; font-size: 0.74rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.achievements-open { margin-top: 12px; }
.achievements-open summary { cursor: pointer; color: var(--ntsl-blue); margin-bottom: 10px; }

/* ---------- Crew-Planung ---------- */
.crew { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.crew > summary { cursor: pointer; font-weight: 600; }
.crew-ships { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crew-ship { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.crew-ship.mine { border-color: rgba(100, 130, 210, 0.6); background: rgba(100, 130, 210, 0.06); }
.crew-ship-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.crew-note { font-style: italic; }
.crew-people { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; font-size: 0.9rem; }
.crew-pilot { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.crew-free { padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 0.8rem; }
.crew-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.push-box { display: flex; flex-direction: column; gap: 8px; } .push-state { display: flex; gap: 8px; }

/* ---------- Voice-Kanäle ---------- */
.voice-toggles { margin: 4px 0 16px; }
.voice-members li { flex-wrap: wrap; }
.voice-members li > :last-child { flex: 0 1 auto; }

/* ======================================================================
   Bedienbarkeit (Rundgang November 2026)
   ====================================================================== */
.shell { min-height: 100dvh; }

/* Seitenleiste scrollt für sich, damit unten liegende Bereiche auch auf
   langen Seiten erreichbar bleiben. */
.sidebar {
    max-height: calc(100dvh - 61px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

/* Kartenköpfe brechen auf schmalen Bildschirmen um statt den Titel zu quetschen. */
.card-head { flex-wrap: wrap; }
.card-head h2 { flex: 1 1 200px; min-width: 0; }

/* Fehler beim Laden einer Seite: mit „Erneut versuchen“. */
.error-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.error-state .alert { width: 100%; margin: 0; }

/* Voice: Besitzer-Hinweis neben dem Namen */
.voice-members li > :first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 860px) {
    /* Untere Leiste auf eigener Ebene – bleibt beim Scrollen (auch iOS) fest stehen. */
    .bottom-nav { transform: translateZ(0); will-change: transform; }

    /* Reiter wischbar, mit Hinweis, dass es rechts weitergeht */
    .subtabs {
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
        padding-right: 24px;
        scroll-snap-type: x proximity;
    }
    .subtab { scroll-snap-align: start; }

    /* Rückmeldungen zu Meldungen kompakt: Text auf zwei Zeilen, Antippen klappt auf */
    .feedback-update { padding: 10px 16px; gap: 10px; flex-wrap: nowrap; align-items: flex-start; }
    .feedback-update-text { min-width: 0; font-size: 0.92rem; cursor: pointer; }
    .feedback-update-text p {
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .feedback-update-text.open p { display: block; }
    .feedback-update .btn { flex: none; }

    /* Menü-Sheet lässt sich nach unten wegwischen */
    .sheet { touch-action: pan-y; }
    .sheet.dragging { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .tab:active, .sheet-item:active, .nav-link:active, .subtab:active { scale: 0.96; }
    .tab, .sheet-item, .subtab { transition: color 0.2s, background 0.2s, scale 0.12s var(--ease-out); }
    .sheet:not(.dragging) { transition: translate 0.25s var(--ease-out); }
    .error-state { animation: fade-up 0.35s var(--ease-out) backwards; }
}

/* ---------- Mitglieder ---------- */
.adjust-dialog { display: flex; flex-direction: column; gap: 4px; }
.adjust-dialog h3 { margin: 6px 0 2px; }
.adjust-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 14px 0 6px; width: 100%; }

/* ======================================================================
   Seitenübergänge (View Transitions)
   ====================================================================== */
@media (prefers-reduced-motion: no-preference) {
    .topbar { view-transition-name: topbar; }
    .sidebar { view-transition-name: sidebar; }
    .bottom-nav { view-transition-name: bottom-nav; }
    .main { view-transition-name: page; }

    /* Rahmen bleibt ruhig stehen */
    ::view-transition-old(root), ::view-transition-new(root),
    ::view-transition-group(topbar), ::view-transition-old(topbar), ::view-transition-new(topbar),
    ::view-transition-group(sidebar), ::view-transition-old(sidebar), ::view-transition-new(sidebar),
    ::view-transition-group(bottom-nav), ::view-transition-old(bottom-nav), ::view-transition-new(bottom-nav) {
        animation: none;
    }
    /* Vom Rahmen nur den neuen Stand zeigen (sonst wären kurz zwei Menüpunkte aktiv). */
    ::view-transition-old(topbar), ::view-transition-old(sidebar), ::view-transition-old(bottom-nav) { display: none; }

    /* Inhalt: alte Seite blendet zügig aus, neue gleitet weich herein */
    ::view-transition-group(page) { animation-duration: 0s; }
    ::view-transition-image-pair(page) { isolation: auto; }
    ::view-transition-old(page) { animation: page-out 0.16s ease-in both; }
    ::view-transition-new(page) { animation: page-in 0.34s var(--ease-out) both; }
    :root[data-nav-dir="forward"]::view-transition-new(page) { animation-name: page-in-forward; }
    :root[data-nav-dir="back"]::view-transition-new(page) { animation-name: page-in-back; }
    :root[data-nav-dir="forward"]::view-transition-old(page) { animation-name: page-out-forward; }
    :root[data-nav-dir="back"]::view-transition-old(page) { animation-name: page-out-back; }
}
@keyframes page-out { to { opacity: 0; translate: 0 -6px; } }
@keyframes page-in { from { opacity: 0; translate: 0 10px; } }
@keyframes page-out-forward { to { opacity: 0; translate: -18px 0; } }
@keyframes page-out-back { to { opacity: 0; translate: 18px 0; } }
@keyframes page-in-forward { from { opacity: 0; translate: 24px 0; } }
@keyframes page-in-back { from { opacity: 0; translate: -24px 0; } }

/* ---------- Status ---------- */
.status-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 16px 0; }
.status-item { padding: 14px 16px; border-left: 3px solid var(--border-strong); }
.status-item.ok { border-left-color: var(--success, #5fb98a); }
.status-item.warn { border-left-color: var(--ntsl-copper); }
.status-item.error { border-left-color: var(--danger, #e06c6c); }
.status-item.off { opacity: 0.75; }
.status-head { display: flex; align-items: center; gap: 12px; }
.status-head .badge { margin-left: auto; flex: none; }
.status-title { display: flex; flex-direction: column; min-width: 0; }
.status-dot { font-size: 0.9rem; width: 1rem; text-align: center; }
.status-item.ok .status-dot { color: var(--success, #5fb98a); }
.status-item.warn .status-dot { color: var(--ntsl-copper); }
.status-item.error .status-dot { color: var(--danger, #e06c6c); }
.status-item.off .status-dot { color: var(--text-muted); }
.status-details { margin: 10px 0 0; padding-left: 28px; color: var(--text-muted); font-size: 0.9rem; }
.status-details li + li { margin-top: 2px; }
.status-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.status-log li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.status-log li:last-child { border-bottom: none; }
.status-log code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; }
.status-log-head { display: flex; gap: 8px; align-items: center; }

/* Status: „Prüfen“ führt zur passenden Stelle */
a.status-link { text-decoration: none; cursor: pointer; transition: filter 0.15s, translate 0.15s; }
a.status-link:hover { filter: brightness(1.25); translate: 2px 0; text-decoration: none; }
a.status-detail-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
a.status-detail-link:hover { color: var(--ntsl-blue); }

/* Hervorhebung eines angesprungenen Felds */
.focus-flash { border-radius: var(--radius-sm); animation: focus-flash 2.4s ease-out; }
@keyframes focus-flash {
    0%, 30% { box-shadow: 0 0 0 6px rgba(190, 160, 110, 0.75), 0 0 28px rgba(190, 160, 110, 0.35); }
    100% { box-shadow: 0 0 0 6px rgba(190, 160, 110, 0), 0 0 28px rgba(190, 160, 110, 0); }
}
@media (prefers-reduced-motion: reduce) { .focus-flash { animation: none; outline: 2px solid var(--ntsl-copper); } }

/* Erfolge: Stufen, Seltenheit, geheime */
.achievement .badge.tier { font-size: 0.68rem; padding: 1px 7px; }
.achievement.tier-bronze .badge.tier { background: rgba(176, 120, 72, 0.22); border-color: rgba(176, 120, 72, 0.6); color: #e2b48a; }
.achievement.tier-silber .badge.tier { background: rgba(190, 200, 215, 0.16); border-color: rgba(190, 200, 215, 0.5); color: #d9e0ea; }
.achievement.tier-gold .badge.tier { background: rgba(214, 178, 74, 0.2); border-color: rgba(214, 178, 74, 0.6); color: #f1d27a; }
.achievement.tier-platin .badge.tier { background: rgba(140, 200, 220, 0.18); border-color: rgba(140, 200, 220, 0.55); color: #bfe6f2; }
.rarity { font-size: 0.74rem; color: var(--text-muted); }
.rarity.rare { color: var(--ntsl-blue); }
.rarity.very-rare { color: var(--ntsl-copper); font-weight: 600; }
.achievement.secret { border-style: dashed; filter: none; opacity: 0.8; }

.reward-editor table input[type="number"] { width: 110px; }
.reward-editor table select { min-width: 160px; }
.reward-name { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.achievement .next-tier { font-size: 0.76rem; }

/* ======================================================================
   Menü mit einklappbaren Gruppen, Suche und Aufgaben-Zahlen
   ====================================================================== */
.nav-search {
    width: 100%; margin: 0 0 6px; padding: 8px 12px; font-size: 0.9rem;
    border-radius: var(--radius-sm);
}
.nav-zone {
    margin: 14px 12px 2px; padding-top: 12px; border-top: 1px solid var(--border);
    font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ntsl-copper);
}
.sheet .nav-zone { margin: 12px 8px 0; }
.nav-group-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: none; border: 0; cursor: pointer; text-align: left; font: inherit;
}
.nav-group-toggle .nav-chevron { margin-left: auto; transition: rotate 0.2s var(--ease-out); }
.nav-group-toggle[aria-expanded="false"] .nav-chevron { rotate: -90deg; }
.nav-group-toggle:hover { color: var(--text); }
.nav-count {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 999px; background: var(--ntsl-copper); color: #14110b; font-size: 0.72rem; font-weight: 700; letter-spacing: 0;
}
.nav-link .nav-count, .sheet-item .nav-count { margin-left: auto; }
.nav-group-toggle .nav-count { margin-left: 0; }

/* Hilfe */
.page-help {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 10px;
    border-radius: 50%; border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 0.8rem; font-weight: 700;
    vertical-align: middle; text-decoration: none;
}
.page-help:hover { color: var(--ntsl-blue); border-color: var(--ntsl-blue); text-decoration: none; }
.help-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.help-toc .chip { text-decoration: none; }
.help-section { margin-bottom: 14px; scroll-margin-top: 80px; }
.help-items { display: flex; flex-direction: column; }
.help-item { border-bottom: 1px solid var(--border); }
.help-item:last-child { border-bottom: 0; }
.help-item summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style-position: inside; }
.help-item summary::marker { color: var(--ntsl-blue); }
.help-item p { margin: 0 0 12px; color: var(--text-muted); line-height: 1.6; }

/* Zu erledigen */
.tasks-card { margin-bottom: 16px; border-left: 3px solid var(--ntsl-copper); }
.tasks-card.done { border-left-color: var(--success); }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.task {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02); color: var(--text); text-decoration: none;
}
.task:hover { border-color: var(--ntsl-copper); text-decoration: none; }
.task .task-count { font-size: 1.15rem; color: var(--ntsl-copper); min-width: 1.4em; text-align: right; }
.task.info .task-count { color: var(--ntsl-blue); }
.task .task-go { margin-left: auto; color: var(--text-muted); }

/* Status: Hinweise akzeptieren */
.status-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.status-accept { font-size: 0.84rem; color: var(--text-muted); }
.status-accept:hover { color: var(--text); }
.status-detail-row .status-accept { margin-left: 10px; }
.status-accepted-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-muted); }
.status-item.accepted { opacity: 0.85; }

/* Konfiguration: Emoji-Reaktionen */
.reaction-rules { display: grid; gap: 10px; }
.reaction-rule { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: end;
    padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.reaction-rule .field { margin: 0; }
.reaction-emoji { display: flex; align-items: center; gap: 8px; }
.reaction-emoji input { flex: 1; min-width: 0; }
.reaction-preview { width: 32px; height: 32px; flex: none; display: grid; place-items: center; font-size: 1.4rem;
    border-radius: 8px; background: var(--panel-raised); }
.reaction-emoji-img { width: 24px; height: 24px; object-fit: contain; }
.reaction-missing { color: var(--danger); font-weight: 700; font-size: 1rem; }
.reaction-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.reaction-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 0.84rem; }
.reaction-chip:hover { border-color: var(--ntsl-blue); }
.reaction-chip img { width: 20px; height: 20px; object-fit: contain; }
.form-actions.start { justify-content: flex-start; }
@media (max-width: 720px) {
    .reaction-rule { grid-template-columns: 1fr; }
}

/* Zahl offener Aufgaben an einem Reiter */
.subtab .nav-count { margin-left: 6px; }

.page-head > div + div { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Banner: Nachbereitung eigener Events */
.followup-banner {
    display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 10px 20px; background: var(--copper-soft); border-bottom: 1px solid rgba(190, 160, 110, 0.5);
}
.followup-text { flex: 1; min-width: 220px; }
.followup-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Emoji-Picker unter Textfeldern */
.emoji-picker { margin-top: 6px; }
.emoji-picker summary { cursor: pointer; color: var(--text-muted); font-size: 0.9rem; width: fit-content; }
.emoji-picker summary:hover { color: var(--text); }
.emoji-picker .reaction-palette { margin: 8px 0 0; }
.emoji-picker .reaction-chip { font-size: 1.05rem; }
.emoji-picker .reaction-palette + .reaction-palette { padding-top: 8px; border-top: 1px solid var(--border); }
.emoji-picker-hint { flex-basis: 100%; margin-top: 2px; }

/* RSI-Verknüpfung im Profil: Schrittanzeige */
.rsi-steps { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; padding: 0; }
.rsi-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px;
    border: 1px solid var(--border); color: var(--text-muted); font-size: 0.88rem; }
.rsi-step-number { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 700;
    background: var(--panel-raised); }
.rsi-steps li.active { border-color: rgba(100, 130, 210, 0.7); background: var(--blue-soft); color: var(--text); }
.rsi-steps li.active .rsi-step-number { background: var(--ntsl-blue); color: #0b1020; }
.rsi-steps li.done { color: var(--success); }
.rsi-steps li.done .rsi-step-number { background: var(--success-soft); color: var(--success); }
