* {
    box-sizing: border-box;
}

:root {
    --fkx-green: #2f5d50;
    --fkx-green-dark: #24483d;
    --fkx-background: #f5f7f8;
    --fkx-border: #e5e8ea;
    --fkx-text: #303438;
    --fkx-muted: #747b80;

    --fkx-inquiry: #d9d2f0;
    --fkx-inquiry-text: #493a75;

    --fkx-booked: #b8d8c7;
    --fkx-booked-text: #245143;

    --fkx-reserved: #ffe08a;
    --fkx-reserved-text: #674b00;

    --fkx-locked: #cfd4d8;
    --fkx-locked-text: #343a3e;
}

body {
    margin: 0;
    padding: 40px;
    background: var(--fkx-background);
    color: var(--fkx-text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.fkx-wrapper {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
}

.fkx-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.fkx-title {
    margin: 0 0 4px;
    font-size: 34px;
    font-weight: 700;
}

.fkx-subtitle {
    color: var(--fkx-muted);
    font-size: 16px;
}

.fkx-calendar {
    display: flex;
    gap: 24px;
}

.fkx-month {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.fkx-header {
    padding: 16px;
    background: var(--fkx-green);
    color: #ffffff;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.fkx-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f3f5f6;
}

.fkx-weekdays div {
    padding: 12px 2px;
    border-bottom: 1px solid #dddddd;
    text-align: center;
    font-weight: 700;
}

.fkx-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.fkx-day,
.fkx-empty {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    border: 1px solid #ececec;
}

.fkx-empty {
    background: #fafafa;
}

.fkx-day {
    cursor: pointer;
    background: #ffffff;
    transition:
        background-color 0.16s ease,
        box-shadow 0.16s ease,
        filter 0.16s ease,
        transform 0.16s ease;
}

.fkx-day:hover {
    z-index: 2;
    box-shadow:
        inset 0 0 0 2px rgba(47, 93, 80, 0.34);
}

/* Einheitliche Rückmeldung für alle direkt bearbeitbaren Belegungsflächen. */
.fkx-day.has-booking:hover {
    z-index: 3;
    filter: brightness(1.035) saturate(.96);
    box-shadow:
        inset 0 0 0 2px rgba(47, 93, 80, 0.42),
        0 3px 8px rgba(27, 52, 45, 0.12);
}

.fkx-day.free {
    background: #ffffff;
}

.fkx-day.past {
    background: #f0f2f3;
    color: #9aa1a5;
}

.fkx-day.past:not(.has-booking) {
    cursor: default;
}

.fkx-day.past:not(.has-booking):hover {
    box-shadow: none;
}


.fkx-day.status-anfrage.booked {
    background: var(--fkx-inquiry);
    color: var(--fkx-inquiry-text);
}

.fkx-day.status-belegt.booked {
    background: var(--fkx-booked);
    color: var(--fkx-booked-text);
}

.fkx-day.status-reserviert.booked {
    background: var(--fkx-reserved);
    color: var(--fkx-reserved-text);
}

.fkx-day.status-gesperrt.booked {
    background: var(--fkx-locked);
    color: var(--fkx-locked-text);
}

.fkx-day.status-anfrage.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-inquiry) 50%,var(--fkx-inquiry) 100%); color:var(--fkx-inquiry-text);}

.fkx-day.status-belegt.arrival {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 49%,
            var(--fkx-booked) 50%,
            var(--fkx-booked) 100%
        );
    color: var(--fkx-booked-text);
}

.fkx-day.status-reserviert.arrival {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 49%,
            var(--fkx-reserved) 50%,
            var(--fkx-reserved) 100%
        );
    color: var(--fkx-reserved-text);
}

.fkx-day.status-gesperrt.arrival {
    background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-locked) 50%,var(--fkx-locked) 100%);
    color: var(--fkx-locked-text);
}

.fkx-day.status-anfrage.departure { background: linear-gradient(135deg,var(--fkx-inquiry) 0%,var(--fkx-inquiry) 49%,#fff 50%,#fff 100%); color:var(--fkx-inquiry-text);}

.fkx-day.status-belegt.departure {
    background:
        linear-gradient(
            135deg,
            var(--fkx-booked) 0%,
            var(--fkx-booked) 49%,
            #ffffff 50%,
            #ffffff 100%
        );
    color: var(--fkx-booked-text);
}

.fkx-day.status-reserviert.departure {
    background:
        linear-gradient(
            135deg,
            var(--fkx-reserved) 0%,
            var(--fkx-reserved) 49%,
            #ffffff 50%,
            #ffffff 100%
        );
    color: var(--fkx-reserved-text);
}

.fkx-day.status-gesperrt.departure {
    background: linear-gradient(135deg,var(--fkx-locked) 0%,var(--fkx-locked) 49%,#fff 50%,#fff 100%);
    color: var(--fkx-locked-text);
}

.fkx-day.arrival,
.fkx-day.departure {
    font-weight: 700;
}

.fkx-day.today {
    z-index: 1;
    box-shadow:
        inset 0 0 0 2px var(--fkx-green);
    font-weight: 700;
}

.fkx-day.has-booking::after {
    position: absolute;
    right: 5px;
    bottom: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
    opacity: 0.7;
}

.fkx-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
    padding: 15px 18px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.06);
}

.fkx-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #454b4f;
    font-size: 14px;
}

.fkx-legend i {
    display: inline-block;
    width: 17px;
    height: 17px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

.fkx-legend-free {
    background: #ffffff;
}

.fkx-legend-booked {
    background: var(--fkx-booked);
}

.fkx-legend-reserved {
    background: var(--fkx-reserved);
}

.fkx-legend-locked {
    background: var(--fkx-locked);
}

.fkx-legend-arrival {
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 49%,
            #8ebc9f 50%,
            #8ebc9f 100%
        );
}

.fkx-legend-departure {
    background:
        linear-gradient(
            135deg,
            #d7a65a 0%,
            #d7a65a 49%,
            #ffffff 50%,
            #ffffff 100%
        );
}

/* Buchungsliste */

.fkx-booking-list {
    margin-top: 28px;
    padding: 24px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.07);
}

.fkx-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 20px;
}

.fkx-list-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
}

.fkx-list-header p {
    margin: 0;
    color: var(--fkx-muted);
}

.fkx-search {
    width: 100%;
    max-width: 330px;
}

.fkx-search span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.fkx-search input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cdd1d4;
    border-radius: 8px;
}

.fkx-overview-tools {
    display: grid;
    grid-template-columns: minmax(230px, 330px) minmax(180px, 230px);
    gap: 10px;
    align-items: end;
}

.fkx-source-filter span {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.fkx-source-filter select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cdd1d4;
    border-radius: 8px;
    background: #fff;
    font: inherit;
}

.fkx-portal-finance-summary,
.fkx-direct-payment-summary {
    display: inline-flex;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.fkx-portal-finance-summary {
    background: #eef4f1;
    color: #285044;
}

.fkx-direct-payment-summary {
    background: #fff3cd;
    color: #765500;
}

.fkx-table-wrapper {
    overflow-x: auto;
}

.fkx-table {
    width: 100%;
    border-collapse: collapse;
}

.fkx-table th,
.fkx-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--fkx-border);
    text-align: left;
    vertical-align: middle;
}

.fkx-table th {
    background: #f3f5f6;
    font-size: 14px;
}

.fkx-note-cell {
    max-width: 280px;
    color: #5f666b;
}

.fkx-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.fkx-status-belegt {
    background: var(--fkx-booked);
    color: var(--fkx-booked-text);
}

.fkx-status-reserviert {
    background: var(--fkx-reserved);
    color: var(--fkx-reserved-text);
}

.fkx-status-gesperrt {
    background: var(--fkx-locked);
    color: var(--fkx-locked-text);
}

.fkx-table-edit {
    padding: 8px 12px;
    background: var(--fkx-green);
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.fkx-table-edit:hover {
    background: var(--fkx-green-dark);
}

.fkx-list-empty {
    display: none;
    padding: 25px 10px 10px;
    color: var(--fkx-muted);
    text-align: center;
}

/* Dialogfenster */

.fkx-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.46);
}

.fkx-modal.is-visible {
    display: flex;
}

.fkx-modal-box {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 22px 55px rgba(0, 0, 0, 0.28);
}

.fkx-modal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.fkx-modal-heading h2 {
    margin: 0;
    font-size: 25px;
}

.fkx-modal-close {
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: #555555;
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.fkx-modal-close:hover {
    background: #eeeeee;
}

.fkx-modal-box label {
    display: block;
    margin-top: 17px;
    margin-bottom: 6px;
    font-weight: 700;
}

.fkx-modal-box input,
.fkx-modal-box select,
.fkx-modal-box textarea {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #cdd1d4;
    border-radius: 8px;
    color: var(--fkx-text);
}

.fkx-modal-box input:disabled {
    background: #f0f2f3;
    color: #6c7378;
    cursor: not-allowed;
}

.fkx-modal-box input:focus,
.fkx-modal-box select:focus,
.fkx-modal-box textarea:focus {
    border-color: var(--fkx-green);
    outline: none;
    box-shadow:
        0 0 0 3px rgba(47, 93, 80, 0.13);
}

.fkx-modal-box textarea {
    min-height: 90px;
    resize: vertical;
}

.fkx-message {
    display: none;
    margin-top: 17px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 14px;
}

.fkx-message.is-error {
    display: block;
    background: #f8d7da;
    color: #842029;
}

.fkx-message.is-success {
    display: block;
    background: #d1e7dd;
    color: #0f5132;
}

.fkx-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 27px;
}

.fkx-buttons-right {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.fkx-button {
    min-height: 43px;
    padding: 10px 17px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.fkx-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.fkx-button-primary {
    background: var(--fkx-green);
    color: #ffffff;
}

.fkx-button-primary:hover {
    background: var(--fkx-green-dark);
}

.fkx-button-secondary {
    background: #e1e3e5;
    color: #222222;
}

.fkx-button-secondary:hover {
    background: #d4d7d9;
}

.fkx-button-danger {
    display: none;
    background: #b4232d;
    color: #ffffff;
}

.fkx-button-danger.is-visible {
    display: inline-block;
}

.fkx-button-danger:hover {
    background: #901b23;
}

@media (max-width: 1000px) {
    body {
        padding: 25px;
    }

    .fkx-calendar {
        flex-wrap: wrap;
    }

    .fkx-month {
        flex: 1 1 calc(50% - 12px);
    }

    .fkx-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .fkx-search {
        max-width: none;
    }
}

@media (max-width: 680px) {
    body {
        padding: 15px;
    }

    .fkx-title {
        font-size: 28px;
    }

    .fkx-calendar {
        display: block;
    }

    .fkx-month {
        width: 100%;
        margin-bottom: 20px;
    }

    .fkx-day,
    .fkx-empty {
        height: 48px;
    }

    .fkx-booking-list {
        padding: 17px;
    }

    .fkx-modal-box {
        padding: 21px;
    }

    .fkx-buttons {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .fkx-buttons-right {
        width: 100%;
        margin-left: 0;
    }

    .fkx-buttons-right .fkx-button,
    .fkx-button-danger {
        flex: 1;
    }
}
/* Buchungsverwaltung 2.0 */
.fkx-modal-box {
    max-width: 720px;
}

.fkx-modal-intro {
    margin: -12px 0 22px;
    color: var(--fkx-muted);
}

.fkx-form-section {
    margin-top: 18px;
    padding: 18px;
    background: #f7f8f9;
    border: 1px solid var(--fkx-border);
    border-radius: 10px;
}

.fkx-form-section h3 {
    margin: 0 0 12px;
    font-size: 17px;
}

.fkx-form-section label:first-child,
.fkx-form-section h3 + label {
    margin-top: 0;
}

.fkx-form-grid {
    display: grid;
    gap: 14px;
}

.fkx-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fkx-form-grid label {
    margin-top: 0;
}

.fkx-form-grid.is-disabled {
    opacity: 0.58;
}

.fkx-booking-duration {
    min-height: 20px;
    margin-top: 10px;
    color: var(--fkx-green);
    font-size: 14px;
    font-weight: 700;
}

.fkx-booking-duration.is-error {
    color: #9f2028;
}

.fkx-guest-summary {
    margin-top: 4px;
    color: var(--fkx-muted);
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 680px) {
    .fkx-form-grid-two {
        grid-template-columns: 1fr;
    }

    .fkx-form-section {
        padding: 14px;
    }
}


/* Buchungsverwaltung 2.0 – Phase 2 */
.fkx-required {
    color: #a51f2b;
}

.fkx-field-hint {
    margin: 5px 0 0;
    color: var(--fkx-muted);
    font-size: 13px;
}

.fkx-field-error {
    display: none;
    margin-top: 5px;
    color: #9f2028;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.fkx-field-error.is-visible {
    display: block;
}

.fkx-modal-box input.is-invalid,
.fkx-modal-box select.is-invalid,
.fkx-modal-box textarea.is-invalid {
    border-color: #b4232d;
    box-shadow: 0 0 0 3px rgba(180, 35, 45, 0.1);
}

/* v019b-6: Pflichtfeldfehler bleiben eindeutig, aber bewusst dezent.
   Nur das betroffene Eingabefeld erhält einen schmalen Rahmen; Hintergrund,
   Feldcontainer und Beschriftung werden nicht mehr großflächig eingefärbt. */
#bookingModal input.is-invalid,
#bookingModal select.is-invalid,
#bookingModal textarea.is-invalid {
    border-color: #c0525b !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(192, 82, 91, 0.22) !important;
    outline: none !important;
}

#bookingModal .fkx-field-has-error > label,
#bookingModal label.fkx-field-has-error {
    color: inherit;
}

.fkx-button:disabled {
    cursor: not-allowed;
}

/* Status-Workflow: nicht blockierende Vorgänge bleiben dezent, aktive Belegungen deutlich. */
.fkx-day.status-angebot.booked { background: var(--fkx-inquiry); color: var(--fkx-inquiry-text); }
.fkx-day.status-storniert.booked { background: #dfe3e5; color: #555d62; }
.fkx-day.status-angebot.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-inquiry) 50%,var(--fkx-inquiry) 100%); color:var(--fkx-inquiry-text); }
.fkx-day.status-angebot.departure { background: linear-gradient(135deg,var(--fkx-inquiry) 0%,var(--fkx-inquiry) 49%,#fff 50%,#fff 100%); color:var(--fkx-inquiry-text); }
.fkx-day.status-storniert.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,#dfe3e5 50%,#dfe3e5 100%); color:#555d62; }
.fkx-day.status-storniert.departure { background: linear-gradient(135deg,#dfe3e5 0%,#dfe3e5 49%,#fff 50%,#fff 100%); color:#555d62; }
.fkx-status-anfrage, .fkx-status-angebot { background:#eee9fa; color:#493a75; }
.fkx-status-storniert { background:#e6e9eb; color:#555d62; }

/* Internationale Kontaktdaten */
.fkx-phone-field { align-self: start; }
.fkx-phone-input { display: grid; grid-template-columns: minmax(118px, 0.42fr) minmax(150px, 1fr); gap: 8px; }
.fkx-phone-input select, .fkx-phone-input input { min-width: 0; }
@media (max-width: 560px) { .fkx-phone-input { grid-template-columns: 1fr; } }

/* X5-Länderauswahl */
.fkx-country-select { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; border: 1px solid #cbd5d1; border-radius: 8px; background: #fff; overflow: hidden; }
.fkx-country-select:focus-within { border-color: #2f855a; box-shadow: 0 0 0 3px rgba(47,133,90,.12); }
.fkx-country-flag { display:block; width:22px; height:15px; margin:0 auto; object-fit:cover; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.14); user-select:none; }
.fkx-country-select select { width: 100%; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding-left: 2px; background-color: transparent; }
.fkx-country-select-phone { min-width: 118px; }
.fkx-phone-input { grid-template-columns: minmax(138px, .46fr) minmax(150px, 1fr); }

/* X5 Timeline: Flächenfarben zeigen nur blockierende Zustände; Anfragen erscheinen als Linien. */
.fkx-day.status-anfrage.booked,
.fkx-day.status-angebot.booked,
.fkx-day.status-anfrage.arrival,
.fkx-day.status-angebot.arrival,
.fkx-day.status-anfrage.departure,
.fkx-day.status-angebot.departure {
    background: #ffffff;
    color: inherit;
}

.fkx-day-number {
    position: relative;
    z-index: 2;
}

.fkx-day.has-inquiry {
    overflow: visible;
}

.fkx-inquiry-timeline {
    position: absolute;
    right: 0;
    bottom: 7px;
    left: 0;
    z-index: 4;
    height: 34px;
    pointer-events: none;
}

.fkx-inquiry-segment {
    position: absolute;
    right: -1px;
    bottom: calc(var(--fkx-inquiry-lane) * 9px);
    left: -1px;
    width: auto;
    height: 8px;
    margin: 0;
    padding: 0;
    appearance: none;
    border: 0;
    border-radius: 0;
    background: var(--fkx-inquiry-color);
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.14),
        0 1px 2px rgba(25, 39, 35, 0.10);
    cursor: pointer;
    opacity: 0.94;
    pointer-events: auto;
    transform-origin: center;
    transition:
        opacity .18s ease,
        filter .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.fkx-inquiry-segment.is-start {
    left: 50%;
}

.fkx-inquiry-segment.is-end {
    right: 50%;
}

.fkx-inquiry-segment.is-start.is-end {
    right: 50%;
    left: 50%;
}

.fkx-inquiry-segment:hover,
.fkx-inquiry-segment:focus-visible,
.fkx-inquiry-segment.is-focused {
    z-index: 6;
    outline: none;
    opacity: 1;
    filter: saturate(1.10) brightness(.96);
    transform: scaleY(1.22);
    box-shadow:
        inset 0 -1px 0 rgba(0, 0, 0, 0.16),
        0 2px 5px rgba(25, 39, 35, 0.24);
}

.fkx-inquiry-segment:focus-visible {
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px rgba(47, 93, 80, 0.55),
        0 2px 5px rgba(25, 39, 35, 0.24);
}

.fkx-inquiry-segment.is-muted {
    opacity: .20;
    filter: saturate(.55);
}

.fkx-inquiry-list-line {
    display: inline-block;
    width: 30px;
    height: 7px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--fkx-inquiry-color);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
    vertical-align: 2px;
}

.fkx-legend-timeline {
    width: 30px !important;
    height: 7px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #3f7898, #4f8568, #b87745) !important;
}

@media (max-width: 900px) {
    .fkx-inquiry-timeline { height: 28px; }
    .fkx-inquiry-segment {
        bottom: calc(var(--fkx-inquiry-lane) * 8px);
        height: 6px;
    }
}

/* X5 Eintragsübersicht: verbindliche Belegung links, offene Nachfrage rechts. */
.fkx-entry-overview {
    margin-top: 28px;
}

.fkx-overview-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.fkx-overview-header h2 {
    margin: 0 0 5px;
    font-size: 24px;
}

.fkx-overview-header p {
    margin: 0;
    color: var(--fkx-muted);
}

.fkx-entry-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 24px;
    align-items: start;
}

.fkx-entry-column {
    margin-top: 0;
    min-width: 0;
}

.fkx-entry-column .fkx-list-header {
    align-items: flex-start;
    margin-bottom: 16px;
}

.fkx-entry-column .fkx-list-header h2 {
    font-size: 21px;
}

.fkx-inquiry-list-panel {
    border-top: 4px solid #6674a0;
}

.fkx-entry-column .fkx-table th,
.fkx-entry-column .fkx-table td {
    padding: 10px 8px;
}

@media (max-width: 1180px) {
    .fkx-entry-columns {
        grid-template-columns: 1fr;
    }

    .fkx-overview-header {
        align-items: stretch;
        flex-direction: column;
    }

    .fkx-overview-header .fkx-search {
        max-width: none;
    }

    .fkx-overview-tools {
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }
}


/* iCal-Synchronisation direkt am Kalender */
.fkx-navigation-actions{display:flex;gap:10px;align-items:center}.fkx-sync-control{display:flex;align-items:center;gap:10px}.fkx-navigation-sync{border:0;cursor:pointer}.fkx-navigation-sync.is-loading{opacity:.72;cursor:wait}.fkx-sync-last-run{max-width:230px;color:#677177;font-size:12px;line-height:1.25}.fkx-sync-last-run.is-error{color:#842029}.fkx-sync-status{margin:-4px 0 16px;padding:11px 14px;border:1px solid #cfe0da;border-radius:9px;background:#eef7f3;color:#285044;font-size:14px;font-weight:700}.fkx-sync-status.is-warning{border-color:#ead7a3;background:#fff7df;color:#70550d}.fkx-sync-status.is-error{border-color:#e5babe;background:#fbe9eb;color:#842029}.fkx-external-source{display:inline-flex;margin-top:5px;padding:3px 7px;border-radius:999px;background:#e8eef6;color:#294f79;font-size:11px;font-weight:700}.fkx-guest-missing{display:inline-flex;margin-top:5px;padding:3px 7px;border-radius:999px;background:#fff0c2;color:#765500;font-size:11px;font-weight:700}@media(max-width:680px){.fkx-navigation-actions{display:grid;grid-template-columns:1fr 1fr}.fkx-sync-control{display:grid;gap:5px}.fkx-navigation-sync{width:100%}.fkx-sync-last-run{max-width:none}}

.fkx-sync-mode{font-size:12px;font-weight:700;color:#218653;white-space:nowrap}.fkx-sync-mode.is-partial{color:#966400}.fkx-sync-mode.is-off{color:#747b80}


/* Buchungsschutz 1.4.5 */
.fkx-booking-lifecycle{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;padding:8px 12px;border-radius:999px;font-size:13px;font-weight:800}
.fkx-booking-lifecycle.is-future{background:#d1e7dd;color:#0f5132}
.fkx-booking-lifecycle.is-current{background:#fff3cd;color:#664d03}
.fkx-booking-lifecycle.is-past{background:#f8d7da;color:#842029}
.fkx-modal-box.is-protected input:disabled,.fkx-modal-box.is-protected select:disabled,.fkx-modal-box.is-protected textarea:disabled{background:#f1f3f4;color:#6c757d;cursor:not-allowed}

/* v006: Zweispaltiger Buchungsdialog mit spaltenweiser Tabulator-Reihenfolge. */
#bookingModal {
    padding: 12px;
}

#bookingModal .fkx-modal-box {
    max-width: 1180px;
    max-height: calc(100vh - 24px);
}

.fkx-booking-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.fkx-booking-column {
    min-width: 0;
}

.fkx-booking-column .fkx-form-section:first-child {
    margin-top: 0;
}

.fkx-form-section-continuation {
    padding-top: 18px;
}

@media (max-width: 980px) {
    #bookingModal .fkx-modal-box {
        max-width: 720px;
    }

    .fkx-booking-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fkx-booking-column-right .fkx-form-section:first-child {
        margin-top: 18px;
    }
}

/* v008: Kompakter Buchungsdialog ohne Funktionsänderung. */
#bookingModal .fkx-modal-box {
    padding: 20px 22px 16px;
}

#bookingModal .fkx-modal-heading {
    margin-bottom: 14px;
}

#bookingModal .fkx-modal-intro {
    margin: -5px 0 12px;
}

#bookingModal .fkx-booking-columns {
    gap: 16px;
}

#bookingModal .fkx-form-section {
    margin-top: 12px;
    padding: 14px;
}

#bookingModal .fkx-form-section h3 {
    margin-bottom: 9px;
}

#bookingModal .fkx-form-grid {
    gap: 10px 12px;
}

#bookingModal .fkx-modal-box label {
    margin-top: 11px;
    margin-bottom: 4px;
}

#bookingModal .fkx-form-grid label,
#bookingModal .fkx-form-section label:first-child,
#bookingModal .fkx-form-section h3 + label {
    margin-top: 0;
}

/* v019b-133c: Portal-Finanzfelder zeilenweise exakt ausrichten. */
#bookingModal .fkx-external-finance-grid {
    align-items: stretch;
}

#bookingModal .fkx-external-finance-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

#bookingModal .fkx-external-finance-field > label {
    display: flex;
    min-height: 2.55em;
    align-items: flex-end;
    margin-bottom: 4px;
    line-height: 1.25;
}

#bookingModal .fkx-external-finance-field > input {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
}

@media (max-width: 680px) {
    #bookingModal .fkx-external-finance-field > label {
        min-height: 0;
    }
}

#bookingModal .fkx-modal-box input,
#bookingModal .fkx-modal-box select,
#bookingModal .fkx-modal-box textarea {
    padding-top: 10px;
    padding-bottom: 10px;
}

#bookingModal .fkx-booking-duration {
    margin-top: 7px;
}

#bookingModal .fkx-field-hint,
#bookingModal .fkx-form-hint,
#bookingModal .fkx-help-text {
    margin-top: 4px;
    line-height: 1.25;
}

#bookingModal textarea {
    min-height: 70px;
}

#bookingModal .fkx-buttons {
    margin-top: 14px;
}

#bookingModal .fkx-form-section-continuation {
    padding-top: 14px;
}

@media (max-width: 980px) {
    #bookingModal .fkx-modal-box {
        padding: 21px;
    }

    #bookingModal .fkx-booking-columns {
        gap: 0;
    }
}

/* v009: Länder-/Vorwahlauswahl mit Flaggen in allen Dropdown-Zeilen */
.fkx-country-select .fkx-country-flag,
.country-select .country-flag { display:none; }
.fkx-native-country-select {
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    padding:0 !important;
    margin:-1px !important;
    overflow:hidden !important;
    clip:rect(0,0,0,0) !important;
    white-space:nowrap !important;
    border:0 !important;
}
.fkx-country-select,
.country-select { position:relative; display:block; overflow:visible; }
.fkx-country-dropdown-button {
    width:100%; min-height:40px; padding:8px 32px 8px 10px;
    display:grid; grid-template-columns:24px minmax(0,1fr) auto; align-items:center; gap:8px;
    border:0; border-radius:7px; background:#fff; color:inherit; font:inherit; text-align:left; cursor:pointer;
}
.fkx-country-select:focus-within,
.country-select:focus-within { border-color:#2f855a; box-shadow:0 0 0 3px rgba(47,133,90,.12); }
.fkx-country-dropdown-button:focus { outline:none; }
.fkx-country-dropdown-flag { display:block; width:22px; height:15px; object-fit:cover; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.14); }
.fkx-country-dropdown-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fkx-country-dropdown-arrow { color:#303438; font-size:.85rem; }
.fkx-country-dropdown-menu {
    position:fixed; z-index:2147483647; padding:5px; overflow-y:auto; overflow-x:hidden;
    overscroll-behavior:contain; touch-action:pan-y; scrollbar-gutter:stable;
    border:1px solid #cbd5d1; border-radius:8px; background:#fff;
    box-shadow:0 12px 28px rgba(0,0,0,.22);
}
.fkx-country-dropdown-option {
    width:100%; padding:8px 10px; display:grid; grid-template-columns:24px minmax(0,1fr); align-items:center; gap:9px;
    border:0; border-radius:6px; background:transparent; color:#303438; font:inherit; text-align:left; cursor:pointer;
}
.fkx-country-dropdown-option:hover,
.fkx-country-dropdown-option.is-active { background:#eef4f1; }
.fkx-country-dropdown-option.is-selected { color:#24483d; font-weight:700; }


/* v010: Telefonfelder breiter, (0)-Hinweis und Gästezahlen in einer Zeile. */
#bookingModal .fkx-grid-full { grid-column: 1 / -1; }
#bookingModal .fkx-phone-input {
    display: grid;
    grid-template-columns: minmax(245px, 1.25fr) auto minmax(180px, 1fr);
    gap: 8px;
    align-items: center;
}
#bookingModal .fkx-country-select-phone { min-width: 0; }
#bookingModal .fkx-phone-trunk-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 7px;
    color: #4f5955;
    font-weight: 700;
    white-space: nowrap;
}
#bookingModal .fkx-person-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (max-width: 1180px) {
    #bookingModal .fkx-phone-input { grid-template-columns: minmax(210px, 1.15fr) auto minmax(150px, 1fr); }
}
@media (max-width: 560px) {
    #bookingModal .fkx-phone-input { grid-template-columns: 1fr auto minmax(120px, 1fr); }
    #bookingModal .fkx-person-counts { grid-template-columns: 1fr 1fr; }
}

/* v019b-6: Der Mitreisenden-Reiter erhält nur noch einen dezenten Hinweis. */
.fkx-booking-tab.is-invalid {
    border-bottom-color: #b85a62;
    color: #7e343b;
    box-shadow: none;
}

/* Fallback für native Formularelemente: bewusst nur am Eingabefeld und ohne
   flächige rote Hinterlegung. Buttons und umgebende Bereiche bleiben neutral. */
#bookingModal input[data-fkx-invalid="1"],
#bookingModal select[data-fkx-invalid="1"],
#bookingModal textarea[data-fkx-invalid="1"] {
    border: 1px solid #c0525b !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(192, 82, 91, 0.22) !important;
}

#bookingModal .fkx-field-has-error {
    box-shadow: none;
    background: transparent;
    padding: 0;
}

#bookingModal .fkx-field-has-error > label {
    color: inherit !important;
}

/* v019b-45: automatisch ermittelte Anrede bleibt dezent gesperrt und kann
   bewusst in den manuellen Modus umgeschaltet werden. */
#bookingModal .fkx-salutation-control {
    display: grid;
    grid-template-columns: minmax(135px, 1fr) auto;
    gap: 6px;
    align-items: stretch;
}
#bookingModal select.fkx-salutation-auto-managed,
#bookingModal select.fkx-salutation-auto-managed:disabled {
    background: #e7e9e8 !important;
    color: #66706c !important;
    border-color: #c7cecb !important;
    opacity: 1;
    cursor: default;
}
#bookingModal .fkx-salutation-manual-button {
    min-height: 40px;
    padding: 7px 10px;
    border: 1px solid #cbd5d1;
    border-radius: 7px;
    background: #eef1f0;
    color: #37403d;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: normal;
    max-width: 165px;
    line-height: 1.15;
}
#bookingModal .fkx-salutation-manual-button:hover:not(:disabled) { background: #e1e7e4; }
#bookingModal .fkx-salutation-manual-button:disabled { color: #8a918e; cursor: default; opacity: .75; }
@media (max-width: 560px) {
    #bookingModal .fkx-salutation-control { grid-template-columns: 1fr; }
}

/* v019b-51: persönlicher Gastzugang */
.fkx-guest-access-section .fkx-inline-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.fkx-guest-access-link{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;margin:10px 0}.fkx-guest-access-link input{min-width:0;font-size:13px}.fkx-guest-access-section .fkx-field-hint.is-success{color:#2f6b3b;font-weight:700}.fkx-guest-access-section .fkx-field-hint.is-warning{color:#8a5d15;font-weight:700}
@media(max-width:650px){.fkx-guest-access-link{grid-template-columns:1fr}.fkx-guest-access-link .fkx-button{justify-self:start}}

/* v019b-53: Prüfung übermittelter Gastdaten */
.fkx-guest-review-modal{z-index:10060}.fkx-guest-review-modal .fkx-modal-box{max-width:1180px;max-height:calc(100vh - 30px)}
.fkx-guest-review-content{display:grid;gap:18px}.fkx-review-loading,.fkx-review-empty-state,.fkx-review-error{padding:18px;border:1px solid #dfe4e2;border-radius:10px;background:#f7f9f8;color:#5c6561}.fkx-review-error{border-color:#e1b4b8;background:#fff2f3;color:#9b2f38}
.fkx-review-submission{border:1px solid #d8dfdc;border-radius:12px;background:#fff;padding:18px;box-shadow:0 4px 14px rgba(0,0,0,.05)}.fkx-review-submission-heading,.fkx-review-person-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.fkx-review-submission-heading h3,.fkx-review-person-heading h4{margin:0}.fkx-review-submission-heading p{margin:4px 0 0;color:#6d7773;font-size:.85rem}.fkx-review-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#fff3cd;color:#755313;font-size:.78rem;font-weight:700}.fkx-review-person{margin-top:16px}.fkx-review-person-heading{margin-bottom:8px}.fkx-review-person-heading span{color:#6d7773;font-size:.82rem}
.fkx-review-table{border:1px solid #dfe4e2;border-radius:9px;overflow:hidden}.fkx-review-header,.fkx-review-row{display:grid;grid-template-columns:minmax(130px,.75fr) minmax(0,1fr) minmax(0,1fr);align-items:stretch}.fkx-review-header{background:#eef3f1;font-size:.8rem;font-weight:800;color:#52605a}.fkx-review-header>div,.fkx-review-row>div{padding:9px 10px;border-right:1px solid #e3e8e6}.fkx-review-header>div:last-child,.fkx-review-row>div:last-child{border-right:0}.fkx-review-row{border-top:1px solid #e3e8e6;font-size:.86rem}.fkx-review-row.is-different{background:#fffaf0}.fkx-review-row.is-same{color:#66706c}.fkx-review-label{font-weight:700}.fkx-review-proposed-choice{display:flex!important;align-items:center!important;gap:8px!important;margin:0!important;font-size:inherit!important;color:inherit!important}.fkx-review-proposed-choice input{width:auto!important;min-height:0!important;margin:0!important}.fkx-review-proposed-choice span{min-width:0;word-break:break-word}
.fkx-review-contact-section{margin-top:14px}.fkx-review-contact-section h4{margin:0 0 7px;font-size:.95rem}.fkx-review-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.fkx-review-contact-grid>div{border:1px solid #dfe4e2;border-radius:9px;padding:10px;background:#fafbfb}.fkx-review-column-title{margin-bottom:7px;font-size:.77rem;font-weight:800;color:#66716d;text-transform:uppercase;letter-spacing:.03em}.fkx-review-contact-item{display:grid;grid-template-columns:minmax(70px,.35fr) 1fr;gap:8px;padding:7px 0;border-top:1px solid #e8ecea;font-size:.84rem}.fkx-review-contact-item:first-of-type{border-top:0}.fkx-review-contact-item small{grid-column:1/-1;color:#6d7773}.fkx-review-contact-item.is-new{display:grid!important;grid-template-columns:auto 1fr!important;align-items:start!important;margin:0!important}.fkx-review-contact-item.is-new>input{width:auto!important;min-height:0!important;margin:3px 0 0!important}.fkx-review-contact-item.is-new>span{display:grid;grid-template-columns:minmax(70px,.35fr) 1fr;gap:8px}.fkx-review-contact-item.is-new small{grid-column:1/-1;color:#2f6b3b;font-weight:700}.fkx-review-contact-item.is-existing small{color:#6d7773}.fkx-review-empty{padding:5px 0;color:#7b8581;font-size:.84rem}
.fkx-review-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid #e3e8e6}
body.fkx-review-modal-open{overflow:hidden}
@media(max-width:760px){.fkx-guest-review-modal{padding:8px}.fkx-guest-review-modal .fkx-modal-box{max-height:calc(100vh - 16px);padding:18px}.fkx-review-header,.fkx-review-row{grid-template-columns:1fr}.fkx-review-header{display:none}.fkx-review-row>div{border-right:0}.fkx-review-current::before{content:"Aktuell: ";font-weight:700}.fkx-review-proposed::before{content:"Vom Gast: ";font-weight:700}.fkx-review-contact-grid{grid-template-columns:1fr}.fkx-review-submission-heading,.fkx-review-person-heading{flex-direction:column;gap:5px}}

/* v019b-55: Gastzugang – versteckte Linkzeile darf nicht durch display:grid sichtbar bleiben. */
.fkx-guest-access-link[hidden]{display:none!important}

/* v019b-90: Angebotsstatus im Vermieterdialog */
.fkx-offer-status{margin:0 0 8px;font-size:15px;font-weight:800;color:#244f42}
.fkx-offer-section .fkx-button{margin-top:4px}

/* v019b-95 – Angebotsdialog kompakter, bearbeitbar und klar gegliedert */
.fkx-dialog.fkx-offer-create-dialog{
    width:min(92vw,780px);
    max-width:780px;
    max-height:calc(100vh - 40px);
    display:flex;
    flex-direction:column;
}
.fkx-offer-create-body{
    overflow-y:auto;
    overflow-x:hidden;
    white-space:normal;
    padding:18px 22px 20px;
}
.fkx-offer-breakdown{
    margin:0;
    padding:14px 16px;
    border:1px solid #e1e7e4;
    border-radius:10px;
    background:#fbfcfc;
    color:#303438;
    font:inherit;
    line-height:1.48;
    white-space:pre-wrap;
}
.fkx-offer-discount-box{
    margin-top:14px;
    padding:14px 16px;
    border:1px solid #d6e2dd;
    border-radius:10px;
    background:#f4f8f6;
}
.fkx-offer-discount-box h3{
    margin:0 0 10px;
    font-size:16px;
    color:#244f42;
}
.fkx-offer-discount-grid{
    display:grid;
    grid-template-columns:160px 110px 280px;
    gap:10px;
    align-items:end;
    justify-content:start;
}
.fkx-offer-discount-grid label{
    display:grid;
    gap:4px;
    min-width:0;
    font-size:12.5px;
    font-weight:700;
    color:#303438;
}
.fkx-offer-discount-grid .fkx-input{
    width:100%;
    min-height:36px;
    height:36px;
    padding:6px 9px;
}
.fkx-offer-discount-error{
    margin-top:8px;
    color:#a32626;
    font-size:13px;
    font-weight:700;
}
.fkx-offer-discount-summary{
    display:grid;
    gap:4px;
    width:min(100%,390px);
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid #d6e2dd;
    font-size:14px;
}
.fkx-offer-discount-summary > div{
    display:flex;
    justify-content:space-between;
    gap:16px;
}
.fkx-offer-discount-summary .is-total{
    margin-top:2px;
    padding-top:7px;
    border-top:1px solid #d6e2dd;
    color:#244f42;
    font-size:17px;
    font-weight:800;
}
.fkx-offer-availability-note{
    margin:12px 0 0;
    padding:10px 12px;
    border-left:3px solid #7aa291;
    background:#f7faf9;
    color:#4f5d57;
    font-size:13px;
    line-height:1.45;
}
@media (max-width:760px){
    .fkx-dialog.fkx-offer-create-dialog{width:min(96vw,680px);max-height:calc(100vh - 20px)}
    .fkx-offer-discount-grid{grid-template-columns:150px 105px minmax(180px,1fr)}
}
@media (max-width:560px){
    .fkx-offer-discount-grid{grid-template-columns:1fr 110px}
    .fkx-offer-discount-reason{grid-column:1/-1}
    .fkx-offer-create-body{padding:16px}
}
@media (max-width:390px){
    .fkx-offer-discount-grid{grid-template-columns:1fr}
    .fkx-offer-discount-reason{grid-column:auto}
}


/* v019b-99: Vermieterdialog neu proportioniert und Vertragsnachweis klar gruppiert. */
#bookingModal {
    padding: 12px;
}
#bookingModal .fkx-modal-box {
    display: flex;
    flex-direction: column;
    width: min(1180px, calc(100vw - 24px));
    max-width: 1180px;
    height: auto;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
    padding: 18px 20px 14px;
}
@supports not (height: 100dvh) {
    #bookingModal .fkx-modal-box {
        max-height: calc(100vh - 24px);
    }
}
#bookingModal .fkx-modal-heading {
    flex: 0 0 auto;
    margin-bottom: 8px;
}
#bookingModal .fkx-modal-heading h2 {
    font-size: 24px;
}
#bookingModal .fkx-booking-lifecycle {
    flex: 0 0 auto;
    margin: 0 0 8px;
    padding: 7px 11px;
}
#bookingModal .fkx-modal-intro {
    flex: 0 0 auto;
    margin: 0 0 9px;
}
#bookingModal .fkx-booking-tabs {
    flex: 0 0 auto;
    margin-bottom: 8px;
}
#bookingModal #bookingTabPanel,
#bookingModal #travelersTabPanel {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    scrollbar-gutter: stable;
}
#bookingModal .fkx-booking-columns {
    gap: 12px;
}
#bookingModal .fkx-form-section {
    margin-top: 9px;
    padding: 12px 13px;
}
#bookingModal .fkx-form-section h3 {
    margin-bottom: 8px;
    font-size: 16px;
}
#bookingModal .fkx-form-section-continuation {
    padding-top: 12px;
}
#bookingModal .fkx-form-grid {
    gap: 8px 10px;
}
#bookingModal .fkx-modal-box label {
    margin-top: 8px;
    margin-bottom: 3px;
}
#bookingModal .fkx-modal-box input,
#bookingModal .fkx-modal-box select,
#bookingModal .fkx-modal-box textarea {
    min-height: 39px;
    padding-top: 8px;
    padding-bottom: 8px;
}
#bookingModal textarea {
    min-height: 60px;
}
#bookingModal .fkx-field-hint,
#bookingModal .fkx-form-hint,
#bookingModal .fkx-help-text {
    margin-top: 3px;
    line-height: 1.3;
}
#bookingModal .fkx-buttons {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e1e6e3;
}
#bookingModal #bookingMessage:not(:empty) {
    flex: 0 0 auto;
    margin-top: 9px;
}
#bookingModal .fkx-contact-party-section > h3 {
    margin-bottom: 8px;
}
#bookingModal .fkx-legal-acceptance-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "heading action"
        "status action";
    gap: 4px 12px;
    align-items: center;
}
#bookingModal .fkx-legal-acceptance-section[hidden] {
    display: none;
}
#bookingModal .fkx-legal-acceptance-section h3 {
    grid-area: heading;
    margin: 0;
}
#bookingModal #legalAcceptanceStatus {
    grid-area: status;
    display: grid;
    gap: 2px;
    margin: 0;
    color: #53615b;
}
#bookingModal #legalAcceptanceStatus strong {
    color: #263c34;
    font-size: 13px;
}
#bookingModal #legalAcceptanceStatus span {
    font-size: 12px;
}
#bookingModal #legalAcceptanceLink {
    grid-area: action;
    align-self: center;
    min-height: 38px;
    padding: 8px 12px;
    white-space: nowrap;
}
@media (max-width: 980px) {
    #bookingModal .fkx-modal-box {
        width: min(760px, calc(100vw - 20px));
        max-width: 760px;
        max-height: calc(100dvh - 20px);
        padding: 16px;
    }
    #bookingModal .fkx-booking-columns {
        gap: 0;
    }
}
@media (max-width: 680px) {
    #bookingModal { padding: 6px; }
    #bookingModal .fkx-modal-box {
        width: calc(100vw - 12px);
        max-height: calc(100dvh - 12px);
        padding: 14px 12px 10px;
    }
    #bookingModal .fkx-legal-acceptance-section {
        grid-template-columns: 1fr;
        grid-template-areas: "heading" "status" "action";
    }
    #bookingModal #legalAcceptanceLink {
        justify-self: start;
        margin-top: 5px;
    }
}

#bookingModal .fkx-buttons-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
#bookingModal .fkx-booking-decision-actions,
#bookingModal .fkx-booking-edit-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
#bookingModal .fkx-booking-decision-actions {
    padding-right: 14px;
    border-right: 1px solid #d8dfdc;
}
#bookingModal .fkx-booking-decision-actions[hidden] { display: none !important; }
#bookingModal .fkx-booking-decision-label {
    margin-right: 2px;
    color: #53615c;
    font-size: 13px;
    font-weight: 700;
}
#bookingModal #saveBooking:disabled {
    cursor: default;
    opacity: .45;
}
@media (max-width: 760px) {
    #bookingModal .fkx-buttons-right { align-items: stretch; }
    #bookingModal .fkx-booking-decision-actions,
    #bookingModal .fkx-booking-edit-actions { width: 100%; flex-wrap: wrap; }
    #bookingModal .fkx-booking-decision-actions { padding-right: 0; padding-bottom: 8px; border-right: 0; border-bottom: 1px solid #d8dfdc; }
}

/* v019b-132: eindeutige Herkunftsfarben für Buchungen und externe Belegungen */
:root {
    --fkx-booking-source: #b8d5ee;
    --fkx-booking-source-text: #16496f;
    --fkx-legacy-manual: #8fc8a4;
    --fkx-legacy-manual-text: #174e32;
    --fkx-airbnb-source: #f2adb5;
    --fkx-airbnb-source-text: #701822;
    --fkx-external-block: #879199;
    --fkx-external-block-text: #1f2528;
}

.fkx-booking-channel-section {
    margin-top: 14px;
}

.fkx-booking-channel-section[hidden],
#externalReferenceRow[hidden] {
    display: none !important;
}

.fkx-day.status-belegt.fkx-source-legacy-manual.booked { background: var(--fkx-legacy-manual); color: var(--fkx-legacy-manual-text); }
.fkx-day.status-belegt.fkx-source-booking.booked { background: var(--fkx-booking-source); color: var(--fkx-booking-source-text); }
.fkx-day.status-belegt.fkx-source-airbnb.booked { background: var(--fkx-airbnb-source); color: var(--fkx-airbnb-source-text); }
.fkx-day.status-gesperrt.fkx-source-external-block.booked,
.fkx-day.status-gesperrt.fkx-source-ical.booked { background: var(--fkx-external-block); color: var(--fkx-external-block-text); }

.fkx-day.status-belegt.fkx-source-legacy-manual.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-legacy-manual) 50%,var(--fkx-legacy-manual) 100%); color: var(--fkx-legacy-manual-text); }
.fkx-day.status-belegt.fkx-source-legacy-manual.departure { background: linear-gradient(135deg,var(--fkx-legacy-manual) 0%,var(--fkx-legacy-manual) 49%,#fff 50%,#fff 100%); color: var(--fkx-legacy-manual-text); }
.fkx-day.status-belegt.fkx-source-booking.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-booking-source) 50%,var(--fkx-booking-source) 100%); color: var(--fkx-booking-source-text); }
.fkx-day.status-belegt.fkx-source-booking.departure { background: linear-gradient(135deg,var(--fkx-booking-source) 0%,var(--fkx-booking-source) 49%,#fff 50%,#fff 100%); color: var(--fkx-booking-source-text); }
.fkx-day.status-belegt.fkx-source-airbnb.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-airbnb-source) 50%,var(--fkx-airbnb-source) 100%); color: var(--fkx-airbnb-source-text); }
.fkx-day.status-belegt.fkx-source-airbnb.departure { background: linear-gradient(135deg,var(--fkx-airbnb-source) 0%,var(--fkx-airbnb-source) 49%,#fff 50%,#fff 100%); color: var(--fkx-airbnb-source-text); }
.fkx-day.status-gesperrt.fkx-source-external-block.arrival,
.fkx-day.status-gesperrt.fkx-source-ical.arrival { background: linear-gradient(135deg,#fff 0%,#fff 49%,var(--fkx-external-block) 50%,var(--fkx-external-block) 100%); color: var(--fkx-external-block-text); }
.fkx-day.status-gesperrt.fkx-source-external-block.departure,
.fkx-day.status-gesperrt.fkx-source-ical.departure { background: linear-gradient(135deg,var(--fkx-external-block) 0%,var(--fkx-external-block) 49%,#fff 50%,#fff 100%); color: var(--fkx-external-block-text); }

.fkx-legend-legacy-manual { background: var(--fkx-legacy-manual); }
.fkx-legend-booking-source { background: var(--fkx-booking-source); }
.fkx-legend-airbnb-source { background: var(--fkx-airbnb-source); }
.fkx-legend-external-block { background: var(--fkx-external-block); }

.fkx-status-source-legacy_manual { background: var(--fkx-legacy-manual) !important; color: var(--fkx-legacy-manual-text) !important; }
.fkx-status-source-booking { background: var(--fkx-booking-source) !important; color: var(--fkx-booking-source-text) !important; }
.fkx-status-source-airbnb { background: var(--fkx-airbnb-source) !important; color: var(--fkx-airbnb-source-text) !important; }
.fkx-status-source-external_block,
.fkx-status-source-ical { background: var(--fkx-external-block) !important; color: #fff !important; }


/* v019b-132b: technische iCal-Belegungen getrennt von fachlichen Vorgängen */
.fkx-technical-ical {
    margin-top: 18px;
    border: 1px solid #d7dde0;
    border-radius: 10px;
    background: #f7f9fa;
}

.fkx-technical-ical > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    color: #46545c;
    font-weight: 700;
    list-style: none;
}

.fkx-technical-ical > summary::-webkit-details-marker { display: none; }
.fkx-technical-ical > summary::before {
    content: "▸";
    margin-right: 7px;
    color: #66747c;
}
.fkx-technical-ical[open] > summary::before { content: "▾"; }

.fkx-technical-ical-count {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e2e7ea;
    color: #55636b;
    font-size: 12px;
    white-space: nowrap;
}

.fkx-technical-ical-hint {
    margin: 0;
    padding: 0 14px 12px;
    color: var(--fkx-muted);
    font-size: 12px;
    line-height: 1.45;
}

.fkx-technical-ical .fkx-table-wrapper {
    margin: 0 10px 10px;
    background: #ffffff;
}

.fkx-technical-ical-table td,
.fkx-technical-ical-table th {
    font-size: 12px;
}


@media (max-width: 680px) {
    .fkx-overview-tools { grid-template-columns: 1fr; }
}

/* v019b-138: Zahlungsverwaltung im Buchungsdialog. */
.fkx-payments-panel{padding-top:2px}
.fkx-payment-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:8px 0 10px}
.fkx-payment-summary-card{border:1px solid #d8e1dd;border-radius:10px;background:#f7faf8;padding:13px 14px}
.fkx-payment-summary-label{font-weight:800;color:#2f5d50;margin-bottom:8px}
.fkx-payment-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.fkx-payment-summary-head .fkx-payment-summary-label{margin-bottom:0}
.fkx-payment-status{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border-radius:999px;background:#e8ecea;color:#48514e;font-size:.78rem;font-weight:800;white-space:nowrap}
.fkx-payment-status-paid{background:#dcefe5;color:#245f48}
.fkx-payment-status-partial{background:#fff0c9;color:#7a5b09}
.fkx-payment-status-open{background:#edf0ef;color:#4c5652}
.fkx-payment-status-unknown{background:#edf0f4;color:#5b6470}
.fkx-payment-summary-card.is-overdue{border-color:#e1b6b6;background:#fff8f8}
.fkx-payment-summary-card.is-overdue .fkx-payment-status{background:#f7dddd;color:#8c2f2f}
.fkx-payment-due-row{display:flex;align-items:flex-end;gap:8px;margin-top:11px;padding-top:10px;border-top:1px solid #d8e1dd}
.fkx-payment-due-row label{display:grid;gap:4px;flex:1;min-width:0;color:#65706c;font-size:.82rem;font-weight:700}
.fkx-payment-due-row input{width:100%;min-height:36px;border:1px solid #cdd6d2;border-radius:7px;padding:6px 8px;background:#fff;color:#2d3431}
.fkx-payment-due-hint{display:block;margin-top:2px;color:#75817d;font-size:.76rem;font-weight:600}
.fkx-payment-due-save{min-height:36px;padding:7px 10px;font-size:.82rem;white-space:nowrap}
.fkx-payment-summary-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;font-size:.9rem}
.fkx-payment-summary-values span{display:grid;gap:3px;color:#65706c}
.fkx-payment-summary-values strong{color:#303438;font-size:1rem}
.fkx-payment-overpaid{margin-top:8px;padding-top:7px;border-top:1px solid #d8e1dd;color:#8a5a12;font-weight:700;font-size:.88rem}
.fkx-payment-entry{margin-top:18px;padding-top:16px;border-top:1px solid #e0e5e3}
.fkx-payment-entry h4{margin:0 0 12px;color:#2f5d50}
.fkx-payment-entry-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.fkx-payment-list{margin-top:18px}
.fkx-payment-table-wrap{overflow:auto;border:1px solid #dfe4e6;border-radius:10px}
.fkx-payment-table{width:100%;border-collapse:collapse;min-width:720px}
.fkx-payment-table th,.fkx-payment-table td{padding:10px 11px;border-bottom:1px solid #e4e8e6;text-align:left;vertical-align:top}
.fkx-payment-table th{background:#f3f6f4;color:#46514d;font-size:.88rem}
.fkx-payment-table tr:last-child td{border-bottom:0}
.fkx-payment-delete{padding:6px 9px;font-size:.84rem}
.fkx-payment-empty{padding:14px;border:1px dashed #ccd5d1;border-radius:9px;color:#6c7571;background:#fafcfb}
#paymentMessage:not(:empty){margin-top:10px;padding:9px 10px;border-radius:8px;background:#eef4f1;color:#2f5d50;font-weight:700}
@media (max-width:900px){.fkx-payment-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fkx-payment-summary-values{grid-template-columns:1fr}}
@media (max-width:560px){.fkx-payment-entry-grid{grid-template-columns:1fr}.fkx-payment-due-row{align-items:stretch;flex-direction:column}.fkx-payment-due-save{width:100%}}

/* v019b-140a: kompakte Druckaktionen und Zahlungsplan-Regel */
.fkx-list-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.fkx-list-print{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:8px 11px;border-radius:7px;background:#eef2f0;color:#294f45;text-decoration:none;font-weight:700;font-size:.88rem;border:1px solid #d5dfdb}
.fkx-list-print:hover{background:#e4ece8}
.fkx-payment-rule{margin:7px 0 10px;color:#44554f;font-size:.88rem;font-weight:700;line-height:1.35}

/* v019b-140b: kompakte Startseitenliste und Detail-Link */
.fkx-list-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}

/* v019b-140c: ruhigere kompakte Buchungsübersicht */
.fkx-compact-booking-table{table-layout:fixed;font-size:12px}
.fkx-compact-booking-table th,.fkx-compact-booking-table td{padding:10px 7px;overflow:visible}
.fkx-compact-booking-table th:nth-child(1){width:18%}
.fkx-compact-booking-table th:nth-child(2){width:35%}
.fkx-compact-booking-table th:nth-child(3){width:15%}
.fkx-compact-booking-table th:nth-child(4){width:19%}
.fkx-compact-booking-table th:last-child{width:88px}
.fkx-compact-period span{color:var(--fkx-muted)}
.fkx-compact-guest{min-width:0}
.fkx-compact-guest>strong{display:block;margin-bottom:4px;line-height:1.25}
.fkx-compact-contact-line{display:block;white-space:nowrap;font-size:11px;line-height:1.4;color:#46545c}
.fkx-compact-persons{white-space:nowrap}
.fkx-compact-status-cell{vertical-align:middle!important}
.fkx-compact-status{display:grid;align-content:center;gap:2px;width:100%;min-height:44px;padding:6px 8px;border-radius:4px;font-size:11px;line-height:1.15;text-align:left;box-sizing:border-box}
.fkx-compact-status>span,.fkx-compact-status>strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fkx-compact-status>strong{font-size:12px}
.fkx-compact-action{text-align:right}
.fkx-compact-action .fkx-table-edit{min-width:76px;padding-left:9px;padding-right:9px}
@media(max-width:1500px){.fkx-compact-booking-table{min-width:610px}.fkx-compact-booking-table-wrap{overflow-x:auto}}
@media(max-width:1180px){.fkx-compact-booking-table{min-width:600px}.fkx-compact-contact-line{font-size:10.5px}}
@media(max-width:760px){.fkx-compact-booking-table{min-width:620px}}

/* v019b-140d: nochmals reduzierte kompakte Startseitenliste */
.fkx-compact-booking-table th:nth-child(1){width:26%}
.fkx-compact-booking-table th:nth-child(2){width:34%}
.fkx-compact-booking-table th:nth-child(3){width:16%}
.fkx-compact-booking-table th:nth-child(4){width:14%}
.fkx-compact-period{white-space:nowrap;color:#1f292e;font-weight:600}
.fkx-compact-status{display:flex;align-items:center;justify-content:flex-start;min-height:34px;padding:6px 8px;border-radius:3px;font-size:11.5px;line-height:1.15;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1500px){.fkx-compact-booking-table{min-width:690px}}
@media(max-width:1180px){.fkx-compact-booking-table{min-width:680px}}
@media(max-width:760px){.fkx-compact-booking-table{min-width:700px}}


/* v019b-141: Sperrgrund und breiteres Statusfeld */
.fkx-block-reason-section{margin-top:14px}.fkx-block-reason-section[hidden]{display:none!important}.fkx-block-reason-section input{width:100%}
.fkx-compact-booking-table th:nth-child(1){width:25%}.fkx-compact-booking-table th:nth-child(2){width:31%}.fkx-compact-booking-table th:nth-child(3){width:13%}.fkx-compact-booking-table th:nth-child(4){width:20%}.fkx-compact-status{min-width:104px}
@media(max-width:1500px){.fkx-compact-booking-table{min-width:720px}}@media(max-width:1180px){.fkx-compact-booking-table{min-width:710px}}@media(max-width:760px){.fkx-compact-booking-table{min-width:730px}}


/* v019b-141a: Zeitraum dreizeilig, Status zentriert, Sperrgrund sichtbar */
.fkx-compact-period{white-space:normal;color:#1f292e;font-weight:600;line-height:1.18}
.fkx-compact-period>span{display:block;color:inherit!important;white-space:nowrap}
.fkx-compact-status{min-width:120px;justify-content:center;text-align:center;flex-direction:column;gap:2px;white-space:normal;overflow:visible;text-overflow:clip}
.fkx-compact-status>strong,.fkx-compact-status>span{display:block;width:100%;text-align:center;white-space:normal;overflow-wrap:anywhere}
.fkx-compact-status>span{font-size:10.5px;font-weight:600;line-height:1.15}
.fkx-compact-booking-table th:nth-child(1){width:20%}
.fkx-compact-booking-table th:nth-child(2){width:31%}
.fkx-compact-booking-table th:nth-child(3){width:13%}
.fkx-compact-booking-table th:nth-child(4){width:25%}


/* v019b-141c: Sperrstatus maximal zweizeilig, technische Hinweise niemals als Grund */
.fkx-compact-booking-table th:nth-child(4){width:27%}
.fkx-compact-status{min-width:138px;max-width:100%;min-height:38px;padding:6px 10px}
.fkx-compact-status>strong,.fkx-compact-status>span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;overflow-wrap:normal!important}
.fkx-compact-status>span{font-size:10.5px}


/* v019b-141d: zweifarbige Übergangstage (Abreise -> Folgezustand) */
.fkx-day.fkx-transition-day {
    background: linear-gradient(
        135deg,
        var(--fkx-transition-before) 0%,
        var(--fkx-transition-before) 46%,
        #ffffff 47%,
        #ffffff 53%,
        var(--fkx-transition-after) 54%,
        var(--fkx-transition-after) 100%
    ) !important;
    color: var(--fkx-text) !important;
    font-weight: 700;
}

/* v019b-141e: kompakte Zeitraumdarstellung und Zahlungsregel-Abstand */
.fkx-compact-period>span:nth-child(2){text-align:center}

/* v019b-141f: „bis“ innerhalb der Datumsbreite zentrieren */
.fkx-compact-period>span{
    width:10ch;
    box-sizing:border-box;
}
.fkx-compact-period>span:nth-child(1),
.fkx-compact-period>span:nth-child(3){text-align:left}
.fkx-compact-period>span:nth-child(2){text-align:center}

/* v019b-149: zentrale Kommunikation in der Buchung */
#bookingModal #communicationTabPanel{
    flex:0 1 auto;
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:5px;
    scrollbar-gutter:stable;
}
#communicationTabPanel[hidden]{display:none!important}
.fkx-communication-panel{padding-top:2px}
.fkx-communication-actions{display:grid;gap:10px;margin-top:10px}
.fkx-communication-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 15px;border:1px solid #d8e1dd;border-radius:10px;background:#fff}
.fkx-communication-card.is-ready{border-left:4px solid #2f5d50;background:#f8fbf9}
.fkx-communication-card.is-muted{background:#fafbfb;color:#66716c}
.fkx-communication-card-copy{min-width:0}
.fkx-communication-card h4{margin:0 0 5px;font-size:15px;color:#2f5d50}
.fkx-communication-card p{margin:0;font-size:.9rem;line-height:1.5;color:#5d6863}
.fkx-communication-card-action{display:flex;align-items:center;justify-content:flex-end;min-width:190px}
.fkx-communication-disabled{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border-radius:8px;background:#eef1f0;color:#68736e;font-size:.84rem;font-weight:700;text-align:center}
@media(max-width:760px){.fkx-communication-card{grid-template-columns:1fr}.fkx-communication-card-action{justify-content:flex-start;min-width:0}.fkx-communication-card-action .fkx-button{width:100%}}

/* v019b-197: Kommunikationschronik */
.fkx-communication-history-section{margin-top:26px;padding-top:20px;border-top:1px solid #dfe6e3}
.fkx-communication-history-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:10px}
.fkx-communication-history-head h3{margin:0;color:#2f5d50}
.fkx-communication-history-list{display:grid;gap:10px}
.fkx-communication-history-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:start;padding:14px 15px;border:1px solid #d8e1dd;border-radius:10px;background:#fff}
.fkx-communication-history-card.is-sent{border-left:4px solid #2f5d50}
.fkx-communication-history-card.is-failed{border-left:4px solid #a64040;background:#fffafa}
.fkx-communication-history-main{min-width:0}
.fkx-communication-history-title{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:#55615c;font-size:.86rem}
.fkx-communication-history-title strong{color:#2f5d50;font-size:.98rem}
.fkx-communication-status-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#e7f1ec;color:#2f5d50;font-weight:900}
.is-failed .fkx-communication-status-icon{background:#f5dddd;color:#8d3030}
.fkx-communication-history-subject{margin-top:7px;font-weight:700;overflow-wrap:anywhere}
.fkx-communication-history-meta,.fkx-communication-history-attachments{margin-top:5px;color:#68736e;font-size:.84rem;line-height:1.45;overflow-wrap:anywhere}
.fkx-communication-history-error{margin-top:8px;padding:8px 10px;border-radius:7px;background:#f8e7e7;color:#812f2f;font-size:.84rem;overflow-wrap:anywhere}
.fkx-communication-history-actions{display:grid;justify-items:stretch;gap:7px;min-width:180px}
.fkx-communication-history-status{font-size:.8rem;font-weight:800;color:#5e6b65;text-align:right}
.fkx-communication-history-pdf-deleted{display:inline-flex;justify-content:center;padding:8px 10px;border-radius:8px;background:#f0f1f1;color:#757b78;font-size:.82rem;font-weight:700}
@media(max-width:760px){.fkx-communication-history-card{grid-template-columns:1fr}.fkx-communication-history-actions{min-width:0}.fkx-communication-history-status{text-align:left}}
