:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #20242a;
    --muted: #68707b;
    --border: #dfe3e8;
    --primary: #294f75;
    --primary-light: #eaf1f7;
    --success: #2e7d52;
    --success-light: #eaf5ef;
    --warning: #9a6a14;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 1.35rem;
    font-weight: 750;
    color: var(--primary);
}

.brand span {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--primary);
}

main {
    padding: 32px 0 60px;
}

.page-title {
    margin: 0;
}

.page-subtitle {
    margin: 4px 0 28px;
    color: var(--muted);
}

.status {
    padding: 14px 16px;
    margin-bottom: 24px;
    border-radius: 8px;
    background: var(--success-light);
    border-left: 4px solid var(--success);
}

.status.error {
    background: #fbecec;
    border-left-color: #b83b3b;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 20px;
}

.number {
    font-size: 2rem;
    line-height: 1;
    font-weight: 750;
    color: var(--primary);
}

.label {
    margin-top: 7px;
    color: var(--muted);
}

.section-title {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.event-card {
    margin-bottom: 20px;
    overflow: hidden;
}

.event-header {
    padding: 22px;
}

.club-name {
    color: var(--muted);
    font-size: 0.9rem;
}

.event-title {
    margin: 3px 0 5px;
    font-size: 1.4rem;
}

.event-location {
    color: var(--muted);
}

.godfathers {
    margin-top: 14px;
}

.event-description {
    margin-bottom: 0;
}

.performance-list {
    border-top: 1px solid var(--border);
}

.performance {
    padding: 15px 22px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr);
    gap: 16px;
    align-items: center;
}

.performance + .performance {
    border-top: 1px solid var(--border);
}

.performance-date {
    font-weight: 650;
}

.performance-meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.attendance {
    justify-self: end;
    text-align: right;
}

.godfather-count {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 7px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 650;
}

.login-container {
    width: min(430px, calc(100% - 32px));
    margin: 7vh auto 0;
}

.login-brand {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.7rem;
    font-weight: 750;
    color: var(--primary);
}

.login-brand span {
    display: block;
    margin-top: 2px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
}

.login-card {
    padding: 28px;
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 5px;
}

.login-intro {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 650;
}

.form-group input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    color: var(--text);
    font: inherit;
}

.form-group input:focus {
    outline: 2px solid var(--primary-light);
    border-color: var(--primary);
}

.button {
    display: inline-block;
    padding: 11px 18px;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.button-primary {
    background: var(--primary);
    color: white;
}

.button-primary:hover {
    opacity: 0.9;
}

.form-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #fbecec;
    color: #8f2929;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 28px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    white-space: nowrap;
    font-size: 0.9rem;
}

.user-menu span {
    font-weight: 650;
}

.user-menu a {
    color: var(--muted);
    text-decoration: none;
}

.user-menu a:hover {
    color: var(--primary);
}

.event-actions {
    margin-top: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--primary);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.availability-heading {
    margin-bottom: 28px;
}

.availability-card {
    max-width: 760px;
    padding: 24px;
}

.availability-card h2 {
    margin-top: 0;
    margin-bottom: 4px;
}

.availability-intro {
    margin-top: 0;
    margin-bottom: 22px;
    color: var(--muted);
}

.date-options {
    border-top: 1px solid var(--border);
}

.date-option {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 5px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.date-option:hover {
    background: var(--primary-light);
}

.date-option input,
.unavailable-option input {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

.food-hint {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--success-light);
    color: var(--success);
    font-size: 0.82rem;
}

.unavailable-option {
    margin-top: 24px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fafafa;
}

.unavailable-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.button-secondary {
    background: #e7e9ec;
    color: var(--text);
    text-decoration: none;
}

.available-people {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}


/*
 * Terminwahl beim Festlegen des definitiven Besuchs.
 */
.visit-date-option {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: start;
    column-gap: 10px;

    margin-bottom: 22px;
    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.visit-date-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.visit-date-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.visit-date-content {
    grid-column: 2;
    grid-row: 1;
    display: block;
    width: 100%;
}

.visit-date-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
}

.visit-date-day {
    font-size: 1.08rem;
    color: var(--text);
}

.visit-date-time {
    color: var(--muted);
    font-size: 0.95rem;
}

.visit-date-details {
    display: flex;
    flex-direction: column;
    gap: 5px;

    color: var(--muted);
    font-size: 0.92rem;
}

.visit-date-details span {
    display: block;
}


/*
 * Teilnahme.
 */
.participation-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.participation-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--surface);
    cursor: pointer;
}

.participation-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.participation-option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.participation-option input[type="radio"] {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.participation-option span {
    display: block;
    margin: 0;
}


/*
 * Definitiver Besuch.
 */
.definitive-visit {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--primary-light);
}

.definitive-visit h3 {
    margin-top: 0;
    margin-bottom: 8px;
}

.definitive-date {
    margin-bottom: 14px;
}

.participant-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.participant-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}

.participant-row:last-child {
    border-bottom: 0;
}


/*
 * Responsive.
 */
@media (max-width: 850px) {

    .header-actions {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .user-menu {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 700px) {

    .header-inner {
        min-height: auto;
        padding: 15px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        gap: 14px;
        flex-wrap: wrap;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .performance {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .attendance {
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 650px) {

    .participant-row {
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 600px) {

    .form-actions {
        flex-direction: column;
    }

    .form-actions .button {
        width: 100%;
        text-align: center;
    }

    .food-hint {
        display: table;
        margin: 5px 0 0;
    }

    .visit-date-header {
        display: block;
    }

    .visit-date-time {
        display: block;
        margin-top: 2px;
    }

    .visit-date-details {
        display: grid;
        gap: 5px;
    }
}
