/* ============================================================
   Straßenfest-Organizer – „Sunset“-Farbkonzept
   Verlauf Orange → Pink für Akzente, Teal für Erfolg/Fortschritt
   ============================================================ */
:root {
    --bg: #f7f5f1;
    --card: #ffffff;
    --text: #28241e;
    --muted: #837b6e;
    --border: #ebe6dd;

    --primary: #ea580c;
    --primary-deep: #c2410c;
    --grad: linear-gradient(120deg, #f97316 0%, #ef4056 55%, #db2777 100%);
    --grad-soft: linear-gradient(120deg, rgba(249, 115, 22, .12), rgba(219, 39, 119, .12));

    --teal: #0d9488;
    --teal-deep: #0f766e;
    --grad-teal: linear-gradient(120deg, #14b8a6, #0d9488);

    --radius: 18px;
    --shadow: 0 1px 2px rgba(40, 30, 18, .05), 0 12px 32px -14px rgba(40, 30, 18, .14);
    --ring: 0 0 0 3px rgba(249, 115, 22, .22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    padding-bottom: 80px; /* Platz für mobile Bottom-Nav */
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

a { color: var(--primary-deep); }

h1.page-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; margin: 22px 0 16px; }

h2 {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -.01em;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.muted { color: var(--muted); }
.center { text-align: center; }

.icon { vertical-align: -3px; flex-shrink: 0; }

/* ===== Kopfbereich & Navigation ===== */
.site-header {
    background: var(--grad);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

.brand {
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.12rem;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(4px);
}

.nav { display: flex; gap: 2px; }

.nav a {
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    padding: 8px 13px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .92rem;
    font-weight: 600;
    transition: background .15s;
}

.nav a.active, .nav a:hover { background: rgba(255, 255, 255, .2); }

/* Mobile: Navigation als feste Leiste unten – große Touch-Ziele */
@media (max-width: 720px) {
    .nav {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: rgba(255, 255, 255, .92);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(40, 30, 18, .08);
        justify-content: space-around;
        padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
        z-index: 100;
    }
    .nav a {
        flex-direction: column;
        gap: 3px;
        color: var(--muted);
        font-size: .68rem;
        font-weight: 600;
        padding: 5px 10px;
        min-width: 56px;
        border-radius: 12px;
        text-align: center;
    }
    .nav a.active { color: var(--primary-deep); background: var(--grad-soft); }
    .nav a:hover { background: none; }
    .nav a.active:hover { background: var(--grad-soft); }
}

@media (min-width: 721px) {
    body { padding-bottom: 0; }
}

/* ===== Karten & Inhalte ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 16px;
}

.card.narrow { max-width: 440px; margin: 36px auto; }

.login-badge {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 16px;
    box-shadow: 0 8px 24px -8px rgba(219, 39, 119, .5);
}

.hero {
    text-align: center;
    background:
        radial-gradient(ellipse at top, rgba(249, 115, 22, .07), transparent 60%),
        var(--card);
}

.hero h2 { font-size: 1.5rem; font-weight: 800; justify-content: center; }
.hero-date, .hero-loc { margin: 4px 0; display: flex; align-items: center; justify-content: center; gap: 7px; }
.hero-date { font-size: 1.05rem; font-weight: 600; }
.hero-date .icon, .hero-loc .icon { color: var(--primary); }
.hero-desc { color: var(--muted); margin-top: 14px; }

.countdown {
    display: inline-block;
    background: var(--grad);
    color: #fff;
    border-radius: 999px;
    padding: 7px 20px;
    margin-top: 12px;
    font-weight: 600;
    box-shadow: 0 6px 18px -6px rgba(219, 39, 119, .45);
}

.countdown strong { color: #fff; }

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

.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 16px 6px;
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label { font-size: .84rem; color: var(--muted); font-weight: 600; }

.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }

.tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: transform .12s, box-shadow .12s;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 2px rgba(40, 30, 18, .05), 0 18px 40px -14px rgba(40, 30, 18, .2);
}

.tile strong { font-size: 1.02rem; }

.tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--grad-soft);
    color: var(--primary);
    margin-bottom: 8px;
}

.tile small { color: var(--muted); }

.hint { background: #f0faf8; border: 1px solid #c6ebe4; font-size: .95rem; }

/* ===== Formulare ===== */
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .93rem; }
label small { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="password"], input[type="number"],
input[type="date"], select, textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 13px;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: #fcfbf9;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--primary);
    box-shadow: var(--ring);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.check-label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check-label input { width: 20px; height: 20px; accent-color: var(--primary); }

input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 6px 18px -8px rgba(219, 39, 119, .55);
    transition: transform .12s, box-shadow .12s, filter .12s;
}

.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { display: flex; width: 100%; margin-bottom: 8px; }
.btn-small { padding: 8px 15px; font-size: .87rem; border-radius: 10px; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: none;
}

.btn-ghost:hover { background: #f5f2ec; filter: none; }

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: background .15s, color .15s;
}

.btn-icon:hover { color: #dc2626; background: #fdf0ee; }

.btn-icon-small { padding: 4px; }

/* ===== Listen ===== */
.people-list, .bring-list { list-style: none; margin: 0; padding: 0; }

.people-list li, .bring-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.people-list li:last-child, .bring-list li:last-child { border-bottom: none; }

.bring-list li.is-open {
    background: #fffaf0;
    border: 1px dashed #f5c66b;
    margin: 4px -10px;
    padding: 13px 12px;
    border-radius: 14px;
}

.bring-main { display: flex; flex-direction: column; gap: 6px; min-width: 180px; flex: 1; align-items: flex-start; }
.bring-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bring-head strong { font-size: 1.02rem; }
.bring-note { display: inline-flex; align-items: center; gap: 4px; }
.bring-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Familien, die sich eingetragen haben – als kompakte Chips */
.bring-pledges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pledge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    white-space: nowrap;
    background: #f3efe8;
    color: var(--teal-deep);
    border-radius: 999px;
    padding: 3px 6px 3px 11px;
    font-size: .82rem;
    font-weight: 700;
}
.chip-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    line-height: 0;
}
.chip-x:hover { color: #dc2626; background: #fdf0ee; }

/* ===== Hinweislisten (vorhanden / selbst mitbringen) ===== */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.info-card h2 { display: flex; align-items: center; gap: 8px; }
.info-list { list-style: none; margin: 8px 0 0; padding: 0; }
.info-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.info-list li:last-child { border-bottom: none; }

.claim-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.claim-form input, .claim-form select { width: auto; margin: 0; padding: 8px 10px; font-size: .9rem; }
.claim-form select { max-width: 180px; }
.claim-form .qty-input { width: 64px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3efe8;
    color: var(--muted);
    border-radius: 999px;
    padding: 3px 11px;
    font-size: .77rem;
    font-weight: 700;
    vertical-align: middle;
}

.badge-open { background: #fef3c7; color: #92400e; }
.badge-done { background: #d2f5ec; color: #0f766e; }
.badge-active { background: var(--grad-teal); color: #fff; }

/* Fortschrittsbalken: wie viel der benötigten Menge schon übernommen ist */
.progress {
    display: block;
    width: min(260px, 100%);
    background: #f0ece4;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.progress-fill { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.progress-fill.is-done { background: var(--grad-teal); }

/* ===== Abstimmungen ===== */
.poll-option {
    display: grid;
    grid-template-columns: auto 1fr 90px 32px;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    padding: 9px 0;
    margin-bottom: 0;
}

.poll-option.poll-closed { grid-template-columns: 1fr 90px 32px; }
.poll-option input { width: 20px; height: 20px; margin: 0; }
.poll-text { overflow-wrap: anywhere; }

.poll-bar {
    background: #f0ece4;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.poll-bar span { display: block; height: 100%; background: var(--grad-teal); border-radius: 999px; }

.poll-count { text-align: right; font-weight: 800; color: var(--teal-deep); }

.vote-row { align-items: end; margin-top: 10px; }
.vote-row label { margin-bottom: 0; }

.poll-details { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.poll-details summary { cursor: pointer; font-weight: 600; }

.admin-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }

/* ===== Tabellen (Verbrauch) ===== */
.table-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }

th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }

th {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.compare-table td { min-width: 86px; }

.cell-num { font-weight: 700; display: block; }

.cell-bar {
    display: block;
    background: #f0ece4;
    border-radius: 999px;
    height: 8px;
    margin-top: 4px;
    overflow: hidden;
}

.cell-bar span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }

/* ===== Meldungen ===== */
.flash {
    padding: 13px 16px;
    border-radius: 12px;
    margin: 16px 0;
    background: #e9f7f2;
    border: 1px solid #bfe8da;
    color: #115e4b;
    font-weight: 600;
}

.flash-error { background: #fdf0ee; border-color: #f3c3ba; color: #9b3325; }

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
    padding: 28px 16px 96px;
}

.footer-link { color: var(--muted); }

@media (min-width: 721px) { .site-footer { padding-bottom: 28px; } }
