* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;

    color: #1f2937;

    background:
        linear-gradient(
            120deg,
            #eef8fb 0%,
            #f7f7f2 55%,
            #f5f0e6 100%
        );
}


/* LOGIN */

#login-box {
    width: 380px;
    margin: 120px auto;

    background: rgba(255, 255, 255, 0.96);

    padding: 30px;

    border-radius: 18px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.08);
}

#login-box h2 {
    margin-top: 0;
}

#login-box input {
    width: 100%;

    padding: 12px 14px;

    margin-bottom: 12px;

    border: 1px solid #ded6ca;

    border-radius: 10px;

    background: white;

    font-size: 14px;
}

#login-button {
    width: 100%;

    padding: 12px;

    border: none;

    border-radius: 10px;

    background: #0f0cc5;

    color: white;

    cursor: pointer;

    font-weight: 600;
}


/* APP HEADER */

.app-header {
    width: calc(100% - 80px);

    margin: 10px auto 10px auto;

    background: rgba(255, 255, 255, 0.96);

    border-radius: 18px;

    padding: 16px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.07);
}


.header-left {
    display: flex;

    align-items: center;

    gap: 18px;
}


.logo {
    width: 110px;

    height: auto;

    display: block;
}


.title-area h1 {
    margin: 0;

    font-size: 26px;

    color: #000000;
}


.title-area p {
    margin: 4px 0 0 0;

    color: #7a8593;

    font-size: 14px;
}


.header-right {
    display: flex;

    align-items: center;

    gap: 16px;
}


.user-email {
    color: #6b7280;

    font-size: 14px;
}


.logout-button {
    padding: 9px 16px;

    border-radius: 20px;

    border: 1px solid #ded6ca;

    background: white;

    cursor: pointer;

    font-weight: 600;
}


/* MAIN PANEL */

.app-panel {
    width: calc(100% - 80px);

    margin: 0 auto 40px auto;

    background: rgba(255, 255, 255, 0.96);

    border-radius: 18px;

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.07);

    overflow: visible;
}


/* NAVIGATION */

.navigation-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 15px;

    border-bottom: 1px solid #ece6dc;
}


.main-nav {
    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}


.nav-button {
    padding: 10px 18px;

    border-radius: 18px;

    border: none;

    background: transparent;

    color: #000000;

    cursor: pointer;

    font-weight: 600;
}


.nav-button:hover {
    background: #f4f1eb;
}


.nav-button.active {
    background: #030c94;

    color: white;

    border-color: #030c94;
}


.year-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    border: none;
    outline: none;
    background: transparent;

    padding: 6px 8px;

    font-size: 20px;
    font-weight: 700;
    color: #000000;

    cursor: pointer;

    text-align: center;
}

.year-select:hover {
    background: rgba(31, 45, 61, 0.06);
    border-radius: 8px;
}


/* CONTROLS */

.controls {
    padding: 5px;

    border-bottom: 1px solid #ece6dc;
}


.month-row {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 20px;
}


.month-row h2 {
    margin: 0;

    min-width: 170px;

    text-align: center;

    font-size: 22px;
}


.month-button,
.today-button {
    padding: 10px 14px;

    border-radius: 12px;

    border: 1px solid #ded6ca;

    background: #f7f3ed;

    cursor: pointer;

    font-size: 15px;
}


.today-button {
    background: white;
}


.filter-row {
    display: grid;

    grid-template-columns:
        minmax(90px, auto)
        minmax(180px, 1.4fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;

    gap: 12px;
}


.search-input,
.filter-select {
    width: 100%;

    padding: 11px 14px;

    border-radius: 12px;

    border: 1px solid #ded6ca;

    background: white;

    color: #030303;

    font-size: 14px;
}


.add-tour-button {
    padding: 11px 18px;

    border-radius: 12px;

    border: none;

    background: #030c94;

    color: white;

    font-weight: 700;

    cursor: pointer;

    white-space: nowrap;
}


.add-tour-button:hover {
    background: #030c94;
}

/* COLUMN GROUP BUTTONS */

.column-toggle-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 22px 0px 22px;
}

.column-toggle {
    padding: 3px 5px;
    border-radius: 16px;
    border: 1px solid #ded6ca;
    background: white;
    color: #000000;
    cursor: pointer;
    font-weight: 600;
}

.column-toggle:hover {
    background: #f4f1eb;
}

.column-toggle.active {
    background: #fcfcfce0;
    color: rgb(172, 172, 172);
    border-color: #ffffffe0;
}

.column-toggle:not(.active) {
    background: #01c5d3;
    color: #000000;
    border-color: #01c5d3;
    opacity: 1;
}

/* GUIDES */

.guides-section {
    padding: 22px;
}

.guides-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.guides-header h2 {
    margin: 0;
}

.guides-header p {
    margin: 4px 0 0 0;
    color: #7a8593;
}

/* GUIDE TABLE */

.guide-table {
    width: 100%;
    border-collapse: collapse;
}

.guide-table th,
.guide-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee8df;
}

/* Name links */
.guide-table th:first-child,
.guide-table td:first-child {
    text-align: left;
}

/* GUIDE TABLE COLUMN WIDTHS */

/* No. */
.guide-table th:nth-child(1),
.guide-table td:nth-child(1) {
    width: 70px;
    text-align: left;
}

/* Name */
.guide-table th:nth-child(2),
.guide-table td:nth-child(2) {
    width: 220px;
    text-align: left;
}

/* Active immer ganz rechts */
.guide-table th:last-child,
.guide-table td:last-child {
    width: 110px;
    text-align: right;
}

/* GUIDE STATUS BUTTON */

.guide-status-button {
    min-width: 85px;
    padding: 6px 12px;

    border: none;
    border-radius: 20px;

    text-align: center;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.guide-status-button.active {
    background: #e3f2e8;
    color: #39724b;
}

.guide-status-button.inactive {
    background: #eeeeec;
    color: #777777;
}

.guide-status-button:hover {
    transform: scale(1.04);
}

.guide-status-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.guide-row {
    cursor: context-menu;
}

.guide-row:hover td {
    background: #faf7f2;
}


/* GUIDE CONTEXT MENU */

.guide-context-menu {
    position: absolute;
    z-index: 1000;

    min-width: 150px;

    padding: 6px;

    background: white;

    border-radius: 10px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);
}

.guide-context-menu button {
    width: 100%;

    padding: 9px 12px;

    border: none;
    border-radius: 7px;

    background: transparent;

    text-align: left;

    cursor: pointer;

    color: #283442;
}

.guide-context-menu button:hover {
    background: #f4f1eb;
}

.edit-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
}

/* GUIDE MODAL */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(31, 45, 61, 0.28);
}

.modal-box {
    width: 420px;
    max-width: calc(100% - 30px);

    background: white;

    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18);

    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid #eee8df;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    border: none;
    background: transparent;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
    color: #6b7280;
}

.modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 22px;
}

.modal-content label {
    margin-top: 8px;

    font-size: 13px;
    font-weight: 700;

    color: #374151;
}

.modal-content input,
.modal-content select {
    width: 100%;

    padding: 11px 13px;

    border: 1px solid #ded6ca;
    border-radius: 10px;

    background: #faf8f4;

    font-size: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 22px 22px 22px;
}

.duration-fields {
    display: flex;
    gap: 12px;
}

.duration-fields > div {
    flex: 1;
}

.duration-fields input {
    width: 100%;
}

.duration-fields span {
    display: block;
    margin-top: 5px;

    font-size: 12px;
    color: #7a8593;
}

.secondary-button {
    padding: 10px 16px;

    border: none;
    border-radius: 10px;

    background: #f1eee8;

    color: #374151;

    cursor: pointer;
    font-weight: 600;
}

.form-message {
    min-height: 18px;
    margin: 8px 0 0 0;

    color: #b42318;
    font-size: 13px;
}

/* MASTER DATA */

.master-data-section {
    padding: 22px;
}

.master-data-header {
    margin-bottom: 20px;
}

.master-data-header h2 {
    margin: 0;
}

.master-data-header p {
    margin: 4px 0 0 0;
    color: #7a8593;
}

.master-data-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.master-tab {
    padding: 9px 16px;

    border: none;
    border-radius: 18px;

    background: transparent;

    color: #000000;

    cursor: pointer;
    font-weight: 600;
}

.master-tab:hover {
    background: #f4f1eb;
}

.master-tab.active {
    background: #030c94;
    color: white;
}

.master-data-content {
    min-height: 300px;
}

.master-panel {
    width: 100%;
}

/* MASTER PANEL HEADER */

.master-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.master-panel-header h3 {
    margin: 0;
}

.master-panel-header p {
    margin: 4px 0 0 0;
    color: #7a8593;
}


/* TOUR TYPE TABLE */

.tour-type-table {
    width: 100%;
    border-collapse: collapse;
}

.tour-type-table th,
.tour-type-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee8df;
}

.tour-type-table th {
    text-align: left;
}

.tour-type-table th:last-child,
.tour-type-table td:last-child {
    text-align: right;
    width: 110px;
}

.tour-type-row {
    cursor: context-menu;
}

.tour-type-row:hover td {
    background: #faf7f2;
}

/* TABLE */

.table-container {
    padding: 0 22px 22px 22px;

    height: calc(100vh - 260px);
    min-height: 350px;

    overflow: auto;
}


.tour-table {
    width: max-content;

    border-collapse: separate;

    border-spacing: 0;

    border: 1px solid #e2d9cc;

    border-radius: 14px;

    overflow: visible;
}


.tour-table thead {
    background: #e9dfd0;
}

.tour-table thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #e9dfd0;
}

.tour-table thead tr:nth-child(2) th {
    position: sticky;
    top: 22px;
    z-index: 29;
    background: #e9dfd0;
}

.tour-table th {
    padding: 6px 10px;

    text-align: left;

    font-size: 13px;

    color: #000000;

    white-space: nowrap;

    border-bottom: 1px solid #ddd2c3;
}

/* Prelim – Überschrift + eingetragener Text */
.tour-table thead tr:first-child th:nth-child(4),
.tour-table tbody td:nth-child(4) {
    color: #9e9e9eec;
}


.tour-table td {
    padding: 5.5px 10px;

    font-size: 13px;

    border-bottom: 1px solid #eee8df;

    background: white;

    white-space: nowrap;
}


.tour-table tbody tr:last-child td {
    border-bottom: none;
}


.empty-row td {
    text-align: center;

    padding: 60px 20px;

    color: #9299a2;

    font-size: 15px;
}


/* RESPONSIVE */

@media (max-width: 1100px) {

    .app-header,
    .app-panel {
        width: calc(100% - 30px);
    }

    .app-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;
    }

    .header-right {
        width: 100%;

        justify-content: space-between;
    }

    .navigation-row {
        align-items: flex-start;

        gap: 20px;

        flex-direction: column;
    }

    .filter-row {
        grid-template-columns:
            1fr
            1fr;
    }

    .add-tour-button {
        width: 100%;
    }

}


@media (max-width: 650px) {

    .filter-row {
        grid-template-columns: 1fr;
    }

    .month-row {
        flex-wrap: wrap;
    }

    .logo {
        width: 90px;
    }

}

/* ==================================================
   HARBORS + SHIPS
   ================================================== */

.harbor-table,
.ship-table {
    width: 100%;
    border-collapse: collapse;
}

.harbor-table th,
.harbor-table td,
.ship-table th,
.ship-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee8df;
}

.harbor-table th,
.ship-table th {
    text-align: left;
}

/* Name nimmt den verfügbaren Platz ein */

.harbor-table th:first-child,
.harbor-table td:first-child,
.ship-table th:first-child,
.ship-table td:first-child {
    text-align: left;
}

/* Active immer ganz rechts */

.harbor-table th:last-child,
.harbor-table td:last-child,
.ship-table th:last-child,
.ship-table td:last-child {
    width: 110px;
    text-align: right;
}


/* Zeilen */

.harbor-row,
.ship-row {
    cursor: context-menu;
}

.harbor-row:hover td,
.ship-row:hover td {
    background: #faf7f2;
}


/* ==================================================
   HARBOR + SHIP STATUS BUTTONS
   ================================================== */

/*
   Die Buttons bekommen über JavaScript zusätzlich
   die Klasse .guide-status-button.
   Dadurch bleibt das Design überall identisch.
*/

.harbor-status-button,
.ship-status-button {
    min-width: 85px;
}


/* ==================================================
   ADD / EDIT TOUR MODAL
   ================================================== */

#tour-modal .modal-box {
    width: 900px;
    max-width: calc(100% - 40px);

    max-height: calc(100vh - 60px);

    display: flex;
    flex-direction: column;
}


/* Header bleibt oben */

#tour-modal .modal-header {
    flex-shrink: 0;
}


/* Inhalt scrollbar */

#tour-modal .modal-content {
    overflow-y: auto;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    column-gap: 22px;
    row-gap: 8px;

    padding: 22px;
}


/* Labels */

#tour-modal .modal-content label {
    margin-top: 8px;

    font-size: 13px;
    font-weight: 700;

    color: #374151;
}


/* Eingabefelder */

#tour-modal .modal-content input,
#tour-modal .modal-content select,
#tour-modal .modal-content textarea {
    width: 100%;

    padding: 11px 13px;

    border: 1px solid #ded6ca;
    border-radius: 10px;

    background: #faf8f4;

    color: #1f2937;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;

    outline: none;
}


/* Fokus */

#tour-modal .modal-content input:focus,
#tour-modal .modal-content select:focus,
#tour-modal .modal-content textarea:focus {
    border-color: #030c94;

    background: white;

    box-shadow:
        0 0 0 3px rgba(3, 12, 148, 0.08);
}


/* Disabled / Readonly */

#tour-modal input:disabled,
#tour-modal input[readonly] {
    background: #f0eee9;
    color: #777777;
}


/* ==================================================
   TOUR FORM GROUPS
   ================================================== */

.tour-form-group {
    display: flex;
    flex-direction: column;

    gap: 6px;
}


.tour-form-group label {
    margin: 0 !important;
}


/* Feld über komplette Breite */

.tour-form-full {
    grid-column: 1 / -1;
}


/* ==================================================
   TOUR MODAL ACTIONS
   ================================================== */

#tour-modal .modal-actions {
    flex-shrink: 0;

    display: flex;
    justify-content: flex-end;

    gap: 10px;

    padding: 16px 22px 22px 22px;

    border-top: 1px solid #eee8df;

    background: white;
}


/* Save Button */

#save-tour-button {
    padding: 10px 18px;

    border: none;
    border-radius: 10px;

    background: #030c94;

    color: white;

    cursor: pointer;

    font-weight: 700;
}


#save-tour-button:hover {
    background: #02096f;
}


#save-tour-button:disabled {
    opacity: 0.6;
    cursor: wait;
}


/* ==================================================
   TOUR TABLE HOVER
   ================================================== */

.tour-row:hover td {
    background: #faf7f2;
}


/* ==================================================
   MASTER DATA ADD BUTTONS
   ================================================== */

#add-tour-type-button,
#add-harbor-button,
#add-ship-button,
#add-guide-button {
    padding: 10px 16px;

    border: none;
    border-radius: 10px;

    background: #030c94;

    color: white;

    cursor: pointer;

    font-weight: 700;

    white-space: nowrap;
}


#add-tour-type-button:hover,
#add-harbor-button:hover,
#add-ship-button:hover,
#add-guide-button:hover {
    background: #02096f;
}


/* ==================================================
   RESPONSIVE TOUR MODAL
   ================================================== */

@media (max-width: 750px) {

    #tour-modal .modal-box {
        width: calc(100% - 20px);

        max-width: none;

        max-height: calc(100vh - 20px);
    }


    #tour-modal .modal-content {
        grid-template-columns: 1fr;

        padding: 18px;
    }


    .tour-form-full {
        grid-column: auto;
    }


    #tour-modal .modal-actions {
        padding: 14px 18px 18px 18px;
    }
}

/* TOUR PERIOD SELECT: Year / January / February ... */

.tour-view-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: auto;
    min-width: 90px;

    padding: 11px 4px;

    border: none;
    border-radius: 0;

    outline: none;
    box-shadow: none;

    background: transparent;
    background-image: none;

    color: #000000;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}

.tour-view-select::-ms-expand {
    display: none;
}

.tour-view-select:hover,
.tour-view-select:focus {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Alte Monatsnavigation nur unsichtbar machen,
   damit app.js weiterhin alle IDs findet */
.month-row {
    display: none;
}

/* Filterzeile mit Year/Month-Auswahl vorne */
.filter-row {
    grid-template-columns:
        minmax(90px, auto)
        minmax(180px, 1.4fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        minmax(150px, 1fr)
        auto;
}

/* Year / Month Dropdown ohne Rahmen und ohne Pfeil */
.tour-view-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: auto;
    min-width: 90px;

    padding: 11px 4px;

    border: none;
    outline: none;
    box-shadow: none;

    background: transparent;

    color: #000000;

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;
}

.tour-view-select::-ms-expand {
    display: none;
}

.tour-view-select:focus,
.tour-view-select:hover {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* ==================================================
   YEAR VIEW MONTH DIVIDERS
   ================================================== */

.year-month-divider td {
    padding: 14px 12px;

    background: #f4f1eb;

    color: #030c94;

    font-size: 15px;
    font-weight: 700;

    border-top: 2px solid #ded6ca;
    border-bottom: 1px solid #ded6ca;
}

.year-month-divider:first-child td {
    border-top: none;
}

.year-month-divider-content {
    position: relative;
    display: flex;
    align-items: center;

    width: 100%;
}

.year-month-divider-title {
    font-weight: 700;
}

.year-month-divider-count {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.year-month-divider-title {
    font-weight: 700;
}

.year-month-divider-count {
    font-size: 13px;
    font-weight: 600;

    color: #6b7280;
}

/* ==================================================
   TOUR TABLE – COLUMN WIDTHS
   Nur HIER die Breiten ändern
   ================================================== */

:root {
    --col-date: 52px;
    --col-harbor: 100px;
    --col-ship: 150px;
    --col-prelim: 50px;
    --col-status: 70px;
    --col-guide: 110px;
    --col-tour-nr: 50px;
    --col-tour-name: 160px;
    --col-time: 100px;
    --col-vy-bus: 50px;
    --col-agency: 70px;

    --col-adults: 50px;
    --col-kids: 50px;
    --col-baby: 50px;
    --col-escort: 50px;

    --col-audited: 70px;
    --col-billing-min: 70px;
    --col-besoks: 100px;
    --col-for-vy: 160px;
    --col-intern: 350px;
    --col-pp-day: 40px;
}


/* ==================================================
   BODY
   ================================================== */

.tour-table tbody td:nth-child(1) {
    width: var(--col-date);
    min-width: var(--col-date);
    max-width: var(--col-date);
}

.tour-table tbody td:nth-child(2) {
    width: var(--col-harbor);
    min-width: var(--col-harbor);
    max-width: var(--col-harbor);
}

.tour-table tbody td:nth-child(3) {
    width: var(--col-ship);
    min-width: var(--col-ship);
    max-width: var(--col-ship);
}

.tour-table tbody td:nth-child(4) {
    width: var(--col-prelim);
    min-width: var(--col-prelim);
    max-width: var(--col-prelim);
}

.tour-table tbody td:nth-child(5) {
    width: var(--col-status);
    min-width: var(--col-status);
    max-width: var(--col-status);
}

.tour-table tbody td:nth-child(6) {
    width: var(--col-guide);
    min-width: var(--col-guide);
    max-width: var(--col-guide);
}

.tour-table tbody td:nth-child(7) {
    width: var(--col-tour-nr);
    min-width: var(--col-tour-nr);
    max-width: var(--col-tour-nr);
}

.tour-table tbody td:nth-child(8) {
    width: var(--col-tour-name);
    min-width: var(--col-tour-name);
    max-width: var(--col-tour-name);
}

.tour-table tbody td:nth-child(9) {
    width: var(--col-time);
    min-width: var(--col-time);
    max-width: var(--col-time);
}

.tour-table tbody td:nth-child(10) {
    width: var(--col-vy-bus);
    min-width: var(--col-vy-bus);
    max-width: var(--col-vy-bus);
}

.tour-table tbody td:nth-child(11) {
    width: var(--col-agency);
    min-width: var(--col-agency);
    max-width: var(--col-agency);
}

.tour-table tbody td:nth-child(12) {
    width: var(--col-adults);
    min-width: var(--col-adults);
    max-width: var(--col-adults);
}

.tour-table tbody td:nth-child(13) {
    width: var(--col-kids);
    min-width: var(--col-kids);
    max-width: var(--col-kids);
}

.tour-table tbody td:nth-child(14) {
    width: var(--col-baby);
    min-width: var(--col-baby);
    max-width: var(--col-baby);
}

.tour-table tbody td:nth-child(15) {
    width: var(--col-escort);
    min-width: var(--col-escort);
    max-width: var(--col-escort);
}

.tour-table tbody td:nth-child(16) {
    width: var(--col-audited);
    min-width: var(--col-audited);
    max-width: var(--col-audited);
}

.tour-table tbody td:nth-child(17) {
    width: var(--col-billing-min);
    min-width: var(--col-billing-min);
    max-width: var(--col-billing-min);
}

.tour-table tbody td:nth-child(18) {
    width: var(--col-besoks);
    min-width: var(--col-besoks);
    max-width: var(--col-besoks);
}

.tour-table tbody td:nth-child(19) {
    width: var(--col-for-vy);
    min-width: var(--col-for-vy);
    max-width: var(--col-for-vy);
}

.tour-table tbody td:nth-child(20) {
    width: var(--col-intern);
    min-width: var(--col-intern);
    max-width: var(--col-intern);
}

.tour-table tbody td:nth-child(21) {
    width: var(--col-pp-day);
    min-width: var(--col-pp-day);
    max-width: var(--col-pp-day);
}


/* ==================================================
   HEADER ZEILE 1
   ================================================== */

.tour-table thead tr:first-child th:nth-child(1) {
    width: var(--col-date);
    min-width: var(--col-date);
    max-width: var(--col-date);
}

.tour-table thead tr:first-child th:nth-child(2) {
    width: var(--col-harbor);
    min-width: var(--col-harbor);
    max-width: var(--col-harbor);
}

.tour-table thead tr:first-child th:nth-child(3) {
    width: var(--col-ship);
    min-width: var(--col-ship);
    max-width: var(--col-ship);
}

.tour-table thead tr:first-child th:nth-child(4) {
    width: var(--col-prelim);
    min-width: var(--col-prelim);
    max-width: var(--col-prelim);
}

.tour-table thead tr:first-child th:nth-child(5) {
    width: var(--col-status);
    min-width: var(--col-status);
    max-width: var(--col-status);
}

.tour-table thead tr:first-child th:nth-child(6) {
    width: var(--col-guide);
    min-width: var(--col-guide);
    max-width: var(--col-guide);
}

.tour-table thead tr:first-child th:nth-child(7) {
    width: var(--col-tour-nr);
    min-width: var(--col-tour-nr);
    max-width: var(--col-tour-nr);
}

.tour-table thead tr:first-child th:nth-child(8) {
    width: var(--col-tour-name);
    min-width: var(--col-tour-name);
    max-width: var(--col-tour-name);
}

.tour-table thead tr:first-child th:nth-child(9) {
    width: var(--col-time);
    min-width: var(--col-time);
    max-width: var(--col-time);
}

.tour-table thead tr:first-child th:nth-child(10) {
    width: var(--col-vy-bus);
    min-width: var(--col-vy-bus);
    max-width: var(--col-vy-bus);
}

.tour-table thead tr:first-child th:nth-child(11) {
    width: var(--col-agency);
    min-width: var(--col-agency);
    max-width: var(--col-agency);
}


/* Pax = Summe aus Adults + Kids + Baby + Escort */

.tour-table thead tr:first-child th.pax-group-title {
    width: calc(
        var(--col-adults) +
        var(--col-kids) +
        var(--col-baby) +
        var(--col-escort)
    );

    min-width: calc(
        var(--col-adults) +
        var(--col-kids) +
        var(--col-baby) +
        var(--col-escort)
    );

    max-width: calc(
        var(--col-adults) +
        var(--col-kids) +
        var(--col-baby) +
        var(--col-escort)
    );
}


/* Ab hier wegen Pax-colspan verschoben */

.tour-table thead tr:first-child th:nth-child(13) {
    width: var(--col-audited);
    min-width: var(--col-audited);
    max-width: var(--col-audited);
}

.tour-table thead tr:first-child th:nth-child(14) {
    width: var(--col-billing-min);
    min-width: var(--col-billing-min);
    max-width: var(--col-billing-min);
}

.tour-table thead tr:first-child th:nth-child(15) {
    width: var(--col-besoks);
    min-width: var(--col-besoks);
    max-width: var(--col-besoks);
}

.tour-table thead tr:first-child th:nth-child(16) {
    width: var(--col-for-vy);
    min-width: var(--col-for-vy);
    max-width: var(--col-for-vy);
}

.tour-table thead tr:first-child th:nth-child(17) {
    width: var(--col-intern);
    min-width: var(--col-intern);
    max-width: var(--col-intern);
}

.tour-table thead tr:first-child th:last-child {
    width: var(--col-pp-day);
    min-width: var(--col-pp-day);
    max-width: var(--col-pp-day);

    padding-left: 3px;
    padding-right: 3px;

    text-align: center;
}


/* ==================================================
   HEADER ZEILE 2 – PAX
   ================================================== */

.tour-table thead tr:nth-child(2) th:nth-child(1) {
    width: var(--col-adults);
    min-width: var(--col-adults);
    max-width: var(--col-adults);
}

.tour-table thead tr:nth-child(2) th:nth-child(2) {
    width: var(--col-kids);
    min-width: var(--col-kids);
    max-width: var(--col-kids);
}

.tour-table thead tr:nth-child(2) th:nth-child(3) {
    width: var(--col-baby);
    min-width: var(--col-baby);
    max-width: var(--col-baby);
}

.tour-table thead tr:nth-child(2) th:nth-child(4) {
    width: var(--col-escort);
    min-width: var(--col-escort);
    max-width: var(--col-escort);
}

/* Pax Überschrift über Adults–Escort */
.pax-group-title {
    text-align: center !important;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px !important;
}

/* Eirik wieder rot */
.eirik-red {
    color: #d00000;
    font-weight: 700;
}

/* Pax-Spalten wirklich kompakt machen */

.tour-table td:nth-child(12),
.tour-table td:nth-child(13),
.tour-table td:nth-child(14),
.tour-table td:nth-child(15) {
    width: 40px;
    min-width: 40px;
    padding-left: 3px;
    padding-right: 3px;
    text-align: center;
}

/* zweite Kopfzeile: Adults / Kids / Baby / Escort */
.tour-table thead tr:nth-child(2) th {
    width: 40px;
    min-width: 40px;
    padding-left: 3px;
    padding-right: 3px;
    text-align: center;
    font-size: 12px;
}

/* Prelim, VY Bus und BB – Inhalte zentrieren */
.tour-table tbody td:nth-child(4),
.tour-table tbody td:nth-child(7),
.tour-table tbody td:nth-child(10),
.tour-table tbody td:nth-child(11),
.tour-table tbody td:nth-child(12),
.tour-table tbody td:nth-child(13),
.tour-table tbody td:nth-child(14),
.tour-table tbody td:nth-child(15),
.tour-table tbody td:nth-child(16),
.tour-table tbody td:nth-child(17),
.tour-table tbody td:nth-child(18) {
    text-align: center;
}

/* ==================================================
   INLINE TABLE DROPDOWNS
   ================================================== */

.inline-edit-harbor,
.inline-edit-ship,
.inline-edit-status,
.inline-edit-guide,
.inline-edit-tour-name,
.inline-edit-agency {
    cursor: pointer;
}

.inline-edit-harbor:hover,
.inline-edit-ship:hover,
.inline-edit-status:hover,
.inline-edit-guide:hover,
.inline-edit-tour-name:hover,
.inline-edit-agency:hover {
    background: #f4f1eb;
}

.inline-table-select {
    width: 100%;

    padding: 2px 4px;

    border: 1px solid #ded6ca;
    border-radius: 5px;

    background: white;

    color: #1f2937;

    font-family: inherit;
    font-size: 13px;

    outline: none;
}

.inline-table-select:focus {
    border-color: #030c94;
}

.inline-edit-field {
    cursor: pointer;
}

.inline-edit-field:hover {
    background: #f4f1eb;
}

.inline-table-input {
    width: 100%;
    min-width: 0;

    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
    color: inherit;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    text-align: inherit;
}

/* Zahlen-Pfeile ausblenden */

/* Chrome, Edge, Safari */
.inline-table-input[type="number"]::-webkit-outer-spin-button,
.inline-table-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Firefox */
.inline-table-input[type="number"] {
    appearance: textfield;
}

.inline-table-input:focus {
    border: none;
    outline: none;
    box-shadow: none;
    background: transparent;
}

/* Monatsüberschriften nicht von Tabellenformatierung beeinflussen */
.year-month-divider td {
    color: inherit;
}

.year-month-divider-title {
    color: #000000;
}

.inline-edit-time {
    cursor: pointer;
}

.inline-edit-time:hover {
    background: #f4f1eb;
}

/* ==================================================
   TOUR TABLE – GROUP TRENNLINIEN
   Header + Daten
   ================================================== */

/* ---------- DATENZEILEN ---------- */

/* Tour Details: vor u. nach Prelim */
.tour-table tbody td:nth-child(4) {
    border-left: 2px solid #cfc6b9;
}

.tour-table tbody td:nth-child(4) {
    border-right: 2px solid #cfc6b9;
}

/* Tour Details: vor u. nach Tour Nr. */

.tour-table tbody td:nth-child(7) {
    border-left: 2px solid #cfc6b9;
}

.tour-table tbody td:nth-child(7) {
    border-right: 2px solid #cfc6b9;
}


/* VY Bus */
.tour-table tbody td:nth-child(10) {
    border-left: 2px solid #cfc6b9;
    border-right: 2px solid #cfc6b9;
}

/* Agency agreed: nach Agency agreed */

.tour-table tbody td:nth-child(11) {
    border-right: 2px solid #cfc6b9;
}

/* Pax / Adults / Kids / Baby / Escort: vor und nach Pax / zwischen Adults-Escort */

.tour-table tbody td:nth-child(12) {
    border-right: 2px solid #cfc6b9;
}

.tour-table tbody td:nth-child(13) {
    border-right: 2px solid #cfc6b9;
}

.tour-table tbody td:nth-child(14) {
    border-right: 2px solid #cfc6b9;
}

.tour-table tbody td:nth-child(15) {
    border-right: 2px solid #cfc6b9;
}

/* Billing: nach Billing min. pax */
.tour-table tbody td:nth-child(17) {
    border-right: 2px solid #cfc6b9;
}


/* VY: For VY */
.tour-table tbody td:nth-child(19) {
    border-left: 2px solid #cfc6b9;
    border-right: 2px solid #cfc6b9;
}

/* Intern: nach Intern*/
.tour-table tbody td:nth-child(20) {
    border-right: 2px solid #cfc6b9;
}

/* ---------- KOPFZEILE 1 ---------- */

/* Tour Details: vor u. nach Prelim */
.tour-table thead tr:first-child th:nth-child(4) {
    border-left: 2px solid #cfc6b9;
}

.tour-table thead tr:first-child th:nth-child(4) {
    border-right: 2px solid #cfc6b9;
}

/* Tour Details: vor u. nach Tour Nr. */

.tour-table thead tr:first-child th:nth-child(7) {
    border-left: 2px solid #cfc6b9;
}

.tour-table thead tr:first-child th:nth-child(7) {
    border-right: 2px solid #cfc6b9;
}


/* VY Bus */
.tour-table thead tr:first-child th:nth-child(10) {
    border-left: 2px solid #cfc6b9;
    border-right: 2px solid #cfc6b9;
}

/* Agency agreed: nach Agency agreed */

.tour-table thead tr:first-child th:nth-child(11) {
    border-right: 2px solid #cfc6b9;
}

/* For VYAudid and Billing ist wegen Pax-colspan im ersten Header das 13+14. TH */
.tour-table thead tr:first-child th:nth-child(13) {
    border-left: 2px solid #cfc6b9;
}

.tour-table thead tr:first-child th:nth-child(14) {
    border-right: 2px solid #cfc6b9;
}

/* For VY ist wegen Pax-colspan im ersten Header das 16. TH */
.tour-table thead tr:first-child th:nth-child(16) {
    border-right: 2px solid #cfc6b9;
    border-left: 2px solid #cfc6b9;
}

/* Intern: nach Intern*/
.tour-table thead tr:first-child th:nth-child(17) {
    border-right: 2px solid #cfc6b9;
}

/* ---------- PAX KOPFZEILE 2 ---------- */

/* Adults */
.tour-table thead tr:nth-child(2) th:nth-child(1) {
    border-right: 2px solid #cfc6b9;
}

/* Kids */
.tour-table thead tr:nth-child(2) th:nth-child(2) {
    border-right: 2px solid #cfc6b9;
}

/* Baby */
.tour-table thead tr:nth-child(2) th:nth-child(3) {
    border-right: 2px solid #cfc6b9;
}

/* ==================================================
   CXL TOURS
   ================================================== */

/* CXL Button – Position */
.cxl-toggle {
    margin-right: auto;
}

/* CXL Button – inaktiv */
.cxl-toggle:not(.active) {
    background: #fcfcfce0;
    color: rgb(172, 172, 172);
    border-color: #ffffffe0;
    opacity: 1;
}

/* CXL Button – aktiv */
.cxl-toggle.active {
    background: #01c5d3;
    color: rgb(0, 0, 0);
    border-color: #01c5d3;
}

/* CXL Touren standardmäßig ausblenden */
.tour-row.cxl-tour {
    display: none;
}

/* Wenn CXL aktiviert ist, wieder anzeigen */
.tour-table.show-cxl .tour-row.cxl-tour {
    display: table-row;
}

/* ==================================================
   AUDITED EIRIK CHECKBOX
   ================================================== */

.audited-eirik-cell {
    padding-left: 6px !important;
    white-space: nowrap;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

/* Checkbox */
.audited-eirik-checkbox {
    appearance: none;
    -webkit-appearance: none;

    width: 22px;
    height: 22px;

    margin: 0;

    border: 2px solid #d00000;
    border-radius: 20px;

    background: #d00000;

    cursor: pointer;
    vertical-align: middle;
}

/* Angewählt = grün */
.audited-eirik-checkbox:checked {
    background: #16a34a;
    border-color: #16a34a;
}

/* Weißer Haken */
.audited-eirik-checkbox:checked::after {
    content: "";

    display: block;

    width: 5px;
    height: 10px;

    margin-left: 6px;
    margin-top: 2px;

    border: solid white;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}
/* Warnung zusatztext */
.intern-warning {
    font-size: 18px;
}

/* Während gespeichert wird */
.audited-eirik-checkbox:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* Billing min. pax Warnung */
.tour-table td.billing-min-warning {
    background: #fbff20ab;
}

/* Agency agreed Warnung im Pax-Bereich */
.tour-table td.agency-warning {
    background: #ffc7ce;
}

/* TOUR STATUS */

.status-done {
    background: #d9f2df;
    color: #2f6b3f;
}

.status-cxl {
    background: #ffd6d6;
    color: #a40000;
}

.status-cxl-pay {
    background: #ffe4bf;
    color: #9a5300;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    height: 22px;
    padding: 0 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}


/* AGENCY AGREED */

.agency-badge.agency-yes,
.agency-badge.agency-ok {
    background: #d9f2df;
    color: #2f6b3f;
}

.agency-badge.agency-no {
    background: #ffd6d6;
    color: #a40000;
}

.agency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 48px;
    height: 22px;
    padding: 0 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

/* ==================================================
   MULTI GUIDE PICKER
   ================================================== */

.guide-multi-picker {
    position: fixed;
    z-index: 5000;

    width: 230px;
    max-height: 320px;

    padding: 10px;

    background: white;

    border: 1px solid #ded6ca;
    border-radius: 12px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.18);
}


.guide-multi-picker-title {
    padding: 4px 6px 8px 6px;

    font-size: 13px;
    font-weight: 700;
}


.guide-multi-picker-list {
    max-height: 220px;
    overflow-y: auto;
}


.guide-multi-option {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 6px;

    border-radius: 6px;

    cursor: pointer;

    font-size: 13px;
}


.guide-multi-option:hover {
    background: #f4f1eb;
}


.guide-multi-option input {
    width: 16px;
    height: 16px;

    margin: 0;

    cursor: pointer;
}


.guide-multi-picker-actions {
    display: flex;
    justify-content: flex-end;

    gap: 6px;

    margin-top: 8px;
    padding-top: 8px;

    border-top: 1px solid #eee8df;
}


.guide-multi-cancel,
.guide-multi-save {
    padding: 6px 10px;

    border: none;
    border-radius: 7px;

    cursor: pointer;

    font-size: 12px;
    font-weight: 600;
}


.guide-multi-cancel {
    background: #f1eee8;
    color: #374151;
}


.guide-multi-save {
    background: #030c94;
    color: white;
}

.bb-file {
  cursor: pointer;
  user-select: none;
}

.bb-cell {
  position: relative;
  text-align: center;
}

.bb-download {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);

  cursor: pointer;
  user-select: none;

  font-size: 16px;
  line-height: 1;
}

.bb-delete {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);

  cursor: pointer;
  user-select: none;

  font-size: 18px;
  font-weight: 900;
  line-height: 1;

  color: #d32f2f;
}

.bb-delete:hover {
  color: #a00000;
}

.bb-file {
  cursor: pointer;
  user-select: none;
}

.bb-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(2px);
}

.bb-modal.show {
  display: flex;
}

.bb-modal-box {
  width: min(390px, calc(100% - 40px));
  padding: 22px;

  background: #ffffff;
  border-radius: 12px;

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.18);

  animation: bbModalIn 0.15s ease-out;
}

.bb-modal-icon {
  font-size: 24px;
  margin-bottom: 10px;
}

.bb-modal-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.bb-modal-text {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.7;
}

.bb-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.bb-modal-button {
  border: none;
  border-radius: 7px;
  padding: 8px 14px;

  font: inherit;
  font-size: 13px;

  cursor: pointer;
}

.bb-modal-cancel {
  background: #f1f1f1;
}

.bb-modal-confirm {
  background: #c94b4b;
  color: white;
}

.bb-modal-button:hover {
  filter: brightness(0.96);
}

@keyframes bbModalIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

tr.date-band-gray td {
  background-color: #efefef;
}

/* =========================================
   P.P. DAY – HÖCHSTER / NIEDRIGSTER TAG
   ========================================= */

.pp-day-cell {
  text-align: center;
  font-weight: 600;
}

.pp-day-cell.pp-day-high {
  background-color: #c6efce;
  color: #006100;
  font-weight: 600;
}

.pp-day-cell.pp-day-low {
  background-color: #ffc7ce;
  color: #9c0006;
  font-weight: 600;
}

#bb-preview-popup {
  position: fixed;
  width: 420px;
  height: 520px;
  background: white;
  border: 1px solid #bbb;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

#bb-preview-popup.show {
  display: block;
}

#bb-preview-popup iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.bb-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
}

/* ==================================================
   TOUR CONTEXT MENU
================================================== */

.tour-context-menu {
    position: fixed;
    z-index: 20000;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 7px;

    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #ddd2c3;
    border-radius: 12px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

.tour-context-menu button {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: none;
    border-radius: 9px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

/* COPY */

.tour-context-copy {
    background: #eef5f2;
    color: #2f5f4f;
}

.tour-context-copy:hover {
    background: #dcebe5;

    transform: translateY(-2px);

    box-shadow:
        0 4px 10px rgba(47, 95, 79, 0.20);
}


/* DELETE */

.tour-context-delete {
    background: #fff0ee;
    color: #c4473d;
}

.tour-context-delete:hover {
    background: #fbdeda;

    transform: translateY(-2px);

    box-shadow:
        0 4px 10px rgba(196, 71, 61, 0.18);
}


/* ICONS */

.tour-context-menu svg {
    width: 20px;
    height: 20px;
}

/* ==================================================
   DELETE TOUR MODAL
================================================== */

.delete-tour-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 30000;
}

.delete-tour-modal.show {
    display: flex;
}

.delete-tour-dialog {
    width: 360px;
    max-width: calc(100vw - 40px);
    padding: 22px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

.delete-tour-dialog h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #222;
}

.delete-tour-dialog p {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.delete-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.delete-tour-cancel,
.delete-tour-confirm {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.delete-tour-cancel {
    background: white;
    border: 1px solid #ccc;
    color: #333;
}

.delete-tour-cancel:hover {
    background: #f5f5f5;
}

.delete-tour-confirm {
    background: #b42318;
    border: 1px solid #b42318;
    color: white;
}

.delete-tour-confirm:hover {
    opacity: 0.9;
}

.print-button {
    margin-left: auto;
    border: none;
    background: transparent;
    padding: 4px 6px;
    font-size: 20px;
    font-family: "Segoe UI Emoji";
    cursor: pointer;
}

.print-button:hover {
    opacity: 0.7;
}

/* ==================================================
   PRINT
================================================== */

@media print {

    /* Hide app elements that are not needed */
    .app-header,
    .navigation-row,
    #tour-controls,
    #tour-column-toggles {
        display: none !important;
    }


    /* Remove page layout restrictions */
    body {
        margin: 0;
        background: white;
    }

    #app-content,
    .app-panel {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #tours-view,
    #master-data-section,
    #guides-section {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }


    /* Print complete visible table */
    .table-container {
        overflow: visible !important;
        max-height: none !important;
        height: auto !important;
        width: 100% !important;
    }

    .tour-table {
        width: 100% !important;
    }


    /* Keep hidden columns hidden */
    .tour-table .hidden-column {
        display: none !important;
    }


    /* Do not print hidden CXL tours */
    .tour-row.cxl-tour:not(.show-cxl) {
        display: none !important;
    }


    /* Remove sticky header behavior */
    .tour-table th {
        position: static !important;
    }


    /* Avoid unnecessary background effects */
    * {
        box-shadow: none !important;
    }

        /* Fit complete table on one page width */
    .tour-table {
        width: 100% !important;
        table-layout: fixed !important;
    }

    .tour-table th,
    .tour-table td {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 2px 2px !important;
        font-size: 7px !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .tour-table th {
        font-size: 7px !important;
    }

    .tour-table td {
        height: auto !important;
    }

        /* Master Data: hide navigation/header elements when printing */
    .master-data-header,
    .master-data-tabs,
    .master-panel-header .add-tour-button {
        display: none !important;
    }

    /* Guides: hide action buttons when printing */
    .guides-header .add-tour-button {
        display: none !important;
    }

    @page {
        size: landscape;
        margin: 8mm;
    }
}

/* CXL tour text */
.tour-table .tour-row.cxl-tour td {
    color: #c62828;
}

/* Pre. bleibt bei CXL grau */
.tour-table .tour-row.cxl-tour td[data-field="prelim"] {
    color: #6b7280;
}

/* ==================================================
   MULTI DATE CALENDAR
   ================================================== */

.multi-date-wrapper {
    position: relative;
    width: 100%;
}

.multi-date-input {
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    background: #ffffff;
}


/* Calendar popup */

.multi-date-calendar {
    display: none;

    position: absolute;
    top: calc(100% + 6px);
    left: 0;

    width: 290px;
    padding: 14px;

    background: #ffffff;

    border: 1px solid #ddd2c3;
    border-radius: 10px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.14);

    z-index: 1000;
}

.multi-date-calendar.open {
    display: block;
}


/* Month navigation */

.multi-date-calendar-header {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;

    margin-bottom: 14px;
}

.multi-date-calendar-header strong {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #222222;
}

.calendar-prev,
.calendar-next {
    width: 32px;
    height: 32px;

    border: none;
    border-radius: 6px;

    background: transparent;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;
}

.calendar-prev:hover,
.calendar-next:hover {
    background: #f3eee7;
}


/* Weekdays */

.multi-date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);

    margin-bottom: 5px;
}

.multi-date-weekdays span {
    text-align: center;

    font-size: 11px;
    font-weight: 600;

    color: #888888;
}


/* Calendar days */

.multi-date-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-day {
    aspect-ratio: 1;

    border: none;
    border-radius: 7px;

    background: transparent;

    font-size: 13px;
    color: #333333;

    cursor: pointer;

    transition:
        background 0.12s ease,
        color 0.12s ease,
        transform 0.12s ease;
}

.calendar-day:hover {
    background: #f3eee7;
}


/* Selected dates */

.calendar-day.selected {
    background: #2f5f4f;
    color: #ffffff;
    font-weight: 600;
}

.calendar-day.selected:hover {
    background: #244b3f;
}


/* Empty calendar positions */

.calendar-empty {
    aspect-ratio: 1;
}

/* Add Tour buttons at the bottom */
.modal-actions {
    width: 100%;
    grid-column: 1 / -1;

    position: sticky;
    bottom: 0;
    z-index: 20;

    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;

    margin-top: 16px;
    padding: 12px 0;

    background: #ffffff;
    border-top: 1px solid #eee7df;
}

.bb-auto-marker {
    display: block;
    width: 100%;

    text-align: center;

    font-weight: 700;
    color: #163a5f;
}

/* ==========================================
   GOOGLE DRIVE CONNECTION
   ========================================== */

.google-drive-button {
  width: 34px;
  height: 34px;
  padding: 0;

  border: none;
  background: transparent;

  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;

  color: #9e9e9e;

  cursor: pointer;

  transition:
    color 0.2s ease,
    transform 0.15s ease;
}

.google-drive-button:hover {
  transform: scale(1.08);
}

.google-drive-button.connected {
  color: #4285f4;
}

.header-action-buttons {
  margin-left: auto;

  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 8px;
}