/* ============================================================
   Schulfest-Liste – Styles
   Warm, freundlich, "Eintragungsliste". Kein externer Font,
   keine externen Requests (DSGVO-freundlich).
   ============================================================ */

:root {
    --bg:           #f4f6f1;
    --surface:      #ffffff;
    --ink:          #222a20;
    --muted:        #6a7464;
    --green:        #2e7d52;
    --green-dark:   #225f3e;
    --honey:        #e6a534;
    --honey-soft:   #fbf1da;
    --border:       #e3e8de;
    --danger:       #c0492f;
    --radius:       14px;
    --shadow:       0 1px 2px rgba(34, 42, 32, .05), 0 8px 24px rgba(34, 42, 32, .06);
    --font:         system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 18px 56px;
}

/* --- Kopf ------------------------------------------------- */
.head { text-align: center; padding: 18px 0 26px; }

.head .eyebrow {
    display: inline-block;
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green);
    font-weight: 700;
    margin-bottom: 10px;
}

.head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.head p {
    margin: 12px auto 0;
    max-width: 30em;
    color: var(--muted);
    font-size: 1rem;
}

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

.card h2 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    font-weight: 700;
}

/* --- Formular --------------------------------------------- */
.field { margin-bottom: 14px; }

.field label {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    background: #fcfdfb;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.field input[type="text"]::placeholder,
.field input[type="password"]::placeholder { color: #aab2a4; }

.field input[type="text"]:focus,
.field input[type="password"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 125, 82, .15);
}

/* --- Buttons ---------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .05s;
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--green-dark); }

.btn-ghost {
    background: transparent;
    color: var(--green-dark);
    border: 1.5px solid var(--border);
    padding: 8px 14px;
    font-size: .9rem;
}
.btn-ghost:hover { border-color: var(--green); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1.5px solid #eccfc8;
    padding: 8px 14px;
    font-size: .9rem;
}
.btn-danger:hover { background: #faeeeb; }

.btn:focus-visible {
    outline: 3px solid rgba(46, 125, 82, .4);
    outline-offset: 2px;
}

/* --- Hinweise / Meldungen ---------------------------------- */
.notice {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: .95rem;
}
.notice-ok    { background: #e7f3ec; color: var(--green-dark); border: 1px solid #c7e3d2; }
.notice-error { background: #faeeeb; color: var(--danger);     border: 1px solid #eccfc8; }

/* --- Liste ------------------------------------------------- */
.list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.list-head h2 { margin: 0; }

.count {
    background: var(--honey-soft);
    color: #8a5d12;
    font-weight: 700;
    font-size: .85rem;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.list { list-style: none; margin: 0; padding: 0; }

.row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 4px;
    border-bottom: 1px dashed var(--border);
}
.row:last-child { border-bottom: none; }

.row .num {
    flex: 0 0 auto;
    min-width: 26px;
    height: 26px;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 700;
    color: var(--green);
    background: #eaf3ee;
    border-radius: 8px;
}

.row .body { flex: 1 1 0; min-width: 0; }
.row .dish { font-weight: 700; word-break: break-word; }
.row .who  { color: var(--muted); font-size: .92rem; }

.row .actions {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.empty {
    text-align: center;
    color: var(--muted);
    padding: 28px 10px;
}

/* --- Fuß / Admin ------------------------------------------ */
.foot {
    text-align: center;
    margin-top: 30px;
    font-size: .88rem;
    color: var(--muted);
}
.foot a { color: var(--green-dark); }

.admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--honey-soft);
    border: 1px solid #f0dcb2;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 22px;
    font-size: .92rem;
}
.admin-bar strong { color: #8a5d12; }

/* --- Login ------------------------------------------------ */
.login-wrap { max-width: 400px; }

/* Auf schmalen Screens: Aktions-Buttons unter den Eintrag, damit der
   Gericht-Text die volle Breite behält und nicht Wort für Wort umbricht. */
@media (max-width: 560px) {
    .row { flex-wrap: wrap; }
    .row .actions {
        flex-basis: 100%;
        padding-left: 38px;   /* bündig unter dem Text (Nummer 26px + 12px Abstand) */
        margin-top: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
