/* FE-Schrift (Fälschungserschwerende Schrift) für deutsche Kennzeichen.
   Quelle: Euro Plate Typeface (c) Andy Hoppe, www.autokennzeichen.info. */
@font-face {
    font-family: "EuroPlate";
    src: url("/assets/fonts/EuroPlate.ttf") format("truetype");
    font-display: swap;
    font-weight: normal;
    font-style: normal;
}

body {
    background: #f4f7fb;
    color: #1f2937;
    min-height: 100vh;
}

#app-shell {
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
}

.sidebar .nav-link {
    color: #556674;
    font-weight: 500;
    margin-bottom: 0.15rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.85rem;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
}

.sidebar .nav-link.disabled {
    color: #adb5bd;
    pointer-events: none;
}

/* Gruppen-Toggle in der Sidebar (Akkordeon) */
.sidebar .nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.sidebar .nav-group-toggle .nav-group-caret {
    font-size: 0.75rem;
    transition: transform 0.15s ease;
    color: #8a98a8;
}
.sidebar .nav-group-toggle[aria-expanded="true"] .nav-group-caret {
    transform: rotate(180deg);
}
.sidebar .nav-sub-collapse {
    margin-bottom: 0.15rem;
}
.sidebar .nav-link.nav-sub {
    padding-left: 1.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6a7a8a;
}
.sidebar .nav-link.nav-sub.active,
.sidebar .nav-link.nav-sub:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.08);
}

.topbar {
    background: #ffffff;
    position: fixed !important;  /* !important, damit Bootstrap-Utility-Klassen (z.B. position-relative) das nicht aushebeln können */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
    min-height: 4.75rem;
    /* width nicht mehr fix 100%, sondern via left/right — siehe Desktop-Media-Query unten,
       die left:250px setzt, damit das Topbar neben der Sidebar startet (nicht darunter). */
}
/* Flex-Items dürfen nicht in eine zweite Zeile rutschen — würde die Topbar wachsen lassen
   und die darunter klebende `.filter-sticky` (top:4.75rem) überdecken. Titel und Suche
   schrumpfen statt zu brechen. */
.topbar {
    flex-wrap: nowrap !important;
}
.topbar h1.h5 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar p.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* User-Menü: vollständig aus dem Topbar-Layout entkoppelt.
   `position: fixed` direkt am Viewport — wird unter KEINEN Umständen vom Such-Feld
   oder anderen Topbar-Inhalten überdeckt. Sehr hoher z-index (über Modal-Layer). */
.topbar-user-menu {
    position: fixed !important;
    top: 0.85rem;
    right: 1.25rem;
    z-index: 2000 !important;
    display: block !important;
}
.topbar-user-menu .dropdown-menu { z-index: 2010; }
.topbar-user-menu .topbar-avatar { display: inline-flex !important; }
/* Such-Feld endet vor dem fixed-positionierten Avatar — 4rem Puffer (Avatar 2.4rem + 1rem Abstand + 0.6rem Reserve). */
.topbar .topbar-search { margin-right: 4rem; }

/* Filter-Leiste oben & Status-Leiste unten: fixiert, ohne sticky-Verhalten,
   bereits beim Laden auf voller Content-Breite und in Hover-Blau. Keine runden Ecken. */
.filter-sticky,
.filter-sticky-bottom {
    position: fixed;
    left: 0;
    right: 0;
    background: #ebf3fe;
    border-radius: 0 !important;
}
.filter-sticky,
.filter-sticky > .card-body,
.filter-sticky-bottom,
.filter-sticky-bottom > .card-body {
    border-radius: 0 !important;
}
.filter-sticky {
    top: 4.75rem;                /* direkt unter der Topbar (min-height: 4.75rem). */
    margin: 0;
    z-index: 1030;               /* über der Topbar (1020) und der scrollenden Liste. */
}
.filter-sticky-bottom {
    bottom: 0;
    margin: 0;
    z-index: 1025;
}
.filter-sticky > .card-body,
.filter-sticky-bottom > .card-body {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
@media (min-width: 992px) {
    /* Sidebar (250px) bleibt links frei, damit die Leisten den Content-Bereich abdecken. */
    .filter-sticky,
    .filter-sticky-bottom {
        left: 250px;
    }
}

/* Filter-Chip (Toggle in Anreise-Multiselect: Status & Quelle). */
.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    margin: 0;
}
.filter-chip input[type=checkbox] {
    display: none;
}
.filter-chip:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}
.filter-chip.is-checked {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

/* Produkt-Filter-Item: Icon-Kreis + Titel + Meta. */
.product-filter-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    cursor: pointer;
    margin: 0;
    transition: background-color 0.15s ease;
}
.product-filter-item:hover {
    background: rgba(13, 110, 253, 0.06);
}
.product-filter-item.is-checked {
    background: rgba(13, 110, 253, 0.12);
}
.product-filter-item .product-filter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #f1f4f8;
    color: #0d6efd;
    flex-shrink: 0;
}
.product-filter-item.is-checked .product-filter-icon {
    background: #0d6efd;
    color: #fff;
}
.product-filter-item .product-filter-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.product-filter-item .product-filter-title {
    font-weight: 500;
}

/* Logo-Block oben in der Sidebar an die Topbar-Höhe angleichen, damit die
   Border-Bottom-Linien beider Bereiche auf gleicher Höhe verlaufen. */
.sidebar-brand {
    min-height: 5.65rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ab Desktop (>=992px): Sidebar fixiert, Navigation scrollt unabhängig vom Content. */
@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        overflow-y: auto;
        z-index: 1030;
    }
    .content {
        margin-left: 250px;
    }
    /* Topbar startet rechts neben der Sidebar — sonst läge die Such-Input
       visuell hinter der Sidebar und würde "über die Seitenbreite hinausragen". */
    .topbar {
        left: 250px;
    }
}
/* Flex-Items haben per Default min-width:auto (= ihre Content-Breite). Eine sehr breite
   Tabelle würde sonst die Hauptspalte aufblasen und die ganze Seite horizontal scrollen
   lassen. Mit min-width:0 darf .content schrumpfen, und Cards/Wrapper darin können ihren
   eigenen overflow-x:auto sauber anwenden. */
main.content {
    min-width: 0;
    overflow-x: hidden;
    /* Topbar ist position: fixed → außerhalb des normalen Flusses. Padding-top in der
       Höhe der Topbar (min-height: 4.75rem) verhindert, dass der Content-Bereich darunter
       rutscht. Padding statt margin, damit es kein Collapsing mit Kind-Margins gibt. */
    padding-top: 4.75rem;
}

/* Klickbare Zeilen (Datei-Vorschau, Match-Tabellen): Cursor + dezenter Hover. */
tr.row-clickable { cursor: pointer; }
tr.row-clickable:hover td { background-color: rgba(13, 110, 253, 0.08); }
/* Highlight-Marker innerhalb der Zellen — Bootstrap mark hat schon gelben BG, hier nur Padding. */
td mark, th mark { padding: 0 0.1rem; border-radius: 0.15rem; }

.avatar {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.card {
    border: 0;
    border-radius: 0.85rem;
}

.card-title {
    letter-spacing: -0.02em;
}

.table thead th {
    border-bottom: 2px solid #e9ecef;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    font-weight: 600;
}

/* Sticky Tabellenkopf — bleibt beim Scrollen im Card-Body stehen. */
.table-sticky-head thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 -2px 0 #e9ecef;
}

.table td, .table th {
    vertical-align: middle;
}

.empty-state {
    border: 1px dashed #d3dbe6;
    border-radius: 0.85rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fbfcfe;
    color: #6c757d;
}

.empty-state .bi {
    font-size: 2.5rem;
    color: #b0b9c4;
}

.form-label {
    font-weight: 500;
    color: #344050;
    font-size: 0.9rem;
}

.form-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 1rem;
}

.is-invalid + .invalid-feedback,
.invalid-feedback {
    display: block;
}

.btn {
    border-radius: 0.55rem;
    font-weight: 500;
}

.badge {
    font-weight: 500;
    padding: 0.45em 0.7em;
    border-radius: 0.45rem;
}

.wizard-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.wizard-steps .step {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 0.75rem;
    text-align: center;
    color: #6c757d;
    font-weight: 500;
    position: relative;
}

.wizard-steps .step.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.wizard-steps .step.done {
    background: #e7f1ff;
    color: #0d6efd;
    border-color: #b6d4fe;
}
.wizard-steps a.step-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.wizard-steps a.step-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(13,110,253,0.15);
}
.wizard-steps .step.step-locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.wizard-steps .step .step-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.08);
    margin-right: 0.35rem;
    font-size: 0.85rem;
}

.wizard-steps .step.active .step-num {
    background: rgba(255,255,255,0.25);
}

.summary-box {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
}

.summary-box dt {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.85rem;
}

.summary-box dd {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.totals-card {
    background: linear-gradient(135deg, #0d6efd, #4d8bff);
    color: #fff;
}

.totals-card .label {
    opacity: 0.85;
    font-size: 0.85rem;
}

.table-sticky {
    max-height: 65vh;
    overflow-y: auto;
}

.table-sticky thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 -2px 0 #e9ecef;
}

code {
    color: #1f2937;
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* mobile check-in styles */
.mobile-shell {
    min-height: 100vh;
    background: #0d1b2a;
    color: #fff;
}

.mobile-shell .mobile-topbar {
    background: #0d6efd;
    color: #fff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-shell .mobile-topbar h1 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.mobile-shell .mobile-body {
    padding: 1.25rem;
    max-width: 720px;
    margin: 0 auto;
}

.mobile-shell .mobile-card {
    background: #fff;
    color: #1f2937;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.mobile-shell .mobile-search input {
    font-size: 1.4rem;
    padding: 1rem 1.1rem;
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.mobile-shell .btn-touch {
    padding: 0.9rem 1.1rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 0.85rem;
    width: 100%;
}

.mobile-shell .plate {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 1.4rem;
    font-weight: 700;
    background: #fff8d6;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-block;
    color: #1f2937;
    border: 1px solid #f0d54a;
}

.mobile-shell a.mobile-back {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

/* live search overlay */
.ls-wrap { position: relative; flex: 1 1 auto; width: 100%; }
.ls-wrap > input { padding-right: 2.1rem; }

.ls-clear {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    color: #adb5bd;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ls-clear:hover { color: #6c757d; background: #f1f3f5; }

.ls-overlay {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 0.6rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    max-height: 420px;
    overflow-y: auto;
    padding: 0.25rem;
    min-width: 360px;
}
.ls-overlay .ls-heading {
    padding: 0.4rem 0.7rem 0.2rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
}
.ls-overlay .ls-results { display: flex; flex-direction: column; }
.ls-overlay .ls-item {
    display: grid;
    grid-template-columns: minmax(110px, auto) 1fr auto;
    column-gap: 0.9rem;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-radius: 0.4rem;
    text-decoration: none;
    color: #1f2937;
    line-height: 1.25;
    min-height: 44px;
}
/* Varianten ohne Plate-Spalte */
.ls-overlay .ls-item--alt { grid-template-columns: 1fr auto; }
.ls-overlay .ls-item--alt:has(.ls-plate) { grid-template-columns: auto 1fr auto; }

.ls-overlay .ls-plate {
    font-family: "EuroPlate", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 1rem;
    background: #fff8d6;
    border: 1px solid #f0d54a;
    color: #1f2937;
    padding: 0.15rem 0.5rem;
    border-radius: 0.3rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.ls-overlay .ls-plate--num {
    background: #eef2f7;
    border-color: #d3dbe6;
    color: #344050;
}
.ls-overlay .ls-mid {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ls-overlay .ls-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-overlay .ls-sub {
    color: #6c757d;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-overlay .ls-right {
    color: #6c757d;
    font-size: 0.78rem;
    text-align: right;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ls-overlay .ls-item:hover,
.ls-overlay .ls-item.active { background: #eef2f7; }
.ls-overlay .ls-empty,
.ls-overlay .ls-loading {
    padding: 1rem 0.9rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.88rem;
}
.ls-overlay .ls-empty-sub { font-size: 0.78rem; color: #adb5bd; }

/* Topbar-Suche: nimmt die Breite bis zum User-Menü ein.
   User-Menü ist jetzt ein reguläres Flex-Item (flex-shrink: 0), das automatisch
   eigenen Platz behält — wir brauchen kein margin-right mehr. */
.topbar-search {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

/* Health-Banner-Host: vom JS dynamisch befüllt — bleibt unsichtbar, solange er leer ist,
   damit der "px-4 pt-3"-Padding-Block nicht für nichts Platz hält. */
#health-banner-host:empty { display: none; }

.card-hover { transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card-hover:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(0,0,0,0.08) !important; }

/* Kunden-Live-Suche im Wizard Schritt 1 */
.cust-results-overlay {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 0.6rem;
    box-shadow: 0 18px 40px rgba(0,0,0,0.12);
    max-height: 380px;
    overflow-y: auto;
    padding: 0.3rem;
}
.cust-results-overlay .cust-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 0.4rem;
    color: #1f2937;
    cursor: pointer;
}
.cust-results-overlay .cust-item:hover { background: #eef2f7; }

/* Generische Suggestion-Items (.cust-result-item) für die Compose-/Bookings-Edit-Live-Suche */
.cust-results-overlay .cust-result-item {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 0.6rem 0.85rem;
    border-radius: 0.4rem;
    color: #1f2937;
    cursor: pointer;
    line-height: 1.25;
}
.cust-results-overlay .cust-result-item + .cust-result-item {
    border-top: 1px solid #f1f4f8;
}
.cust-results-overlay .cust-result-item.is-active,
.cust-results-overlay .cust-result-item:hover,
.cust-results-overlay .cust-result-item:focus {
    background: #eef2f7;
    outline: none;
}
.cust-results-overlay .cust-result-item .fw-semibold {
    font-size: 0.95rem;
    color: #1f2937;
}
.cust-results-overlay .cust-result-item .small {
    color: #6c757d;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cust-results-overlay .cust-result-item .badge {
    font-size: 0.7rem;
    font-weight: 600;
}
/* Schiffs-Tag-Links unter dem Event-Suchfeld */
.ship-tag-link {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color .12s, color .12s, border-color .12s;
}
.ship-tag-link:hover {
    background: #e7f1ff;
    border-color: #b6d4fe;
    color: #0d6efd;
}
.ship-tag-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
/* Sortierbare Tabellen-Header — Cursor + dezenter Sortier-Indikator */
.sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
}
.sortable-th:hover { background: rgba(13, 110, 253, 0.06); }
.sortable-th .sortable-indicator {
    display: inline-block;
    margin-left: 0.35rem;
    width: 0.6rem;
    opacity: 0.35;
}
.sortable-th .sortable-indicator::after { content: '↕'; }
.sortable-th--asc  .sortable-indicator { opacity: 1; }
.sortable-th--desc .sortable-indicator { opacity: 1; }
.sortable-th--asc  .sortable-indicator::after { content: '↑'; }
.sortable-th--desc .sortable-indicator::after { content: '↓'; }

.ship-tag-link.is-hidden {
    background: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
    text-decoration: line-through;
    text-decoration-color: rgba(132, 32, 41, 0.6);
}
.ship-tag-badge {
    font-weight: 500;
}
.ship-tag-badge .btn-close {
    font-size: 0.6rem;
}
.cust-results-overlay .event-days-badge {
    flex: 0 0 auto;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: #ced4da;
    min-width: 2.4rem;
    text-align: right;
    align-self: center;
}
.cust-results-empty {
    padding: 0.85rem 1rem;
    color: #6c757d;
    font-size: 0.85rem;
    text-align: center;
}
.cust-results-overlay .cust-line {
    display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
    font-weight: 600;
    font-size: 0.93rem;
}
.cust-results-overlay .cust-company { color: #6c757d; font-weight: 500; }
.cust-results-overlay .cust-sub {
    color: #6c757d; font-size: 0.78rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cust-results-overlay .cust-plate {
    font-family: ui-monospace, monospace; font-weight: 700;
    font-size: 0.85rem;
    background: #fff8d6; border: 1px solid #f0d54a;
    padding: 0.1rem 0.5rem; border-radius: 0.3rem; color: #1f2937;
}
.cust-results-overlay .cust-empty {
    padding: 0.9rem; text-align: center; color: #6c757d; font-size: 0.88rem;
}

/* Anreiseliste – farbige Zeilen */
.arrival-list {
    display: flex;
    flex-direction: column;
}
.arrival-row {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    color: #1f2937;
    text-decoration: none;
    transition: filter 0.12s ease;
    cursor: pointer;
    font: inherit;
}
.arrival-row:hover, .arrival-row:focus { filter: brightness(0.96); color: #1f2937; outline: none; }
.arrival-row:first-child { border-top-left-radius: 0.85rem; border-top-right-radius: 0.85rem; }
.arrival-row:last-child  { border-bottom: 0; border-bottom-left-radius: 0.85rem; border-bottom-right-radius: 0.85rem; }

.arrival-row--paid    { background: #b7e4b6; }
.arrival-row--partial { background: #ffe09e; }
.arrival-row--open    { background: #ffc987; }
.arrival-row--cancelled {
    background: #ff9933;
    color: #4a2a00;
}
.arrival-row--cancelled .arrival-plate,
.arrival-row--cancelled .arrival-name {
    text-decoration: line-through;
    text-decoration-color: rgba(74, 42, 0, 0.5);
}

/* Stornierte Buchung — Detailseite leicht rot eingefärbt und mit "Storniert"-Akzent. */
.booking-show--cancelled .card {
    background: #fdf3f3;
    border-color: #f5c2c7;
}
.booking-show--cancelled .summary-box {
    background: #faeaea;
    border-color: #f1b8be;
}
.booking-show--cancelled .totals-card {
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.15);
}
.booking-show--cancelled .card .card-title,
.booking-show--cancelled .card h5,
.booking-show--cancelled .card h6 {
    color: #842029;
}
/* Stornierte Buchung in Kunden-Buchungsliste */
.booking-row-cancelled td {
    background: #fdf3f3 !important;
    color: #842029;
}
.booking-row-cancelled .badge-cancelled {
    background: #dc3545;
    color: #fff;
}

/* Anreise-Modal Header: zwei-Zeilen-Layout — oben Name + Plate, unten 2x2-Metadaten-Grid. */
.arrival-modal-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}
.arrival-modal-header__main { min-width: 0; }
.arrival-modal-plate {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: #fff;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    font-family: "EuroPlate", ui-monospace, "Courier New", monospace;
    font-size: 1.55rem;
    font-weight: 400;
    letter-spacing: 1px;
    line-height: 1;
    color: #111;
    text-transform: uppercase;
    white-space: nowrap;
}
.arrival-modal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e9ecef;
}
.arrival-modal-meta__cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.arrival-modal-meta__cell .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.arrival-modal-meta__cell .value {
    font-size: 0.95rem;
    color: #1a1a1a;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.arrival-modal-meta__cell--wide { grid-column: 1 / -1; }

/* ============================================================
   Check-in-Modal (Neugestaltung): Header-Strip aus 4 Info-Karten,
   editierbare Produkt-Tabelle, sticky Sidebar mit Summary + Status.
   Fokus: schnelle Erfassung im Counter-Alltag (POS-Charakter).
   ============================================================ */
.arrival-checkin-modal .modal-content {
    border: 0;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}
.arrival-checkin-modal .modal-header,
.arrival-checkin-modal .modal-footer {
    background: #f8f9fc;
    border-color: #e9ecef;
}
.arrival-checkin-modal .modal-body { background: #fff; }

/* Header-Strip: kompakte Info-Karten */
.ci-info-card {
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    height: 100%;
    min-width: 0;
}
.ci-info-card__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.ci-info-card__primary {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ci-info-card__meta { display: flex; flex-direction: column; gap: 0.15rem; }
.ci-info-card__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.82rem;
    min-width: 0;
}
.ci-info-card__row .lbl { color: #6c757d; flex-shrink: 0; }
.ci-info-card__row .val {
    color: #1a1a1a;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ci-info-card--plate {
    background: linear-gradient(180deg, #ffffff 0%, #f4f6fb 100%);
}
.ci-plate-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.ci-plate-edit {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.ci-plate-input {
    font-family: "EuroPlate", ui-monospace, "Courier New", monospace;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ci-product-picker .dropdown-item {
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
}
.ci-product-picker .dropdown-item:hover { background: #f1f4f9; }
.ci-product-picker .ci-pick-price { color: #0d6efd; font-variant-numeric: tabular-nums; }
.ci-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #0d6efd;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}
.ci-icon-btn:hover { background: rgba(13, 110, 253, 0.1); }

/* Generische Section-Karte (Produkte, Notizen, Summary, Status, Payment) */
.ci-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}
.ci-section__header {
    display: flex;
    align-items: center;
    margin-bottom: 0.6rem;
}
.ci-section__title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #495057;
    font-weight: 700;
}

/* Produkt-Tabelle */
.ci-products-table {
    margin-bottom: 0;
}
.ci-products-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
    background: #fafbfd;
}
.ci-products-table tbody td { vertical-align: middle; }
.ci-prod-title { font-weight: 600; color: #1a1a1a; }
.ci-prod-code { font-family: ui-monospace, "Courier New", monospace; font-size: 0.78rem; }
.ci-qty { font-weight: 600; }
.ci-price-group { max-width: 8rem; margin-left: auto; }
.ci-line-total { font-variant-numeric: tabular-nums; }

/* Sidebar */
.ci-sidebar {
    position: sticky;
    top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ci-summary {
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.85rem 1rem;
}
.ci-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.92rem;
    padding: 0.2rem 0;
    font-variant-numeric: tabular-nums;
}
.ci-sum-row--total {
    padding-top: 0.4rem;
    margin-top: 0.2rem;
}
.ci-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 0.25rem 0;
}
.ci-status-row .lbl { color: #6c757d; }

/* Modal-Dialog & Body: feste Höhe, damit Header/Tabs/Footer nicht scrollen.
   Nur der Tab-Inhalt (Produkte / Zahlung / Notizen) bekommt internes Scrollen. */
.ci-modal-dialog { max-height: calc(100vh - 1rem); }
.ci-modal-dialog .modal-content {
    max-height: calc(100vh - 1rem);
    display: flex;
    flex-direction: column;
}
.ci-modal-dialog .modal-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.ci-modal-dialog .modal-body > .row.g-3 {
    flex: 1 1 auto;
    min-height: 0;
}
.ci-modal-dialog .modal-body > .row.g-3 > [class*="col-"] {
    display: flex;
    min-height: 0;
}
.ci-modal-dialog .modal-body > .row.g-3 > .col-12.col-xl-8 { flex-direction: column; }
.ci-modal-dialog .modal-body > .row.g-3 > .col-12.col-xl-4 > .ci-sidebar { width: 100%; }

/* Tab-Section: Tabs oben fixiert, Content scrollt intern. */
.ci-tab-section {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}
.ci-tabs {
    padding: 0.4rem 0.6rem 0;
    background: #fafbfd;
    border-bottom: 1px solid #e9ecef;
    margin: 0;
    flex-shrink: 0;
}
.ci-tabs .nav-link {
    color: #495057;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: 0;
}
.ci-tabs .nav-link.active {
    color: #0d6efd;
    background: #fff;
    border-color: #e9ecef #e9ecef #fff;
}
.ci-tab-content {
    flex: 1 1 auto;
    min-height: 0;
    /* visible, damit Dropdown-Menüs (Produkt-Picker) nicht abgeschnitten werden;
       interner Scroll passiert in .ci-products-scroll, das hält die Tab-Höhe stabil. */
    overflow: visible;
    padding: 0.85rem 1rem;
    position: relative;
}
.ci-tab-content > .tab-pane.active { height: 100%; display: flex; flex-direction: column; }
.ci-products-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.ci-notes { resize: none; min-height: 100%; }

/* Zahlung-Tab: gesamte Tab-Höhe scrollbar (Rabatt + Liste + Eingabe).
   Discount und Zahlungs-Eingabe sollen erreichbar bleiben, auch wenn die
   Zahlungs-Liste länger wird. */
.ci-payment-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.ci-payments-list .ci-payment-row {
    display: grid;
    grid-template-columns: 1fr 7rem 9rem 5rem;
    gap: 0.5rem;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    background: #fff;
}
.ci-payments-list .ci-payment-row.is-editing { background: #fff8e1; }
.ci-payments-list .ci-payment-cell { font-size: 0.88rem; }
.ci-payments-list .ci-payment-cell.amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.ci-payments-list .ci-payment-cell.date   { color: #6c757d; }
.ci-payments-list .ci-payment-empty { color: #6c757d; font-size: 0.88rem; padding: 0.4rem; }

/* Notizen-Liste: scrollt intern, jüngste oben, jeder Eintrag mit Timestamp + Aktionen. */
.ci-notes-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}
.ci-notes-list .ci-note {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.4rem;
    background: #fff;
}
.ci-notes-list .ci-note__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.ci-notes-list .ci-note__meta { color: #6c757d; font-size: 0.75rem; }
.ci-notes-list .ci-note__body { white-space: pre-wrap; font-size: 0.92rem; color: #1a1a1a; }
.ci-notes-list .ci-note__actions .btn { padding: 0.1rem 0.45rem; line-height: 1; }
.ci-notes-list .ci-note.is-editing { background: #fff8e1; }

/* Notizen-Tab: Container ist column-flex, damit der Listenbereich den verbleibenden
   Platz unter Input + Speichern-Button einnimmt und intern scrollt. */
#amTabNotes.tab-pane.active { display: flex; flex-direction: column; }

/* Produkt-Tabelle: Mini-Swap-Dropdown bekommt eine kleine pencil-Icon-Größe. */
.ci-products-table .ci-swap-product { display: flex; align-items: center; gap: 0.4rem; }
.ci-products-table .ci-swap-toggle {
    color: #6c757d;
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    font-size: 0.78rem;
}
.ci-products-table .ci-swap-toggle:hover { color: #0d6efd; border-color: #b6d4fe; }

/* Footer: Haupt-CTA prominent */
.arrival-checkin-modal .ci-footer { border-top: 1px solid #e9ecef; }
.ci-cta {
    min-width: 14rem;
}
.ci-cta:disabled { opacity: 0.65; }

/* Änderungs-Historie: ab ~24rem scrollbar (Iframe-Look), damit lange Audit-Logs
   die Seite nicht endlos aufblähen. Wird vom record-history.php Partial überall genutzt. */
.record-history-scroll {
    max-height: 24rem;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fff;
}
.record-history-scroll .accordion-item:last-child { border-bottom: 0; }

/* Favoriten-Stern im Modal-Footer: gefüllter Stern + warme Akzentfarbe wenn aktiv. */
.ci-fav-btn.is-favored {
    color: #fff;
    background: #f0a020;
    border-color: #f0a020;
}
.ci-fav-btn.is-favored:hover { background: #d4881a; border-color: #d4881a; }

/* Mobile/Tablet: Sidebar nicht sticky bei kleinem Viewport */
@media (max-width: 1199.98px) {
    .ci-sidebar { position: static; }
    .ci-cta { min-width: 0; }
    .arrival-checkin-modal .ci-footer { flex-wrap: wrap; }
}

/* Schlüsselanhänger-Karte im Anreise-Modal — gleiche Anordnung wie license-plates.php, ohne Border. */
.keytag-card {
    color: #111;
    line-height: 1.1;
}
.keytag-card__row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.keytag-card__name {
    font-size: 0.82rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.keytag-card__days {
    font-size: 0.95rem;
    font-weight: 400;
}
.keytag-card__plate {
    font-family: "EuroPlate", ui-monospace, "Courier New", monospace;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.keytag-card__travel {
    font-size: 0.82rem;
    margin-top: 0.25rem;
    color: #111;
}
.keytag-card__row-bot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.15rem;
}
.keytag-card__event {
    font-size: 1.15rem;
    font-weight: 800;
    color: #4a4a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.keytag-card__code {
    font-family: ui-monospace, "Courier New", monospace;
    font-size: 1.15rem;
    font-weight: 800;
    color: #111;
    letter-spacing: 0.5px;
}
.keytag-card__meta {
    border-top: 1px solid #e9ecef;
    padding-top: 0.4rem;
}

/* Anreise-Zeile: Icon | Kunde (Name + Plate) | 4-Spalten-Datenraster */
.arrival-row {
    display: grid;
    grid-template-columns: 56px minmax(150px, 220px) 1fr;
    align-items: center;
    gap: 1rem;
    text-align: left;
}
.arrival-row__icon {
    font-size: 1.8rem;
    line-height: 1;
    text-align: center;
    color: #1f2937;
    opacity: 0.7;
}
.arrival-row__icon--checked_in   { color: #1f6c2c; opacity: 1; }
.arrival-row__icon--checked_out  { color: #6c757d; opacity: 1; }

.arrival-row__customer { min-width: 0; }
.arrival-row__customer .arrival-name {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.2;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.arrival-row__customer .arrival-company {
    color: rgba(0,0,0,0.55);
}
.arrival-row__customer .arrival-plate {
    font-family: "EuroPlate", ui-monospace, "Courier New", monospace;
    font-size: 1.45rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #111;
    line-height: 1.05;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arrival-row__data {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.3fr 1fr 1fr;
    gap: 1rem;
    min-width: 0;
    align-items: start;
}
.arrival-row__data .cell { min-width: 0; }
.arrival-row__data .label {
    display: block;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(0,0,0,0.55);
    line-height: 1.1;
}
.arrival-row__data .value {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
    margin-top: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Stellplatz-Cell ist optisch eng an Event angelehnt (kleinerer Gap nach links). */
.cell--stellplatz { margin-left: -0.5rem; }

@media (max-width: 768px) {
    .arrival-row {
        grid-template-columns: 44px 1fr;
        gap: 0.6rem;
    }
    .arrival-row__icon { font-size: 1.4rem; }
    .arrival-row__data {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 0.4rem;
    }
    .arrival-row__customer .arrival-plate { font-size: 1.15rem; }
}

/* Toasts container — unterhalb der fixierten Topbar (min-height 4.75rem), damit der
   Stack nicht den User-Avatar und die Suchleiste oben rechts überdeckt. */
.toast-stack {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
    pointer-events: none;  /* Klicks gehen durch leere Bereiche durch */
}
.toast-stack > * { pointer-events: auto; }

/* Print: keine Sidebar/Topbar, A4-Layout */
@media print {
    body { background: #fff !important; }
    .sidebar, .topbar, .toast-stack, .ls-overlay, .alert.alert-dismissible, .btn-close {
        display: none !important;
    }
    .content, main.content { background: #fff !important; }
    section.p-4 { padding: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #e9ecef; break-inside: avoid; }
    .table thead th { background: #fff !important; }
    a { color: #1f2937 !important; text-decoration: none !important; }
    .btn, .badge.bg-primary, .badge.bg-success, .badge.bg-warning, .badge.bg-danger, .badge.bg-info, .badge.bg-secondary {
        color: #1f2937 !important;
        background: #fff !important;
        border: 1px solid #adb5bd !important;
    }
}

@media (max-width: 1199.98px) {
    .sidebar {
        width: 100%;
    }
    .topbar-search { flex-basis: 100%; margin-left: 0; max-width: none; }
}


/* ==========================================================================
   EVENTS-ÜBERSICHT
   Toolbar, Liste, Cards, Statistik-Modal — eigene Styles unter dem Prefix .ev-*
   ========================================================================== */

.ev-page { max-width: 1600px; margin: 0 auto; }

/* ---- Sticky Toolbar ------------------------------------------------------- */
.ev-toolbar {
    position: sticky; top: 0; z-index: 5;
    background: linear-gradient(180deg, rgba(248,249,250,0.96) 0%, rgba(248,249,250,0.92) 100%);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem 0.5rem;
    margin: -1rem -1rem 1rem;
}
.ev-toolbar-top {
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: flex-start; justify-content: space-between;
    margin-bottom: 0.6rem;
}
.ev-toolbar-title h4 { font-weight: 600; letter-spacing: -0.01em; }
.ev-toolbar-crud {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.ev-toolbar-mid {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.6rem;
}
.ev-toolbar-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.ev-search { position: relative; min-width: 14rem; }
.ev-search input { padding-left: 2rem; }
.ev-search-icon { position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); color: #6c757d; font-size: 0.9rem; }
.ev-filter-badge {
    display: inline-block; padding: 0 0.4rem; min-width: 1.2rem;
    border-radius: 9rem; background: #0d6efd; color: #fff;
    font-size: 0.7rem; line-height: 1.2rem; text-align: center;
    margin-left: 0.25rem;
}

.ev-toolbar-bottom {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    align-items: center; justify-content: space-between;
}
.ev-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.ev-chips-clear {
    border: none; background: transparent; color: #6c757d;
    width: 1.8rem; height: 1.8rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.12s, color 0.12s;
    margin-left: 0.2rem;
}
.ev-chips-clear:hover { background: #f8d7da; color: #b02a37; }
.ev-chips-clear i { font-size: 0.85rem; }
.ev-chip {
    border: 1px solid #dee2e6; background: #fff; color: #495057;
    padding: 0.35rem 0.85rem; border-radius: 9rem; font-size: 0.85rem;
    cursor: pointer; transition: all 0.15s;
}
.ev-chip:hover { background: #f8f9fa; border-color: #adb5bd; }
.ev-chip.is-active {
    background: #0d6efd; border-color: #0d6efd; color: #fff;
    box-shadow: 0 1px 4px rgba(13,110,253,0.25);
}

/* ---- Layout-Switch ------------------------------------------------------- */
.ev-layout-switch {
    display: inline-flex; gap: 0; padding: 2px;
    background: #f1f3f5; border-radius: 0.5rem;
}
.ev-layout-btn {
    border: none; background: transparent; color: #6c757d;
    padding: 0.35rem 0.75rem; border-radius: 0.35rem;
    font-size: 0.9rem; cursor: pointer; transition: all 0.15s;
}
.ev-layout-btn:hover { color: #212529; }
.ev-layout-btn.is-active {
    background: #fff; color: #0d6efd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ---- Body & Loading ------------------------------------------------------ */
.ev-body { position: relative; min-height: 200px; }
.ev-body-loading {
    position: absolute; top: 1rem; right: 1rem;
    padding: 0.4rem 0.8rem; background: #fff;
    border: 1px solid #e9ecef; border-radius: 0.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex; align-items: center;
    z-index: 4;
}
#evContent { transition: opacity 0.2s; }

/* ---- LIST-VIEW (echte <table>, Header sortierbar via sortable-tables.js) - */
.ev-list {
    width: 100%;
    background: #fff; border: 1px solid #e9ecef; border-radius: 0.6rem; overflow: hidden;
    border-collapse: collapse;
}
.ev-list thead { display: block; }
.ev-list tbody { display: block; }
.ev-list thead tr,
.ev-list tbody tr {
    display: grid;
    grid-template-columns: 19rem 1fr 4rem 4rem 4.5rem 4.5rem 4.5rem 5rem 10.5rem;
    gap: 0.5rem;
    align-items: center;
}
.ev-list thead tr {
    padding: 0.6rem 0.9rem; background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.ev-list thead th {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: #6c757d; font-weight: 600;
    border: none; padding: 0;
    cursor: pointer; user-select: none;
    position: relative;
}
.ev-list thead th[data-no-sort] { cursor: default; }
.ev-list thead th[data-sort-direction]::after {
    content: "▴";
    margin-left: 0.25rem; font-size: 0.7rem; color: #0d6efd;
}
.ev-list thead th[data-sort-direction="desc"]::after { content: "▾"; }
.ev-list thead th:hover:not([data-no-sort]) { color: #212529; }

.ev-list tbody tr {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.15s;
}
.ev-list tbody tr:hover { background: #fafbfc; }
.ev-list tbody tr:last-child { border-bottom: none; }
.ev-list td { padding: 0; border: none; vertical-align: middle; }

/* Statistiken-Button + 3-Punkte-Menü auf einer Zeile (mit kleinem Gap) */
.ev-row-actions-bar {
    display: inline-flex; gap: 0.35rem; align-items: center; justify-content: flex-end;
    flex-wrap: nowrap;
}
.ev-row-actions-more { line-height: 1; padding: 0.25rem 0.5rem; }
.ev-row-actions-more i { font-size: 0.95rem; }

.ev-row-ships { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ev-ship-badge {
    display: inline-flex; flex-direction: row; align-items: baseline; gap: 0.3rem;
    background: #eef4ff; color: #0d4ea6;
    padding: 0.2rem 0.55rem; border-radius: 0.4rem;
    font-size: 0.78rem; line-height: 1.25;
    border: 1px solid transparent; cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
    text-align: left;
}
.ev-ship-badge:hover { background: #dbe7ff; border-color: #b6cbf2; }
.ev-ship-badge:focus-visible { outline: 2px solid #99b8e8; outline-offset: 1px; }
.ev-ship-badge.is-active {
    background: #0d6efd; color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 1px 4px rgba(13,110,253,0.25);
}
.ev-ship-badge .ev-ship-name { font-weight: 600; }
.ev-ship-badge .ev-ship-days { font-weight: 400; color: #6c757d; }
.ev-ship-badge.is-active .ev-ship-name { color: #fff; }
.ev-ship-badge.is-active .ev-ship-days { color: rgba(255,255,255,0.75); }
.ev-row-early { font-size: 0.8rem; }
.ev-early-dot {
    display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
    background: #ffc107; margin-right: 0.3rem; vertical-align: middle;
}

/* ---- KPIs (Halle/Außen/Valet/Gesamt) ------------------------------------- */
.ev-kpi { display: flex; flex-direction: column; align-items: flex-end; gap: 0.18rem; }
.ev-kpi-num {
    font-size: 1.25rem; font-weight: 700; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.ev-kpi-num.ev-kpi-halle  { color: #dc3545; }
.ev-kpi-num.ev-kpi-aussen { color: #198754; }
.ev-kpi-num.ev-kpi-valet  { color: #0d6efd; }
.ev-kpi-num.ev-kpi-total  { color: #212529; }
.ev-kpi-bar {
    display: block; width: 100%; max-width: 3.5rem;
    height: 3px; background: #f1f3f5; border-radius: 9rem; overflow: hidden;
}
.ev-kpi-bar > span { display: block; height: 100%; border-radius: 9rem; background: #adb5bd; }
[data-kind="halle"]  .ev-kpi-bar > span { background: #dc3545; }
[data-kind="aussen"] .ev-kpi-bar > span { background: #198754; }
[data-kind="valet"]  .ev-kpi-bar > span { background: #0d6efd; }

.ev-kpi-label {
    font-size: 0.66rem; text-transform: uppercase;
    letter-spacing: 0.05em; color: #94a3b8; font-weight: 600;
    margin-top: 0.05rem;
}

/* ---- CARDS-VIEW ---------------------------------------------------------- */
.ev-card {
    background: #fff; border: 1px solid #e9ecef; border-radius: 0.7rem;
    padding: 1rem; display: flex; flex-direction: column; gap: 0.85rem;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.ev-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06); border-color: #d0d7de;
}
.ev-card-date-row { display: flex; gap: 0.45rem; align-items: center; font-size: 0.95rem; }
.ev-card-ships { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ev-card-kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
    padding-top: 0.5rem; border-top: 1px dashed #e9ecef;
}
.ev-card-kpis .ev-kpi-block {
    display: flex; flex-direction: column; gap: 0.2rem; align-items: flex-start;
}
.ev-card-kpis .ev-kpi-num { font-size: 1.4rem; }
.ev-card-kpis .ev-kpi-bar { width: 100%; max-width: none; }
.ev-card-kpis .ev-kpi-block .ev-kpi-halle  ~ .ev-kpi-bar > span { background: #dc3545; }
.ev-card-kpis .ev-kpi-block .ev-kpi-aussen ~ .ev-kpi-bar > span { background: #198754; }
.ev-card-kpis .ev-kpi-block .ev-kpi-valet  ~ .ev-kpi-bar > span { background: #0d6efd; }
.ev-card-foot { margin-top: auto; }

/* ---- Stats Modal --------------------------------------------------------- */
.ev-stats-modal .modal-content { border-radius: 0.8rem; overflow: hidden; }
.ev-stats-modal .modal-header { border-bottom: 1px solid #e9ecef; }

/* Loading-Overlay während AJAX-Fetch */
.ev-stats-loading {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
    z-index: 10;
}
.ev-stats-loading.is-active { display: flex; }
.ev-stats-loading-inner { text-align: center; }

/* Event-Filter-Bar im Modal */
.ev-stats-event-filter {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 1.25rem;
    background: #f8f9fa; border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}
.ev-stats-event-filter.d-none { display: none; }
.ev-stats-event-filter-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: #6c757d; font-weight: 600;
}
.ev-stats-event-filter-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ev-stats-event-chip {
    border: 1px solid #dee2e6; background: #fff; color: #495057;
    padding: 0.2rem 0.65rem; border-radius: 9rem; font-size: 0.78rem;
    cursor: pointer; transition: all 0.12s;
    display: inline-flex; align-items: baseline; gap: 0.3rem;
}
.ev-stats-event-chip:hover { background: #f1f3f5; border-color: #adb5bd; }
.ev-stats-event-chip.is-active {
    background: #0d6efd; color: #fff; border-color: #0d6efd;
    box-shadow: 0 1px 3px rgba(13,110,253,0.25);
}
.ev-stats-event-chip .ev-chip-name { font-weight: 600; }
.ev-stats-event-chip .ev-chip-days { font-weight: 400; color: #6c757d; }
.ev-stats-event-chip.is-active .ev-chip-days { color: rgba(255,255,255,0.75); }
.ev-stats-modal-body { display: grid; grid-template-columns: 14rem 1fr; min-height: 28rem; }
.ev-stats-nav {
    background: #f8f9fa; padding: 1rem 0.6rem; border-right: 1px solid #e9ecef;
    display: flex; flex-direction: column; gap: 0.2rem;
}
.ev-stats-nav-btn {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.8rem; background: transparent; border: none;
    border-radius: 0.4rem; color: #495057;
    font-size: 0.9rem; text-align: left; cursor: pointer;
    transition: background 0.15s;
}
.ev-stats-nav-btn:hover { background: #eef0f2; color: #212529; }
.ev-stats-nav-btn.is-active { background: #e7f1ff; color: #0d6efd; font-weight: 500; }
.ev-stats-nav-btn i { font-size: 1rem; }
.ev-stats-content { padding: 1rem 1.25rem; overflow-y: auto; max-height: 70vh; }

.ev-stats-pane { display: none; }
.ev-stats-pane.is-active { display: block; }

/* Sub-Tabs innerhalb eines Panes (z.B. Vergleich & Verlauf) */
.ev-stats-subtabs {
    display: inline-flex; gap: 0; padding: 2px;
    background: #f1f3f5; border-radius: 0.5rem;
    margin-bottom: 0.85rem;
}
.ev-stats-subtab {
    border: none; background: transparent; color: #6c757d;
    padding: 0.35rem 0.9rem; border-radius: 0.35rem;
    font-size: 0.85rem; font-weight: 500; cursor: pointer;
    transition: all 0.15s;
}
.ev-stats-subtab:hover { color: #212529; }
.ev-stats-subtab.is-active {
    background: #fff; color: #0d6efd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.ev-stats-subpane { display: none; }
.ev-stats-subpane.is-active { display: block; }
.ev-stats-cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; margin-bottom: 1rem; }
.ev-stats-card {
    background: #fff; border: 1px solid #e9ecef; border-radius: 0.6rem; padding: 0.9rem;
}
.ev-stats-card-accent { border-color: #cfe2ff; background: linear-gradient(180deg, #f1f8ff 0%, #fff 100%); }
.ev-stats-card-title { font-size: 0.85rem; font-weight: 600; color: #212529; margin-bottom: 0.5rem; }
.ev-stats-kpis-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.ev-stats-kpis-4 > div { display: flex; flex-direction: column; gap: 0.15rem; }
.ev-stats-kpis-4 .ev-kpi-num { font-size: 1.15rem; }

.ev-stats-charts-row {
    display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 0.85rem;
}
.ev-chart-wrap { height: 11rem; }
.ev-chart-wrap-lg { height: 18rem; }
.ev-chart-legend { font-size: 0.8rem; }
.ev-legend-dot {
    display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%;
    margin-right: 0.4rem;
}
.ev-legend-dot.ev-kpi-halle  { background: #dc3545; }
.ev-legend-dot.ev-kpi-aussen { background: #198754; }
.ev-legend-dot.ev-kpi-valet  { background: #0d6efd; }

.ev-summary-dl { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem 1rem; margin: 0; font-size: 0.88rem; }
.ev-summary-dl dt { font-weight: 400; color: #6c757d; margin: 0; }
.ev-summary-dl dd { margin: 0; font-weight: 600; text-align: right; }
.ev-util-bar { height: 4px; background: #f1f3f5; border-radius: 9rem; overflow: hidden; margin-top: 0.3rem; }
.ev-util-bar > span { display: block; height: 100%; background: linear-gradient(90deg, #198754, #ffc107 70%, #dc3545); }

/* Event-Filter-Leiste in der Belegungs-Karte */
.ev-occ-event-filter {
    display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
    margin: 0 0 0.6rem;
    padding: 0.4rem 0.5rem; background: #f8f9fa; border-radius: 0.5rem;
}
.ev-occ-event-filter-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: #6c757d; font-weight: 600;
}
.ev-occ-event-filter-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }

/* Sort-Bar für Events-im-Detail / Daten */
.ev-ship-sort {
    display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.ev-ship-sort-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
    color: #6c757d; font-weight: 600;
}
.ev-ship-sort-btn {
    border: 1px solid #dee2e6; background: #fff; color: #495057;
    padding: 0.2rem 0.7rem; border-radius: 9rem; font-size: 0.78rem;
    cursor: pointer; transition: all 0.12s;
    display: inline-flex; align-items: center; gap: 0.2rem;
}
.ev-ship-sort-btn:hover { background: #f1f3f5; border-color: #adb5bd; }
.ev-ship-sort-btn.is-active {
    background: #0d6efd; color: #fff; border-color: #0d6efd;
    box-shadow: 0 1px 3px rgba(13,110,253,0.25);
}
.ev-ship-sort-btn.is-active::after {
    content: '▾';
    font-size: 0.7rem;
}
.ev-ship-sort-btn.is-asc.is-active::after { content: '▴'; }

/* Ship-Detail-Pane */
.ev-ship-row {
    padding: 0.75rem 0; border-bottom: 1px solid #f1f3f5;
}
.ev-ship-row:last-child { border-bottom: none; }
.ev-ship-row-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.ev-ship-row-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; }
.ev-ship-row-name { font-weight: 700; font-size: 1rem; color: #212529; }
.ev-ship-row-days { font-weight: 400; color: #6c757d; }
.ev-ship-row-date { font-weight: 400; color: #6c757d; }
.ev-ship-row-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.ev-ship-row-kpis > div { display: flex; flex-direction: column; gap: 0.1rem; }
.ev-ship-row-kpis .ev-kpi-num { font-size: 1.05rem; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .ev-list thead { display: none !important; }
    .ev-list tbody tr {
        grid-template-columns: 1fr; gap: 0.5rem;
        padding: 1rem; border-bottom: 1px solid #e9ecef;
    }
    .ev-list tbody td.text-end { text-align: left !important; }
    .ev-row-actions { display: flex; gap: 0.4rem; }
    .ev-stats-modal-body { grid-template-columns: 1fr; }
    .ev-stats-nav { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid #e9ecef; padding: 0.5rem; }
    .ev-stats-nav-btn { white-space: nowrap; }
    .ev-stats-cards-row, .ev-stats-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .ev-toolbar-actions { width: 100%; }
    .ev-search { flex: 1 1 100%; }
    .ev-card-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   EVENTS / VIEW — Detail-Page (modern Hero + Sidebar + Bottom-Stats)
   ========================================================================== */

/* ---- Hero Header ------------------------------------------------------- */
.ev-detail-header {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ev-detail-header__top {
    display: flex; align-items: center; gap: 0.5rem;
    padding-bottom: 0.85rem; border-bottom: 1px solid #f1f3f5;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ev-detail-hero {
    display: grid;
    grid-template-columns: 9rem 1fr minmax(20rem, 28rem);
    gap: 1.5rem;
    align-items: center;
}
@media (max-width: 1199.98px) {
    .ev-detail-hero { grid-template-columns: 1fr; gap: 1rem; }
}
.ev-detail-hero__logo {
    width: 9rem; height: 9rem;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
    border-radius: 0.85rem;
    overflow: hidden;
}
.ev-detail-hero__logo img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    padding: 0.5rem;
}
.ev-detail-hero__logo-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #adb5bd; font-size: 3rem;
}

.ev-detail-hero__main { min-width: 0; }
.ev-detail-hero__title {
    display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.ev-detail-hero__title h1 {
    font-size: 1.85rem; font-weight: 700; margin: 0;
    color: #0f172a; letter-spacing: -0.01em;
}
.ev-detail-hero__org-badge {
    background: #dbeafe; color: #1d4ed8;
    padding: 0.25rem 0.7rem; border-radius: 0.5rem;
    font-size: 0.78rem; font-weight: 600;
}
.ev-detail-hero__meta {
    display: flex; flex-wrap: wrap; gap: 0.85rem;
    margin-top: 0.6rem; color: #64748b; font-size: 0.9rem;
}
.ev-detail-hero__meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.ev-detail-hero__meta-item i { color: #94a3b8; }
.ev-detail-hero__meta-item code {
    background: #f1f5f9; color: #475569; font-size: 0.85em;
    padding: 0.1rem 0.4rem; border-radius: 0.25rem;
}

/* Reise-Timeline rechts */
.ev-detail-hero__period {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f6 100%);
    border-radius: 0.85rem; padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        "from line to"
        "footer footer footer";
    align-items: center; gap: 0.5rem;
}
.ev-period__from   { grid-area: from; }
.ev-period__to     { grid-area: to; text-align: right; }
.ev-period__line   { grid-area: line; display: flex; align-items: center; justify-content: center; position: relative; min-width: 5rem; }
.ev-period__footer { grid-area: footer; text-align: center; padding-top: 0.5rem; border-top: 1px dashed #cbd5e1; margin-top: 0.5rem; color: #64748b; font-size: 0.82rem; }
.ev-period__label  { font-size: 0.7rem; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; }
.ev-period__weekday{ font-size: 0.9rem; color: #475569; margin-top: 0.15rem; }
.ev-period__date   { font-size: 1.05rem; font-weight: 700; color: #0d6efd; line-height: 1.2; margin-top: 0.1rem; }
.ev-period__line-track {
    position: absolute; left: 0; right: 0; top: 50%;
    height: 2px; background: #0d6efd; opacity: 0.4;
}
.ev-period__line-dot {
    position: relative; z-index: 1;
    width: 2.4rem; height: 2.4rem; border-radius: 50%;
    background: #0d6efd; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(13,110,253,0.35);
}
.ev-period__badge {
    background: #0d6efd; color: #fff;
    padding: 0.15rem 0.55rem; border-radius: 9rem;
    font-size: 0.72rem; font-weight: 600;
    margin-right: 0.4rem;
}

/* ---- KPI Cards --------------------------------------------------------- */
.ev-kpi-card {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 1rem 1.1rem; border-radius: 0.75rem;
    background: #fff; border: 1px solid #e9ecef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    height: 100%;
}
.ev-kpi-card__icon {
    width: 3rem; height: 3rem; border-radius: 0.6rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
}
.ev-kpi-card__body { min-width: 0; }
.ev-kpi-card__label {
    font-size: 0.72rem; font-weight: 600;
    color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em;
}
.ev-kpi-card__value { font-size: 1.5rem; font-weight: 700; color: #0f172a; line-height: 1.1; }
.ev-kpi-card__sub   { font-size: 0.78rem; color: #94a3b8; margin-top: 0.15rem; }

.ev-kpi-card--blue   { background: linear-gradient(180deg, #eff6ff 0%, #fff 100%); border-color: #c7dafd; }
.ev-kpi-card--blue   .ev-kpi-card__icon { background: #dbeafe; color: #1d4ed8; }
.ev-kpi-card--green  { background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%); border-color: #bbf2d2; }
.ev-kpi-card--green  .ev-kpi-card__icon { background: #d1fae5; color: #047857; }
.ev-kpi-card--green  .ev-kpi-card__value { color: #047857; }
.ev-kpi-card--orange { background: linear-gradient(180deg, #fff7ed 0%, #fff 100%); border-color: #fed7aa; }
.ev-kpi-card--orange .ev-kpi-card__icon { background: #ffedd5; color: #c2410c; }
.ev-kpi-card--orange .ev-kpi-card__value { color: #c2410c; }
.ev-kpi-card--violet { background: linear-gradient(180deg, #f5f3ff 0%, #fff 100%); border-color: #ddd6fe; }
.ev-kpi-card--violet .ev-kpi-card__icon { background: #ede9fe; color: #6d28d9; }
.ev-kpi-card--violet .ev-kpi-card__value { color: #6d28d9; }

/* ---- Tabs (Card-Wrap) -------------------------------------------------- */
.ev-detail-tabs-card { border-radius: 0.75rem; border: 1px solid #e9ecef; }
.ev-detail-tabs-card .nav-tabs { border-bottom: 1px solid #e9ecef; padding: 0.4rem 0.5rem 0; gap: 0.2rem; }
.ev-detail-tabs-card .nav-tabs .nav-link {
    border: none; border-radius: 0.4rem 0.4rem 0 0;
    color: #64748b; padding: 0.55rem 0.95rem;
    font-size: 0.92rem; font-weight: 500;
    background: transparent; transition: background 0.12s, color 0.12s;
}
.ev-detail-tabs-card .nav-tabs .nav-link:hover { background: #f8fafc; color: #0f172a; }
.ev-detail-tabs-card .nav-tabs .nav-link.active {
    background: #fff; color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
    font-weight: 600;
}

/* ---- Sidebar Cards ----------------------------------------------------- */
.ev-detail-side { display: flex; flex-direction: column; gap: 0.85rem; }
.ev-side-card {
    background: #fff; border: 1px solid #e9ecef; border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.ev-side-card__title {
    font-size: 0.95rem; font-weight: 600;
    color: #0f172a; margin-bottom: 0.65rem;
}
.ev-side-dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.85rem; margin: 0; font-size: 0.85rem; }
.ev-side-dl dt { color: #94a3b8; font-weight: 400; margin: 0; }
.ev-side-dl dd { color: #0f172a; font-weight: 500; text-align: right; margin: 0; }

/* Event-Informations-Slider */
.ev-slider { padding-bottom: 0.6rem; }
.ev-slider__track {
    position: relative;
    min-height: 7.5rem;
}
.ev-slider__slide {
    display: none;
    position: relative;
    padding: 0.15rem 0 0.4rem;
    animation: ev-slider-fade 0.18s ease;
}
.ev-slider__slide.is-active { display: block; }
@keyframes ev-slider-fade {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.ev-slider__hint {
    display: inline-block;
    background: #eef4ff; color: #1d4ed8;
    font-size: 0.7rem; font-weight: 600;
    padding: 0.15rem 0.55rem; border-radius: 9rem;
    margin-bottom: 0.4rem;
}
.ev-slider__title-row {
    display: flex; gap: 0.7rem; align-items: center;
}
.ev-slider__logo {
    flex-shrink: 0;
    width: 2.4rem; height: 2.4rem;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.2rem;
}
.ev-slider__title-block { min-width: 0; flex: 1; }
.ev-slider__title {
    font-size: 1.15rem; font-weight: 700; color: #0f172a;
    line-height: 1.2; word-break: break-word;
}
.ev-slider__org {
    font-size: 0.82rem; color: #94a3b8;
    margin-top: 0.15rem;
}
.ev-slider__meta {
    margin-top: 0.65rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    font-size: 0.85rem; color: #475569;
}
.ev-slider__meta i.bi { color: #94a3b8; }
.ev-slider__meta code {
    background: #f1f5f9; color: #475569;
    padding: 0.05rem 0.4rem; border-radius: 0.25rem;
    font-size: 0.85em;
}
/* Klickbare Slides (alle außer dem aktuellen Event) öffnen das Event beim Klick. */
.ev-slider__slide--clickable { cursor: pointer; border-radius: 0.5rem; padding: 0.4rem 0.5rem; margin: -0.4rem -0.5rem; transition: background .12s ease; }
.ev-slider__slide--clickable:hover { background: #eff6ff; }
.ev-slider__slide--clickable:hover .ev-slider__title { color: #1e3a8a; }

.ev-slider__nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 0.6rem; padding-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
}
.ev-slider__btn {
    border: 1px solid #e2e8f0; background: #fff;
    width: 1.85rem; height: 1.85rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #475569; cursor: pointer;
    transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
}
.ev-slider__btn:hover {
    background: #2563eb; color: #fff; border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37,99,235,0.25);
}
.ev-slider__btn:disabled,
.ev-slider__btn[disabled] {
    background: #f8fafc; color: #cbd5e1; border-color: #e2e8f0;
    cursor: not-allowed; box-shadow: none;
}
.ev-slider__counter {
    font-size: 0.82rem; color: #64748b; font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Timeline */
.ev-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.ev-timeline::before {
    content: ""; position: absolute;
    left: 0.45rem; top: 0.5rem; bottom: 0.5rem;
    width: 2px; background: #e2e8f0;
}
.ev-timeline > li {
    display: grid; grid-template-columns: 1.4rem 1fr auto; gap: 0.6rem;
    align-items: center; padding: 0.4rem 0; position: relative;
}
.ev-timeline__dot {
    width: 0.85rem; height: 0.85rem; border-radius: 50%;
    background: #cbd5e1; position: relative; z-index: 1;
    box-shadow: 0 0 0 3px #fff;
}
.ev-timeline__dot--primary { background: #0d6efd; }
.ev-timeline__dot--success { background: #198754; }
.ev-timeline__dot--warning { background: #f59e0b; }
.ev-timeline__dot--danger  { background: #dc3545; }
.ev-timeline__dot--muted   { background: #cbd5e1; }
.ev-timeline__main { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.ev-timeline__icon { color: #94a3b8; font-size: 0.95rem; }
.ev-timeline__label { font-size: 0.85rem; color: #0f172a; }
.ev-timeline__time  { font-size: 0.82rem; color: #475569; font-weight: 500; text-align: right; }

/* Quick Actions */
.ev-quick-action {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.55rem 0.75rem; margin: 0.15rem 0;
    color: #0f172a; text-decoration: none;
    border-radius: 0.5rem; border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    font-size: 0.88rem;
}
.ev-quick-action:hover {
    background: #f8fafc; border-color: #e2e8f0; color: #0d6efd;
}
.ev-quick-action > i:first-child { color: #94a3b8; }
.ev-quick-action:hover > i:first-child { color: #0d6efd; }

/* ---- Responsive Touches ----------------------------------------------- */
@media (max-width: 991.98px) {
    .ev-detail-hero { gap: 1rem; }
    .ev-detail-hero__logo { width: 7rem; height: 7rem; }
    .ev-detail-hero__title h1 { font-size: 1.4rem; }
}

/* ==========================================================================
   DAILY-CLOSING — Rechnungen-Tab: Inline-Edit + Bulk-Toolbar
   ========================================================================== */

.dc-bulk-toolbar {
    position: sticky; top: 0.5rem; z-index: 5;
    background: #fff; border: 1px solid #bfdbfe;
    border-radius: 0.6rem; box-shadow: 0 4px 14px rgba(15,42,90,0.08);
    padding: 0.55rem 0.85rem; margin-bottom: 0.85rem;
}
.dc-bulk-toolbar__inner {
    display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
}
.dc-bulk-toolbar__count { color: #475569; font-size: 0.9rem; }
.dc-bulk-toolbar__count strong { color: #1e3a8a; }

/* Invoice-Tabelle (Inline-Edit) */
.dc-invoice-table input.form-control,
.dc-invoice-table select.form-select { font-size: 0.85rem; }
.dc-invoice-table .dc-no-input { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 14rem; }
.dc-invoice-table .dc-invoice-no-input { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
.dc-invoice-table .dc-clear-no { line-height: 1; }
.dc-invoice-table .dc-no-hint { font-size: 0.72rem; color: #b45309; display: block; margin-top: 0.15rem; }

/* Row-States */
.dc-invoice-table tbody tr.dc-row--dirty {
    background: #fffbeb;
    box-shadow: inset 3px 0 0 #f59e0b;
}
.dc-invoice-table tbody tr.dc-row--cancelled {
    color: #991b1b;
    text-decoration: line-through;
    background: #fef2f2;
}
.dc-invoice-table tbody tr.dc-row--cancelled td { color: #991b1b; }
.dc-invoice-table tbody tr.dc-row--cancelled a { color: #991b1b; }
.dc-invoice-table tbody tr.dc-row--finalized {
    background: #f0fdf4;
    box-shadow: inset 3px 0 0 #16a34a;
}

/* Bulk-Aktion-Button-Farbcodes via JS-Optionen (option:checked → background) */
#dcBulkAction option[value="save"]     { color: #1d4ed8; }
#dcBulkAction option[value="finalize"] { color: #15803d; }
#dcBulkAction option[value="cancel"]   { color: #b45309; }
#dcBulkAction option[value="delete"]   { color: #b91c1c; }
