﻿:root {
    --rp-navy: #102a43;
    --rp-navy-strong: #0b1f33;
    --rp-navy-soft: #23445f;
    --rp-red: #c6283d;
    --rp-red-dark: #a71f32;
    --rp-surface: #ffffff;
    --rp-surface-hover: #f4f7f9;
    --rp-background: #f3f6f8;
    --rp-header-background: rgba(255, 255, 255, 0.94);
    --rp-border: #dce4e9;
    --rp-border-strong: #9aabb7;
    --rp-text: #243746;
    --rp-muted: #6d7f8c;
    --rp-shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
}

html, body { min-height:100%; font-family:Inter,"Segoe UI",Helvetica,Arial,sans-serif; color:var(--rp-text); background:var(--rp-background); }
body { margin:0; }
a,.btn-link { color:var(--rp-navy-soft); }
a:hover,.btn-link:hover { color:var(--rp-red); }
.content { padding-top:1.75rem; padding-bottom:3rem; }
h1 { margin-bottom:1.4rem; color:var(--rp-navy); font-size:clamp(1.75rem,3vw,2.35rem); font-weight:750; letter-spacing:-.035em; }
h1:focus { outline:none; }
h2,h3,h4,h5,h6,legend { color:var(--rp-navy); }
.btn { border:1px solid var(--rp-border-strong); border-radius:.65rem; font-weight:650; transition:transform 120ms ease,box-shadow 120ms ease,background-color 120ms ease; }
.btn:hover:not(:disabled) { transform:translateY(-1px); }
.btn-primary { color:#fff; background:var(--rp-navy); border-color:#7892a4; box-shadow:0 5px 14px rgba(16,42,67,.18); }
.btn-primary:hover,.btn-primary:focus { color:#fff; background:var(--rp-navy-strong); border-color:#607f94; }
.btn-outline-primary { color:var(--rp-navy); border-color:#9aabb7; }
.btn-outline-primary:hover { color:#fff; background:var(--rp-navy); border-color:var(--rp-navy); }
.btn-outline-danger { color:var(--rp-red); border-color:#dda5ae; }
.btn-outline-danger:hover { color:#fff; background:var(--rp-red); border-color:var(--rp-red); }
.btn-danger { background:var(--rp-red); border-color:#dda5ae; }
.btn-danger:hover { background:var(--rp-red-dark); border-color:#efb5be; }
.btn:focus,.btn:active:focus,.btn-link.nav-link:focus,.form-control:focus,.form-select:focus,.form-check-input:focus { border-color:#7892a4; box-shadow:0 0 0 .2rem rgba(16,42,67,.14); }
form,.table-responsive,.accordion,.alert { border-radius:.9rem; }
form { margin-bottom:1.5rem; padding:1.35rem; background:var(--rp-surface); border:1px solid var(--rp-border); box-shadow:var(--rp-shadow); }
.form-label { margin-bottom:.4rem; color:#344f62; font-size:.875rem; font-weight:700; }
.form-control,.form-select { min-height:2.65rem; border-color:#cbd7de; border-radius:.6rem; color:var(--rp-text); background-color:#fff; }
textarea.form-control { min-height:6rem; }
.form-text,.text-muted { color:var(--rp-muted)!important; }
fieldset { padding:1rem 0 0; border-top:1px solid var(--rp-border); }
legend { float:none; width:auto; margin-bottom:1rem; font-weight:750; }
.table-responsive { background:var(--rp-surface); border:1px solid var(--rp-border); box-shadow:var(--rp-shadow); }
.table { margin-bottom:0; color:var(--rp-text); }
.table>:not(caption)>*>* { padding:.85rem 1rem; border-bottom-color:#e8eef1; }
.table thead th { color:var(--rp-navy); background:#edf2f5; border-bottom:1px solid #d5e0e6; font-size:.78rem; font-weight:800; letter-spacing:.045em; text-transform:uppercase; white-space:nowrap; }
.table-striped>tbody>tr:nth-of-type(odd)>* { --bs-table-accent-bg:#fafcfd; }
.table-hover>tbody>tr:hover>* { --bs-table-accent-bg:#f1f6f8; }
.badge { border-radius:999px; font-weight:700; padding:.42em .7em; }
.accordion { overflow:hidden; border:1px solid var(--rp-border); }
.accordion-item { border:0; border-bottom:1px solid var(--rp-border); }
.accordion-item:last-child { border-bottom:0; }
.accordion-button { color:var(--rp-navy); background:#fff; font-weight:700; }
.accordion-button:not(.collapsed) { color:var(--rp-navy); background:#edf3f6; box-shadow:none; }
.accordion-button:focus { box-shadow:inset 0 0 0 2px rgba(16,42,67,.12); }
hr { color:#ccd8df; opacity:1; }
.alert-success { color:#185f45; background:#e9f7f1; border-color:#bde4d3; }
.alert-danger { color:#8c2031; background:#fff0f2; border-color:#efc3ca; }
.valid.modified:not([type=checkbox]) { outline:1px solid #26b050; }
.invalid { outline:1px solid var(--rp-red); }
.validation-message { color:var(--rp-red); }
.blazor-error-boundary { padding:1rem 1rem 1rem 3.7rem; color:white; background:var(--rp-red); }
.blazor-error-boundary::after { content:"Ein unerwarteter Fehler ist aufgetreten."; }
.darker-border-checkbox.form-check-input { border-color:#929292; }
.form-floating>.form-control-plaintext::placeholder,.form-floating>.form-control::placeholder { color:var(--bs-secondary-color); text-align:end; }
.form-floating>.form-control-plaintext:focus::placeholder,.form-floating>.form-control:focus::placeholder { text-align:start; }

/* Aktivitäten-Timeline */
.ak-track { min-height:68px!important; }
.ak-bar.ak-boot { top:50px!important; height:13px!important; background:#d9dee3!important; border-color:#aeb7bf!important; color:#39434b; font-weight:600; }
.ak-bar.ak-fahrer { top:5px!important; height:40px!important; padding-top:.55rem!important; font-weight:700; }
.ak-bar.ak-fahrer.ak-m { background:#f3b3b8!important; border-color:#d66a75!important; color:#6f1822; }
.ak-bar.ak-fahrer.ak-wkr { background:#b8d7f5!important; border-color:#6aa5df!important; color:#173f67; }
.ak-fahrer[title^="DA #"],.ak-fahrer[title^="DE #"],.ak-fahrer[title^="PF #"],.ak-fahrer[title^="Vor #"],.ak-fahrer[title^="VB #"],.ak-fahrer[title^="Abr #"],.ak-fahrer[title^="AR #"],.ak-fahrer[title^="T #"],.ak-fahrer[title^="Ta #"],.ak-fahrer[title^="Taxi #"],.ak-fahrer[title^="TX #"] { font-size:0!important; justify-content:center!important; padding-inline:.12rem!important; overflow:visible!important; }
.ak-fahrer[title^="DA #"]::after,.ak-fahrer[title^="DE #"]::after,.ak-fahrer[title^="PF #"]::after,.ak-fahrer[title^="Vor #"]::after,.ak-fahrer[title^="VB #"]::after,.ak-fahrer[title^="Abr #"]::after,.ak-fahrer[title^="AR #"]::after,.ak-fahrer[title^="T #"]::after,.ak-fahrer[title^="Ta #"]::after,.ak-fahrer[title^="Taxi #"]::after,.ak-fahrer[title^="TX #"]::after { display:block; font-size:.66rem; font-weight:700; line-height:1; white-space:nowrap; }
.ak-fahrer[title^="DA #"]::after { content:"DA"; }.ak-fahrer[title^="DE #"]::after { content:"DE"; }.ak-fahrer[title^="PF #"]::after { content:"PF"; }
.ak-fahrer[title^="Vor #"]::after,.ak-fahrer[title^="VB #"]::after { content:"VB"; }.ak-fahrer[title^="Abr #"]::after,.ak-fahrer[title^="AR #"]::after { content:"AR"; }
.ak-fahrer[title^="T #"]::after,.ak-fahrer[title^="Ta #"]::after { content:"Ta"; }.ak-fahrer[title^="Taxi #"]::after,.ak-fahrer[title^="TX #"]::after { content:"T"; }
.ak-segment-handle[title^="Vor #"],.ak-segment-handle[title^="VB #"],.ak-segment-handle[title^="Abr #"],.ak-segment-handle[title^="AR #"] { display:flex!important; align-items:center; justify-content:center; padding-inline:.08rem!important; font-size:0!important; overflow:visible!important; }
.ak-segment-handle[title^="Vor #"]::after,.ak-segment-handle[title^="VB #"]::after,.ak-segment-handle[title^="Abr #"]::after,.ak-segment-handle[title^="AR #"]::after { display:block; font-size:.66rem; font-weight:700; line-height:1; white-space:nowrap; }
.ak-segment-handle[title^="Vor #"]::after,.ak-segment-handle[title^="VB #"]::after { content:"VB"; }.ak-segment-handle[title^="Abr #"]::after,.ak-segment-handle[title^="AR #"]::after { content:"AR"; }

/* Globale Nachtansicht */
html[data-theme="dark"] { --rp-surface:#1b2630; --rp-surface-hover:#26343f; --rp-background:#111920; --rp-header-background:rgba(20,30,38,.96); --rp-border:#344551; --rp-border-strong:#607480; --rp-text:#dce6ec; --rp-muted:#9eafb9; --rp-shadow:0 10px 30px rgba(0,0,0,.24); --bs-body-color:var(--rp-text); --bs-body-bg:var(--rp-background); --bs-secondary-color:var(--rp-muted); --bs-tertiary-bg:#202d37; --bs-border-color:var(--rp-border); --bs-card-bg:var(--rp-surface); }
html[data-theme="dark"] body,html[data-theme="dark"] .content,html[data-theme="dark"] .container,html[data-theme="dark"] .container-fluid { color:var(--rp-text); background-color:var(--rp-background); }
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,html[data-theme="dark"] h5,html[data-theme="dark"] h6,html[data-theme="dark"] legend,html[data-theme="dark"] .application-title { color:#e6eef4; }
html[data-theme="dark"] a,html[data-theme="dark"] .btn-link,html[data-theme="dark"] .nav-link:not(.active) { color:#a9c9de; }
html[data-theme="dark"] form,html[data-theme="dark"] .card,html[data-theme="dark"] .modal-content,html[data-theme="dark"] .dropdown-menu,html[data-theme="dark"] .list-group-item,html[data-theme="dark"] .accordion-item,html[data-theme="dark"] .offcanvas,html[data-theme="dark"] .popover { color:var(--rp-text); background-color:var(--rp-surface); border-color:var(--rp-border); }
html[data-theme="dark"] .card-header,html[data-theme="dark"] .card-footer,html[data-theme="dark"] .modal-header,html[data-theme="dark"] .modal-footer,html[data-theme="dark"] .dropdown-divider { color:var(--rp-text); background-color:#202d37; border-color:var(--rp-border); }
html[data-theme="dark"] .form-label,html[data-theme="dark"] .col-form-label { color:#c6d4dd; }
html[data-theme="dark"] .form-control,html[data-theme="dark"] .form-select,html[data-theme="dark"] .input-group-text { color:var(--rp-text); background-color:#141f27; border-color:#465966; }
html[data-theme="dark"] .form-control:disabled,html[data-theme="dark"] .form-select:disabled,html[data-theme="dark"] .form-control[readonly] { color:#aebcc5; background-color:#202b34; }
html[data-theme="dark"] .form-control::placeholder { color:#7f919d; }
html[data-theme="dark"] .form-check-input { background-color:#141f27; border-color:#607480; }
html[data-theme="dark"] .table-responsive { background:var(--rp-surface); border-color:var(--rp-border); }
html[data-theme="dark"] .table { --bs-table-color:var(--rp-text); --bs-table-bg:var(--rp-surface); --bs-table-border-color:var(--rp-border); --bs-table-striped-bg:#202d37; --bs-table-striped-color:var(--rp-text); --bs-table-hover-bg:#293945; --bs-table-hover-color:#fff; color:var(--rp-text); }
html[data-theme="dark"] .table thead th,html[data-theme="dark"] .table-light,html[data-theme="dark"] .table-light>*>* { color:#d9e5ec; background-color:#263540; border-color:#3b4e5b; }
html[data-theme="dark"] .accordion-button,html[data-theme="dark"] .accordion-button:not(.collapsed) { color:var(--rp-text); background-color:#1b2630; }
html[data-theme="dark"] .accordion-button:not(.collapsed) { background-color:#25343f; }
html[data-theme="dark"] .btn { border-color:#8297a4; }
html[data-theme="dark"] .btn-primary { color:#fff; background:#315f7d; border-color:#9bb7c9; box-shadow:none; }
html[data-theme="dark"] .btn-primary:hover,html[data-theme="dark"] .btn-primary:focus { color:#fff; background:#3d7395; border-color:#c4d6e1; }
html[data-theme="dark"] .btn-outline-primary { color:#c6deed; border-color:#829fb2; }
html[data-theme="dark"] .btn-outline-primary:hover { color:#fff; background:#315f7d; border-color:#a9c2d1; }
html[data-theme="dark"] .btn-outline-secondary { color:#d6e1e7; border-color:#8297a4; }
html[data-theme="dark"] .btn-outline-secondary:hover { color:#fff; background-color:#30424f; border-color:#a8bac5; }
html[data-theme="dark"] .nav-tabs { border-bottom-color:var(--rp-border); }
html[data-theme="dark"] .nav-tabs .nav-link.active,html[data-theme="dark"] .nav-pills .nav-link.active { color:#fff; background-color:#29475d; border-color:#496274; }
html[data-theme="dark"] .dropdown-item { color:var(--rp-text); }
html[data-theme="dark"] .dropdown-item:hover,html[data-theme="dark"] .dropdown-item:focus { color:#fff; background-color:#2a3b47; }
html[data-theme="dark"] .alert-success { color:#bce8d5; background:#17392d; border-color:#2f6550; }
html[data-theme="dark"] .alert-danger { color:#f2c3cb; background:#49232a; border-color:#74404a; }
html[data-theme="dark"] .alert-warning { color:#f3dfad; background:#493d20; border-color:#736334; }
html[data-theme="dark"] .bg-light,html[data-theme="dark"] .bg-body-tertiary,html[data-theme="dark"] .bg-white { background-color:#202d37!important; }
html[data-theme="dark"] .text-dark { color:var(--rp-text)!important; }
html[data-theme="dark"] hr { color:#445762; }

/* Bootstrap-Komponenten und seitenspezifische Container, die sonst ihre helle Farbe behalten. */
html[data-theme="dark"] .card-body,html[data-theme="dark"] .tab-content,html[data-theme="dark"] .tab-pane,html[data-theme="dark"] .list-group,html[data-theme="dark"] .accordion-body,html[data-theme="dark"] .accordion-collapse { color:var(--rp-text); background-color:var(--rp-surface); }
html[data-theme="dark"] .nav-tabs .nav-link { color:#abc4d4; background-color:transparent; border-color:transparent; }
html[data-theme="dark"] .nav-tabs .nav-link:hover { border-color:#405461; background-color:#22313c; }
html[data-theme="dark"] .btn-light,html[data-theme="dark"] .btn-outline-light { color:#dce6ec; background-color:#26343f; border-color:#8297a4; }
html[data-theme="dark"] .btn-light:hover,html[data-theme="dark"] .btn-outline-light:hover { color:#fff; background-color:#30424f; }
html[data-theme="dark"] .form-control-plaintext { color:var(--rp-text); }

/* Timeline: Kopfzeilen, Werkzeugleiste und Nicht-verplant-Zeile waren noch weiß. */
html[data-theme="dark"] .ak-plan,html[data-theme="dark"] .ak-label,html[data-theme="dark"] .ak-track,html[data-theme="dark"] .ak-row,html[data-theme="dark"] .ak-header,html[data-theme="dark"] .ak-unassigned { border-color:#384b57!important; }
html[data-theme="dark"] .ak-plan,html[data-theme="dark"] .ak-label,html[data-theme="dark"] .ak-track,html[data-theme="dark"] .ak-header,html[data-theme="dark"] .ak-unassigned,html[data-theme="dark"] .ak-toolbar,html[data-theme="dark"] .ak-tabs,html[data-theme="dark"] .ak-unassigned-header { color:var(--rp-text); background-color:#18232b!important; }
html[data-theme="dark"] .ak-plan .bg-white,html[data-theme="dark"] .ak-plan .bg-light { background-color:#18232b!important; }
html[data-theme="dark"] .ak-plan button:not(.btn-primary):not(.btn-danger) { background-color:#1d2a34; }
html[data-theme="dark"] .ak-bar.ak-boot { background:#4a5964!important; border-color:#6a7c88!important; color:#f2f5f7; }

/* Einige Verwaltungsseiten verwenden eigene weiße Panels/Zeilen. Die Bootstrap-Variablen werden hier
   auf dem kompletten Seitenbaum überschrieben, damit auch komponenteneigene var(--bs-*)-Flächen folgen. */
html[data-theme="dark"] main { --bs-body-bg:var(--rp-background); --bs-body-color:var(--rp-text); --bs-card-bg:var(--rp-surface); --bs-light-rgb:32,45,55; --bs-white-rgb:27,38,48; --bs-secondary-bg:#202d37; --bs-tertiary-bg:#202d37; }
html[data-theme="dark"] main .border,html[data-theme="dark"] main .border-top,html[data-theme="dark"] main .border-bottom,html[data-theme="dark"] main .border-start,html[data-theme="dark"] main .border-end { border-color:var(--rp-border)!important; }

@media (max-width:767.98px) { .content { padding-top:1.1rem; } form { padding:1rem; } .table>:not(caption)>*>* { padding:.7rem .8rem; } }
