/* ==========================================================================
   Füchse Duisburg · VIP-Portal
   Handgeschriebenes Theme, mobile-first. Vereinsfarben zentral als Variablen –
   an das offizielle Corporate Design (Website-Theme) angeglichen.
   ========================================================================== */

@font-face {
    font-family: 'Redzone MediumReg';
    src: url('../../fonts/redzone/Redzone-MediumReg.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Redzone LightReg';
    src: url('../../fonts/redzone/Redzone-LightReg.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Redzone ExtraLightReg';
    src: url('../../fonts/redzone/Redzone-ExtraLightReg.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Redzone BoldReg';
    src: url('../../fonts/redzone/Redzone-BoldReg.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Redzone BlackReg';
    src: url('../../fonts/redzone/Redzone-BlackReg.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Regular';
    src: url('../../fonts/poppins/Poppins-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Light';
    src: url('../../fonts/poppins/Poppins-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Medium';
    src: url('../../fonts/poppins/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins-Bold';
    src: url('../../fonts/poppins/Poppins-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

:root {
    --rot: #df0914;            /* Vereinsrot (offizielles CI) */
    --rot-dunkel: #b70710;
    --rot-hell: #fce6e8;
    --tinte: #1d1e1c;          /* fast schwarz, Header/Fuß (offizielles CI) */
    --tinte-weich: #333333;
    --papier: #f3f5f7;         /* Seitenhintergrund */
    --karte: #ffffff;
    --linie: #e2e7ec;
    --linie-hell: #eef1f4;
    --text: #22262b;
    --text-blass: #5b6670;
    --gruen: #1f7a3d;
    --gruen-hell: #e9f5ee;
    --blau: #0088ce;           /* Sprade-Blau (offizielles CI) */
    --blau-hell: #e6f3fa;
    --gold: #b7791f;
    --gold-hell: #fdf3e2;
    --radius: 14px;
    --radius-klein: 9px;
    --schatten: 0 1px 2px rgba(16, 24, 32, .06), 0 4px 14px rgba(16, 24, 32, .04);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Poppins-Regular', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--papier);
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

h1, h2, h3, h4 { font-family: 'Redzone BlackReg', sans-serif; line-height: 1.25; color: var(--tinte); }
h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .35rem; }
h2 { font-size: 1.12rem; font-weight: 700; margin: 1.6rem 0 .75rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
h4 { font-size: .92rem; font-weight: 700; margin: 1rem 0 .4rem; }
h2:first-child, h3:first-child, h4:first-child { margin-top: 0; }
p { margin: .4rem 0 .8rem; }
a { color: var(--rot); }
a:hover { color: var(--rot-dunkel); }
code { background: var(--linie-hell); padding: .1em .35em; border-radius: 5px; font-size: .92em; }
hr.trenner { border: 0; border-top: 1px solid var(--linie); margin: 1.4rem 0; }
.karte ul, .karte ol { margin: .4rem 0 .8rem; padding-left: 1.3rem; }
.karte li { margin-bottom: .3rem; }

.text-blass { color: var(--text-blass); }

/* --- Barrierefreiheit ---------------------------------------------------- */

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--tinte);
    color: #fff;
    padding: .6rem 1rem;
    z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

:focus-visible {
    outline: 3px solid rgba(223, 9, 20, .4);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Kopfbereich ---------------------------------------------------------- */

.kopf {
    background: var(--tinte);
    color: #fff;
}

.kopf-innen {
    max-width: 1100px;
    margin: 0 auto;
    padding: .65rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.marke {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
    color: #fff;
}
.marke-logo { width: 42px; height: 42px; display: block; }
.marke-text {
    display: flex;
    flex-direction: column;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #c8cfd6;
    line-height: 1.25;
}
.marke-text strong {
    font-family: 'Redzone BlackReg', sans-serif;
    font-size: 1.05rem;
    letter-spacing: .02em;
    color: #fff;
    font-weight: 800;
}

.nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.nav-link {
    color: #c8cfd6;
    text-decoration: none;
    padding: .55rem .7rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
}
.nav-link:hover,
.nav-link.aktiv { color: #fff; background: var(--tinte-weich); }
.nav-abmelden { margin-left: .35rem; }
.nav-abmelden .btn { color: #c8cfd6; }
.nav-abmelden .btn:hover { color: #fff; background: var(--tinte-weich); }

/* --- Inhalt & Karten ------------------------------------------------------ */

.inhalt {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.karte {
    background: var(--karte);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    box-shadow: var(--schatten);
    padding: 1.25rem 1.35rem;
    margin: 0 0 1.1rem;
}

.seiten-kopf { margin: .5rem 0 1.1rem; }
.seiten-kopf p { margin: 0; }
.seiten-kopf-aktion {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.aktions-gruppe { display: flex; gap: .5rem; flex-wrap: wrap; }

.seite-schmal { max-width: 720px; }

.raster {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.1rem;
}
.raster .karte { margin: 0; }

.fehlerseite { max-width: 560px; margin: 3rem auto; text-align: center; }

/* --- Hinweise (Flash) ------------------------------------------------------ */

.hinweis {
    border-radius: var(--radius-klein);
    padding: .8rem 1rem;
    margin: 0 0 1rem;
    border: 1px solid;
    font-weight: 500;
}
.hinweis-erfolg { background: var(--gruen-hell); border-color: #bfe3cd; color: #14522a; }
.hinweis-fehler { background: var(--rot-hell); border-color: #f3c2c8; color: #7d0b16; }
.hinweis-info   { background: var(--blau-hell); border-color: #bedbeb; color: #0f4460; }

/* --- Formulare -------------------------------------------------------------- */

.formular { margin-top: .5rem; }

.feld { margin-bottom: 1rem; }
.feld label, .feld legend {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: .3rem;
    color: var(--tinte);
}
.feld-hinweis { font-size: .85rem; color: var(--text-blass); margin: .3rem 0 0; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: .6rem .75rem;
    font: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid #c9d1d9;
    border-radius: var(--radius-klein);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--rot);
    outline: 3px solid rgba(223, 9, 20, .18);
    outline-offset: 0;
}
input:disabled, select:disabled, textarea:disabled { background: var(--linie-hell); color: var(--text-blass); }
textarea { resize: vertical; }

input[type="checkbox"], input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--rot);
    flex: none;
}

.feld-checkbox label, .radio-zeile {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-weight: 500;
    cursor: pointer;
}
.radio-gruppe { display: grid; gap: .5rem; }
.radio-zeile {
    border: 1px solid var(--linie);
    border-radius: var(--radius-klein);
    padding: .6rem .75rem;
}
.radio-zeile:hover { border-color: #b8c2cc; }

fieldset.feld { border: 0; padding: 0; margin: 0 0 1rem; }

.formular-zeile {
    display: flex;
    gap: .9rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.formular-zeile .feld { margin-bottom: .35rem; }
.feld-wachsen { flex: 1 1 240px; }
.feld-klein { flex: 0 0 110px; }
.feld-aktion { flex: 0 0 auto; }

.formular-aktionen { display: flex; gap: .6rem; align-items: center; margin-top: 1.1rem; flex-wrap: wrap; }

.eingabe-code {
    font-size: 1.3rem;
    letter-spacing: .35em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.qr-wrapper {
    max-width: 220px;
    margin: .5rem 0 .75rem;
    padding: .75rem;
    background: #fff;
    border: 1px solid var(--linie);
    border-radius: var(--radius-klein);
}
.qr-wrapper img { display: block; width: 100%; height: auto; }

.secret-anzeige {
    display: inline-block;
    font-size: 1.05rem;
    letter-spacing: .12em;
    padding: .35rem .6rem;
    margin: .25rem 0;
    word-break: break-all;
}
.uri-link { word-break: break-all; font-size: .85rem; }
.schritte li { margin-bottom: .8rem; }

/* --- Buttons ----------------------------------------------------------------- */

.btn {
    display: inline-block;
    font-family: 'Redzone BlackReg', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: .6rem 1.15rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    background: transparent;
    color: var(--text);
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primaer { background: var(--rot); color: #fff; }
.btn-primaer:not(:disabled):hover { background: var(--rot-dunkel); color: #fff; }

.btn-sekundaer { background: #fff; border-color: #c9d1d9; color: var(--tinte); }
.btn-sekundaer:hover { border-color: var(--tinte); color: var(--tinte); }

.btn-leise { color: var(--text-blass); font-weight: 600; }
.btn-leise:hover { background: var(--linie-hell); color: var(--tinte); }

.btn-gefahr { color: var(--rot); }
.btn-gefahr:hover { background: var(--rot-hell); color: var(--rot-dunkel); }

.btn-gefahr-voll { background: #fff; border-color: var(--rot); color: var(--rot); }
.btn-gefahr-voll:hover { background: var(--rot); color: #fff; }

.btn-breit { width: 100%; }
.btn-klein { padding: .35rem .7rem; font-size: .85rem; border-radius: 8px; }

/* --- Badges ---------------------------------------------------------------------- */

.badge {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .18rem .55rem;
    border-radius: 99px;
    white-space: nowrap;
    vertical-align: middle;
}
.badge-ok         { background: var(--gruen-hell); color: var(--gruen); }
.badge-neu        { background: var(--blau-hell); color: var(--blau); }
.badge-offen      { background: var(--gruen-hell); color: var(--gruen); }
.badge-storniert  { background: var(--linie-hell); color: var(--text-blass); }
.badge-kontingent { background: var(--blau-hell); color: var(--blau); }
.badge-rechnung   { background: var(--gold-hell); color: var(--gold); }
.badge-dauerkarte { background: var(--gold-hell); color: var(--gold); }
.badge-spende     { background: var(--gruen-hell); color: var(--gruen); }
.badge-admin      { background: var(--tinte); color: #fff; }

/* --- Tabellen ----------------------------------------------------------------------- */

.tabelle-scroll { overflow-x: auto; margin: 0 -.35rem; padding: 0 .35rem; }

.tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabelle th {
    text-align: left;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-blass);
    font-weight: 700;
    padding: .5rem .6rem;
    border-bottom: 2px solid var(--linie);
    white-space: nowrap;
}
.tabelle td {
    padding: .6rem;
    border-bottom: 1px solid var(--linie-hell);
    vertical-align: top;
}
.tabelle tr:last-child td { border-bottom: 0; }

.zeile-erledigt td { color: var(--text-blass); }
.zeile-erledigt td strong { color: inherit; }

.spalte-aktion { white-space: nowrap; text-align: right; }
.spalte-zahl { text-align: right; font-variant-numeric: tabular-nums; }
.aktion-inline { display: inline-block; margin-left: .25rem; }

/* --- Kennzahlen & Auslastungsbalken ---------------------------------------------------- */

.kennzahl-band { display: flex; align-items: center; }
.kennzahl { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.kennzahl-wert {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--tinte);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.kennzahl-karte .kennzahl-wert { display: block; margin: .2rem 0 .1rem; }
.kennzahl-text { font-size: 1rem; color: var(--text); max-width: 34ch; }
.kennzahl-spende .kennzahl-wert { color: var(--gruen); }

.balken {
    height: 14px;
    border-radius: 99px;
    background: var(--linie-hell);
    overflow: hidden;
    margin: .5rem 0;
}
.balken-fuellung { height: 100%; border-radius: 99px; background: var(--gruen); }
.balken-fuellung.stufe-warn { background: var(--gold); }
.balken-fuellung.stufe-voll { background: var(--rot); }

/* Breiten in 5-%-Schritten (CSP erlaubt keine Inline-Styles) */
.p0{width:0}.p5{width:5%}.p10{width:10%}.p15{width:15%}.p20{width:20%}
.p25{width:25%}.p30{width:30%}.p35{width:35%}.p40{width:40%}.p45{width:45%}
.p50{width:50%}.p55{width:55%}.p60{width:60%}.p65{width:65%}.p70{width:70%}
.p75{width:75%}.p80{width:80%}.p85{width:85%}.p90{width:90%}.p95{width:95%}
.p100{width:100%}

/* --- Portal: Spielinfo & Dauerkarten-Liste ----------------------------------------------- */

.spiel-info { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--linie-hell); }
.spiel-titel { font-family: 'Redzone BlackReg', sans-serif; font-size: 1.15rem; font-weight: 800; color: var(--tinte); margin: 0 0 .15rem; }

.dk-liste { list-style: none; margin: .8rem 0 1rem; padding: 0; display: grid; gap: .5rem; }

.dk-zeile {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    border: 1px solid var(--linie);
    border-radius: var(--radius-klein);
    padding: .65rem .8rem;
    cursor: pointer;
    background: #fff;
}
.dk-code { font-weight: 800; color: var(--tinte); font-variant-numeric: tabular-nums; }
.dk-bezeichnung { color: var(--text-blass); font-size: .92rem; }

.dk-status {
    margin-left: auto;
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .18rem .55rem;
    border-radius: 99px;
}
.dk-status-an { display: none; background: var(--gruen-hell); color: var(--gruen); }
.dk-status-ab { display: inline-block; background: var(--gold-hell); color: var(--gold); }
.dk-zeile input:checked ~ .dk-status-an { display: inline-block; }
.dk-zeile input:checked ~ .dk-status-ab { display: none; }

@supports selector(li:has(input)) {
    .dk-zeile:has(input:not(:checked)) { background: #fffaf0; border-color: #ecd9b0; }
    .dk-zeile:has(input:checked):hover { border-color: #b8c2cc; }
}

/* --- Sponsor-Formular: Felder je nach Typ ein-/ausblenden --------------------------------- */

@supports selector(form:has(input)) {
    #sponsor-formular .nur-kontingent, #sponsor-formular .nur-dauerkarte { display: none; }
    #sponsor-formular:has(#typ-kontingent:checked) .nur-kontingent { display: block; }
    #sponsor-formular:has(#typ-dauerkarte:checked) .nur-dauerkarte { display: block; }
}

/* --- Auth-Seiten ---------------------------------------------------------------------------- */

.auth-karte { max-width: 430px; margin: 2.5rem auto; }
.auth-links { text-align: center; margin-top: 1.1rem; }

/* --- Fußbereich ------------------------------------------------------------------------------ */

.fuss { background: var(--tinte); color: #9aa3ac; margin-top: auto; }
.fuss-innen {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .85rem;
}
.fuss a { color: #c8cfd6; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }

/* --- Mobil ------------------------------------------------------------------------------------ */

@media (max-width: 640px) {
    h1 { font-size: 1.3rem; }
    .karte { padding: 1rem; }
    .kopf-innen { padding: .55rem .75rem; }
    .marke-logo { width: 36px; height: 36px; }
    .nav { margin-left: 0; width: 100%; }
    .formular-zeile { display: block; }
    .feld-klein { flex: none; }
    .kennzahl-wert { font-size: 1.9rem; }
    .spalte-aktion { text-align: left; }
    .aktion-inline { margin: .15rem .25rem .15rem 0; }
}

/* --- Tabellen auf schmalen Bildschirmen: Zeilen als Karten statt Scroll -------------------------- */

@media (max-width: 700px) {
    .tabelle-gestapelt thead { display: none; }
    .tabelle-gestapelt tr {
        display: block;
        border-bottom: 1px solid var(--linie);
        padding: .5rem 0;
    }
    .tabelle-gestapelt tr:last-child { border-bottom: 0; }
    .tabelle-gestapelt td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: .75rem;
        padding: .25rem 0;
        border-bottom: none;
    }
    .tabelle-gestapelt td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: .74rem;
        text-transform: uppercase;
        letter-spacing: .07em;
        color: var(--text-blass);
        flex-shrink: 0;
    }
    .tabelle-gestapelt td.spalte-aktion {
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
    }
    .tabelle-gestapelt td.spalte-aktion::before { margin-bottom: .3rem; }
}

/* --- Druck (Gästeliste direkt ausdruckbar) ------------------------------------------------------ */

@media print {
    .kopf, .fuss, .nav, .btn, .aktion-inline, .hinweis, .skip-link { display: none !important; }
    body { background: #fff; }
    .karte { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
    a { color: #000; text-decoration: none; }
}
