* {
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(12, 20, 34, 0.4);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: rgba(74, 137, 216, 0.45);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 137, 216, 0.8);
}

:root {
    --bg: #0c1422;
    --panel: rgba(15, 23, 38, 0.9);
    --panel-soft: rgba(20, 31, 50, 0.88);
    --line: rgba(128, 156, 197, 0.28);
    --text: #e7edf8;
    --muted: #afbdd3;
    --primary: #4a89d8;
    --primary-strong: #366eb2;
    --danger: #ff7171;
    --ok: #58d79b;
    --warn: #ffd067;
    --cat-accent: #5faeff;
    --cat-accent-strong: #2d73c9;
    --topbar-bg: linear-gradient(90deg, rgba(15, 23, 38, 0.96), rgba(18, 30, 49, 0.94));
    --panel-bg: linear-gradient(180deg, rgba(16, 25, 40, 0.94), rgba(14, 22, 35, 0.92));
}

body[data-theme='day'] {
    --bg: #e7eef9;
    --panel: rgba(245, 250, 255, 0.84);
    --panel-soft: rgba(237, 246, 255, 0.82);
    --line: rgba(52, 95, 158, 0.28);
    --text: #11243f;
    --muted: #49638a;
    --primary: #3d87dc;
    --primary-strong: #2d73c9;
    --topbar-bg: linear-gradient(90deg, rgba(227, 239, 255, 0.9), rgba(213, 231, 255, 0.84));
    --panel-bg: linear-gradient(180deg, rgba(248, 252, 255, 0.92), rgba(238, 247, 255, 0.86));
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    background: radial-gradient(circle at top right, #1a2740 0%, #0f1a2d 45%, #0a1220 100%);
    color: var(--text);
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
}

body[data-theme='day'] {
    background: radial-gradient(circle at top right, #dcecff 0%, #cce0f7 45%, #bed5ef 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url('img/hintergrundbild.png');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    pointer-events: none;
}

body[data-theme='day']::before {
    opacity: 0.2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(9, 14, 24, 0.58), rgba(9, 14, 24, 0.74));
    pointer-events: none;
}

body[data-theme='day']::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(226, 238, 251, 0.56));
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(128, 156, 197, 0.18);
    background: var(--topbar-bg);
    backdrop-filter: blur(20px) saturate(1.5);
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.36);
    overflow: hidden;
}

.topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 25%, var(--cat-accent) 50%, var(--primary) 75%, transparent 100%);
    opacity: 0.65;
    pointer-events: none;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-avatar {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #7fc2ff;
    box-shadow: 0 0 0 4px rgba(127, 194, 255, 0.15);
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
}

.logo-badge {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid #456ca6;
    background: linear-gradient(180deg, #2c5d96, #1e3f67);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand h1 {
    margin: 2px 0 0;
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

.muted {
    color: var(--muted);
    margin: 0;
    font-size: 0.9rem;
}

.brand-status {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.brand-discord-tag {
    opacity: 0.6;
    font-size: 0.78rem;
}

.brand-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 3px 0 2px;
}

.role-badge-inline {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(74, 137, 216, 0.18);
    border: 1px solid rgba(74, 137, 216, 0.4);
    color: #90bfef;
    margin-left: 3px;
    vertical-align: middle;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.ghost-btn {
    border: 1px solid rgba(128, 156, 197, 0.38);
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    padding: 8px 14px;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    background: rgba(28, 44, 70, 0.72);
    backdrop-filter: blur(6px);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, background 0.18s ease;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#themeToggleBtn {
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 999px;
    gap: 5px;
}

.progress-sticky {
    position: sticky;
    top: 80px;
    z-index: 19;
    padding: 8px 22px 0;
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(46, 68, 104, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.layout {
    padding: 20px 24px 32px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.layout.full-layout {
    grid-template-columns: 1fr;
}

.start-layout {
    grid-template-columns: 1.2fr 1fr;
}

.login-gate-wrap {
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-gate {
    width: min(520px, 100%);
    text-align: center;
}

.login-gate h2 {
    margin-top: 0;
    margin-bottom: 10px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.maintenance-wrap {
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.maintenance-gate {
    width: min(520px, 100%);
    text-align: center;
}

.maintenance-gate h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.maintenance-icon {
    font-size: 3.5rem;
    color: var(--warn);
    margin-bottom: 12px;
    animation: maintenance-pulse 2s ease-in-out infinite;
}

@keyframes maintenance-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.94); }
}

.maintenance-divider {
    height: 1px;
    background: var(--line);
    margin: 16px 0;
}

.maintenance-active-btn {
    border-color: var(--danger) !important;
    background: linear-gradient(135deg, #c0392b 0%, #922b21 100%) !important;
    box-shadow: 0 6px 18px rgba(192, 57, 43, 0.45) !important;
}

.start-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.main-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    border: 1px solid #5ea5ff;
    background: linear-gradient(135deg, #5aaefb 0%, #2f84e1 100%);
    box-shadow: 0 8px 22px rgba(47, 132, 225, 0.38);
    min-height: 56px;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, filter 0.18s ease;
}

.main-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(47, 132, 225, 0.5);
    filter: brightness(1.06);
}

.secondary-action-btn {
    border-color: #7a91b6;
    background: linear-gradient(180deg, #4e6588, #3a4d69);
    box-shadow: 0 6px 14px rgba(21, 32, 51, 0.35);
}

.disabled-btn {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.5);
}

.reference-tabs {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    background: rgba(16, 25, 40, 0.7);
}

.reference-tabs h3 {
    margin: 0 0 10px;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reference-tab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.reference-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #3a4d6d;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    background: linear-gradient(180deg, rgba(44, 61, 87, 0.78), rgba(31, 46, 68, 0.78));
    font-weight: 600;
}

.reference-tab:hover {
    filter: brightness(1.08);
}

.reference-tab--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px) saturate(1.35);
}

.panel-head {
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.panel-head h2 {
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.panel-head h2 i,
.topbar-actions i,
.category-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55em;
    height: 1.55em;
    border-radius: 6px;
    background: rgba(88, 120, 168, 0.22);
    box-shadow: inset 0 0 0 1px rgba(135, 167, 212, 0.2);
}

.stepper {
    margin: 14px 0 18px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(10% + 10px);
    right: calc(10% + 10px);
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 65, 95, 0.7), rgba(95, 174, 255, 0.3) 50%, rgba(47, 65, 95, 0.7));
    z-index: 0;
    transform: translateY(-50%);
    pointer-events: none;
}

.progress-sticky .stepper {
    margin: 0;
}

.stepper.flow-stepper {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.step {
    border: 1px solid #2f415f;
    border-radius: 12px;
    padding: 8px 10px;
    text-align: left;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(17, 27, 44, 0.9);
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, border-color 0.2s ease;
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid #3f5985;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #cfe2ff;
    background: rgba(22, 37, 64, 0.8);
}

.step-name {
    font-size: 0.86rem;
    letter-spacing: 0.01em;
}

.step.active {
    color: #fff;
    border-color: var(--cat-accent);
    background: linear-gradient(135deg, var(--cat-accent) 0%, var(--cat-accent-strong) 100%);
    box-shadow: 0 4px 22px rgba(95, 174, 255, 0.44), 0 0 0 3px rgba(95, 174, 255, 0.14);
    transform: translateY(-2px);
}

.step.active .step-num {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.step.done {
    color: #dff2ff;
    border-color: var(--cat-accent-strong);
    background: linear-gradient(135deg, rgba(46, 73, 110, 0.95), rgba(33, 55, 87, 0.95));
    box-shadow: 0 2px 10px rgba(45, 115, 201, 0.22);
}

.step.done .step-num {
    border-color: var(--cat-accent);
    background: rgba(95, 174, 255, 0.16);
    color: #fff;
}

.dispatch-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.group label {
    font-weight: 600;
    font-size: 0.93rem;
}

input, textarea, select {
    border: 1px solid #2a3952;
    border-radius: 8px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 11px 12px;
    outline: none;
    font: inherit;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.18);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(22, 32, 52, 0.65);
    border: 1px dashed #34527d;
    border-radius: 12px;
    padding: 12px;
}

.check-grid label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.92rem;
    color: #dbe9ff;
}

.form-actions {
    display: flex;
    gap: 10px;
}

button {
    border: 1px solid rgba(74, 137, 216, 0.55);
    border-radius: 10px;
    background: rgba(40, 92, 168, 0.88);
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.18s ease;
    backdrop-filter: blur(4px);
    letter-spacing: 0.01em;
    font-size: inherit;
}

button:hover {
    transform: translateY(-2px);
    background: rgba(58, 113, 196, 0.98);
    box-shadow: 0 6px 22px rgba(42, 96, 168, 0.45);
}

button:active {
    transform: translateY(0);
    transition-duration: 0.08s;
}

button.secondary {
    border-color: #4a5f84;
    background: linear-gradient(180deg, #2a3852, #1b2538);
}

.protocol {
    margin-top: 14px;
    border: 1px solid #2a3f62;
    border-radius: 10px;
    padding: 12px;
    background: rgba(12, 19, 32, 0.84);
}

.protocol h3 {
    margin-top: 0;
}

.protocol ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.dispatch-edit-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(15, 25, 45, 0.9);
    border: 1px solid rgba(128, 156, 197, 0.45);
    border-radius: 8px;
    color: var(--text, #e8ecf1);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 10px 12px;
    resize: vertical;
    margin-top: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dispatch-edit-input:focus {
    outline: none;
    border-color: rgba(95, 174, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(95, 174, 255, 0.12);
}

.hidden {
    display: none !important;
}

.category-grid {
    margin: 14px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.category-btn {
    border: 1px solid #3e5f92;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(40, 66, 109, 0.86), rgba(27, 45, 74, 0.86));
    color: #fff;
    padding: 14px 12px;
    font-weight: 700;
    font-size: 0.98rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-height: 56px;
}

.category-btn.cat-feuerwehr {
    border-color: #a84747;
    background: linear-gradient(180deg, rgba(167, 66, 66, 0.92), rgba(121, 40, 40, 0.92));
}

.category-btn.cat-rettungsdienst {
    border-color: #3f73b6;
    background: linear-gradient(180deg, rgba(72, 130, 202, 0.92), rgba(45, 95, 160, 0.92));
}

.category-btn.cat-gefahrgut {
    border-color: #b0882f;
    background: linear-gradient(180deg, rgba(231, 190, 89, 0.96), rgba(191, 149, 49, 0.96));
    color: #1f1d16;
}

.category-btn.cat-manv {
    border-color: #7f52b7;
    background: linear-gradient(180deg, rgba(155, 98, 221, 0.92), rgba(110, 66, 172, 0.92));
}

.category-btn.active {
    border-color: var(--cat-accent);
    box-shadow: 0 0 0 2px var(--cat-accent);
    filter: saturate(1.05) brightness(1.02);
}

.option-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.option-grid.feuerwehr-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-section-header {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 4px 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cat-accent);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.option-grid.rettungsdienst-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-btn {
    border: 1px solid #35517d;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 43, 73, 0.88), rgba(19, 36, 60, 0.88));
    color: #dceaff;
    padding: 11px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-height: 56px;
}

.option-btn i,
.option-label i {
    width: 1.4em;
    height: 1.4em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(130, 204, 255, 0.22);
    margin-right: 8px;
}

.option-btn > span,
.option-label > span {
    display: inline-block;
}

.option-btn:hover,
.person-choice-btn:hover,
.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26);
}

.option-btn.active {
    border-color: var(--cat-accent);
    background: #1f3f69;
    color: #fff;
    box-shadow: 0 0 0 2px var(--cat-accent);
}

.option-btn.feuerwehr-option {
    border: 1px solid #ea7f7f;
    background: linear-gradient(90deg, #f49292, #eb8f8f);
    color: #1f1717;
    padding: 0;
    display: grid;
    grid-template-columns: 36px 1fr;
    min-height: 56px;
    overflow: hidden;
}

.option-btn.feuerwehr-option .option-number {
    background: linear-gradient(180deg, #ff6f74, #ff5963);
    color: #1d1d1d;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.option-btn.feuerwehr-option .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-weight: 700;
    text-align: center;
    gap: 6px;
}

.option-btn.feuerwehr-option.active {
    border-color: #ff5e66;
    box-shadow: 0 0 0 2px rgba(255, 94, 102, 0.2);
}

.option-btn.rettungsdienst-option {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: var(--rd-bg, #bcdde5);
    color: #18202a;
    padding: 0;
    display: grid;
    grid-template-columns: 36px 1fr;
    min-height: 56px;
    overflow: hidden;
}

.option-btn.rettungsdienst-option .option-number {
    background: var(--rd-badge, #8fb9c4);
    color: #1d1d1d;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.option-btn.rettungsdienst-option .option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-weight: 700;
    text-align: center;
    gap: 6px;
}

.option-btn.rettungsdienst-option.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* Abfrage-Chips – zeigen welche Schritte folgen */
.abfrage-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px 6px 8px;
    grid-column: 1 / -1;
    border-top: 1px solid rgba(0, 0, 0, 0.13);
}

.abfrage-chip {
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.13);
    color: inherit;
    opacity: 0.8;
    white-space: nowrap;
}

.option-btn:not(.feuerwehr-option):not(.rettungsdienst-option) .abfrage-chips {
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 2px 2px 2px;
}

.person-choice-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.person-choice-btn {
    border: 1px solid #3c5b89;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(31, 59, 99, 0.85), rgba(21, 41, 69, 0.85));
    color: #dceaff;
    padding: 10px;
    font-weight: 700;
    cursor: pointer;
    min-height: 56px;
}

.person-choice-btn.active {
    border-color: var(--cat-accent);
    background: linear-gradient(180deg, var(--cat-accent), var(--cat-accent-strong));
    color: #fff;
}

.age-input {
    margin-top: 10px;
    width: 100%;
    max-width: 240px;
    display: block;
    padding: 10px 14px;
    border: 1px solid #3c5b89;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(31, 59, 99, 0.85), rgba(21, 41, 69, 0.85));
    color: #dceaff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.age-input:focus {
    border-color: var(--cat-accent);
    box-shadow: 0 0 0 2px rgba(var(--cat-accent), 0.2);
}

.age-input::placeholder {
    color: #7a99c2;
    font-weight: 400;
}

/* ── Gefahrgut-Hinweis ─────────────────────────────────────── */
.gg-hinweis.manv-hinweis {
    border-color: #b889ff;
    background: rgba(184, 137, 255, 0.07);
}
.gg-hinweis.manv-hinweis .gg-hinweis-title,
.gg-hinweis.manv-hinweis .gg-hinweis-list li > i,
.gg-hinweis.manv-hinweis .gg-hinweis-list a {
    color: #b889ff;
}
.gg-hinweis.manv-hinweis .gg-hinweis-list a:hover { color: #d9c4f7; }

.gg-hinweis {
    border: 1.5px solid #f3c85a;
    border-radius: 10px;
    background: rgba(243, 200, 90, 0.07);
    padding: 1rem 1.1rem 0.85rem;
    margin-bottom: 1.1rem;
}
.gg-hinweis-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #c79a2e;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.gg-hinweis-title i { font-size: 1.05rem; }
.gg-hinweis-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.gg-hinweis-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.45;
}
.gg-hinweis-list li > i {
    color: #c79a2e;
    font-size: 1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}
.gg-hinweis-list a {
    color: #c79a2e;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gg-hinweis-list a:hover { color: #f3c85a; }
/* ─────────────────────────────────────────────────────────── */

/* ── Telereanimation ───────────────────────────────────────── */
.telerea-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.telerea-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.telerea-title i { color: #ea9c9d; }
.telerea-timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem 1.1rem;
    min-width: 90px;
}
.telerea-timer-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 2px;
}
#telereaTimerDisplay {
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #ea9c9d;
    letter-spacing: .04em;
}
.telerea-checklist {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.telerea-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.9rem;
    transition: background .25s, color .25s, border-color .25s;
    counter-increment: telerea-step;
}
.telerea-checklist li::before {
    content: counter(telerea-step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background .25s, color .25s;
}
.telerea-checklist { counter-reset: telerea-step; }
.telerea-checklist li.done {
    background: rgba(148, 189, 165, 0.12);
    border-color: #94bda5;
    color: var(--text);
    text-decoration: line-through;
    opacity: .7;
}
.telerea-checklist li.done::before {
    background: #94bda5;
    color: #fff;
    content: '✓';
}
.telerea-checklist li.active {
    background: rgba(234, 156, 157, 0.12);
    border-color: #ea9c9d;
    color: var(--text);
    font-weight: 600;
}
.telerea-checklist li.active::before {
    background: #ea9c9d;
    color: #fff;
}
.telerea-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.5rem;
}
.telerea-next-btn {
    background: rgba(234, 156, 157, 0.15) !important;
    border-color: #ea9c9d !important;
    color: #ea9c9d !important;
}
.telerea-next-btn:hover {
    background: rgba(234, 156, 157, 0.28) !important;
}
/* ─────────────────────────────────────────────────────────── */

.stage-animate {
    animation: stageIn 180ms ease both;
}

@keyframes stageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 4px var(--ok));
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        filter: drop-shadow(0 0 10px var(--ok));
        transform: scale(1.15);
    }
}

.status.ok i {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes liveDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(88, 215, 155, 0.55); opacity: 1; }
    60% { box-shadow: 0 0 0 6px rgba(88, 215, 155, 0); opacity: 0.7; }
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    animation: liveDotPulse 2s ease-out infinite;
    flex-shrink: 0;
    margin-right: 3px;
    vertical-align: middle;
}

.rettungsdienst-mode #personStatusQuestion,
.rettungsdienst-mode #personStatusGrid {
    display: none;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    margin: 14px 0 8px;
}

.profile-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #3d73bb;
    box-shadow: 0 0 0 4px rgba(74, 137, 216, 0.18);
}

.profile-card h3 {
    margin: 0;
    font-size: 1rem;
}

.profile-card p {
    margin: 2px 0 0;
    color: var(--muted);
}

.profile-discord-tag {
    font-size: 0.8rem;
    color: var(--muted);
    opacity: 0.7;
    margin-top: 2px !important;
}

.profile-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 8px;
}

.role-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: rgba(74, 137, 216, 0.18);
    border: 1px solid rgba(74, 137, 216, 0.4);
    color: #90bfef;
    transition: filter 0.18s ease;
}

.role-badge:hover {
    filter: brightness(1.25);
}

.role-badge.badge-admin {
    background: rgba(255, 113, 113, 0.18);
    border-color: rgba(255, 113, 113, 0.42);
    color: #ffb3b3;
}

.role-badge.badge-mod {
    background: rgba(255, 208, 103, 0.18);
    border-color: rgba(255, 208, 103, 0.4);
    color: #ffe4a0;
}

.role-badge.badge-lts {
    background: rgba(88, 215, 155, 0.14);
    border-color: rgba(88, 215, 155, 0.36);
    color: #a0f0c8;
}

.role-badge.badge-fw {
    background: rgba(234, 127, 127, 0.18);
    border-color: rgba(234, 127, 127, 0.4);
    color: #ffcaca;
}

.role-badge.badge-rd {
    background: rgba(72, 130, 202, 0.18);
    border-color: rgba(72, 130, 202, 0.4);
    color: #aacfef;
}

.status {
    margin: 4px 0 8px;
    font-size: 0.8rem;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

.status.ok {
    color: var(--ok);
    background: rgba(88, 215, 155, 0.12);
    border: 1px solid rgba(88, 215, 155, 0.3);
}

.status.warn {
    color: var(--warn);
    background: rgba(255, 208, 103, 0.12);
    border: 1px solid rgba(255, 208, 103, 0.28);
}

.status.danger {
    color: var(--danger);
    background: rgba(255, 113, 113, 0.12);
    border: 1px solid rgba(255, 113, 113, 0.28);
}

.status.info {
    color: var(--cat-accent);
    background: rgba(95, 174, 255, 0.12);
    border: 1px solid rgba(95, 174, 255, 0.28);
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #6875f5, #4958d6);
    border: 1px solid #7c85f7;
}

.login-error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(220, 60, 60, 0.18);
    border: 1px solid rgba(220, 60, 60, 0.45);
    color: #f87171;
    font-size: 0.9rem;
    font-weight: 500;
}

.pin-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 12px;
}

.pin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 540px;
    overflow-y: auto;
}

.pin-item {
    border: 1px solid #2b3b57;
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    background: rgba(16, 26, 43, 0.9);
    padding: 10px;
    transition: border-left-color 0.2s ease;
}

.pin-item:hover {
    border-left-color: #7fc2ff;
}

.pin-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.pin-head h4 {
    margin: 0;
}

.delete-pin {
    color: var(--danger);
    text-decoration: none;
    font-size: 1.1rem;
}

.pin-item p {
    margin: 8px 0 0;
    color: #d7e4fb;
    line-height: 1.45;
}

.pin-image {
    margin-top: 8px;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid #364969;
}

.map-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.map-head-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.einsatz-map {
    width: 100%;
    min-height: 68vh;
    border-radius: 12px;
    border: 1px solid var(--line);
    overflow: hidden;
}

.map-footline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.dienstliste-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(16, 26, 43, 0.72);
    padding: 12px;
}

.dienstliste-wrap h3 {
    margin: 0 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.98rem;
}

.dienstliste-table-wrap {
    overflow-x: auto;
}

.dienstliste-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.dienstliste-table th,
.dienstliste-table td {
    border-bottom: 1px solid rgba(128, 156, 197, 0.22);
    text-align: left;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.dienstliste-table th {
    color: var(--muted);
    font-weight: 700;
}

.dienstliste-empty {
    color: var(--muted);
    text-align: center !important;
}

.unit-marker-wrap {
    background: transparent;
    border: 0;
}

.unit-marker {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 2px rgba(20, 33, 54, 0.56);
    display: inline-block;
}

.unit-popup {
    line-height: 1.45;
    min-width: 180px;
}

/* ── PIN-FORMULAR ACCORDION ── */
.pin-form-toggle {
    margin: 10px 0 12px;
}

.pin-form-toggle summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.94rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 2px;
    list-style: none;
    user-select: none;
}

.pin-form-toggle summary::-webkit-details-marker {
    display: none;
}

.pin-form-toggle summary::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-right: 2px;
}

.pin-form-toggle[open] summary::before {
    transform: rotate(45deg);
}

/* ── BESTÄTIGUNGS-MODAL ── */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(6, 10, 18, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: stageIn 160ms ease both;
}

.confirm-overlay.hidden {
    display: none !important;
}

.confirm-box {
    background: linear-gradient(180deg, #111f36, #0c1828);
    border: 1px solid #2f4870;
    border-radius: 14px;
    padding: 24px;
    width: min(380px, 92vw);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.confirm-box h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.confirm-box p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-cancel-btn {
    border-color: #4a5f84;
    background: linear-gradient(180deg, #2a3852, #1b2538);
}

.confirm-ok-btn {
    border-color: #c0484b;
    background: linear-gradient(180deg, #e55b5e, #bf3538);
}

/* ── TOAST ── */
.toast-container {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(180deg, #1a2f4f, #111f36);
    border: 1px solid #2f4870;
    border-left: 3px solid var(--ok);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    animation: toastIn 220ms ease both;
    pointer-events: auto;
}

.toast.toast-danger {
    border-left-color: var(--danger);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

@media (max-width: 900px) {
    .start-layout {
        grid-template-columns: 1fr;
    }

    .reference-tab-grid {
        grid-template-columns: 1fr;
    }

    .topbar-actions .ghost-btn span:not(.sr-only) {
        display: none;
    }

    .main-action-btn {
        min-height: 50px;
        padding: 12px 14px;
    }
}

@media (max-width: 1150px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .category-grid,
    .option-grid,
    .grid-2,
    .check-grid,
    .stepper {
        grid-template-columns: 1fr;
    }

    .progress-sticky {
        top: 72px;
    }

    .progress-sticky .stepper.flow-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .option-grid.feuerwehr-grid {
        grid-template-columns: 1fr;
    }

    .option-grid.rettungsdienst-grid {
        grid-template-columns: 1fr;
    }

    .person-choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .einsatz-map {
        min-height: 58vh;
    }
}

/* ═══════════════════════════════════════════════
   SKELETON LOADER
   ═══════════════════════════════════════════════ */
@keyframes shimmer {
    0%   { background-position: -700px 0; }
    100% { background-position:  700px 0; }
}

.skeleton-row td {
    background: linear-gradient(
        90deg,
        rgba(22, 36, 58, 0.85) 25%,
        rgba(40, 60, 90, 0.92) 50%,
        rgba(22, 36, 58, 0.85) 75%
    );
    background-size: 700px 100%;
    animation: shimmer 1.6s infinite linear;
    color: transparent !important;
    border-radius: 4px;
    user-select: none;
    pointer-events: none;
}

.skeleton-row td::selection { background: transparent; }

/* ═══════════════════════════════════════════════
   SITE FOOTER
   ═══════════════════════════════════════════════ */
.site-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 24px;
    margin-top: 28px;
    border-top: 1px solid var(--line);
    background: rgba(8, 13, 22, 0.55);
    backdrop-filter: blur(12px);
    font-size: 0.76rem;
    color: var(--muted);
    letter-spacing: 0.02em;
    position: relative;
}

.site-footer .footer-brand {
    font-weight: 700;
    color: var(--text);
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-footer .footer-version {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(74, 137, 216, 0.12);
    border: 1px solid rgba(74, 137, 216, 0.28);
    border-radius: 999px;
    padding: 2px 9px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.73rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.site-footer .footer-right {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════
   PANEL HEAD SEPARATOR (day theme)
   ═══════════════════════════════════════════════ */
body[data-theme='day'] .panel {
    border-top-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 24px rgba(60, 100, 160, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

body[data-theme='day'] .site-footer {
    background: rgba(220, 235, 255, 0.55);
}

body[data-theme='day'] .status.ok {
    background: rgba(56, 174, 120, 0.12);
    border-color: rgba(56, 174, 120, 0.32);
}

body[data-theme='day'] .status.warn {
    background: rgba(190, 140, 20, 0.1);
    border-color: rgba(190, 140, 20, 0.28);
}

/* ═══════════════════════════════════════════════
   OPTION / CATEGORY BTN TRANSITIONS
   ═══════════════════════════════════════════════ */
.option-btn,
.person-choice-btn,
.category-btn {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease, filter 0.18s ease;
}

.category-btn:hover,
.option-btn:hover,
.person-choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    filter: brightness(1.06);
}

.category-btn:active,
.option-btn:active,
.person-choice-btn:active {
    transform: translateY(0);
    transition-duration: 0.08s;
}

/* ── CHANGELOG ── */
.changelog-panel {
    margin-bottom: 1rem;
}

.changelog-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.1rem 0 0.25rem;
}

.changelog-item {
    background: var(--panel-soft);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--primary);
}

.changelog-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.changelog-version {
    font-weight: 700;
    font-size: 0.78rem;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
    letter-spacing: 0.03em;
}

.changelog-date {
    font-size: 0.77rem;
    color: var(--muted);
}

.changelog-title {
    font-weight: 600;
    font-size: 0.87rem;
    margin: 0 0 0.3rem;
    color: var(--text);
}

.changelog-changes {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.81rem;
    color: var(--muted);
    line-height: 1.7;
}

.changelog-changes li {
    padding: 0;
}

/* ── DISPONENTEN ── */
.dispatcher-box {
    margin-top: 1.4rem;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem 1.1rem;
}

.dispatcher-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dispatcher-box-head h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.dispatcher-box-head h3 i {
    color: var(--primary);
    font-size: 1rem;
}

.dispatcher-count-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    min-width: 22px;
    text-align: center;
}

.dispatcher-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dispatcher-entry {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(74, 137, 216, 0.06);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.dispatcher-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px currentColor;
}

.dispatcher-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dispatcher-name {
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dispatcher-job {
    font-size: 0.76rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dispatcher-kanal {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--cat-accent);
}

.dispatcher-offline {
    font-size: 0.83rem;
    color: var(--muted);
    font-style: italic;
}
