/* ==========================================================================
   Luigi Termin-Kalender – Designsystem
   Farben und Bildsprache angelehnt an luigi-italien.de (Vintage Italien)
   ========================================================================== */

:root {
    /* Italienisches Flaggenrot (Pantone 18-1662 / offizielles Bandiera) */
    --luigi-red: #ce2b37;
    --luigi-red-dark: #a8222c;
    --luigi-orange: #e86a1e;
    --luigi-green: #1f8a4c;
    --cream: #faf6ef;
    --paper: #fffdf9;
    --sand: #e8dcc6;
    --sand-dark: #d8c8ac;
    --olive: #7a8450;
    --espresso: #2b2118;
    /* Header: tiefes Zypressengrün statt Espressobraun */
    --header: #1a2e28;
    --muted: #6b6259;
    --ink: #1d1611;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(26, 46, 40, .08);
    --shadow: 0 10px 28px rgba(26, 46, 40, .12);
    --shadow-lg: 0 26px 60px rgba(26, 46, 40, .22);

    --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    --container: 1180px;
    --header-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--espresso);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
}

/* Feines Filmkorn über dem gesamten Layout */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 .6em;
    color: var(--ink);
    letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.08rem; font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1.1em; }

a { color: var(--luigi-red); text-decoration: none; }
a:hover { color: var(--luigi-red-dark); text-decoration: underline; }

img { max-width: 100%; display: block; }

hr { border: 0; border-top: 1px solid var(--sand-dark); margin: 2rem 0; }

:focus-visible { outline: 3px solid var(--luigi-orange); outline-offset: 2px; }

h1:focus, h2:focus { outline: none; }

/* ---------- Layout ---------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.container--narrow { max-width: 820px; }

.page { display: flex; flex-direction: column; min-height: 100vh; }

.page__main { flex: 1; }

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }

.section--paper { background: var(--paper); }
.section--sand { background: var(--sand); }
.section--dark { background: var(--espresso); color: var(--cream); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--cream); }

.section__head { max-width: 720px; margin-bottom: 2.4rem; }
.section__head--center { margin-inline: auto; text-align: center; }

.stack > * + * { margin-top: 1rem; }

.grid { display: grid; gap: 1.6rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--luigi-red);
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: "";
    width: 34px;
    height: 3px;
    background: linear-gradient(90deg, var(--luigi-green), #fff, var(--luigi-red));
    border-radius: 2px;
}

/* Auf Fotos und dunklem Grund braucht das Label mehr Kontrast als das Signalrot. */
.hero .eyebrow,
.section--dark .eyebrow { color: #ffcf9e; }

.lead { font-size: 1.15rem; color: var(--muted); }
.section--dark .lead { color: #d9cfc2; }

.muted { color: var(--muted); }

.tricolore {
    height: 5px;
    background: linear-gradient(90deg, var(--luigi-green) 0 33.3%, #f6f3ee 33.3% 66.6%, var(--luigi-red) 66.6%);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 800;
    background: rgba(26, 46, 40, .96);
    backdrop-filter: blur(10px);
    color: var(--cream);
}

.site-header__inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: var(--cream);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.3rem;
    line-height: 1.1;
    margin-right: auto;
}

.brand:hover { color: #fff; text-decoration: none; }

.brand__logo {
    height: 46px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* White script strokes need a dark plate on cream surfaces (login). */
.brand--on-light .brand__logo {
    background: var(--header);
    border-radius: 10px;
    padding: .4rem .65rem;
    height: 52px;
}

.admin__side .brand__logo {
    height: 40px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .15rem;
}

.brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--luigi-green), var(--luigi-red));
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}

.brand__sub {
    display: block;
    font-family: var(--font-body);
    font-size: .68rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #b9ada0;
}

.site-nav { display: flex; align-items: center; gap: 1.4rem; }

/* :not(.btn) keeps the flat underline styling away from nav buttons,
   whose own padding would otherwise be overridden. */
.site-nav a:not(.btn) {
    color: #e6ded4;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:not(.btn):hover,
.site-nav a:not(.btn).active {
    color: #fff;
    border-bottom-color: var(--luigi-red);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: var(--cream);
    border-radius: var(--radius-sm);
    padding: .45rem .7rem;
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    padding: .9rem 1.7rem;
    border-radius: 999px;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn:disabled, .btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn--primary {
    background: var(--luigi-red);
    color: #fff;
    box-shadow: 0 8px 20px rgba(206, 43, 55, .3);
}

.btn--primary:hover { background: var(--luigi-red-dark); color: #fff; }

.btn--paypal {
    background: #ffc439;
    color: #10334f;
    box-shadow: 0 8px 20px rgba(255, 196, 57, .4);
}

.btn--paypal:hover { background: #f5b400; color: #10334f; }

.btn--ghost {
    background: transparent;
    border-color: currentColor;
    color: var(--espresso);
}

.btn--ghost:hover { background: rgba(26, 46, 40, .06); color: var(--espresso); }

.section--dark .btn--ghost, .hero .btn--ghost { color: #fff; }
.section--dark .btn--ghost:hover, .hero .btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.btn--small { padding: .55rem 1.1rem; font-size: .88rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

.link-quiet { color: var(--muted); font-size: .9rem; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    color: #fff;
    min-height: min(88vh, 780px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
}

.hero--compact { min-height: 420px; }

.hero__slides { position: absolute; inset: 0; z-index: -2; }

.hero__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: heroFade 21s infinite;
    transform: scale(1.06);
}

.hero__slide:nth-child(1) { animation-delay: 0s; }
.hero__slide:nth-child(2) { animation-delay: 7s; }
.hero__slide:nth-child(3) { animation-delay: 14s; }

@keyframes heroFade {
    0% { opacity: 0; transform: scale(1.1); }
    6% { opacity: 1; }
    33% { opacity: 1; transform: scale(1.02); }
    40% { opacity: 0; }
    100% { opacity: 0; }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(18, 34, 28, .55) 0%, rgba(18, 34, 28, .3) 40%, rgba(18, 34, 28, .9) 100%);
}

.hero__content { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); max-width: 760px; }

.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }

.hero__quote {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.2rem;
    color: #f4e9db;
    border-left: 3px solid var(--luigi-red);
    padding-left: 1rem;
    margin: 1.4rem 0 2rem;
    max-width: 620px;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem;
    margin-top: 2.6rem;
    font-size: .9rem;
    color: #e3d8ca;
}

.hero__meta strong { display: block; font-size: 1.5rem; font-family: var(--font-display); color: #fff; }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .38rem .8rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge--free { background: rgba(31, 138, 76, .14); color: #16663a; }
.badge--few { background: rgba(232, 106, 30, .16); color: #a8481a; }
.badge--full { background: rgba(206, 43, 55, .12); color: var(--luigi-red-dark); }
.badge--past { background: rgba(107, 98, 89, .15); color: var(--muted); }
.badge--paid { background: rgba(31, 138, 76, .14); color: #16663a; }
.badge--pending { background: rgba(232, 106, 30, .16); color: #a8481a; }
.badge--draft { background: rgba(107, 98, 89, .15); color: var(--muted); }

/* Gestempelter "Ausgebucht"-Look auf Bildern */
.stamp {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: .8rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--luigi-red);
    background: rgba(255, 253, 249, .92);
    border: 2px solid var(--luigi-red);
    border-radius: 6px;
    padding: .4rem .75rem;
    transform: rotate(-7deg);
    box-shadow: var(--shadow-sm);
}

/* ---------- Karten ---------- */

.card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(43, 33, 24, .07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--sand); }

.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }

.card:hover .card__media img { transform: scale(1.05); }

.card__date {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
    background: var(--paper);
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    text-align: center;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

.card__date b { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.card__date span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; gap: .5rem; }

.card__title { margin: 0; font-size: 1.35rem; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--luigi-red); text-decoration: none; }

.card__meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .9rem; color: var(--muted); }

.card__text { color: var(--muted); font-size: .96rem; margin: .2rem 0 0; }

.card__footer {
    margin-top: auto;
    padding-top: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    flex-wrap: wrap;
}

.price { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }

.card--sold-out .card__media img { filter: grayscale(.75) contrast(.95); }

/* Polaroid-Galerie */

.polaroids { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.6rem; }

.polaroid {
    background: #fff;
    padding: .7rem .7rem 2.4rem;
    box-shadow: var(--shadow);
    transform: rotate(-1.4deg);
    transition: transform .25s ease;
}

.polaroid:nth-child(even) { transform: rotate(1.8deg); }
.polaroid:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.polaroid img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* ---------- Ablauf / Steps ---------- */

.steps { counter-reset: step; display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.step {
    position: relative;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.4rem 1.6rem 1.6rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--luigi-orange);
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -22px;
    left: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    background: var(--luigi-red);
    box-shadow: 0 6px 14px rgba(206, 43, 55, .35);
}

.step h3 { margin-bottom: .4rem; font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Kalender ---------- */

.calendar-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.calendar-bar__title { font-family: var(--font-display); font-size: 1.7rem; margin: 0; min-width: 260px; }

.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--sand-dark);
    background: var(--paper);
    color: var(--espresso);
    font-size: 1.1rem;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.icon-btn:hover { background: var(--sand); }

.view-switch { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 3px; }

.view-switch button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 600;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    cursor: pointer;
}

.view-switch button.is-active { background: var(--paper); color: var(--espresso); box-shadow: var(--shadow-sm); }

.calendar {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(43, 33, 24, .07);
}

.calendar__weekdays,
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); }

.calendar__weekdays {
    background: var(--espresso);
    color: #e2d8cc;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.calendar__weekdays span { padding: .7rem .5rem; text-align: center; }

.calendar__day {
    min-height: 108px;
    padding: .5rem;
    border-right: 1px solid rgba(43, 33, 24, .07);
    border-bottom: 1px solid rgba(43, 33, 24, .07);
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__day--outside { background: rgba(232, 220, 198, .35); color: var(--muted); }
.calendar__day--today { box-shadow: inset 0 0 0 2px var(--luigi-orange); }

.calendar__daynum { font-size: .85rem; font-weight: 600; color: var(--muted); }
.calendar__day--today .calendar__daynum { color: var(--luigi-orange); }

.calendar__event {
    display: block;
    font-size: .78rem;
    line-height: 1.25;
    padding: .35rem .45rem;
    border-radius: 6px;
    background: rgba(31, 138, 76, .14);
    color: #16663a;
    text-decoration: none;
    border-left: 3px solid var(--luigi-green);
}

.calendar__event:hover { text-decoration: none; filter: brightness(.96); }
.calendar__event--few { background: rgba(232, 106, 30, .16); color: #a8481a; border-left-color: var(--luigi-orange); }
.calendar__event--full { background: rgba(206, 43, 55, .12); color: var(--luigi-red-dark); border-left-color: var(--luigi-red); }
.calendar__event--past { background: rgba(107, 98, 89, .12); color: var(--muted); border-left-color: var(--muted); }
.calendar__event b { display: block; font-weight: 700; }

/* ---------- Termin-Detail ---------- */

.detail-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.detail-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }

.detail-layout { display: grid; gap: 2.4rem; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); align-items: start; }

.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.fact-list li { display: flex; gap: .8rem; align-items: flex-start; }
.fact-list .fact__label { min-width: 108px; color: var(--muted); font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }

.description { white-space: pre-line; }

.sticky-panel { position: sticky; top: calc(var(--header-h) + 1.5rem); }

.panel {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(43, 33, 24, .07);
    padding: 1.7rem;
}

.panel__title { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 .3rem; }

.seat-meter { margin: 1.2rem 0; }
.seat-meter__track { height: 10px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.seat-meter__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--luigi-green), var(--luigi-orange)); transition: width .4s ease; }
.seat-meter__fill--full { background: linear-gradient(90deg, var(--luigi-orange), var(--luigi-red)); }
.seat-meter__label { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); margin-top: .5rem; }

.seat-dots { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 0; }
.seat-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--sand-dark); }
.seat-dot--taken { background: var(--luigi-red); }

/* ---------- Formulare ---------- */

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 1rem;
}

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }

/* The grid gap spaces these already; the field's own margin would double it
   whenever the grid wraps into a single column. */
.form-grid .field { margin-bottom: 0; }

.field label { font-size: .85rem; font-weight: 600; letter-spacing: .04em; color: var(--espresso); }

/* Blazor's InputText renders a bare <input> without a type attribute,
   so match on everything except the controls that need their own look. */
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.field select,
.field textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--espresso);
    background: #fff;
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-sm);
    padding: .7rem .85rem;
    width: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field textarea { min-height: 110px; resize: vertical; }

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--luigi-orange);
    box-shadow: 0 0 0 3px rgba(232, 106, 30, .18);
}

.field__hint { font-size: .8rem; color: var(--muted); }

.field--check { flex-direction: row; align-items: flex-start; gap: .6rem; }
.field--check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--luigi-red); }
.field--check label { font-weight: 400; font-size: .92rem; line-height: 1.5; }

.field--span-2 { grid-column: 1 / -1; }

.validation-message, .field .invalid-feedback { color: var(--luigi-red-dark); font-size: .84rem; }

.invalid { border-color: var(--luigi-red) !important; }
.valid.modified:not([type=checkbox]) { border-color: var(--luigi-green); }

/* ---------- Hinweise ---------- */

.notice {
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    font-size: .96rem;
    margin-bottom: 1.2rem;
    border-left: 4px solid;
}

.notice__icon { font-size: 1.15rem; line-height: 1.3; }
.notice p:last-child { margin-bottom: 0; }

.notice--info { background: #eef4ff; border-color: #3f6ecb; color: #23386b; }
.notice--warn { background: #fff5e6; border-color: var(--luigi-orange); color: #7d3d10; }
.notice--success { background: #eaf7ee; border-color: var(--luigi-green); color: #145c33; }
.notice--error { background: #fdeceb; border-color: var(--luigi-red); color: #8c1119; }

/* ---------- Tabellen (Admin) ---------- */

.table-wrap { overflow-x: auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid rgba(43, 33, 24, .07); }

table.data { width: 100%; border-collapse: collapse; font-size: .94rem; }

table.data th {
    text-align: left;
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--sand-dark);
    white-space: nowrap;
}

table.data td { padding: .85rem 1rem; border-bottom: 1px solid rgba(43, 33, 24, .07); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(232, 220, 198, .3); }
table.data td.title { min-width: 190px; }
table.data td.place { min-width: 130px; }

/* Aktionen umbrechen lassen, damit die Tabelle nicht horizontal scrollen muss. */
table.data td.actions { text-align: right; }
table.data td.actions > * { margin: .15rem 0 .15rem .35rem; }
table.data .row-cancelled td { opacity: .55; text-decoration: line-through; }

.table-empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

/* ---------- Admin-Shell ---------- */

.admin { display: flex; min-height: 100vh; background: var(--cream); }

.admin__side {
    width: 250px;
    flex: 0 0 250px;
    background: var(--espresso);
    color: #d9cfc2;
    padding: 1.4rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.admin__side .brand { margin: 0 0 .5rem; font-size: 1.15rem; }

.admin__nav { display: flex; flex-direction: column; gap: .25rem; }

.admin__nav a {
    color: #cdc1b3;
    padding: .6rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    text-decoration: none;
}

.admin__nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.admin__nav a.active { background: var(--luigi-red); color: #fff; }

.admin__foot { margin-top: auto; font-size: .82rem; color: #a4988a; }
.admin__foot form { margin: .6rem 0 0; }

.admin__main { flex: 1; min-width: 0; padding: clamp(1.4rem, 3vw, 2.4rem); }

.admin__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.admin__head h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 2rem; }

.stat {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--luigi-orange);
}

.stat b { display: block; font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.stat span { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        linear-gradient(rgba(18, 34, 28, .78), rgba(18, 34, 28, .78)),
        url("../img/hero-01.jpg") center / cover no-repeat;
}

.login-card { width: 100%; max-width: 420px; background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.2rem; }

/* ---------- Footer ---------- */

.site-footer { background: var(--header); color: #b9ada0; padding: 3rem 0 2rem; font-size: .92rem; }
.site-footer a { color: #e6ded4; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h4 { color: var(--cream); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer__bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; }

/* ---------- Animation ---------- */

.reveal { animation: reveal .7s cubic-bezier(.2, .7, .3, 1) both; }
.reveal:nth-child(2) { animation-delay: .08s; }
.reveal:nth-child(3) { animation-delay: .16s; }
.reveal:nth-child(4) { animation-delay: .24s; }

@keyframes reveal {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

.spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
    .hero__slide:first-child { opacity: 1; }
}

/* ---------- Blazor ---------- */

.blazor-error-boundary {
    background: var(--luigi-red-dark);
    color: #fff;
    padding: 1rem 1.4rem;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after { content: "Es ist ein Fehler aufgetreten. Bitte lade die Seite neu."; }

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff3cd;
    color: #6b4d00;
    padding: .8rem 1.2rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .2);
}

/* ---------- CMS ---------- */

.cms-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #2a4038;
    color: #efe4d6;
    padding: .55rem clamp(1rem, 4vw, 2rem);
    font-size: .88rem;
}

.cms-banner a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}

.cms-section {
    position: relative;
}

.cms-edit-btn {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 40;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 999px;
    background: var(--paper);
    color: var(--espresso);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.cms-edit-btn:hover {
    background: #fff;
    color: var(--luigi-red);
}

.cms-section--brand {
    margin-right: auto;
}

.cms-section--brand .cms-edit-btn {
    top: -.2rem;
    right: -.2rem;
}

.cms-section--site-header {
    display: block;
}

.cms-section--site-header .cms-edit-btn {
    top: .65rem;
    right: .75rem;
    z-index: 50;
}

.cms-section--site-header .site-header__inner > .brand {
    margin-right: auto;
}

.cms-section--flush > .section__head {
    margin-bottom: 2.4rem;
}

.cms-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(26, 46, 40, .55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 1.5rem 1rem;
    overscroll-behavior: contain;
}

.cms-modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 3rem);
    overflow: auto;
    margin: auto 0;
    background: var(--paper);
    color: var(--espresso);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.cms-modal__head,
.cms-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--sand-dark);
}

.cms-modal__foot {
    border-bottom: 0;
    border-top: 1px solid var(--sand-dark);
    justify-content: flex-end;
}

.cms-modal__head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.cms-modal__body {
    padding: 1.2rem;
    display: grid;
    gap: 1rem;
}

.cms-group {
    border: 1px solid var(--sand-dark);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: grid;
    gap: .8rem;
}

.cms-group__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .8rem;
}

.cms-group h3 {
    margin: 0;
    font-size: 1rem;
}

.cms-image-row {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: .9rem;
    align-items: start;
}

.cms-image-row__preview {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--sand);
}

.cms-image-row__fields {
    display: grid;
    gap: .6rem;
}

.cms-upload {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    width: fit-content;
}

.cms-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 600px) {
    .cms-image-row { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
    .admin { flex-direction: column; }
    .admin__side { width: 100%; flex: none; flex-direction: row; align-items: center; gap: 1rem; overflow-x: auto; }
    .admin__nav { flex-direction: row; }
    .admin__foot { margin: 0; }
}

@media (max-width: 760px) {
    body { font-size: 16px; }

    .nav-toggle { display: inline-flex; }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--header);
        padding: .5rem 1.2rem 1.2rem;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open { display: flex; }
    .site-nav a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
    .site-nav .btn { margin-top: .8rem; }

    .calendar__day { min-height: 74px; padding: .3rem; }
    .calendar__event { font-size: .68rem; padding: .2rem .3rem; }
    .calendar__event span { display: none; }
    .hero__meta { gap: 1.1rem; }
}
