/* Basis, Installation, Seitenlayout und Anmeldung. Ladefolge: app, components, features, responsive, hall-schedule. */
:root {
    color-scheme: light;
    --club-header: #16324f;
    --club-header-text: #ffffff;
    --club-action: #176b4d;
    --club-action-text: #ffffff;
    --club-action-hover: #10543c;
    --club-accent: #e7b416;
    --club-link: #174f78;
    --club-secondary: #e3e9ee;
    --club-secondary-text: #243746;
    --club-secondary-hover: #d5dde4;
    --club-table-header: #eef2f5;
    --club-table-header-text: #445463;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #17202a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: #f4f6f8;
}

/* Installation */
.installer-body {
    background: #edf1f4;
}

.installer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px max(24px, calc((100% - 920px) / 2));
    color: #fff;
    background: #16324f;
    border-bottom: 4px solid #e7b416;
}

.installer-header div {
    display: grid;
    gap: 2px;
}

.installer-header span:last-child {
    color: #cbd7e1;
    font-size: 13px;
}

.installer-page {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 64px;
}

.installer-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 20px;
    padding: 0;
    overflow: hidden;
    list-style: none;
    border: 1px solid #cbd5df;
    border-radius: 6px;
}

.installer-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    padding: 8px 12px;
    color: #687786;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.installer-steps li > span {
    display: grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #52606d;
    background: #e6ebef;
    border-radius: 50%;
    font-size: 12px;
}

.installer-steps .is-current {
    color: #16324f;
    background: #e8f2f8;
}

.installer-steps .is-current > span,
.installer-steps .is-complete > span {
    color: #fff;
    background: #176b4d;
}

.installer-panel {
    padding: 32px;
    background: #fff;
    border: 1px solid #cbd5df;
    border-radius: 6px;
    box-shadow: 0 8px 28px rgb(22 50 79 / 8%);
}

.installer-panel .page-intro {
    margin-bottom: 26px;
}

.installer-section-heading {
    margin: 28px 0 14px;
    font-size: 18px;
}

.installer-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0;
    padding: 1px;
    background: #d9e0e7;
    list-style: none;
}

.installer-checks li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: #fff;
}

.installer-checks__status {
    display: grid;
    flex: 0 0 28px;
    min-height: 24px;
    place-items: center;
    color: #fff;
    background: #248a57;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
}

.installer-checks .is-error .installer-checks__status {
    background: #b4232c;
}

.installer-checks small {
    display: block;
    margin-top: 3px;
    color: #687786;
    line-height: 1.35;
}

.installer-form {
    margin-top: 26px;
    padding-top: 2px;
    border-top: 1px solid #d9e0e7;
}

.installer-notice {
    max-width: 720px;
    padding: 14px 16px;
    color: #243746;
    background: #eef2f5;
    border-left: 4px solid #347da7;
    line-height: 1.5;
}

.installer-complete-mark {
    display: grid;
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    place-items: center;
    color: #fff;
    background: #176b4d;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 800;
}

@media (max-width: 700px) {
    .installer-page {
        width: min(100% - 20px, 920px);
        padding-top: 20px;
    }

    .installer-panel {
        padding: 22px 18px;
    }

    .installer-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .installer-checks,
    .installer-panel .form-grid {
        grid-template-columns: 1fr;
    }
}

a {
    color: inherit;
}

/* Seitenrahmen und Navigation */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 64px 1fr;
}

.app-shell--public {
    grid-template-rows: 64px minmax(min-content, 1fr) auto;
}

.app-shell--public .page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 32px;
    color: var(--club-header-text);
    background: var(--club-header);
    border-bottom: 4px solid var(--club-accent);
    position: relative;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--club-header-text);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

.app-brand__mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--club-header);
    background: var(--club-header-text);
    border-radius: 6px;
}

.app-user {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--club-header-text);
    font-size: 14px;
}

.app-navigation {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
    margin-left: auto;
}

.app-navigation a {
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--club-header-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.app-navigation a:hover,
.app-navigation a:focus-visible {
    color: var(--club-header-text);
    background: rgb(255 255 255 / 10%);
    outline: none;
}

.app-navigation__group {
    position: relative;
    align-self: stretch;
}

.app-navigation__group summary {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    color: var(--club-header-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.app-navigation__group summary::-webkit-details-marker {
    display: none;
}

.app-navigation__group summary::after {
    width: 6px;
    height: 6px;
    margin: -4px 0 0 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: rotate(45deg);
}

.app-navigation__group[open] summary,
.app-navigation__group summary:hover,
.app-navigation__group summary:focus-visible {
    color: var(--club-header-text);
    background: rgb(255 255 255 / 10%);
    outline: none;
}

.app-navigation__group[open] summary::after {
    margin-top: 4px;
    transform: rotate(-135deg);
}

.app-navigation__submenu {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    display: grid;
    min-width: 220px;
    padding: 6px;
    color: #17202a;
    background: #fff;
    border: 1px solid #d9e0e7;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 12px 28px rgb(23 32 42 / 18%);
}

.app-navigation__submenu a {
    min-height: 42px;
    padding: 0 12px;
    color: #17202a;
    border-radius: 4px;
}

.app-navigation__submenu a:hover,
.app-navigation__submenu a:focus-visible {
    color: #17202a;
    background: #edf2f6;
}

.app-navigation > a.is-active,
.app-navigation__group.is-active > summary {
    color: var(--club-header-text);
    background: rgb(255 255 255 / 14%);
    box-shadow: inset 0 -3px var(--club-header-text);
}

.app-navigation__submenu a.is-active {
    color: #17202a;
    background: #e5edf4;
    box-shadow: inset 3px 0 var(--club-accent);
}

.staff-create-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
}

.app-user__logout {
    color: var(--club-header-text);
    font-weight: 700;
    text-decoration: none;
}

.app-user__logout:hover,
.app-user__logout:focus-visible {
    text-decoration: underline;
}

.page {
    width: min(1120px, calc(100% - 40px));
    min-width: 0;
    margin: 0 auto;
    padding: 40px 0 64px;
}

.page-heading {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: 0;
}

.page-intro {
    max-width: 720px;
    margin: 0 0 32px;
    color: #52606d;
    line-height: 1.6;
}

.page-subtitle {
    margin: 0;
    color: #52606d;
    line-height: 1.45;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-section {
    margin-top: 32px;
}

.page-section h2 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.25;
}

.booking-form {
    padding: 20px;
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 6px;
}

.booking-form__dates,
.booking-form__details,
.booking-management__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

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

.booking-all-day {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.booking-form__actions,
.booking-management__actions,
.booking-resource-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.booking-management__form .booking-all-day,
.booking-management__form > .button,
.booking-management__actions {
    grid-column: 1 / -1;
    justify-self: start;
}

.booking-table td:first-child {
    min-width: 210px;
}

.booking-table .text-link {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
}

.booking-table form .text-link {
    color: #a12632;
}

.booking-review-form {
    display: grid;
    gap: 7px;
    min-width: 210px;
}

.booking-review-form label {
    font-size: 12px;
    font-weight: 700;
}

.booking-review-form input {
    width: 100%;
}

.booking-review-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.booking-review-form__actions .button {
    padding: 8px 10px;
    font-size: 13px;
}

@media (max-width: 760px) {
    .booking-form__dates,
    .booking-form__details,
    .booking-management__form {
        grid-template-columns: 1fr;
    }
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.status-card {
    min-height: 148px;
    padding: 20px;
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgb(22 50 79 / 6%);
}

.status-card__label {
    display: block;
    margin-bottom: 18px;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-card__value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.status-card__detail {
    display: block;
    margin-top: 8px;
    color: #687786;
    font-size: 14px;
    line-height: 1.45;
}

.status-card__indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    background: #248a57;
    border-radius: 50%;
}

/* Anmeldung; die übrigen Zugangsmasken nutzen gemeinsame Komponenten. */
.login-layout {
    display: grid;
    width: 100%;
    place-items: center;
}

.login-panel {
    width: min(100%, 600px);
    padding: 28px;
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 6px;
    box-shadow: 0 8px 28px rgb(22 50 79 / 10%);
}

.login-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin-bottom: 22px;
}

.login-identity__logo {
    display: grid;
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d9e0e7;
    border-radius: 4px;
}

.login-identity__logo img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.login-identity__logo--default {
    color: var(--club-header-text);
    background: var(--club-header);
    border-color: var(--club-header);
    font-size: 24px;
    font-weight: 800;
}

.login-identity__name {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.login-identity__name span {
    color: #52606d;
    font-size: 13px;
}

.login-identity__name strong {
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.login-intro {
    margin: 0 0 24px;
    color: #52606d;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
}

.login-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #17202a;
    background: #fff;
    border: 1px solid #9aa8b6;
    border-radius: 4px;
    font: inherit;
}

.login-form input:focus {
    border-color: #16324f;
    outline: 3px solid rgb(22 50 79 / 18%);
}

.login-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 22px;
    font-size: 14px;
}

.login-panel .login-links {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
}
