body {
    margin: 0;
    background: #f3f0ea;
    color: #222;
    font-family: Verdana, sans-serif;
    font-size: 12px;
}

a {
    color: #c75518;
    text-decoration: none;
}

a.header-login-button,
a.header-login-button:hover,
a.header-login-button:focus-visible {
    color: #ffffff !important;
}

.page-shell {
    padding: 8px 12px 16px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 10px;
}

.brand-card,
.header-actions-card,
.help-card {
    background: #fff;
    border: 1px solid #ddd5c9;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}

.brand-card {
    width: 490px;
    padding: 10px 12px 12px;
}

.brand-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.brand-logo-link {
    display: block;
    width: 136px;
    height: 108px;
    flex-shrink: 0;
    line-height: 0;
}

.brand-logo-image {
    display: block;
    width: 112px;
    height: auto;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    min-height: 108px;
    padding-top: 2px;
}

.brand-title {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #2a241d;
    line-height: 1.15;
    max-width: 300px;
}

.brand-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    margin-top: 0;
    flex-wrap: wrap;
}

.header-actions-card {
    padding: 10px 12px;
    min-width: 360px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.default-button,
button.default-button,
a.default-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 13px;
    border: 1px solid #d1cbc0;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f2ea 100%);
    color: #4d4d4d;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.default-button:hover,
button.default-button:hover,
a.default-button:hover {
    background: #fffaf3;
    border-color: #c6bba9;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.abmelden-button {
    color: #c75518;
    border-color: #e0b497;
}

.header-help,
.header-help-toggle {
    min-width: 30px;
}

.nav-arrow {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 14px;
}

.date-switcher-form {
    display: inline-flex;
}

.date-switcher-input,
input[type="email"],
input[type="password"],
input[type="text"] {
    box-sizing: border-box;
    border: 1px solid #d1cbc0;
    border-radius: 9px;
    background: #fff;
    color: #333;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    padding: 6px 10px;
}

.date-picker-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.date-picker-label {
    display: inline-block;
    padding: 0 8px;
    min-height: 30px;
    line-height: 30px;
    min-width: 80px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}
.date-switcher-input--overlay {
    position: absolute;
    top: 0; left: 0;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.date-switcher-input {
    width: 126px;
    min-height: 30px;
    text-align: center;
}

#content {
    margin-top: 8px;
}

.success-message,
.error-message {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 3px;
    color: #fff;
}

.success-message { background: #5f8a3b; }
.error-message { background: #a84433; }

.help-panel {
    margin-bottom: 12px;
}

.help-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.help-card {
    padding: 18px 20px;
}

.help-card__eyebrow {
    margin: 0 0 10px;
    color: #a54c1c;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.help-card__title {
    margin: 0 0 12px;
    font-family: Georgia, serif;
    font-size: 28px;
    line-height: 1.1;
}

.help-card__text {
    margin: 0 0 16px;
    color: #5f574c;
    line-height: 1.45;
}

.help-card__status {
    border: 1px solid #dcccb5;
    border-radius: 14px;
    background: #f3eadc;
    padding: 14px;
}

.help-card__status-label {
    display: block;
    margin-bottom: 6px;
    color: #8c765e;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.help-card__list {
    margin: 0;
    padding-left: 20px;
    color: #5f574c;
    line-height: 1.5;
}

.help-card__list li + li {
    margin-top: 8px;
}

.calendar-layout {
    background: #f8f6f2;
    border: 1px solid #ddd5c8;
    box-shadow: 0 1px 2px rgba(79, 58, 33, 0.05);
    padding: 8px 0 0;
}

.calendar-wrap {
    overflow-x: auto;
}

.booking-grid {
    width: 100%;
    min-width: 1180px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.booking-grid td {
    border-right: 1px solid #d8d0c4;
    border-bottom: 1px solid #d8d0c4;
    vertical-align: top;
}

.booking-grid tr td:first-child {
    border-left: 1px solid #d8d0c4;
}

.calendar-date-row td,
.calendar-square-row td,
.footer-date-row td {
    background: #ffffff;
}

.time-spacer,
.time-side-head {
    width: 68px;
}

.day-header-cell {
    text-align: center;
    padding: 8px 0 9px;
    border-top: 1px solid #e8e8e8;
    border-right: 1px solid #ece7dc;
    background: #ffffff;
}

.day-header-cell--today {
    background: #fff8f6 !important;
}

.day-header-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: "Red Hat Text", sans-serif;
}

.day-header-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #151515;
    font-family: "Red Hat Display", sans-serif;
}

.day-header-date {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6a6e73;
    font-family: "Red Hat Text", sans-serif;
}

.day-header-cell--today .day-header-name,
.day-header-cell--today .day-header-date {
    color: #bf4316;
}

.square-head-cell {
    width: calc((100% - 76px) / 9);
    min-width: 0;
    text-align: center;
    padding: 6px 4px 7px;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
    background: #ffffff;
}

.square-head-cell--active {
    background: #ffffff !important;
}

.square-head-cell--today {
    background: #fff8f6 !important;
}

.square-head-title {
    display: block;
    font-family: "Red Hat Display", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #bf4316;
    line-height: 1.15;
}

.square-head-alias {
    display: block;
    margin-top: 2px;
    font-family: "Red Hat Text", sans-serif;
    font-size: 10px;
    color: #bf4316;
    line-height: 1.2;
    letter-spacing: 0;
}

.time-side-head {
    padding: 6px 5px;
    color: #6a6e73;
    font-size: 12px;
    font-weight: 500;
    background: #ffffff;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
}

.time-spacer {
    background: #ffffff;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
}
.time-cell {
    background: #faf8f4;
    padding: 7px 4px 5px;
    white-space: nowrap;
}

.time-main {
    display: block;
    font-family: "Red Hat Display", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0;
    color: #1f1f1f;
}

.time-sub {
    display: block;
    color: #9ca9bc;
    font-size: 10px;
    line-height: 1.15;
    margin-top: 3px;
}

.calendar-core-row td {
    height: 44px;
}

.calendar-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    height: calc(100% - 4px);
    margin: 2px;
    padding: 5px 8px;
    text-align: center;
    border-radius: 2px;
    color: #333;
    box-sizing: border-box;
}

/* Free, bookable slot — white, highlights on hover (matches legacy default3.css). */
.cc-free {
    background: #fff;
}

/* Expired/past slot — warm grey, blends into the page background, non-interactive. */
.cc-over {
    background: #f7f4ef;
    color: #9a938a;
    cursor: default;
}

a.cc-free:hover,
.guest-login-cell:hover {
    background: #fdf0e1;
}

.cc-own,
.cc-single-future {
    background: #a9d1ef;
    color: #163a52;
}

a.cc-own:hover {
    background: #98c4e6;
}

.cc-single {
    background: #ddd8d0;
    color: #444;
}

.slot-cell--past {
    background: #efebe4;
    color: #7b7369;
    box-shadow: inset 0 0 0 1px #e1d7ca;
}

.slot-cell--past.cc-own,
.slot-cell--past.cc-single-future,
.slot-cell--past.cc-single {
    background: #ddd7cf;
    color: #5f574c;
}

.slot-cell--past .cc-label-secondary {
    color: rgba(70, 62, 54, 0.54);
}

.slot-cell--past::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(120,105,89,0.05));
    pointer-events: none;
}

.cc-label-primary {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.cc-label-secondary {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 3px;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.46);
    line-height: 1.15;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.event-cell {
    position: relative;
    background: linear-gradient(180deg, rgba(236, 168, 165, 0.9) 0%, rgba(230, 154, 151, 0.92) 100%);
}

.event-cell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(60deg, transparent 32%, rgba(255,255,255,0.08) 32%, rgba(255,255,255,0.08) 36%, transparent 36%),
        linear-gradient(-60deg, transparent 32%, rgba(255,255,255,0.05) 32%, rgba(255,255,255,0.05) 36%, transparent 36%);
    opacity: 0.34;
}

.event-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    padding: 10px 14px;
    box-sizing: border-box;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.1px;
    text-align: center;
    color: #352525;
}

a.event-label {
    height: 100%;
    text-decoration: none;
    cursor: pointer;
}

.event-cell--editable:hover .event-label,
.event-cell--editable:focus-within .event-label {
    color: #241313;
    text-decoration: underline;
}

.booking-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.35);
}

.booking-modal__viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 20px;
}

.booking-modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #d9d2c7;
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

.booking-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 18px;
    color: #888;
    cursor: pointer;
}

.booking-modal__header {
    padding: 18px 20px 10px;
    text-align: center;
}

.booking-modal__body {
    padding: 0 20px 16px;
    text-align: center;
}

.booking-modal__actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 18px;
}

.booking-modal__actions--stacked {
    flex-direction: column;
}

.booking-modal__actions--manage {
    align-items: stretch;
}

.booking-modal__action-form {
    flex: 1 1 0;
    margin: 0;
}

.booking-modal__actions--manage > .default-button {
    flex: 1 1 0;
    text-align: center;
}

.booking-modal__meta { color: #666; }
.booking-modal__success { color: #4f7f2b; }
.booking-modal__warning { color: #b04533; }

.modal-primary-button,
.modal-danger-button {
    width: 100%;
    border: 0;
    border-radius: 4px;
    padding: 10px 14px;
    color: #fff;
    cursor: pointer;
}

.modal-primary-button { background: #c75518; }
.modal-danger-button { background: #a84433; }
.modal-danger-button--delete { background: #7f2a22; }

.standalone-login {
    padding: 24px 0;
}

.centered-panel {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d9d2c7;
    padding: 24px;
}

.login-page-panel {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.login-page-copy h1 {
    font-family: Georgia, serif;
    margin-bottom: 10px;
}

.auth-form {
    display: grid;
    gap: 8px;
}

.auth-label {
    color: #666;
    font-size: 11px;
}

.auth-checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #666;
}

.auth-submit {
    width: 100%;
}

@media screen and (max-width: 1240px) {
    .booking-grid {
        min-width: 1080px;
    }
}

@media screen and (max-width: 1100px) {
    .top-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 10px;
}

    .brand-card,
    .header-actions-card {
    padding: 10px 12px;
    min-width: 360px;
}

    .header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
}

@media screen and (max-width: 720px) {
    .page-shell {
    padding: 8px 12px 16px;
}

    .brand-card {
    width: 490px;
    padding: 10px 12px 12px;
}

    .brand-title {
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #2a241d;
    line-height: 1.15;
    max-width: 300px;
}

    .brand-logo-link {
    display: block;
    width: 136px;
    height: 108px;
    flex-shrink: 0;
    line-height: 0;
}

    .brand-logo-image {
    display: block;
    width: 112px;
    height: auto;
}

    .login-page-panel {
        grid-template-columns: 1fr;
    }

    .booking-grid {
        min-width: 980px;
    }
}
























.help-panel__grid--single {
    grid-template-columns: minmax(320px, 520px);
}


.booking-modal__field {
    display: grid;
    gap: 6px;
    width: 100%;
}

.booking-modal__field-label {
    color: #6c6257;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.booking-modal__input,
.booking-modal__select {
    box-sizing: border-box;
    width: 100%;
    min-height: 38px;
    border: 1px solid #d1cbc0;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    padding: 8px 10px;
}

.booking-modal__field--player[hidden] {
    display: none;
}



.booking-modal__card--feedback {
    max-width: 360px;
}

.booking-modal__flash {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
}

.booking-modal__quote {
    margin: 10px 0 0;
    font-size: 13px;
    font-style: italic;
    color: #6a6e73;
    line-height: 1.4;
}


.admin-booking-form {
    margin-top: 8px;
}

.admin-booking-layout {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 0.9fr 1.15fr;
    gap: 16px;
    align-items: start;
}

.admin-booking-card {
    background: #fff;
    border: 1px solid #ccc8bf;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    padding: 10px;
}

.admin-booking-card__title {
    margin: 0 0 8px;
    color: #6b6b6b;
    font-size: 12px;
    font-weight: 400;
}

.admin-booking-grid {
    display: grid;
    gap: 10px;
}

.admin-booking-grid--two {
    grid-template-columns: 1fr 1fr;
}

.admin-booking-grid--stack {
    grid-template-columns: 1fr;
}

.admin-booking-field {
    display: grid;
    gap: 4px;
}

.admin-booking-field--full {
    width: 100%;
}

.admin-booking-field--player {
    grid-template-columns: 24px 1fr;
    align-items: center;
    margin-top: 6px;
}

.admin-booking-field__label {
    color: #5f5f5f;
    font-size: 11px;
}

.admin-booking-player-index {
    color: #555;
    font-size: 12px;
}

.admin-booking-input,
.admin-booking-select,
.admin-booking-textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #bfc1c6;
    background: #fff;
    color: #333;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 2px;
}

.admin-booking-input--readonly {
    background: #efefef;
    color: #888;
}

.admin-booking-textarea {
    resize: vertical;
    min-height: 96px;
}

.admin-booking-user-meta {
    margin-top: 8px;
    color: #585858;
    font-style: italic;
    line-height: 1.45;
}

.admin-booking-link {
    display: inline-block;
    margin-top: 8px;
}

.admin-booking-players {
    margin-top: 12px;
    border-top: 1px solid #d8d8d8;
    padding-top: 10px;
}

.admin-booking-note-hint,
.admin-booking-created {
    margin-top: 8px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

.admin-booking-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #d9d2c7;
    flex-wrap: wrap;
}

.admin-booking-actions form {
    margin: 0;
}

.admin-booking-actions__save {
    min-width: 200px;
}

.admin-booking-actions__divider {
    color: #666;
}

@media screen and (max-width: 1180px) {
    .admin-booking-layout {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

@media screen and (max-width: 760px) {
    .admin-booking-layout {
        grid-template-columns: 1fr;
    }

    .admin-booking-grid--two {
        grid-template-columns: 1fr;
    }
}


.admin-booking-shell {
    position: relative;
    max-width: 1020px;
    margin: 8px auto 0;
    padding: 24px 28px 20px;
    background: #fff;
    border: 1px solid #d6d2ca;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.admin-booking-close {
    position: absolute;
    top: 4px;
    right: 10px;
    color: #8d8d8d;
    font-size: 30px;
    line-height: 1;
}

.admin-booking-close:hover {
    color: #666;
}

.admin-booking-form {
    margin-top: 20px;
}

.admin-booking-layout {
    grid-template-columns: 1fr 1fr 0.86fr 1.18fr;
    gap: 14px;
    align-items: start;
}

.admin-booking-card {
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfc 100%);
    border: 1px solid #cfcbc2;
    border-radius: 2px;
    box-shadow: none;
    padding: 10px 12px 12px;
}

.admin-booking-card__title {
    margin: 0 0 8px;
    color: #666;
    font-size: 11px;
    font-weight: 400;
}

.admin-booking-user-name {
    margin-top: 8px;
    color: #214d78;
    font-size: 13px;
}

.admin-booking-user-meta {
    margin-top: 4px;
    color: #5f5f5f;
    font-style: italic;
    line-height: 1.45;
}

.admin-booking-link {
    display: inline-block;
    margin-top: 8px;
    color: #666;
}

.admin-booking-link::before {
    content: "✎ ";
    color: #777;
}

.admin-booking-grid {
    gap: 8px 14px;
}

.admin-booking-grid--two {
    grid-template-columns: 1fr 1fr;
}

.admin-booking-field {
    gap: 3px;
}

.admin-booking-field__label {
    color: #5f5f5f;
    font-size: 11px;
    font-weight: 400;
}

.admin-booking-input,
.admin-booking-select,
.admin-booking-textarea {
    border: 1px solid #bbbfc5;
    border-radius: 2px;
    min-height: 30px;
    font-size: 12px;
    padding: 5px 8px;
}

.admin-booking-select {
    padding-right: 24px;
}

.admin-booking-field--repeat {
    max-width: 132px;
    margin: 4px auto 0;
}

.admin-booking-players {
    margin-top: 10px;
    padding-top: 8px;
}

.admin-booking-field--player {
    grid-template-columns: 20px 1fr;
    margin-top: 4px;
}

.admin-booking-player-index {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

.admin-booking-note-hint,
.admin-booking-created,
.admin-booking-info-line {
    margin-top: 8px;
    color: #666;
    font-style: italic;
    line-height: 1.35;
}

.admin-booking-info-line {
    padding-top: 8px;
    border-top: 1px solid #ddd6ca;
}

.admin-booking-actions {
    gap: 12px;
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid #ddd6ca;
}

.admin-booking-actions__save {
    min-width: 210px;
}

.admin-booking-secondary-actions {
    margin-top: 10px;
    text-align: center;
}

.admin-booking-link-button {
    border: 0;
    background: transparent;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

@media screen and (max-width: 1180px) {
    .admin-booking-shell {
        margin-left: 0;
        margin-right: 0;
    }

    .admin-booking-layout {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

.booking-modal__card--event {
    max-width: 520px;
}

.booking-modal--iframe {
    align-items: stretch;
}

.booking-modal__viewport--iframe {
    align-items: stretch;
    padding: 20px;
}

.booking-modal__card--iframe {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 40px);
    max-height: calc(100vh - 40px);
}

.booking-modal__close--iframe {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-modal__iframe {
    border: none;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.booking-modal__textarea {
    resize: vertical;
    min-height: 64px;
}

.booking-modal__body--event {
    display: grid;
    gap: 12px;
    padding: 0 20px 18px;
    text-align: left;
}

.booking-modal__body--event .booking-modal__field {
    gap: 5px;
}

.booking-modal__body--event .booking-modal__field-label {
    text-align: left;
    letter-spacing: 1px;
}

.booking-modal__event-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}

.booking-modal__actions--event {
    padding: 4px 0 0;
    gap: 8px;
}

@media screen and (max-width: 560px) {
    .booking-modal__event-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive usability pass: keep desktop layout intact, make phones/tablets usable. */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea,
.date-switcher-input,
.booking-modal__input,
.booking-modal__select,
.admin-booking-input,
.admin-booking-select,
.admin-booking-textarea {
    max-width: 100%;
}

.calendar-wrap {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.booking-grid {
    width: max-content;
}

.booking-modal {
    overflow-y: auto;
}

.booking-modal__viewport {
    min-height: 100dvh;
    box-sizing: border-box;
}

.booking-modal__card {
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
}

.booking-modal__body,
.booking-modal__actions,
.booking-modal__body--event {
    flex: 0 0 auto;
}

.booking-modal__body,
.booking-modal__body--event {
    overflow-y: auto;
}

.app-header__menu-toggle {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none;
    }

    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header {
        padding-inline: 10px;
        padding-block: 10px;
    }

    .app-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding: 12px;
    }

    .app-header__brand {
        min-width: 0;
        gap: 10px;
        grid-column: 1;
        grid-row: 1;
    }

    .app-header__logo {
        max-width: 44px;
        height: auto;
    }

    .app-header__title {
        font-size: 15px;
        line-height: 1.2;
    }

    .app-header__menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
    }

    .app-header__menu-icon,
    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
        transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .app-header__menu-icon {
        position: relative;
    }

    .app-header__menu-icon::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .app-header__menu-icon::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .app-header__nav-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .app-header__nav {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .app-header__nav .ui-calendar-nav-btn {
        min-width: 0;
        width: 100%;
        height: 40px;
    }

    .app-header__nav .ui-calendar-nav-btn--today {
        display: none;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:first-child {
        order: 1;
    }

    .app-header__nav .ui-calendar-date-form {
        grid-column: 2;
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:last-child {
        order: 3;
    }

    .app-header__nav .ui-calendar-date-input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding-right: 12px;
    }

    .app-header__nav .ui-calendar-date-input::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-header__actions > form > button,
    .app-header__actions > a,
    .app-header__actions > button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 560px) {
    .app-header__card {
        border-radius: 8px;
    }

    .app-header__inner {
        gap: 10px;
        padding: 10px;
    }

    .app-header__logo {
        max-width: 40px;
    }

    .app-header__title {
        font-size: 14px;
    }

    .app-header__nav {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
    }
}
@media screen and (max-width: 560px) {
    .booking-modal__body,
    .booking-modal__body--event {
        flex: 1 1 auto;
        min-height: 0;
    }

    .booking-modal__actions {
        flex: 0 0 auto;
        background: #fff;
    }
}

/* ── Admin filter bar ────────────────────────────────────────────────────── */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.admin-filter-bar__input {
    padding: 7px 10px;
    border: 1px solid #ccc5bb;
    border-radius: 5px;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    background: #fff;
    min-width: 180px;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.admin-filter-bar__input--date {
    min-width: 140px;
}

.admin-filter-bar__input:focus {
    outline: none;
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199, 85, 24, 0.12);
}

.admin-filter-bar__select {
    padding: 7px 10px;
    border: 1px solid #ccc5bb;
    border-radius: 5px;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s;
}

.admin-filter-bar__select:focus {
    outline: none;
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199, 85, 24, 0.12);
}

.admin-privilege-presets {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.admin-privilege-select {
    width: 100%;
    max-width: 340px;
    border: 1px solid #ccc5bb;
    border-radius: 5px;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    background: #fff;
    padding: 4px 0;
}

.admin-privilege-select option {
    padding: 5px 10px;
    cursor: pointer;
}

.admin-privilege-select option:checked {
    background: #c75518;
    color: #fff;
}

.admin-no-results {
    color: #888;
    font-style: italic;
    margin: 20px 0;
}

/* ── Admin sidebar layout ─────────────────────────────────────────────────── */

.admin-body-root {
    background: #f3f0ea;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-popup-mode .admin-sidebar { display: none; }
.admin-popup-mode .admin-content-area { padding: 16px; overflow: visible; }
.admin-popup-mode .admin-flash { margin-bottom: 12px; }
.admin-popup-mode .admin-shell { min-height: auto; }
.admin-popup-mode { overflow: auto; }

/* Sidebar */
.admin-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #2c2420;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar__brand {
    padding: 18px 16px 14px;
    font-size: 13px;
    font-weight: bold;
    color: #f0ebe3;
    letter-spacing: 0.03em;
    border-bottom: 1px solid #3e302b;
}

.admin-sidebar__nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    gap: 2px;
}

.admin-sidebar__link {
    display: block;
    padding: 9px 16px;
    color: #c9bdb6;
    font-size: 12px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.12s, color 0.12s;
}

.admin-sidebar__link:hover {
    background: #3e302b;
    color: #f0ebe3;
}

.admin-sidebar__link.is-active {
    background: #3e302b;
    color: #f0ebe3;
    border-left-color: #c75518;
    font-weight: bold;
}

.admin-sidebar__link--muted {
    color: #8a7670;
    font-size: 11px;
}

.admin-sidebar__link--muted:hover {
    color: #c9bdb6;
}

.admin-sidebar__footer {
    padding: 10px 0 12px;
    border-top: 1px solid #3e302b;
}

/* Content area */
.admin-content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-main {
    flex: 1;
    padding: 24px 28px;
}

/* Flash messages */
.admin-flash {
    padding: 10px 20px;
    font-size: 12px;
    border-bottom: 1px solid transparent;
}

.admin-flash--success {
    background: #eaf5ea;
    color: #2a6a2a;
    border-color: #b8ddb8;
}

.admin-flash--error {
    background: #fdf0f0;
    color: #8a1f1f;
    border-color: #e8b8b8;
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd5c9;
    border-radius: 4px;
    margin-top: 14px;
    font-size: 12px;
}

.admin-table th {
    background: #f7f3ee;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd5c9;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.admin-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0ebe3;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover td {
    background: #faf7f3;
}

.admin-table__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
}

/* Admin separator */
.admin-separator {
    border: 0;
    border-top: 1px solid #ddd5c9;
    margin: 12px 0;
}

/* Admin panel (general content card) */
.admin-panel {
    background: #fff;
    border: 1px solid #ddd5c9;
    border-radius: 4px;
    padding: 20px;
}

/* Responsive: collapse sidebar to top bar on small screens */
@media screen and (max-width: 800px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .admin-sidebar__brand {
        padding: 10px 14px;
        border-bottom: 0;
        border-right: 1px solid #3e302b;
    }

    .admin-sidebar__nav {
        flex-direction: row;
        flex-wrap: wrap;
        flex: 1;
        padding: 4px 6px;
        gap: 0;
    }

    .admin-sidebar__link {
        border-left: 0;
        border-bottom: 3px solid transparent;
        padding: 7px 10px;
    }

    .admin-sidebar__link.is-active {
        border-left-color: transparent;
        border-bottom-color: #c75518;
    }

    .admin-sidebar__footer {
        border-top: 0;
        border-left: 1px solid #3e302b;
        padding: 4px 6px;
    }

    .admin-main {
        padding: 16px;
    }
}
.booking-confirm-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px;
}

.booking-confirm-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 460px;
    padding: 32px 36px;
}

.booking-confirm-title {
    margin: 0 0 24px;
    color: #c84b11;
    font-size: 18px;
    line-height: 1.25;
    text-align: center;
}

.booking-confirm-summary {
    width: 100%;
    margin-bottom: 24px;
    border: 0;
    border-collapse: collapse;
}

.booking-confirm-summary td {
    border: 0;
    padding: 8px 0;
    font-size: 13px;
    line-height: 1.35;
    vertical-align: top;
}

.booking-confirm-summary td:first-child {
    width: 68px;
    color: #777;
}

.booking-confirm-summary td:last-child {
    font-weight: bold;
}

.booking-confirm-summary__alias {
    color: #777;
    font-weight: normal;
}

.booking-confirm-quote {
    margin: 0 0 28px;
    color: #777;
    font-size: 12px;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
}

.booking-confirm-error {
    margin: 0 0 16px;
    color: #c0392b;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.booking-confirm-form {
    display: grid;
    gap: 16px;
}

.booking-confirm-field {
    display: grid;
    gap: 6px;
    color: #777;
    font-size: 12px;
    text-align: left;
}

.booking-confirm-field input,
.booking-confirm-field select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border: 1px solid #d1cbc0;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: Verdana, sans-serif;
    font-size: 14px;
    background: #fff;
}

.booking-confirm-submit {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: #c84b11;
    color: #fff;
    font-size: 14px;
}

.booking-confirm-cancel {
    margin-top: 16px;
    text-align: center;
}

.booking-confirm-cancel a {
    color: #777;
    font-size: 12px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
    box-sizing: border-box;
    max-width: 100%;
}

@media screen and (max-width: 560px) {
    .booking-confirm-page {
        padding: 8px 0 16px;
    }

    .booking-confirm-card {
        max-width: none;
        padding: 18px 14px;
        border-left: 0;
        border-right: 0;
    }

    .booking-confirm-title {
        margin-bottom: 18px;
        font-size: 18px;
    }

    .booking-confirm-summary {
        margin-bottom: 20px;
    }

    .booking-confirm-summary td {
        display: block;
        width: 100%;
        padding: 3px 0;
        font-size: 14px;
    }

    .booking-confirm-summary td:first-child {
        width: 100%;
        padding-top: 10px;
    }

    .booking-confirm-field {
        font-size: 13px;
    }

    .booking-confirm-field input {
        min-height: 44px;
        font-size: 16px;
        padding: 10px 12px;
    }

    .booking-confirm-submit {
        min-height: 46px;
        font-size: 15px;
    }

    input[type="datetime-local"],
    input[type="number"] {
        min-height: 44px;
        font-size: 16px;
    }
}

/* Calendar grid normalization: desktop and mobile use a fixed, predictable table grid. */
.calendar-square-table {
    --calendar-time-col: 82px;
    --calendar-slot-col: 136px;
    --calendar-row-height: 56px;
    /* Hidden optional days collapse; JavaScript reveals as many complete days as fit. */
    width: max-content;
    min-width: 0;
    table-layout: fixed;
}

/* Optional extra day-columns. Hidden by default so the no-JS render keeps one day visible. */
.cal-extra-day {
    display: none;
}

.cal-extra-day.is-visible {
    display: revert;
}

.calendar-time-col,
.time-spacer,
.time-side-head,
.time-cell {
    width: var(--calendar-time-col);
    min-width: var(--calendar-time-col);
    max-width: var(--calendar-time-col);
}

.calendar-slot-col,
.square-head-cell,
.calendar-core-row td:not(.time-cell) {
    width: var(--calendar-slot-col);
    min-width: var(--calendar-slot-col);
    max-width: var(--calendar-slot-col);
}

.calendar-date-row td,
.calendar-square-row td,
.footer-date-row td {
    background: #ffffff;
}

.time-spacer,
.time-side-head {
    width: 76px;
}

.day-header-cell {
    text-align: center;
    padding: 8px 0 9px;
    border-top: 1px solid #e8e8e8;
    border-right: 1px solid #ece7dc;
    background: #ffffff;
}

.day-header-cell--today {
    background: #fff8f6 !important;
}

.day-header-inline {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: "Red Hat Text", sans-serif;
}

.day-header-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #151515;
    font-family: "Red Hat Display", sans-serif;
}

.day-header-date {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6a6e73;
    font-family: "Red Hat Text", sans-serif;
}

.day-header-cell--today .day-header-name,
.day-header-cell--today .day-header-date {
    color: #bf4316;
}

.square-head-cell {
    width: calc((100% - 76px) / 9);
    min-width: 0;
    text-align: center;
    padding: 6px 4px 7px;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
    background: #ffffff;
}

.square-head-cell--active {
    background: #ffffff !important;
}

.square-head-cell--today {
    background: #fff8f6 !important;
}

.square-head-title {
    display: block;
    font-family: "Red Hat Display", sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #bf4316;
    line-height: 1.15;
}

.square-head-alias {
    display: block;
    margin-top: 2px;
    font-family: "Red Hat Text", sans-serif;
    font-size: 10px;
    color: #bf4316;
    line-height: 1.2;
    letter-spacing: 0;
}

.time-side-head {
    padding: 6px 8px;
    color: #6a6e73;
    font-size: 12px;
    font-weight: 500;
    background: #ffffff;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
}

.time-spacer {
    background: #ffffff;
    border-top: 1px solid #ece7dc;
    border-right: 1px solid #ece7dc;
}
.time-cell {
    padding: 6px 5px 4px;
}

.calendar-cell {
    width: calc(100% - 4px);
    height: calc(var(--calendar-row-height) - 4px);
    min-height: 0;
    overflow: hidden;
}

.cc-label-primary,
.cc-label-secondary,
.event-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.event-cell {
    box-sizing: border-box;
    overflow: hidden;
}

.event-label {
    height: 100%;
    min-height: 0;
    padding: 6px 8px;
}

.app-header__menu-toggle {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none;
    }

    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header {
        padding-inline: 10px;
        padding-block: 10px;
    }

    .app-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding: 12px;
    }

    .app-header__brand {
        min-width: 0;
        gap: 10px;
        grid-column: 1;
        grid-row: 1;
    }

    .app-header__logo {
        max-width: 44px;
        height: auto;
    }

    .app-header__title {
        font-size: 15px;
        line-height: 1.2;
    }

    .app-header__menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
    }

    .app-header__menu-icon,
    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
        transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .app-header__menu-icon {
        position: relative;
    }

    .app-header__menu-icon::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .app-header__menu-icon::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .app-header__nav-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .app-header__nav {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .app-header__nav .ui-calendar-nav-btn {
        min-width: 0;
        width: 100%;
        height: 40px;
    }

    .app-header__nav .ui-calendar-nav-btn--today {
        display: none;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:first-child {
        order: 1;
    }

    .app-header__nav .ui-calendar-date-form {
        grid-column: 2;
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:last-child {
        order: 3;
    }

    .app-header__nav .ui-calendar-date-input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding-right: 12px;
    }

    .app-header__nav .ui-calendar-date-input::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-header__actions > form > button,
    .app-header__actions > a,
    .app-header__actions > button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 560px) {
    .app-header__card {
        border-radius: 8px;
    }

    .app-header__inner {
        gap: 10px;
        padding: 10px;
    }

    .app-header__logo {
        max-width: 40px;
    }

    .app-header__title {
        font-size: 14px;
    }

    .app-header__nav {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
    }
}

/* Configurable logo rendering. The actual size comes from config/booking.php. */
.brand-logo-link {
    width: var(--booking-logo-width, 112px);
    height: var(--booking-logo-height, 108px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-image {
    width: var(--booking-logo-width, 112px);
    height: var(--booking-logo-height, 108px);
    object-fit: contain;
}
/* Keep the desktop header action buttons level with the calendar navigation row. */
.header-actions-card {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.header-actions {
    width: 100%;
}

/* ============================================================
   Admin layout (Alt-System-Optik: helles, zentriertes Panel)
   ============================================================ */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-nav .default-button.is-active {
    color: #333;
    border-color: #888;
    border-bottom-color: #333;
    background: linear-gradient(to bottom, #fff 0%, #dcdcdc 100%);
    font-weight: 700;
}

.admin-panel {
    margin: 16px auto;
    max-width: 1024px;
    padding: 32px;
    color: #333;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}
.admin-panel h1 { margin: 0 0 4px; font-size: 22px; color: #333; }
.admin-intro { margin: 0 0 12px; color: #666; font-size: 13px; }
.admin-separator { margin: 12px 0 20px; border: 0; border-top: 1px solid #ccc; }

/* Tabellen */
.admin-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.admin-table th,
.admin-table td { padding: 8px; border: 1px solid #ccc; text-align: left; vertical-align: top; }
.admin-table thead th { background: #eee; color: #547B97; font-weight: 700; }
.admin-table tbody tr:nth-child(even) td { background: #fafafa; }
.admin-table .admin-table__actions { white-space: nowrap; }
.admin-table .admin-table__actions a { margin-right: 10px; }
.admin-table form { display: inline; }

/* ── Admin form ───────────────────────────────────────────────────────────── */
.admin-form {
    width: 100%;
    max-width: 640px;
}

.admin-form__section {
    background: #fff;
    border: 1px solid #ddd5c9;
    border-radius: 6px;
    padding: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.admin-form__section-title {
    background: #f7f3ee;
    border-bottom: 1px solid #ddd5c9;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
}

.admin-form__row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 0 16px;
    align-items: start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0ebe3;
}

.admin-form__row:last-child {
    border-bottom: 0;
}

.admin-form__label {
    padding-top: 9px;
    font-size: 12px;
    color: #444;
    font-weight: bold;
}

.admin-form__field input[type="text"],
.admin-form__field input[type="email"],
.admin-form__field input[type="number"],
.admin-form__field input[type="time"],
.admin-form__field input[type="date"],
.admin-form__field input[type="password"],
.admin-form__field select,
.admin-form__field textarea {
    width: 100%;
    max-width: 380px;
    padding: 7px 10px;
    border: 1px solid #ccc5bb;
    border-radius: 5px;
    background: #fff;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    transition: border-color 0.12s, box-shadow 0.12s;
    box-sizing: border-box;
}

.admin-form__field input:focus,
.admin-form__field select:focus,
.admin-form__field textarea:focus {
    outline: none;
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199, 85, 24, 0.12);
}

.admin-form__field select {
    cursor: pointer;
}

.admin-form__note {
    margin: 5px 0 0;
    color: #888;
    font-size: 11px;
    font-style: italic;
    line-height: 1.4;
}

.admin-form__lang-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #eef4fb;
    border: 1px solid #c5d9ef;
    border-radius: 5px;
    color: #3a6190;
    font-size: 11px;
    line-height: 1.5;
}
.admin-form__lang-hint-icon {
    font-size: 14px;
    line-height: 1.2;
    flex-shrink: 0;
}

.admin-form__field--flex {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-form__inline-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form__inline-label {
    font-size: 11px;
    color: #666;
    font-weight: bold;
}

.admin-form__inline-group input[type="date"],
.admin-form__inline-group input[type="time"],
.admin-form__inline-group input[type="number"],
.admin-form__inline-group select {
    padding: 7px 10px;
    border: 1px solid #ccc5bb;
    border-radius: 5px;
    background: #fff;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    color: #222;
    box-sizing: border-box;
}

.admin-form__inline-group input:focus,
.admin-form__inline-group select:focus {
    outline: none;
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199,85,24,0.12);
}

.admin-form__actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}
/* Admin event form - compact layout */
.admin-event-form .admin-form__lang-hint {
    margin-bottom: 10px;
    padding: 7px 10px;
    background: #f7f7f7;
    border-color: #d8d8d8;
    color: #333333;
}

.admin-popup-mode .admin-event-form .admin-form__lang-hint {
    display: none;
}

.admin-popup-mode .admin-type-switcher {
    margin-bottom: 12px;
}

.admin-event-form .admin-form__section {
    margin-bottom: 14px;
    background: #f7f7f7;
    border-color: #d8d8d8;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.admin-event-form .admin-form__row {
    grid-template-columns: 128px 1fr;
    padding: 9px 16px;
    border-bottom-color: #e5e5e5;
}

.admin-event-form .admin-form__label {
    padding-top: 7px;
    color: #333333;
}

.admin-event-form .admin-form__field--flex {
    gap: 12px 20px;
}

.admin-event-form .admin-form__inline-group {
    gap: 3px;
}

.admin-event-form .admin-form__inline-label {
    color: #333333;
}

.admin-event-form .admin-form__field input[type="text"],
.admin-event-form .admin-form__field input[type="number"],
.admin-event-form .admin-form__field input[type="time"],
.admin-event-form .admin-form__field input[type="date"],
.admin-event-form .admin-form__field select,
.admin-event-form .admin-form__field textarea,
.admin-event-form .admin-form__inline-group input[type="date"],
.admin-event-form .admin-form__inline-group input[type="time"],
.admin-event-form .admin-form__inline-group input[type="number"],
.admin-event-form .admin-form__inline-group select {
    min-height: 30px;
    padding: 5px 8px;
    border: 1px solid #b8b8b8;
    border-radius: 6px;
    background: #fff;
    color: #222;
}

.admin-event-form .admin-form__field input:focus,
.admin-event-form .admin-form__field select:focus,
.admin-event-form .admin-form__field textarea:focus,
.admin-event-form .admin-form__inline-group input:focus,
.admin-event-form .admin-form__inline-group select:focus {
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199, 85, 24, 0.14);
}

.admin-event-form .admin-form__field textarea {
    max-width: 100%;
    min-height: 56px;
    resize: vertical;
}

.admin-event-form .admin-event-form__description-row textarea {
    min-height: 80px;
}

.admin-event-form__capacity {
    width: 100px;
}

.admin-event-form .admin-form__note {
    margin-top: 4px;
    color: #666666;
    line-height: 1.3;
}

.admin-event-form .admin-form__actions {
    margin-top: 14px;
}

@media (max-width: 700px) {
    .admin-event-form .admin-form__row {
        grid-template-columns: 1fr;
        padding: 10px 12px;
    }
}
/* Admin booking form - compact card layout (create / popup mode) */
.admin-form--compact {
    max-width: 640px;
}

.admin-popup-mode .admin-main {
    padding: 22px 18px 18px;
}

.admin-popup-mode .admin-main,
.admin-popup-mode .admin-form {
    display: flex;
    flex-direction: column;
}

.admin-popup-mode .admin-form__actions {
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin: 12px 0 0;
    padding: 10px 0;
    background: #f3f0ea;
    border-top: 1px solid #d8d8d8;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.06);
}
.admin-popup-mode .admin-form[hidden],
.admin-popup-mode #panel-event[hidden] {
    display: none !important;
}

.abf-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    padding: 0;
}

.abf-row + .abf-row,
.abf-card--notes {
    margin-top: 12px;
}

.abf-card {
    flex: 1;
    min-width: 0;
    padding: 12px;
    background: #f7f7f7;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.abf-card--court,
.abf-card--players {
    flex: 0 0 218px;
}

.abf-card--owner,
.abf-card--time {
    flex: 1 1 auto;
}

.abf-card--notes {
    background: #f7f7f7;
}

.abf-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.abf-field--notes {
    flex: 1 1 auto;
}

.abf-label {
    display: block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #333333;
}

.abf-sublabel {
    display: block;
    margin: 7px 0 3px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #666666;
}

.abf-input,
.abf-select,
.abf-dateinput {
    width: 100%;
    min-height: 29px;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid #b8b8b8;
    border-radius: 6px;
    background: #fff;
    color: #222;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    line-height: 1.25;
    transition: border-color 0.12s, box-shadow 0.12s, background-color 0.12s;
}

.abf-select {
    padding-right: 6px;
}

.abf-input:focus,
.abf-select:focus,
.abf-dateinput:focus,
.abf-textarea:focus {
    outline: none;
    border-color: #c75518;
    box-shadow: 0 0 0 3px rgba(199, 85, 24, 0.14);
}

.abf-textarea {
    min-height: 80px;
    resize: vertical;
}

.abf-player-fields {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

.abf-row2 {
    display: flex;
    gap: 10px;
}

.abf-row2--times,
.abf-field--repeat {
    margin-top: 10px;
}

.abf-row2 > .abf-field {
    flex: 1;
    min-width: 0;
}

.abf-row2--notes {
    align-items: flex-start;
}

.abf-hint {
    margin-top: 4px;
    color: #c96b00;
    font-size: 11px;
    line-height: 1.35;
}

.abf-hint--side {
    flex: 0 0 auto;
    max-width: 190px;
    padding: 29px 0 0 8px;
    white-space: normal;
}

.admin-booking-input--readonly {
    background-color: #eeeeee;
    color: #777;
}

@media (max-width: 700px) {
    .admin-form--compact {
        max-width: none;
    }

    .admin-popup-mode .admin-main {
        padding: 14px 12px;
    }

    .admin-popup-mode .admin-form__actions {
        margin: 10px 0 0;
        padding: 10px 0 0;
    }

    .abf-row,
    .abf-row2,
    .abf-row2--notes {
        flex-direction: column;
        gap: 10px;
    }

    .abf-card--court,
    .abf-card--players {
        flex-basis: auto;
    }

    .abf-hint--side {
        max-width: none;
        padding: 0;
    }
}

/* Primary (filled) button for admin form submits */
.admin-type-switcher {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid #ccc5bb;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.admin-type-switcher__tab {
    display: inline-block;
    padding: 7px 20px;
    font-size: 12px;
    font-family: Verdana, sans-serif;
    color: #555;
    background: #f5f1ec;
    border: none;
    text-decoration: none;
    cursor: pointer;
    border-right: 1px solid #ccc5bb;
}

.admin-type-switcher__tab:last-child {
    border-right: none;
}

.admin-type-switcher__tab--active {
    background: #c75518;
    color: #fff;
    font-weight: bold;
    cursor: default;
}

.admin-type-switcher__tab:not(.admin-type-switcher__tab--active):hover {
    background: #ebe6df;
}

.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 20px;
    border: 1px solid #a8440f;
    border-radius: 6px;
    background: linear-gradient(180deg, #d96020 0%, #c75518 100%);
    color: #fff;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.12s, box-shadow 0.12s;
}

.admin-btn-primary:hover {
    background: linear-gradient(180deg, #e0682a 0%, #d05e1e 100%);
    box-shadow: 0 2px 6px rgba(199, 85, 24, 0.25);
}

@media (max-width: 700px) {
    .admin-panel { padding: 16px; }
    .admin-form__row { grid-template-columns: 1fr; gap: 4px; }
    .admin-form__label { padding-top: 0; }
    .admin-form__actions { padding-left: 0; }
    .admin-form__field input[type="text"],
    .admin-form__field input[type="email"],
    .admin-form__field input[type="number"],
    .admin-form__field input[type="time"],
    .admin-form__field input[type="date"],
    .admin-form__field input[type="password"],
    .admin-form__field select,
    .admin-form__field textarea { max-width: 100%; }
}
.popup-body-root {
    margin: 0;
    background: #f3f0ea;
    color: #222;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    overflow: auto;
}

.popup-body-root .booking-confirm-page {
    padding: 18px 16px 20px;
}

.popup-body-root .booking-confirm-card {
    max-width: 460px;
    padding: 24px 28px 20px;
    box-shadow: none;
}

.popup-body-root .booking-confirm-title {
    margin-bottom: 18px;
}
/* Quiet calendar refinements: subtle states, better mobile scanning. */
.calendar-wrap {
    position: relative;
    /* Override the Vite-bundled calendar-grid.css: this container only scrolls
       horizontally, so reserving a gutter on both edges just wastes width and
       causes the last visible day/column to be clipped. */
    scrollbar-gutter: auto;
    scroll-snap-type: x proximity;
}

.calendar-cell {
    border-radius: 3px;
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}


.calendar-cell--subscription {
    position: relative;
    padding-left: 10px;
}

.calendar-cell--subscription::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: rgba(26, 103, 179, 0.45);
    border-radius: 3px 0 0 3px;
}

.cc-free:hover,
.cc-free:focus-visible {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(21, 21, 21, 0.08);
}

.cc-own {
    background: #e4f1e6;
    box-shadow: inset 3px 0 0 rgba(62, 134, 53, 0.45);
}

.cc-own:hover,
.cc-own:focus-visible {
    background: #daebdd;
}

.cc-own .cc-label-primary {
    color: #24512a;
}

.cc-own .cc-label-secondary {
    color: #4f7b55;
}

.cc-single-future {
    background: #d8e9fb;
}

.booking-trigger.cc-single-future:hover,
.booking-trigger.cc-single-future:focus-visible {
    background: #cfe1f4;
}

.cc-over,
.slot-cell--past {
    background: #f4f4f4;
    color: #8a8d90;
}

.event-cell {
    background: #fde8e1;
    box-shadow: inset 3px 0 0 rgba(191, 67, 22, 0.55);
}

.event-cell--editable:hover,
.event-cell--editable:focus-within {
    background: #fbded5;
}

.calendar-cell:focus-visible,
.event-label:focus-visible {
    outline: 2px solid #151515;
    outline-offset: -2px;
}
.app-header__menu-toggle {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none;
    }

    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header {
        padding-inline: 10px;
        padding-block: 10px;
    }

    .app-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding: 12px;
    }

    .app-header__brand {
        min-width: 0;
        gap: 10px;
        grid-column: 1;
        grid-row: 1;
    }

    .app-header__logo {
        max-width: 44px;
        height: auto;
    }

    .app-header__title {
        font-size: 15px;
        line-height: 1.2;
    }

    .app-header__menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
    }

    .app-header__menu-icon,
    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
        transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .app-header__menu-icon {
        position: relative;
    }

    .app-header__menu-icon::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .app-header__menu-icon::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .app-header__nav-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .app-header__nav {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .app-header__nav .ui-calendar-nav-btn {
        min-width: 0;
        width: 100%;
        height: 40px;
    }

    .app-header__nav .ui-calendar-nav-btn--today {
        display: none;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:first-child {
        order: 1;
    }

    .app-header__nav .ui-calendar-date-form {
        grid-column: 2;
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:last-child {
        order: 3;
    }

    .app-header__nav .ui-calendar-date-input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding-right: 12px;
    }

    .app-header__nav .ui-calendar-date-input::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-header__actions > form > button,
    .app-header__actions > a,
    .app-header__actions > button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 560px) {
    .app-header__card {
        border-radius: 8px;
    }

    .app-header__inner {
        gap: 10px;
        padding: 10px;
    }

    .app-header__logo {
        max-width: 40px;
    }

    .app-header__title {
        font-size: 14px;
    }

    .app-header__nav {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
    }
}



.booking-mobile-dialog__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@media screen and (max-width: 560px) {
    .booking-mobile-dialog {
        max-height: calc(100dvh - 16px);
    }

    .booking-mobile-dialog__summary-grid {
        grid-template-columns: 1fr;
    }

    .booking-mobile-dialog__actions {
        padding: 14px 16px;
    }

    .booking-mobile-dialog__actions .ui-btn {
        width: 100%;
    }
}

.app-header__menu-toggle {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none;
    }

    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header {
        padding-inline: 10px;
        padding-block: 10px;
    }

    .app-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding: 12px;
    }

    .app-header__brand {
        min-width: 0;
        gap: 10px;
        grid-column: 1;
        grid-row: 1;
    }

    .app-header__logo {
        max-width: 44px;
        height: auto;
    }

    .app-header__title {
        font-size: 15px;
        line-height: 1.2;
    }

    .app-header__menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
    }

    .app-header__menu-icon,
    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
        transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .app-header__menu-icon {
        position: relative;
    }

    .app-header__menu-icon::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .app-header__menu-icon::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .app-header__nav-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .app-header__nav {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .app-header__nav .ui-calendar-nav-btn {
        min-width: 0;
        width: 100%;
        height: 40px;
    }

    .app-header__nav .ui-calendar-nav-btn--today {
        display: none;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:first-child {
        order: 1;
    }

    .app-header__nav .ui-calendar-date-form {
        grid-column: 2;
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:last-child {
        order: 3;
    }

    .app-header__nav .ui-calendar-date-input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding-right: 12px;
    }

    .app-header__nav .ui-calendar-date-input::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-header__actions > form > button,
    .app-header__actions > a,
    .app-header__actions > button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 560px) {
    .app-header__card {
        border-radius: 8px;
    }

    .app-header__inner {
        gap: 10px;
        padding: 10px;
    }

    .app-header__logo {
        max-width: 40px;
    }

    .app-header__title {
        font-size: 14px;
    }

    .app-header__nav {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
    }
}

.app-header__menu-toggle {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none;
    }

    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header {
        padding-inline: 10px;
        padding-block: 10px;
    }

    .app-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        padding: 12px;
    }

    .app-header__brand {
        min-width: 0;
        gap: 10px;
        grid-column: 1;
        grid-row: 1;
    }

    .app-header__logo {
        max-width: 44px;
        height: auto;
    }

    .app-header__title {
        font-size: 15px;
        line-height: 1.2;
    }

    .app-header__menu-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
    }

    .app-header__menu-icon,
    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
        transition: transform 0.12s ease, opacity 0.12s ease;
    }

    .app-header__menu-icon {
        position: relative;
    }

    .app-header__menu-icon::before {
        position: absolute;
        top: -5px;
        left: 0;
    }

    .app-header__menu-icon::after {
        position: absolute;
        top: 5px;
        left: 0;
    }

    .app-header__nav-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        justify-content: stretch;
    }

    .app-header__nav {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        align-items: center;
        justify-content: start;
        gap: 8px;
        width: 100%;
    }

    .app-header__nav .ui-calendar-nav-btn {
        min-width: 0;
        width: 100%;
        height: 40px;
    }

    .app-header__nav .ui-calendar-nav-btn--today {
        display: none;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:first-child {
        order: 1;
    }

    .app-header__nav .ui-calendar-date-form {
        grid-column: 2;
        order: 2;
        width: 100%;
        min-width: 0;
    }

    .app-header__nav .ui-calendar-nav-btn--arrow:last-child {
        order: 3;
    }

    .app-header__nav .ui-calendar-date-input {
        width: 100%;
        min-width: 0;
        height: 40px;
        padding-right: 12px;
    }

    .app-header__nav .ui-calendar-date-input::-webkit-calendar-picker-indicator {
        opacity: 0;
        width: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 1 1 100%;
        min-width: 0;
    }

    .app-header__actions > form > button,
    .app-header__actions > a,
    .app-header__actions > button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }
}

@media screen and (max-width: 560px) {
    .app-header__card {
        border-radius: 8px;
    }

    .app-header__inner {
        gap: 10px;
        padding: 10px;
    }

    .app-header__logo {
        max-width: 40px;
    }

    .app-header__title {
        font-size: 14px;
    }

    .app-header__nav {
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 6px;
    }
}










.app-header__menu-toggle {
    display: none;
}

.app-header__action-trigger {
    display: none;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header__action-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 32px;
    border: 1px solid #d4cec3;
    border-radius: 6px;
    background: #fff;
    color: #6a6e73;
    font-size: 13px;
    font-weight: 600;
}




@media screen and (max-width: 900px) {
    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }
}

@media screen and (max-width: 900px) {
    .app-header__action-trigger {
        display: inline-flex;
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex;
    }
}

@media screen and (max-width: 900px) {
    .calendar-layout--mobile-safe .calendar-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .calendar-layout--mobile-safe [data-day]:not(.is-visible) {
        display: none !important;
    }

    .calendar-layout--mobile-safe .calendar-square-table {
        min-width: 0;
    }
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none !important;
    }

    .app-header__action-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100%;
    }

    .app-header__actions.is-open {
        display: flex !important;
    }
}

.app-header__mobile-controls,
.app-header__auth-short-form {
    display: none;
}

@media screen and (max-width: 900px) {
    .app-header__menu-toggle {
        display: none !important;
    }

    .app-header__mobile-controls {
        display: flex;
        grid-column: 1 / -1;
        grid-row: 3;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
    }

    .app-header__auth-short-form {
        display: inline;
    }

    .app-header__auth-short {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        white-space: nowrap;
    }

    .app-header__action-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 4;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex !important;
    }

    .app-header__desktop-logout,
    .app-header__actions > .header-login-button {
        display: none !important;
    }
}


.app-header__mobile-controls,
.app-header__auth-short-form {
    display: none;
}

.app-header__auth-short {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    border: 1px solid #d4cec3;
    border-radius: 6px;
    background: #fff;
    color: #6a6e73;
    transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.app-header__auth-short:hover,
.app-header__auth-short:focus-visible,
.app-header__action-trigger:hover,
.app-header__action-trigger:focus-visible {
    border-color: #bf4316;
    color: #bf4316;
}

@media screen and (max-width: 900px) {
    .app-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .app-header__nav-wrap {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .app-header__mobile-controls {
        display: flex;
        grid-column: 2;
        grid-row: 2;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .app-header__auth-short-form {
        display: inline;
    }

    .app-header__action-trigger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        border: 1px solid #d4cec3;
        border-radius: 6px;
        background: #fff;
        color: #6a6e73;
        font-size: 18px;
        font-weight: 700;
        line-height: 1;
    }

    .app-header__actions {
        display: none;
        grid-column: 1 / -1;
        grid-row: 3;
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        gap: 8px;
    }

    .app-header__actions.is-open {
        display: flex !important;
    }

    .app-header__desktop-logout,
    .app-header__actions > .header-login-button,
    .app-header__actions > a:not([href*='admin']) {
        display: none !important;
    }
}

.app-header__auth-short.header-login-button,
.app-header__auth-short.header-login-button:hover,
.app-header__auth-short.header-login-button:focus-visible {
    background: #fff !important;
    color: #bf4316 !important;
    border: 1px solid #d4cec3;
}

.app-header__logo {
    display: block;
    flex: 0 0 auto;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
}

@media screen and (max-width: 900px) {
    .app-header__logo {
        display: none;
    }
}
/* Medium desktop header: keep action buttons visible instead of overflowing. */
@media screen and (min-width: 901px) and (max-width: 1540px) {
    .app-header__inner {
        display: grid !important;
        grid-template-columns: minmax(260px, max-content) minmax(300px, 1fr);
        grid-template-areas:
            "brand nav"
            "actions actions";
        align-items: center;
        gap: 12px 18px;
    }

    .app-header__brand {
        grid-area: brand;
        min-width: 0;
    }

    .app-header__logo {
        width: 88px !important;
        height: 84px !important;
    }

    .app-header__title {
        max-width: 280px;
        font-size: 16px;
    }

    .app-header__nav-wrap {
        grid-area: nav;
        min-width: 0;
        justify-content: flex-end;
    }

    .app-header__actions {
        grid-area: actions;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin-left: 0 !important;
        overflow: visible;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form {
        flex: 0 1 auto;
        min-width: 0;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form > button {
        white-space: nowrap;
    }
}

/* Global header action menu: keep navigation visible while moving secondary actions into one compact trigger. */
.app-header__card {
    position: relative;
}

.app-header__inner {
    display: grid !important;
    grid-template-columns: minmax(220px, max-content) minmax(260px, 1fr) auto;
    grid-template-areas: "brand nav controls";
    align-items: center;
    gap: 14px 18px;
}

.app-header__brand {
    grid-area: brand;
}

.app-header__nav-wrap {
    grid-area: nav;
    min-width: 0;
    justify-content: flex-end;
}

.app-header__mobile-controls {
    display: flex !important;
    grid-area: controls;
    align-items: center;
    justify-content: flex-end;
}

.app-header__action-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #d4cec3;
    border-radius: 6px;
    background: #fff;
    color: #6a6e73;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.app-header__actions {
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    z-index: 40;
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    width: max-content;
    min-width: 220px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid #d8d2c8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    gap: 6px;
    margin-left: 0 !important;
}

.app-header__actions.is-open {
    display: flex !important;
}

.app-header__actions > a,
.app-header__actions > button,
.app-header__actions > form > button,
.app-header__actions > .header-login-button {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.app-header__actions > form {
    display: block !important;
    width: 100%;
}

.app-header__desktop-logout {
    display: block !important;
}

.app-header__actions > .header-login-button {
    display: flex !important;
}

.app-header__locale {
    justify-content: center;
    padding: 6px 4px 2px;
}

@media screen and (min-width: 901px) and (max-width: 1120px) {
    .app-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand controls"
            "nav nav";
    }

    .app-header__brand {
        min-width: 0;
    }

    .app-header__title {
        max-width: min(560px, 70vw);
    }
}

@media screen and (max-width: 900px) {
    .app-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand controls"
            "nav nav";
    }

    .app-header__nav-wrap {
        width: 100%;
        justify-content: stretch;
    }

    .app-header__actions {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .app-header__actions > a,
    .app-header__actions > button,
    .app-header__actions > form > button,
    .app-header__actions > .header-login-button {
        display: flex !important;
    }
}

/* Align the public/admin header card and calendar frame to the visible day columns. */
:root {
    --calendar-visible-width: 490px;
}

.app-header__card,
.calendar-layout {
    width: var(--calendar-visible-width);
    max-width: 100%;
}

@media screen and (max-width: 900px) {
    .app-header__card,
    .calendar-layout {
        width: 100%;
    }
}

/* The header shell itself must not add side padding when aligned to the calendar grid. */
.app-header {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.app-header__card,
.calendar-layout {
    box-sizing: border-box;
}

/* Keep the header usable when the calendar collapses to a single visible day. */
.app-header__card {
    width: min(100%, max(var(--calendar-visible-width), 760px));
}

@media screen and (max-width: 760px) {
    .app-header__card {
        width: 100%;
    }

    .app-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand controls"
            "nav nav";
    }

    .app-header__brand {
        min-width: 0;
    }

    .app-header__title {
        max-width: 100%;
    }
}

/* Let the header card sit directly on the page background without an extra grey band. */
.app-header {
    background: transparent !important;
}

/* Polished compact action dropdown. */
.app-header__actions {
    min-width: 236px;
    padding: 10px;
    border-color: #ddd5c9;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fffdf9 100%);
    box-shadow: 0 18px 44px rgba(50, 38, 24, 0.16), 0 3px 10px rgba(50, 38, 24, 0.08);
    gap: 5px;
}

.app-header__actions::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 18px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #ddd5c9;
    border-left: 1px solid #ddd5c9;
    background: #fff;
    transform: rotate(45deg);
}

.app-header__actions > a,
.app-header__actions > button,
.app-header__actions > form > button,
.app-header__actions > .header-login-button {
    min-height: 34px;
    border-color: transparent !important;
    background: transparent !important;
    color: #4f565d !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.app-header__actions > a:hover,
.app-header__actions > a:focus-visible,
.app-header__actions > button:hover,
.app-header__actions > button:focus-visible,
.app-header__actions > form > button:hover,
.app-header__actions > form > button:focus-visible,
.app-header__actions > .header-login-button:hover,
.app-header__actions > .header-login-button:focus-visible {
    background: #fff4ec !important;
    color: #bf4316 !important;
    transform: translateX(1px);
}

.app-header__actions > .app-header__admin-mode {
    margin-top: 6px;
    padding-top: 10px !important;
    border-top: 1px solid #f0ede6 !important;
}

.app-header__locale {
    padding: 10px 4px 2px;
    color: #8b8580;
}

.app-header__locale span.font-bold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    border-radius: 999px;
    background: #151515;
    color: #fff !important;
    font-size: 12px;
}

.app-header__locale a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 24px;
    border-radius: 999px;
    color: #bf4316;
    transition: background-color 0.14s ease, color 0.14s ease;
}

.app-header__locale a:hover,
.app-header__locale a:focus-visible {
    background: #fff4ec;
    color: #9e3412;
}

.app-header__locale span[aria-hidden="true"] {
    display: none;
}

/* Non-calendar pages keep a stable header width; calendar pages opt into grid alignment. */
.app-header__card {
    width: min(100%, 1720px);
}

.has-calendar-layout .app-header__card {
    width: min(100%, max(var(--calendar-visible-width), 760px));
}

.has-calendar-layout .calendar-layout {
    width: var(--calendar-visible-width);
    max-width: 100%;
}

/* Event labels should wrap inside narrow calendar cells instead of being clipped.
   overflow must stay visible so the (rowspan) row grows to fit long labels. */
.event-cell {
    overflow: visible;
    box-sizing: border-box;
}

.event-label {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    padding: 4px 6px !important;
    font-size: 12px !important;
    line-height: 1.18 !important;
}
