*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red:        #c0000c;
    --red-dark:   #8a0008;
    --red-light:  #fbeaea;
    --ink:        #111827;
    --ink-mid:    #4b5563;
    --ink-faint:  #9ca3af;
    --bg:         #f1f3f6;
    --paper:      #ffffff;
    --locked-bg:  #e5e7eb;
    --locked-txt: #6b7280;
    --radius:     20px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}

/* ── Top-Bar ──────────────────────────────────────── */

.topbar {
    background: linear-gradient(130deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(140, 0, 10, 0.28);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar__logo {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
    flex-shrink: 0;
}

.topbar__titles {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar__eyebrow {
    font-size: 0.72rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    opacity: 0.82;
}

.topbar__name {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.topbar__login {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.18);
    border: 1.5px solid rgba(255,255,255,0.45);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}

.topbar__login svg { width: 16px; height: 16px; flex-shrink: 0; }

.topbar__login:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.topbar__auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar__username {
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}

.topbar__logout  { background: rgba(255,255,255,0.12); }
.topbar__install { background: rgba(255,255,255,0.22); border: 1.5px solid rgba(255,255,255,0.6); cursor: pointer; font-family: inherit; }

/* ── Hub Main ─────────────────────────────────────── */

.hub {
    flex: 1;
    padding: 32px 24px 16px;
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
}

.hub__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Cards ────────────────────────────────────────── */

.card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
    border: 2px solid transparent;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.card--red {
    border-color: #f3c5c5;
}

.card--red:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(192, 0, 12, 0.18);
    border-color: var(--red);
}

.card--light {
    border-color: #dde6f0;
    background: linear-gradient(160deg, #f8fbfd 0%, #edf4fb 100%);
}

.card--light:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(30, 80, 140, 0.14);
    border-color: #3b82f6;
}

.card--gray {
    border-color: #e5e7eb;
    background: linear-gradient(160deg, #f9fafb 0%, #f3f4f6 100%);
}

.card--gray:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(75, 85, 99, 0.14);
    border-color: #9ca3af;
}

.card--locked {
    background: var(--locked-bg);
    border-color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Card Icons ───────────────────────────────────── */

.card__icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.card__emoji {
    font-size: 2.4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}

.card__emoji--small {
    font-size: 1.4rem;
    color: var(--red);
    font-weight: 900;
    font-style: normal;
}

.card__emoji--lock {
    font-size: 2.8rem;
    filter: grayscale(1) opacity(0.55);
}

/* ── Card Body ────────────────────────────────────── */

.card__body {
    flex: 1;
}

.card__label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 3px;
}

.card--locked .card__label,
.card--locked .card__title,
.card--locked .card__sub {
    color: var(--locked-txt);
}

.card__title {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    line-height: 1.1;
    margin-bottom: 8px;
    color: var(--ink);
}

.card__sub {
    font-size: 0.84rem;
    color: var(--ink-mid);
    line-height: 1.5;
}

/* ── Secure Badge ─────────────────────────────────── */

.card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 5px 10px;
    border-radius: 999px;
    align-self: flex-start;
}

.card__badge--secure {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.card__badge--noaccess {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

/* ── Ticker ───────────────────────────────────────── */

.ticker {
    background: var(--red);
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    margin-top: 28px;
}

.ticker__track {
    display: inline-block;
    animation: ticker-scroll 38s linear infinite;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding-left: 100%;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── Motto ────────────────────────────────────────── */

.motto {
    background: var(--ink);
    color: #fff;
    text-align: center;
    font-size: clamp(0.72rem, 1.2vw, 0.9rem);
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 13px 20px;
}

/* ── Footer ───────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 14px 20px;
    font-size: 0.8rem;
    color: var(--ink-faint);
    background: var(--bg);
}

.footer a { color: var(--red); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Hub 2-Spalten-Layout ────────────────────────── */

.hub__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.hub__left { min-width: 0; }

/* ── Kalender-Widget ─────────────────────────────── */

.hub__kalender {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    overflow: hidden;
    position: sticky;
    top: 82px;
    border: 2px solid #e5e7eb;
}

.kal__header {
    background: linear-gradient(130deg, var(--red) 0%, var(--red-dark) 100%);
    color: #fff;
    padding: 12px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kal__title {
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.kal__toggle {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-radius: 999px;
    padding: 2px;
    gap: 2px;
}

.kal__toggle-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
}

.kal__toggle-btn--active {
    background: rgba(255,255,255,0.9);
    color: var(--red);
}

.kal__toggle-btn:hover:not(.kal__toggle-btn--active) {
    color: #fff;
}

.kal__nav {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
}

.kal__nav button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    width: 26px; height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.kal__nav button:hover { background: rgba(255,255,255,0.35); }

#kal-week-label {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
}

.kal__body {
    padding: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kal__loading, .kal__empty {
    text-align: center;
    color: var(--ink-faint);
    font-size: 0.83rem;
    padding: 24px 0;
}

.kal__day {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kal__day--today .kal__day-label {
    color: var(--red);
    font-weight: 800;
}

.kal__day-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ink-mid);
    padding-bottom: 2px;
    border-bottom: 1px solid #f0f0f0;
}

.kal__termin {
    background: #f9fafb;
    border-left: 3px solid var(--red);
    border-radius: 8px;
    padding: 7px 10px;
}

.kal__termin-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kal__emoji { font-size: 0.9rem; flex-shrink: 0; }

.kal__termin-titel {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.kal__termin-meta {
    display: flex;
    gap: 8px;
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--ink-faint);
}

.kal__time { font-weight: 600; }

.kal__del {
    position: absolute;
    top: 6px; right: 6px;
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 4px;
    transition: color 0.15s;
}
.kal__del:hover { color: #c0000c; }

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 1100px) {
    .hub__layout { grid-template-columns: 1fr 260px; }
}

@media (max-width: 860px) {
    .hub__layout { grid-template-columns: 1fr; }
    .hub__grid   { grid-template-columns: repeat(2, 1fr); }
    .hub__kalender { position: static; }
    .kal__body { max-height: 360px; }
}

@media (max-width: 540px) {
    .hub { padding: 18px 14px 12px; }
    .hub__grid { grid-template-columns: 1fr; gap: 14px; }
    .topbar { padding: 12px 16px; }
    .topbar__logo { height: 40px; }
    .topbar__name { font-size: 0.95rem; }
    .card { min-height: unset; padding: 20px 18px 16px; }
    .card__emoji { font-size: 1.9rem; }
    .card__title { font-size: 1.2rem; }
}

/* ── Legal pages (impressum / datenschutz) ────────── */

.page { max-width: 860px; margin: 0 auto; padding: 32px 20px; }
.page-hero {
    background: linear-gradient(132deg, var(--red) 0%, var(--red-dark) 84%);
    color: #fff;
    padding: 20px 28px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    box-shadow: 0 8px 28px rgba(140,0,10,0.2);
}
.hero__logo { height: 64px; width: auto; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)); }
.hero__eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.4px; opacity: 0.82; }
.hero__title { font-size: 1.6rem; font-weight: 900; }
.hero__subtitle { font-size: 0.9rem; opacity: 0.9; margin-top: 2px; }


:root {
    --color-red-700: #b30606;
    --color-red-800: #7f0808;
    --color-red-100: #fce8e8;
    --color-ink-900: #12263a;
    --color-ink-700: #2a3f54;
    --color-ink-500: #5b7083;
    --color-ink-100: #e8eef5;
    --color-bg: #f4f7fb;
    --color-paper: #ffffff;
    --color-secure: #fef2e6;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow-soft: 0 16px 34px rgba(16, 34, 52, 0.09);
    --shadow-lift: 0 18px 44px rgba(179, 6, 6, 0.17);
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: "Segoe UI", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 0% 0%, #ffe1e1 0%, transparent 36%),
        radial-gradient(circle at 100% 20%, #e3f1ff 0%, transparent 30%),
        var(--color-bg);
    color: var(--color-ink-900);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────── */

.page {
    min-height: 100vh;
    padding: 34px 20px 26px;
    max-width: 1180px;
    margin: 0 auto;
}

/* ── Header / Hero ────────────────────────────────── */

.header {
    width: 100%;
    margin-bottom: 24px;
}

.page-hero {
    background: linear-gradient(132deg, var(--color-red-700) 0%, var(--color-red-800) 84%);
    color: #fff;
    padding: 22px 28px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 16px 36px rgba(101, 0, 0, 0.23);
}

.hero__logo {
    height: 78px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    flex-shrink: 0;
}

.hero__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    opacity: 0.85;
    margin-bottom: 4px;
}

.hero__title {
    font-size: clamp(1.45rem, 2.8vw, 2.1rem);
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
    margin-bottom: 4px;
}

.hero__subtitle {
    font-size: 0.95rem;
    line-height: 1.45;
    max-width: 60ch;
    opacity: 0.9;
}

.hub-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.hub-chip {
    background: #ffffff;
    color: var(--color-red-700);
    border: 1px solid #f5c5c5;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.hub-grid {
    display: grid;
    gap: 18px;
}

.panel {
    background: var(--color-paper);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 22px;
    border: 1px solid #dce5ef;
}

.panel--public {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.panel--secure {
    background: linear-gradient(180deg, #ffffff 0%, #fff8f2 100%);
}

.panel__head h2 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    color: var(--color-ink-900);
}

.panel__head p {
    color: var(--color-ink-500);
    margin-bottom: 18px;
    line-height: 1.55;
}

.clubauth-cta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    background: linear-gradient(124deg, #193a56 0%, #0e2433 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 14px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.clubauth-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 37, 55, 0.3);
}

.clubauth-cta__label {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.clubauth-cta__hint {
    font-size: 0.9rem;
    opacity: 0.88;
}

/* ── Tiles Grid ───────────────────────────────────── */

.tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

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

/* ── Single Tile ──────────────────────────────────── */

.tile {
    display: flex;
    flex-direction: column;
    padding: 22px 20px;
    border-radius: var(--radius-lg);
    background: var(--color-paper);
    box-shadow: 0 6px 16px rgba(26, 49, 68, 0.08);
    text-decoration: none;
    color: var(--color-ink-900);
    border: 1px solid #d4dfeb;
    transition: transform var(--transition),
                box-shadow var(--transition),
                border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.tile::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: var(--radius-lg);
}

.tile--public::before,
.tile--secondary::before { background: linear-gradient(145deg, #f5fbff00 0%, #ddeefd80 100%); }

.tile--booking::before,
.tile--entnahme::before { background: linear-gradient(145deg, #fff4f200 0%, #ffe7e47d 100%); }

.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.tile--booking:hover,
.tile--entnahme:hover { border-color: var(--color-red-700); }

.tile--secondary:hover,
.tile--public:hover { border-color: #2f6d95; }

.tile:hover::before { opacity: 1; }

/* ── Icon ─────────────────────────────────────────── */

.tile__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    flex-shrink: 0;
}

.tile__icon-wrap--booking,
.tile__icon-wrap--entnahme { background: var(--color-red-100); color: var(--color-red-700); }

.tile__icon-wrap--secondary,
.tile__icon-wrap--public { background: #e7f2fb; color: #1f5b83; }

.tile__svg {
    width: 24px;
    height: 24px;
}

/* ── Tile Content ─────────────────────────────────── */

.tile__body {
    flex: 1;
}

.tile__title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--color-ink-900);
    line-height: 1.3;
}

.tile__desc {
    font-size: 0.9rem;
    color: var(--color-ink-500);
    line-height: 1.55;
}

/* ── Arrow ────────────────────────────────────────── */

.tile__arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 14px;
    transition: transform var(--transition);
}

.tile__arrow svg {
    width: 20px;
    height: 20px;
}

.tile--booking .tile__arrow,
.tile--entnahme .tile__arrow { color: var(--color-red-700); }

.tile--public .tile__arrow,
.tile--secondary .tile__arrow { color: #1f5b83; }

.tile:hover .tile__arrow { transform: translateX(4px); }

/* ── Soon / disabled tiles ────────────────────────── */

.tile--soon {
    opacity: 0.52;
    cursor: not-allowed;
    pointer-events: none;
}

.tile__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff3cd;
    color: #7a5500;
    border: 1px solid #f5cc6a;
    border-radius: 6px;
    padding: 2px 7px;
    margin-left: 6px;
    vertical-align: middle;
}

.clubauth-cta--disabled {
    background: #c7d5e4;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.clubauth-cta--disabled .clubauth-cta__hint {
    opacity: 1;
    font-style: italic;
}

/* ── Next-step note ───────────────────────────────── */

.next-step {
    background: var(--color-paper);
    border-radius: var(--radius-xl);
    padding: 20px 22px;
    border: 1px dashed #c7d5e5;
    color: var(--color-ink-700);
}

.next-step h2 {
    color: var(--color-ink-900);
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.next-step p {
    line-height: 1.55;
}

/* ── Footer ───────────────────────────────────────── */

.footer {
    margin-top: 26px;
    font-size: 0.82rem;
    color: var(--color-ink-500);
    letter-spacing: 0.2px;
}

.footer a {
    color: var(--color-red-700);
}

/* ── Mobile ───────────────────────────────────────── */

@media (max-width: 900px) {
    .tiles,
    .tiles--compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 18px 12px;
    }

    .header {
        margin-bottom: 18px;
    }

    .page-hero {
        padding: 16px;
        gap: 12px;
        border-radius: 18px;
    }

    .hero__logo {
        height: 54px;
    }

    .hero__title {
        font-size: 1.22rem;
    }

    .hero__subtitle {
        font-size: 0.85rem;
    }

    .panel {
        padding: 16px;
    }

    .tile {
        padding: 16px;
    }
}
