/* style.css — Mama LeBao Reservierungs-App
   Warme Restaurant-Palette. Eigenständig (kein Bezug zu anderen Firmenfarben). */

:root {
    --accent: #a8312b;     /* Rot (Akzent) */
    --accent-dark: #872620;
    --bg: #f6f1ea;         /* warmer Hintergrund */
    --card: #ffffff;
    --line: #e7ddcf;
    --ink: #2b2018;        /* dunkle Schrift */
    --muted: #8a7d6e;
    --ok: #2e8b57;
    --neu: #e0a106;
    --abg: #b0bec5;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(43, 32, 24, .06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--accent); }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--accent);
    color: #fff;
}
.topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar__brand { font-size: 20px; font-weight: 700; letter-spacing: .4px; }
.topbar__brand small { font-weight: 400; opacity: .85; font-size: 13px; }
.topbar__user { font-size: 14px; }
.topbar__user a { color: #fff; text-decoration: underline; }

/* ---------- Layout ---------- */
.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 20px 60px; }

/* ---------- Alerts / Flash ---------- */
.alert {
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 0 0 18px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert--ok    { background: #e7f4ec; color: #1f6b41; border-color: #bfe2cd; }
.alert--warn  { background: #fdf3da; color: #8a6400; border-color: #f1dca0; }
.alert--error { background: #fbe6e4; color: #8d2620; border-color: #f0c1bc; }

/* ---------- KPIs ---------- */
.kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0 0 22px;
}
.kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    text-align: center;
}
.kpi__num { display: block; font-size: 32px; font-weight: 800; color: var(--accent); line-height: 1; }
.kpi__lbl { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 2px solid var(--line); }
.tab {
    padding: 10px 18px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Chips (Statusfilter) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.chip {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Tabelle ---------- */
.rtable { width: 100%; border-collapse: collapse; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.rtable th, .rtable td { padding: 12px 14px; text-align: left; vertical-align: top; font-size: 14px; }
.rtable thead th { background: #efe6d8; color: #5e5346; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.rtable tbody tr { border-top: 1px solid var(--line); }
.rtable .contact a { display: inline-block; }
.rtable .note { max-width: 240px; }
.muted { color: var(--muted); }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.badge--neu        { background: var(--neu); }
.badge--bestaetigt { background: var(--ok); }
.badge--abgesagt   { background: var(--abg); color: #44505a; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { background: var(--accent-dark); }
.btn--block { width: 100%; }
.btn--ok { background: var(--ok); }
.btn--ok:hover { background: #246c44; }
.btn--no { background: #c4564f; }
.btn--no:hover { background: #a8312b; }
.actions { white-space: nowrap; }
.inline { display: inline; }
.actions .inline + .inline { margin-left: 6px; }

/* ---------- Kalender ---------- */
#calendar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow); }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cal-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

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

/* ---------- Login / Tool ---------- */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.login-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 34px;
    width: 100%;
    max-width: 380px;
}
.login-brand { font-size: 26px; font-weight: 800; color: var(--accent); text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin: 4px 0 22px; font-size: 14px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
}
.login-card input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.login-card .btn { margin-top: 20px; }

/* ---------- Responsive: Tabelle -> Karten (< 760px) ---------- */
@media (max-width: 760px) {
    .kpis { grid-template-columns: 1fr; }
    .rtable, .rtable thead, .rtable tbody, .rtable tr, .rtable th, .rtable td { display: block; }
    .rtable thead { display: none; }
    .rtable { border: 0; background: transparent; box-shadow: none; }
    .rtable tbody tr {
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 14px;
        padding: 6px 4px;
    }
    .rtable td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        border: 0;
        padding: 8px 14px;
        text-align: right;
    }
    .rtable td::before {
        content: attr(data-l);
        font-weight: 700;
        color: var(--muted);
        text-align: left;
        flex: 0 0 40%;
    }
    .rtable .note, .rtable .contact { text-align: right; }
    .actions { text-align: right; }
    .actions .inline + .inline { margin-left: 0; }
    .actions .btn { margin-top: 6px; }
}
