/* style.css — Ginya Reservierungs-App
   Organic-Zen-Palette — bildet die Website (ginya-hh.de) ab:
   warmes Schwarz + Gold + Creme. Tokens analog zum Theme :root. */

:root {
    --accent: #C2A14D;       /* Gold (Akzent) */
    --accent-hover: #D8BC6E; /* helleres Gold (Hover) */
    --on-accent: #15130E;    /* dunkler Text auf Gold */
    --bg: #15130E;           /* warmes Schwarz */
    --bg-2: #1F1B13;         /* alternierende Fläche */
    --card: #221D14;         /* Karten */
    --line: #3A3326;         /* warmes dunkles Hairline */
    --ink: #ECE4D3;          /* cremeweiße Schrift */
    --muted: #B7A98C;        /* gedämpftes Beige */
    --ok: #4FA877;           /* Grün (bestätigt) auf Dunkel */
    --neu: #C2A14D;          /* Gold (offen) */
    --abg: #6B5D4A;          /* gedämpftes Braun-Grau (abgesagt) */
    --radius: 12px;
    --shadow: 0 12px 36px rgba(0, 0, 0, .45);
    --serif: Georgia, 'Playfair Display', 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
    margin: 0;
    background: var(--bg);
    /* dezenter Gold-Schimmer wie auf der Website */
    background-image:
        radial-gradient(1200px 600px at 100% -10%, rgba(194, 161, 77, .07), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(194, 161, 77, .04), transparent 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

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

/* Deutlich sichtbarer Tastatur-Fokus (Barrierefreiheit) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent-hover);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Topbar ---------- */
.topbar {
    background: rgba(28, 22, 17, .92);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(201, 162, 77, .12);
}
.topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 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; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.topbar__brand img { height: 30px; width: auto; display: block; }
.topbar__name { font-family: var(--serif); color: var(--accent); font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.topbar__brand small { font-weight: 600; color: var(--accent); font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
.topbar__user { font-size: 14px; color: var(--muted); }
.topbar__user a { color: var(--accent); 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: rgba(79, 168, 119, .14);  color: #9fe0bd; border-color: rgba(79, 168, 119, .4); }
.alert--warn  { background: rgba(201, 162, 77, .14);  color: #e6cd92; border-color: rgba(201, 162, 77, .4); }
.alert--error { background: rgba(194, 85, 63, .16);   color: #f0b3a4; border-color: rgba(194, 85, 63, .45); }

/* ---------- 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-family: var(--serif); font-size: 34px; font-weight: 700; 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: 1px solid var(--line); }
.tab {
    padding: 10px 18px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.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: var(--on-accent); }

/* ---------- Tabelle ---------- */
.rtable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.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: #1A140E; color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.rtable tbody tr { border-top: 1px solid var(--line); }
/* Neue Anfragen fallen in jeder Liste sofort auf (Karten-Farbe + Hauch Gold) */
.rtable tbody tr.is-neu { background: #2E2717; }
/* Sprungziel des Erinnerungs-Banners: hinscrollen + kurz aufleuchten */
.rtable tbody tr:target { scroll-margin-top: 90px; animation: neu-blitz 1.6s ease-out 1; }
@keyframes neu-blitz {
    0%   { box-shadow: inset 0 0 0 3px var(--neu); }
    100% { box-shadow: inset 0 0 0 3px transparent; }
}
.rtable .contact a { display: inline-block; }
.rtable td:nth-child(3) { text-transform: uppercase; }
.rtable .note { max-width: 240px; }
/* Tisch-Zuteilung (Mini-Formular in der Zeile) */
.rtable .tisch { white-space: nowrap; }
.tisch-form { display: inline-flex; align-items: center; gap: 4px; }
.tisch-input {
    width: 52px;
    padding: 6px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--bg-2);
    color: var(--ink);
    font-size: 13px;
    text-align: center;
}
.tisch-input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.tisch-save {
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--accent);
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}
.tisch-save:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* Tisch bereits zugeteilt: grün, analog zum Bestätigt-Status */
.tisch-input--set { border-color: var(--ok); font-weight: 700; }
.tisch-save--set { background: var(--ok); color: #0e2a1c; border-color: var(--ok); }
.tisch-save--set:hover { background: #5fb98a; border-color: #5fb98a; color: #0e2a1c; }

.rtable .created { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.rtable .created .created__line { display: block; }
.rtable .created .lbl { display: none; } /* „Eingegangen:"-Label nur mobil (Desktop hat die Spaltenüberschrift) */
.rtable .created .src { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- Badges: runde Status-Symbole (Text als Tooltip) ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0;            /* Label-Text ausblenden, Symbol via ::before */
    white-space: nowrap;
    vertical-align: middle;
}
.badge::before { font-weight: 900; line-height: 1; }
.badge--neu        { background: var(--neu); color: var(--on-accent); }
.badge--neu::before        { content: "!"; font-size: 17px; }
.badge--bestaetigt { background: var(--ok);  color: #0e2a1c; }
.badge--bestaetigt::before { content: "✓"; font-size: 15px; }
.badge--abgesagt   { background: var(--abg); color: #ECE4D3; }
.badge--abgesagt::before   { content: "✕"; font-size: 14px; }

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

/* ---------- Kalender (FullCalendar v6 Dark) ---------- */
#calendar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow);
    --fc-border-color: var(--line);
    --fc-page-bg-color: var(--card);
    --fc-neutral-bg-color: var(--bg-2);
    --fc-today-bg-color: rgba(201, 162, 77, .10);
    --fc-list-event-hover-bg-color: var(--bg-2);
    --fc-button-bg-color: var(--accent);
    --fc-button-border-color: var(--accent);
    --fc-button-text-color: var(--on-accent);
    --fc-button-hover-bg-color: var(--accent-hover);
    --fc-button-hover-border-color: var(--accent-hover);
    --fc-button-active-bg-color: var(--accent-hover);
    --fc-button-active-border-color: var(--accent-hover);
    color: var(--ink);
}
#calendar .fc a { color: var(--ink); }
#calendar .fc .fc-col-header-cell-cushion,
#calendar .fc .fc-daygrid-day-number { color: var(--muted); }
#calendar .fc .fc-toolbar-title { font-family: var(--serif); color: var(--ink); }
.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; }
.cal-legend .dot--neu        { background: #e0a106; }
.cal-legend .dot--bestaetigt { background: #2e8b57; }
.cal-legend .dot--abgesagt   { background: #b0bec5; }

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

/* ---------- Summenzeile unter Liste / Heute / Kalender ---------- */
.list-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    margin: 0 2px 18px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--muted);
}
.list-summary strong { color: var(--accent); font-family: var(--serif); font-size: 18px; margin-right: 4px; }
.list-summary .btn--add { margin-left: auto; padding: 7px 14px; font-size: 13px; }
.csv-link { font-size: 13px; color: var(--accent); white-space: nowrap; }

/* ---------- Formular „Neue Reservierung" ---------- */
.fform { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fform .full { grid-column: 1 / -1; }
.fform label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 5px; color: var(--ink); }
.fform input, .fform select, .fform textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-2);
    color: var(--ink);
    font-family: inherit;
}
.fform input:focus, .fform select:focus, .fform textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.fform textarea { min-height: 70px; resize: vertical; }
/* iOS: Datum/Uhrzeit-Felder ohne Inhalt kollabieren sonst in der Höhe */
.fform input[type="date"], .fform input[type="time"] { -webkit-appearance: none; appearance: none; min-height: 44px; }
.fform .check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 400; color: var(--muted); cursor: pointer; }
.fform .check input { width: auto; margin-top: 2px; min-height: 0; }
.fform .form-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

/* Mobil: Formular 1-spaltig, Modal als Bottom-Sheet, 16px gegen iOS-Auto-Zoom */
@media (max-width: 520px) {
    .fform { grid-template-columns: 1fr; }
    .fform input, .fform select, .fform textarea { font-size: 16px; }
    .fform .form-actions .btn { width: 100%; text-align: center; padding: 13px 16px; }
    .modal { padding: 0; align-items: flex-end; }
    .modal__card {
        max-width: none;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        max-height: 92dvh;
        padding: 20px 16px calc(18px + env(safe-area-inset-bottom));
    }
}

/* Klickbare Tageszellen im Kalender */
#calendar .fc-daygrid-day { cursor: pointer; }

/* ---------- Tages-Popup (Modal) ---------- */
.modal[hidden] { display: none; }
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.modal__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 24px 24px 20px;
}
.modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}
.modal__close:hover { color: var(--ink); background: var(--bg-2); }
.modal__title { font-family: var(--serif); color: var(--accent); margin: 0 28px 2px 0; font-size: 22px; }
.modal__sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.modal__body { display: flex; flex-direction: column; gap: 12px; }

.day-res {
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--bg-2);
}
.day-res--neu        { border-left-color: var(--neu); }
.day-res--bestaetigt { border-left-color: var(--ok); }
.day-res--abgesagt   { border-left-color: var(--abg); opacity: .75; }
.day-res__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-res__time { font-family: var(--serif); color: var(--accent); font-weight: 700; }
.day-res__name { font-weight: 600; color: var(--ink); text-transform: uppercase; }
.day-res__g { color: var(--muted); font-size: 13px; }
.day-res__head .badge { margin-left: auto; }
.day-res__meta { margin-top: 6px; font-size: 13px; }
.day-res__meta a { color: var(--accent); }
.day-res__note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.day-res__actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.day-res__actions .btn { min-width: 130px; text-align: center; }
.day-res__actions .inline { display: inline; }

/* ---------- 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-logo { display: block; height: 40px; width: auto; margin: 0 auto 14px; }
.login-brand { font-family: var(--serif); font-size: 26px; font-weight: 700; 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; color: var(--ink); }
.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;
    background: var(--bg-2);
    color: var(--ink);
}
.login-card input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.login-card .btn { margin-top: 20px; }
.login-title { text-align: center; font-size: 20px; font-weight: 700; color: var(--ink); margin: 18px 0 10px; }
.pw-wrap { position: relative; }
.pw-wrap input[type="password"], .pw-wrap input[type="text"] { width: 100%; padding-right: 92px; }
.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.pw-toggle:hover { color: var(--accent-hover); }

/* ---------- Desktop: kompakte Tabelle (> 760px) ---------- */
@media (min-width: 1201px) {
    .wrap { max-width: 1240px; }
    .rtable th, .rtable td { padding: 10px 8px; }
    .rtable th:first-child, .rtable td:first-child { padding-left: 14px; }
    .rtable th:last-child,  .rtable td:last-child  { padding-right: 14px; }
    .rtable thead th { white-space: nowrap; }
    /* Datum, Zeit, Name, Pers. nie umbrechen */
    .rtable td:nth-child(1), .rtable td:nth-child(2), .rtable td:nth-child(3), .rtable td:nth-child(4) { white-space: nowrap; }
    .rtable .contact { max-width: 200px; min-width: 175px; }
    .rtable .contact a { overflow-wrap: anywhere; }
    /* Anmerkung braucht Mindestbreite, sonst bricht jedes Wort einzeln um */
    .rtable .note { min-width: 150px; max-width: 230px; font-size: 13.5px; }
    /* Eingegangen-Spalte schmal halten: MANUELL-Tag auf eigener Zeile */
    .rtable .created { font-size: 12px; }
    .rtable .created .src { display: block; margin: 0; }
    /* Aktionen: Buttons kompakt, gleich breit wie die Badges (150px) */
    .rtable .actions { white-space: normal; min-width: 150px; }
    .rtable .actions .inline { display: block; }
    .rtable .actions .inline + .inline { margin: 6px 0 0; }
    .rtable .actions .btn { display: block; width: 150px; padding: 7px 10px; font-size: 13px; text-align: center; }
}

/* ---------- Responsive: Tabelle -> kompakte Karten (<= 1200px: Handy, Tablet, mittlere Bildschirme) ---------- */
@media (max-width: 1200px) {
    .kpis { grid-template-columns: 1fr; }
    .wrap { padding-left: 14px; padding-right: 14px; max-width: 100%; }
    /* Button „+ Neue Reservierung": volle Breite unter den Summen */
    .list-summary .btn--add { margin-left: 0; flex: 1 0 100%; text-align: center; padding: 12px 14px; font-size: 14px; }
    /* CSV-Export auf dem Handy ausblenden (nur am Desktop sinnvoll) */
    .csv-link { display: none; }

    .rtable, .rtable tbody { display: block; }
    .rtable thead { display: none; }
    .rtable { border: 0; background: transparent; box-shadow: none; width: 100%; max-width: 100%; }

    /* Karte = eine Reservierung, Felder kompakt in Zeilen angeordnet */
    .rtable tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 6px;
        row-gap: 3px;
        background: var(--card);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-bottom: 12px;
        padding: 12px 14px;
    }
    .rtable td { display: block; border: 0; padding: 0; text-align: left; overflow-wrap: anywhere; font-size: 15.5px; }
    /* Neue Anfragen: goldene Kante an der Karte */
    .rtable tbody tr.is-neu { border-left: 3px solid var(--neu); }

    /* Zeile 1: Datum · Zeit ................. Status */
    .rtable td:nth-child(1) { order: 1; font-weight: 700; }
    .rtable td:nth-child(2) { order: 2; font-weight: 700; color: var(--accent); }
    .rtable td:nth-child(2)::before { content: "· "; color: var(--muted); font-weight: 400; }
    /* Status: in der Kopfzeile rechts — Symbol + lesbarer Text im Badge */
    .rtable td:nth-child(9) { order: 3; margin-left: auto; }
    .rtable td:nth-child(9)::before { content: "Status: "; color: var(--ink); font-weight: 700; font-size: 13px; margin-right: 4px; }
    .rtable td:nth-child(9) .badge {
        width: auto;
        height: auto;
        min-width: 0;
        border-radius: 999px;
        font-size: 12px;      /* macht den Label-Text im Badge sichtbar */
        font-weight: 700;
        padding: 5px 12px;
        gap: 6px;
    }
    /* Trennlinie zwischen Datums-Kopfzeile und Inhalt (danach etwas Luft) */
    .rtable tbody tr::before {
        content: "";
        flex-basis: 100%;
        height: 0;
        order: 4;
        border-top: 1px solid var(--line);
        margin: 7px 0 14px;
    }

    /* Zeile 2: Gäste: Name · X Pers. */
    .rtable td:nth-child(3) { order: 5; font-weight: 600; }
    .rtable td:nth-child(3)::before { content: "Gäste: "; color: var(--muted); font-weight: 400; text-transform: none; }
    .rtable td:nth-child(4) { order: 6; font-weight: 700; }
    .rtable td:nth-child(4)::before { content: "· "; color: var(--muted); font-weight: 400; }
    .rtable td:nth-child(4)::after  { content: " Pers."; }

    /* Tisch: eigene Zeile unter den Gästen */
    .rtable td.tisch { order: 7; flex: 1 0 100%; display: flex; align-items: center; gap: 16px; white-space: nowrap; margin: 8px 0; }
    .rtable td.tisch::before { content: "Tisch: "; color: var(--muted); font-size: 14.5px; margin-right: 2px; }
    /* Abstand zwischen Eingabefeld und ✓-Speichern-Button (im Formular) breiter */
    .rtable td.tisch .tisch-form { gap: 16px; }
    .rtable td.tisch .tisch-input { font-size: 16px; padding: 11px 10px; width: 82px; } /* iOS-Zoom vermeiden */
    .rtable td.tisch .tisch-save { padding: 11px 16px; font-size: 16px; }

    /* Kontakt: „Tel:" und „E-Mail:" je eigene Zeile */
    .rtable td.contact { order: 8; flex: 1 0 100%; font-size: 14.5px; }
    .rtable td.contact br { display: none; }
    .rtable td.contact a { display: block; word-break: break-all; margin: 0 0 2px; }
    .rtable td.contact a::before { display: inline-block; margin-right: 4px; color: var(--muted); font-weight: 400; }
    .rtable td.contact a[href^="tel:"]::before    { content: "Tel:"; }
    .rtable td.contact a[href^="mailto:"]::before { content: "E-Mail:"; }

    /* Anmerkung (leere „—"-Anmerkung wird ganz ausgeblendet) */
    .rtable td.note { order: 9; flex: 1 0 100%; max-width: none; font-size: 14.5px; color: var(--muted); }
    .rtable td.note:has(> .muted) { display: none; }

    /* Eingegangen / Bestätigt (mit Leerzeile davor); Buttons sitzen rechts daneben.
       flex-basis klein halten, damit Zeitstempel + 1 Button in eine Zeile passen. */
    .rtable td.created { order: 10; flex: 1 1 140px; min-width: 0; white-space: normal; margin-top: 12px; }
    .rtable td.created .lbl { display: inline; }
    .rtable td.created .src { margin-left: 6px; }

    /* Aktionen: gleich große Buttons, rechts neben den Zeitstempeln
       (bei Platzmangel wrappen sie automatisch auf eine eigene Zeile) */
    .rtable td.actions { order: 11; flex: 0 1 auto; margin-left: auto; align-self: flex-end; display: flex; gap: 8px; margin-top: 10px; white-space: normal; justify-content: flex-end; }
    .rtable td.actions .inline { display: block; flex: 0 0 auto; }
    .rtable td.actions .btn { display: block; width: 150px; text-align: center; padding: 13px 12px; } /* >= 44px Touch-Höhe */
    /* „Absagen" schmaler als „Bestätigen" (Hauptaktion) — rot tritt zurück */
    .rtable td.actions .btn--no { width: 104px; }
    .actions .inline + .inline { margin-left: 0; }

    /* Größere Touch-Flächen für Filter-Chips und Tabs */
    .chip { padding: 9px 16px; font-size: 14px; }
    .tab  { padding: 12px 16px; }
}

/* Sehr kleine Displays (< 390px): Aktions-Buttons untereinander in voller Breite */
@media (max-width: 389px) {
    .rtable td.actions { flex: 1 0 100%; margin-left: 0; flex-wrap: wrap; }
    .rtable td.actions .inline { flex: 1 0 100%; }
    .rtable td.actions .btn { width: 100%; }
}
