/* broilerdata – Grundgestaltung der Anwendung */
:root {
    --bg:        #0f1419;
    --surface:   #161d25;
    --surface-2: #1d2630;
    --border:    #2a3541;
    --text:      #e8edf2;
    --muted:     #8a97a6;
    --accent:    #f2a516;
    --accent-dk: #d18d0c;
    --danger:    #e5534b;
    --radius:    8px;
    --sidebar-w: 232px;
    --font:      system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: inherit; }

/* ── Marke ─────────────────────────────────────────── */
.brand { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }
.brand-lg { font-size: 2rem; text-align: center; display: block; }
/* kleines neutrales „Beta“ hinter dem Schriftzug (bd_beta() in config.php) */
.beta { display: inline-block; margin-left: .45em; padding: .1em .4em; vertical-align: .35em; font-size: .5rem; font-weight: 600;
        letter-spacing: .08em; text-transform: uppercase; line-height: 1.2; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; }
.brand-lg .beta { font-size: .6rem; vertical-align: .9em; }
/* haftung.php – Haftungsausschluss akzeptieren */
.haftung-karte { max-width: 440px; }
.haftung-hinweis { padding: 1rem 0; border-top: 1px solid var(--border); }
.haftung-hinweis h1 { font-size: 1.05rem; margin-bottom: .6rem; }
.haftung-hinweis p { font-size: .92rem; line-height: 1.55; color: #c3ccd5; }
.haftung-hinweis p + p { margin-top: .6rem; }
.haftung-nebenbei { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; font-size: .78rem; color: var(--muted); padding-bottom: 1rem; margin-bottom: .6rem; border-bottom: 1px solid var(--border); }
.haftung-nebenbei a, .haftung-nebenbei button { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.haftung-nebenbei a:hover, .haftung-nebenbei button:hover { color: var(--accent); }
.haftung-knoepfe { display: flex; gap: .6rem; margin-top: 1rem; }
.haftung-knoepfe .btn-primary { flex: 1; }

/* ── Knöpfe & Felder ───────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: none; border-radius: var(--radius);
       padding: .65rem 1.1rem; font: 600 .95rem var(--font); cursor: pointer; text-decoration: none; transition: background .15s; }
.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-block { width: 100%; }
.btn-ghost { font-size: .85rem; color: var(--muted); text-decoration: none; padding: .35rem .7rem; border: 1px solid var(--border);
             border-radius: var(--radius); transition: color .15s, border-color .15s; }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
button.btn-ghost { background: none; font: 500 .85rem var(--font); cursor: pointer; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.field input { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
               padding: .65rem .8rem; font: inherit; outline: none; transition: border-color .15s; }
.field input:focus { border-color: var(--accent); }
.alert { padding: .65rem .85rem; border-radius: var(--radius); font-size: .88rem; margin-bottom: 1rem; }
.alert-error { background: rgba(229, 83, 75, .12); border: 1px solid rgba(229, 83, 75, .4); color: #ff8a83; }

/* ── Login ─────────────────────────────────────────── */
body.auth { display: flex; flex-direction: column; min-height: 100vh;
            background: radial-gradient(ellipse at top, #1b2632 0%, var(--bg) 60%); }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border);
             border-radius: 14px; padding: 2rem 1.75rem; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.auth-sub { text-align: center; color: var(--muted); font-size: .9rem; margin: .35rem 0 1.6rem; }

/* ── App-Rahmen: Navigation links, Inhalt rechts ───── */
body.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface);
           border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 1.25rem .85rem; gap: 1.75rem; }
.sidebar .brand { padding: 0 .55rem; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: .2rem; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: var(--radius);
            color: var(--muted); text-decoration: none; font-weight: 500; transition: background .15s, color .15s; }
.nav-item .icon { width: 19px; height: 19px; vertical-align: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: rgba(242, 165, 22, .12); color: var(--accent); }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 2rem;
          border-bottom: 1px solid var(--border); background: rgba(15, 20, 25, .85); position: sticky; top: 0; z-index: 10;
          backdrop-filter: blur(6px); }
.page-title { font-size: 1.35rem; font-weight: 700; }
.user { display: flex; align-items: center; gap: .75rem; font-size: .88rem; }
.user-name { font-weight: 600; }
.user-role { color: var(--accent); background: rgba(242, 165, 22, .1); padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.content { flex: 1; padding: 2rem; }

/* Leerer Zustand */
.empty { max-width: 520px; margin: 4rem auto; text-align: center; background: var(--surface); border: 1px dashed var(--border);
         border-radius: 14px; padding: 2.5rem 2rem; }
.empty-icon { font-size: 2.4rem; margin-bottom: .6rem; }
.empty h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.empty p { color: var(--muted); font-size: .92rem; }

/* ── Seitenkopf im Inhalt (Zähler links, Aktion rechts) ── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-intro { color: var(--muted); font-size: .92rem; }
.alert-ok { background: rgba(63, 185, 120, .12); border: 1px solid rgba(63, 185, 120, .4); color: #6fd59d; }
.alert-hinweis { background: rgba(242, 166, 30, .1); border: 1px solid rgba(242, 166, 30, .4); color: var(--text); }
/* Dashboard: E-Mail noch nicht bestätigt – Text links, „erneut senden“ rechts */
.mail-hinweis { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.mail-hinweis .btn-ghost { flex: none; }
.muted { color: var(--muted); font-size: .88rem; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: 1.25rem; }
.back-link:hover { color: var(--accent); }

/* ── Ställe: Kacheln ───────────────────────────────── */
.stall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.stall-card { position: relative; display: flex; flex-direction: column; gap: .35rem; min-height: 150px; padding: 1.3rem 1.25rem;
              background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none;
              transition: border-color .15s, transform .15s, box-shadow .15s; }
.stall-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.stall-icon { font-size: 1.7rem; line-height: 1; }
.stall-icon.lg { font-size: 2.4rem; }
.stall-name { font-size: 1.15rem; font-weight: 700; margin-top: auto; overflow-wrap: anywhere; }
.stall-meta { font-size: .78rem; color: var(--muted); }
.stall-arrow { position: absolute; top: 1.1rem; right: 1.2rem; color: var(--muted); transition: color .15s, transform .15s; }
.stall-card:hover .stall-arrow { color: var(--accent); transform: translateX(3px); }
.stall-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.stall-head h2 { font-size: 1.5rem; }
.stall-head .dot { margin: 0 .3rem; }
.stall-head + .empty { margin-top: 1rem; }

/* ── Formular-Karte ────────────────────────────────── */
.form-card { max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem 1.5rem; }
.form-title { font-size: 1.05rem; margin-bottom: 1.1rem; }
.form-hint { font-size: .82rem; color: var(--muted); margin: -.25rem 0 1.25rem; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--border); }

[hidden] { display: none !important; }

/* ── Icons (SVG statt Emojis) ──────────────────────── */
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; vertical-align: -.25em; }
.icon-sm { width: 1em; height: 1em; vertical-align: -.15em; }
.icon-xs { width: .95em; height: .95em; vertical-align: -.15em; opacity: .8; }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn-ghost { display: inline-flex; align-items: center; gap: .35rem; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; }
.empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 16px;
              background: rgba(242, 165, 22, .1); color: var(--accent); margin-bottom: .9rem; }
.empty-icon .icon { width: 32px; height: 32px; }
.stall-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px;
              background: rgba(242, 165, 22, .1); color: var(--accent); }
.stall-icon .icon { width: 24px; height: 24px; }
.stall-icon.lg { width: 56px; height: 56px; }
.stall-icon.lg .icon { width: 30px; height: 30px; }
.stall-arrow .icon { width: 18px; height: 18px; }

/* ── Weitere Knöpfe ────────────────────────────────── */
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-danger-ghost { background: none; color: var(--danger); border: 1px solid rgba(229, 83, 75, .4); }
.btn-danger-ghost:hover { background: rgba(229, 83, 75, .1); }

/* ── Panels (Einstellungen) ────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1.25rem; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.panel-title { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.panel-title .icon { color: var(--accent); }
.panel-sub { color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.panel-empty { padding: 2rem 1.25rem; text-align: center; color: var(--muted); font-size: .92rem; }

.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; text-decoration: none; border-bottom: 1px solid var(--border); transition: background .15s; }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--surface-2); }
.list-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(242, 165, 22, .1); color: var(--accent); }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.list-title { font-weight: 600; }
.list-meta { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.list-meta .dot { margin: 0 .2rem; }
.list-date { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.list-arrow { color: var(--muted); }
.list-row:hover .list-arrow { color: var(--accent); }

/* ── Layout-Editor ─────────────────────────────────── */
.le-general { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; padding: 1.25rem; }
.le-general .field { margin-bottom: 0; }
.le-name { flex: 1 1 320px; }
.le-days { width: 140px; }
.le-checks { display: flex; flex-direction: column; }
.anwenden-liste { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.anwenden-liste li { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 8px;
                     background: var(--surface-2); border: 1px solid var(--border); font-size: .88rem; font-weight: 600; }
.anwenden-liste .icon { color: var(--accent); }
.anwenden-hinweis { font-size: .85rem; }
.check { display: flex; align-items: center; gap: .7rem; cursor: pointer; padding: .55rem .2rem; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border); background: var(--bg); flex-shrink: 0; position: relative; transition: background .15s, border-color .15s; }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #1a1205; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check small { display: block; color: var(--muted); font-size: .8rem; }
.le-tools { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Bogen ist Teil der Seite: kein eigener Scrollbereich, es scrollt die ganze Seite; zu viele Spalten → blättern */
.le-board { overflow: visible; }
.le-wrap { padding: 0; }
.le-table { border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.le-table th, .le-table td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 0; }
.le-table thead th { position: sticky; top: var(--topbar-h, 0px); z-index: 2; background: var(--surface-2); }
.le-corner { position: sticky; left: 0; z-index: 3 !important; padding: .6rem .9rem !important; text-align: left; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.le-colhead { padding: .45rem .5rem !important; }
.le-col-name { width: 100%; min-width: calc(var(--w, 11) * 1.15ch + 1.2rem); background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: .4rem .55rem; font: 600 .88rem var(--font); outline: none; }
.le-col-name:focus { border-color: var(--accent); }
.le-col-tools { display: flex; justify-content: flex-end; gap: .15rem; margin-top: .3rem; }
.le-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: none; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.le-icon-btn:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.le-icon-btn.danger:hover { color: var(--danger); }
.le-icon-btn:disabled { opacity: .3; cursor: default; }
.le-rowhead { position: sticky; left: 0; z-index: 1; background: var(--surface); padding: 0 .4rem 0 .9rem !important; text-align: left; white-space: nowrap; }
.le-rowhead:has(.le-row-name) { display: flex; align-items: center; gap: .2rem; padding: .25rem .3rem .25rem .5rem !important; }
.le-day { font-weight: 600; color: var(--muted); font-size: .85rem; }
.le-row-name { flex: none; width: calc(var(--w, 8) * 1ch + 1.1rem); background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: .35rem .5rem; font: .86rem var(--font); outline: none; }
.le-row-name:focus { border-color: var(--accent); }
.le-cell { width: 100%; min-width: calc(var(--w, 3) * 1ch + 1.5rem); border: none; background: transparent; color: var(--text); padding: .55rem .7rem; font: .9rem var(--font); text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.le-cell:hover { background: rgba(255, 255, 255, .03); }
.le-cell:focus { background: rgba(242, 165, 22, .08); box-shadow: inset 0 0 0 2px var(--accent); }
.le-cell::placeholder { color: var(--border); }
.le-table tbody tr:hover .le-rowhead { color: var(--text); }
.le-empty { padding: 2rem 1.25rem; text-align: center; color: var(--muted); font-size: .92rem; }
.le-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .75rem; padding: .9rem 1.25rem; background: var(--surface);
              border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .3); }
.le-spacer { flex: 1; }
.le-modus { color: var(--muted); }
.le-modus.is-live { color: var(--accent); border-color: var(--accent); }

/* ── Stall: Layout auswählen ──────────────────────── */
.pick { max-width: 640px; }
.pick-body { padding: 1.1rem 1.25rem 1.25rem; }
.pick-actions { margin-top: 1.1rem; }
.pick-cta { margin-top: 1rem; }

.choice-list { display: flex; flex-direction: column; gap: .6rem; text-align: left; }
.choice { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 10px;
          background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--muted); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px;
               background: rgba(242, 165, 22, .1); color: var(--accent); flex-shrink: 0; }
.choice-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; transition: border-color .15s, box-shadow .15s; }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(242, 165, 22, .06); }
.choice:has(input:checked) .choice-dot { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 10px var(--accent); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Stall: Datenbogen-Tabelle (Teil der Seite, kein eigener Scrollbereich) ── */
.sheet { border-collapse: separate; border-spacing: 0; font-size: .9rem; background: var(--surface);
         border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.sheet th, .sheet td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: .55rem .8rem; white-space: nowrap; }
.sheet thead th { position: sticky; top: var(--topbar-h, 0px); z-index: 2; background: var(--surface-2); text-align: left; font-weight: 600; }
.sheet .sheet-corner { left: 0; z-index: 3; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sheet-rowhead { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 600; color: var(--muted); }
.sheet td { padding: 0; }
.sheet tbody tr:hover td, .sheet tbody tr:hover .sheet-rowhead { background: var(--surface-2); color: var(--text); }
/* Eingabefeld je Zelle; der Sollwert steht als placeholder grau im Hintergrund und verschwindet mit dem eingetragenen Wert */
.sheet-cell { display: block; width: 100%; min-width: calc(var(--w, 3) * 1ch + 1.6rem); height: 2.4rem; padding: 0 .8rem; border: none; background: transparent;
              color: var(--text); font: 600 .92rem var(--font); text-align: right; font-variant-numeric: tabular-nums; outline: none; transition: background .3s, box-shadow .3s; }
.sheet-cell::placeholder { color: var(--muted); opacity: .45; font-weight: 400; }
.sheet-cell:hover { background: rgba(255, 255, 255, .03); }
.sheet-cell:focus { background: rgba(242, 165, 22, .08); box-shadow: inset 0 0 0 2px var(--accent); }
.sheet-cell.is-saving { color: var(--muted); }
/* Augen-Knopf an: Sollwert klein links in ausgefüllten Feldern (leere Felder zeigen ihn ohnehin als Hintergrund) */
.sheet.show-soll td[data-soll] { position: relative; }
.sheet.show-soll td[data-soll]:not(:has(.sheet-cell:placeholder-shown))::before {
    content: attr(data-soll); position: absolute; left: .55rem; top: 50%; transform: translateY(-50%); pointer-events: none;
    color: var(--muted); opacity: .6; font-size: .78rem; font-variant-numeric: tabular-nums; }
.sheet.show-soll .sheet-cell { min-width: calc((var(--w, 3) + var(--s, 0)) * 1ch + 2.4rem); }
/* Symbol-Knöpfe oben rechts im Stall-Kopf (Auge = Sollwerte, QR-Code) */
.head-actions { margin-left: auto; display: flex; gap: .5rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px;
            border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.icon-btn .icon { width: 22px; height: 22px; }
.icon-btn span { display: inline-flex; }
.soll-toggle .when-on, .soll-toggle.active .when-off { display: none; }
.soll-toggle.active .when-on { display: inline-flex; }
.soll-toggle.active { border-color: var(--accent); color: var(--accent); background: rgba(242, 165, 22, .1); }
.sheet-cell.is-saved { box-shadow: inset 0 0 0 2px #3fb978; }
/* Protokollspalte: wer die Zeile zuletzt bearbeitet hat (nur Anzeige) */
.sheet .sheet-prot { padding: .25rem .8rem; line-height: 1.2; color: var(--muted); font-size: .75rem; }
.sheet-prot b { display: block; color: var(--text); font-weight: 600; font-size: .8rem; }
.sheet-prot-head { color: var(--muted); }
.le-prot, .le-prot-head { color: var(--muted); font-size: .78rem; font-style: italic; white-space: nowrap; padding: .5rem .8rem; opacity: .7; }
.le-prot-head { font-style: normal; font-weight: 600; }
.sheet-cell.is-error { color: #ff8a83; box-shadow: inset 0 0 0 2px var(--danger); }

/* Beim Springen per Pfeiltaste das Feld nicht unter der festen Kopfzeile bzw. Speichern-Leiste verstecken */
.le-table input, .sheet input { scroll-margin: calc(var(--topbar-h, 0px) + 5rem) 0 6rem; }

/* ── Fenster (Popup) über der Seite, z. B. QR-Code ── */
dialog.modal { margin: auto; width: calc(100% - 2rem); max-width: 440px; padding: 1.25rem 1.4rem 1.4rem; border: 1px solid var(--border);
               border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
dialog.modal[open] { animation: modal-pop .2s ease-out; }
dialog.modal::backdrop { background: rgba(8, 11, 14, .72); backdrop-filter: blur(3px); }
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.modal-head h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.modal-head h2 .icon { color: var(--accent); }
.modal-text { color: var(--muted); font-size: .88rem; margin-bottom: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; padding-top: 1rem; margin-top: .25rem; border-top: 1px solid var(--border); }
.termin-felder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1rem; }
.modal .field { min-width: 0; }
.modal .field input:not([type=checkbox]):not([type=radio]), .modal .field select, .modal .field textarea { width: 100%; min-width: 0; }
.termin-felder input { color-scheme: dark; }
@media (max-width: 480px) { .termin-felder { grid-template-columns: minmax(0, 1fr); } }
.termine { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; color: var(--muted); font-size: .88rem; }
.termine b { color: var(--text); font-weight: 600; }
.termin-info { margin-left: .5rem; padding: .1rem .55rem; border-radius: 999px; background: rgba(242, 165, 22, .1); color: var(--accent); font-size: .78rem; font-weight: 600; }
.termin-info.is-vorbei { background: rgba(138, 151, 166, .15); color: var(--muted); }

/* Stall-Auswahl in Termin-Popups */
.stall-checks { margin-top: .25rem; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.stall-checks-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem .8rem;
                     background: var(--surface-2); border-bottom: 1px solid var(--border); }
.stall-checks-head > span { font-size: .8rem; font-weight: 600; color: var(--muted); }
.stall-checks-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 .5rem; padding: .3rem .8rem; max-height: none; }
.check-sm { gap: .55rem; padding: .4rem 0; font-size: .9rem; }
.check-sm .check-box { width: 19px; height: 19px; border-radius: 5px; }
.check-sm input:checked + .check-box::after { left: 5px; top: 1px; width: 5px; height: 10px; }
.check.is-fest { cursor: default; }
.check.is-fest .check-box { opacity: .6; }
.check small { display: inline; }

/* ── Kalender ──────────────────────────────────────── */
.kal-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kal-legende { display: flex; gap: 1rem; color: var(--muted); font-size: .85rem; }
.kal-legende span { display: inline-flex; align-items: center; gap: .35rem; }
.kal-legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.kal-wt { padding: .55rem .7rem; background: var(--surface-2); color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em;
          text-transform: uppercase; border-bottom: 1px solid var(--border); }
.kal-tag { position: relative; min-height: 112px; padding: .4rem .45rem .5rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
           display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.kal-tag:nth-child(7n) { border-right: none; }
.kal-tag.is-fremd { background: rgba(0, 0, 0, .18); }
.kal-tag.is-fremd .kal-nr { opacity: .4; }
.kal-tag.is-we { background: rgba(255, 255, 255, .015); }
.kal-kopf { display: flex; align-items: center; justify-content: space-between; }
.kal-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%; font-size: .85rem; font-weight: 600; color: var(--muted); }
.kal-tag.is-heute .kal-nr { background: var(--accent); color: #1a1205; }
.kal-plus { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: none; border-radius: 6px;
            background: none; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.kal-tag:hover .kal-plus, .kal-plus:focus-visible { opacity: 1; }
.kal-plus:hover { background: var(--surface-2); color: var(--accent); }
@media (hover: none) { .kal-plus { opacity: .7; } } /* Touch-Geräte: kein Hover, + immer zeigen */
.kal-ev { display: flex; align-items: center; gap: .3rem; padding: .2rem .45rem; border-radius: 6px; font-size: .78rem; font-weight: 600; text-decoration: none;
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.kal-ev .icon { width: 13px; height: 13px; flex-shrink: 0; }
.kal-ev.is-ein, .kal-legende .is-ein { background: rgba(63, 185, 120, .14); color: #6fd59d; border-color: #3fb978; }
.kal-ev.is-aus, .kal-legende .is-aus { background: rgba(229, 83, 75, .13); color: #ff8a83; border-color: var(--danger); }
.kal-ev:hover { filter: brightness(1.2); }
.kal-legende .is-ein { background: #3fb978; }
.kal-legende .is-aus { background: var(--danger); }
.kal-art { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: 1rem; }
.kal-art label { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem; border: 1px solid var(--border); border-radius: 10px;
                 cursor: pointer; font-weight: 600; color: var(--muted); transition: border-color .15s, background .15s, color .15s; }
.kal-art input { position: absolute; opacity: 0; pointer-events: none; }
.kal-art label:has(input[value="einstall"]:checked) { border-color: #3fb978; background: rgba(63, 185, 120, .12); color: #6fd59d; }
.kal-art label:has(input[value="ausstall"]:checked) { border-color: var(--danger); background: rgba(229, 83, 75, .12); color: #ff8a83; }
.kal-art label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 800px) { .kal-tag { min-height: 80px; padding: .25rem; } .kal-ev { font-size: .68rem; padding: .15rem .3rem; } .kal-ev .icon { display: none; } }
.qr-box { display: flex; justify-content: center; padding: 1rem; background: #fff; border-radius: 12px; }
.qr-box canvas { display: block; width: 100%; max-width: 280px; height: auto; image-rendering: pixelated; }
.qr-inhalt { margin: .8rem 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.qr-inhalt span { color: var(--text); overflow-wrap: anywhere; }
.qr-export { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.qr-export-label { display: inline-flex; align-items: center; gap: .35rem; margin-right: auto; color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ── Blättern bei vielen Spalten (assets/js/sheet-pager.js) ── */
.pager { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin-bottom: .75rem; }
.le-wrap .pager { margin: 0; padding: .7rem 1.25rem; border-bottom: 1px solid var(--border); }
.pager-btn, .pager-num { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .55rem;
                         border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); color: var(--text);
                         font: 600 .88rem var(--font); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pager-btn:hover:not(:disabled), .pager-num:hover { border-color: var(--muted); }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-num.active { background: var(--accent); border-color: var(--accent); color: #1a1205; }
.pager-info { margin-left: .6rem; color: var(--muted); font-size: .85rem; }

/* ── Mitarbeiter: Profilbild (rund) statt Haus-Symbol ── */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
          background: rgba(242, 165, 22, .1); color: var(--accent); flex-shrink: 0; }
.avatar .icon { width: 60%; height: 60%; vertical-align: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-lg { width: 84px; height: 84px; }
.person-card:not(.is-link) { cursor: default; }
.person-card:not(.is-link):hover { transform: none; box-shadow: none; border-color: var(--border); }
.person-card.is-inaktiv { opacity: .55; }
.person-rolle.is-admin { color: var(--accent); }

.pb { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.pb-text { display: flex; flex-direction: column; gap: .15rem; }
.pb-text small { color: var(--muted); font-size: .8rem; }
.pb-tools { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.pb-wahl { position: relative; padding: .5rem .9rem; font-size: .88rem; }
.pb-wahl input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field select { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
                padding: .65rem .8rem; font: inherit; outline: none; }
.field select:focus { border-color: var(--accent); }
.form-card .check { margin: -.25rem 0 1rem; }

/* ── Mitarbeiter-Seite: Arbeitszeiten ───────────────── */
.az-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.az-titel { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.az-titel .icon { color: var(--accent); }
.az-monat { display: flex; align-items: center; gap: .4rem; }
.az-monat .pager-btn { text-decoration: none; }
.az-monat-name { min-width: 140px; text-align: center; font-weight: 700; }
.az-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: .92rem; }
.az-table th, .az-table td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.az-table thead th { position: sticky; top: var(--topbar-h, 0px); z-index: 2; background: var(--surface-2); color: var(--muted); font-size: .75rem;
                     font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.az-table thead th:first-child { border-top-left-radius: 12px; }
.az-table thead th:last-child { border-top-right-radius: 12px; }
.az-table tbody tr:not(.az-neu):hover td { background: var(--surface-2); }
.az-table tfoot td { border-bottom: none; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.az-table tfoot td:first-child { border-bottom-left-radius: 12px; }
.az-table tfoot td:last-child { border-bottom-right-radius: 12px; }
.az-table tfoot b { color: var(--accent); font-size: 1.05rem; }
.az-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.az-tag { display: inline-block; width: 1.9rem; color: var(--muted); }
.az-aktion { width: 1%; text-align: right !important; }
.az-aktion form { display: inline; }
.list-row.is-heute .list-title { color: var(--accent); }
.az-leer { text-align: center !important; color: var(--muted); padding: 1.5rem !important; }
.az-neu td { background: rgba(242, 165, 22, .05); }
.az-neu input { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: .45rem .6rem;
                font: inherit; outline: none; color-scheme: dark; }
.az-neu input:focus { border-color: var(--accent); }
.az-pause { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); }
.az-pause input { width: 5rem; }
.az-vorschau { font-weight: 700; color: var(--accent); }
.az-vorschau.is-fehler { color: var(--danger); font-weight: 600; }
.az-add { padding: .5rem .9rem; font-size: .88rem; }

/* ── Footer ────────────────────────────────────────── */
.footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem;
          padding: 1rem 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
.footer-links { display: flex; gap: 1.1rem; align-items: center; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-version { opacity: .6; }
body.auth .footer, body.legal .footer { justify-content: center; border-top: none; }

/* ── Rechtsseiten ──────────────────────────────────── */
body.legal { display: flex; flex-direction: column; min-height: 100vh; }
.legal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; border-bottom: 1px solid var(--border); }
.legal-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.legal-body h1 { font-size: 1.7rem; margin-bottom: 1rem; }
.legal-body h2 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
.legal-body p { color: #c3ccd5; }
.legal-body .hint { color: var(--accent); background: rgba(242, 165, 22, .08); border: 1px solid rgba(242, 165, 22, .3);
                    padding: .6rem .85rem; border-radius: var(--radius); font-size: .88rem; }


/* Login: „Angemeldet bleiben“ */
.auth-merken { margin: -.25rem 0 1rem; font-size: .9rem; }
/* Passwortfeld mit Auge rechts (anzeigen/verbergen) */
.pw-feld { position: relative; display: block; }
.pw-feld input { width: 100%; padding-right: 2.9rem; }
.pw-auge { position: absolute; top: 50%; right: .3rem; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
           width: 36px; height: 36px; border: none; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.pw-auge:hover, .pw-auge.on { color: var(--accent); }
.pw-auge .icon { width: 20px; height: 20px; }
.pw-auge .when-on, .pw-auge.on .when-off { display: none; }
.pw-auge.on .when-on { display: inline-flex; }
.pw-auge .when-off { display: inline-flex; }
/* „Noch kein Konto? Registrieren“ / „Schon ein Konto? Anmelden“ unter dem Formular */
.auth-wechsel { margin-top: 1.3rem; padding-top: 1.1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .9rem; }
.auth-wechsel a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-wechsel a:hover { text-decoration: underline; }
/* Login: „Passwort vergessen?“ rechts unter dem Passwortfeld; Hinweistexte auf passwort-vergessen/-neu */
.auth-vergessen { align-self: flex-end; font-size: .8rem; color: var(--muted); text-decoration: none; }
.auth-vergessen:hover { color: var(--accent); text-decoration: underline; }
.auth-hinweis { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 0 0 1rem; }
.auth-hinweis b { color: var(--text); }

/* ── Handy-Eingabe (erfassen/, Ziel des Stall-QR-Codes) ─ */
body.erf { min-height: 100vh; background: var(--bg); }
.erf-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
           padding: .6rem 1rem; padding-top: max(.6rem, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border); }
.erf-top .brand { font-size: 1.05rem; }
.erf-user { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .88rem; color: var(--muted); }
.erf-user > span:not(.avatar) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar-xs { width: 28px; height: 28px; }
.erf-logout { display: inline-flex; padding: .45rem; color: var(--muted); border-radius: 8px; border: none; background: none; cursor: pointer; }
.erf-logout:last-child { margin-right: -.45rem; }
.erf-logout:hover { color: var(--text); }
.erf-wrap { max-width: 520px; margin: 0 auto; padding: 1rem 1rem 0; }
.erf-kopf { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.erf-kopf > div { flex: 1; min-width: 0; }
.erf-kopf h1 { font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
.erf-kopf p { color: var(--muted); font-size: .88rem; }
.erf-tag { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; height: 58px; padding: 0 .5rem;
           border-radius: 12px; background: rgba(242, 165, 22, .14); color: var(--accent); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.erf-tag small { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .2rem; }
.erf-ok { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; margin-bottom: 1rem; border-radius: 12px;
          background: rgba(63, 185, 120, .12); border: 1px solid rgba(63, 185, 120, .4); color: #6fd59d; }
.erf-ok .icon { width: 28px; height: 28px; }
.erf-ok div { display: flex; flex-direction: column; font-size: .88rem; }
.erf-ok b { font-size: 1rem; }
.erf-hinweis { display: flex; gap: .7rem; align-items: flex-start; padding: 1rem; margin-bottom: 1rem; border-radius: 12px;
               background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.erf-hinweis .icon { width: 22px; height: 22px; margin-top: .1rem; color: var(--accent); }
.erf-zeile select { font-size: 1rem; padding: .7rem .8rem; }
.erf-form { display: flex; flex-direction: column; gap: .6rem; }
.erf-feld { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem .55rem .9rem; background: var(--surface);
            border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s; }
.erf-feld:focus-within { border-color: var(--accent); }
.erf-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.erf-name small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.erf-feld input { width: 42%; max-width: 170px; flex-shrink: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
                  color: var(--text); font: 600 1.15rem var(--font); padding: .6rem .7rem; text-align: right; outline: none; }
.erf-feld input::placeholder { color: var(--muted); opacity: .45; font-weight: 500; }
.erf-feld input:focus { border-color: var(--accent); }
.erf-feld.is-voll input { border-color: rgba(63, 185, 120, .45); }
.erf-senden { position: sticky; bottom: 0; margin: .4rem -1rem 0; padding: .8rem 1rem; padding-bottom: max(.8rem, env(safe-area-inset-bottom));
              background: linear-gradient(to top, var(--bg) 70%, transparent); }
.erf-senden .btn { padding: .95rem; font-size: 1.05rem; }
.erf-senden .btn:disabled { opacity: .6; }
.erf .btn-secondary { padding: .8rem; }
.erf-feld.is-text { flex-wrap: wrap; padding: .7rem .75rem .75rem .9rem; }
.erf-feld.is-text input { width: 100%; max-width: none; text-align: left; font-size: 1.07rem; font-weight: 500; }
/* ab 16px zoomt das iPhone beim Antippen eines Felds nicht heran */
@media (max-width: 700px) { .field input, .field select { font-size: 16px; } }

/* QR-Codes gesammelt herunterladen (Einstellungen) */
.qr-sammel { padding: 1rem 1.25rem 1.1rem; }
.qr-sammel .qr-export { margin-top: 1rem; padding-top: 0; border-top: none; }
.qr-sammel.qr-im-popup { padding: 0; }
.kal-vorlage-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: end; }
.kal-vorlage-zeile .icon-btn { margin-bottom: 1rem; }

/* ── Mastdurchgänge (Stall-Seite) ──────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dg-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin: -.5rem 0 1.25rem; padding: .75rem 1rem;
          background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.dg-bar .termine { margin-top: 0; }
.dg-wahl select { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
                  padding: .5rem .7rem; font: 600 .9rem var(--font); outline: none; max-width: 100%; cursor: pointer; }
.dg-wahl select:focus { border-color: var(--accent); }
.dg-status { padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dg-status.is-laeuft  { background: rgba(63, 185, 120, .15); color: #6fd59d; }
.dg-status.is-geplant { background: rgba(242, 165, 22, .12); color: var(--accent); }
.dg-status.is-beendet { background: rgba(138, 151, 166, .15); color: var(--muted); }
.dg-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.dg-bemerkung { flex-basis: 100%; color: var(--muted); font-size: .85rem; font-style: italic; }
.dg-hinweis { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; padding: .6rem .9rem; border-radius: var(--radius);
              background: rgba(242, 165, 22, .08); border: 1px solid rgba(242, 165, 22, .3); color: var(--text); font-size: .88rem; }
.dg-hinweis .icon { color: var(--accent); }
.dg-hinweis a { color: var(--accent); font-weight: 600; margin-left: auto; }
.dg-loeschen { margin-right: auto; }
.dg-heute-zeile { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.sheet tbody tr.is-heute .sheet-rowhead { color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sheet.is-readonly .sheet-cell { cursor: default; color: var(--muted); }
.sheet.is-readonly .sheet-cell:focus { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 2px var(--border); }
@media (max-width: 600px) { .dg-actions { margin-left: 0; } }
/* Unterreiter in der Navigation (z. B. Durchgänge unter Ställe) */
.nav-sub { margin-left: 1.15rem; padding: .45rem .7rem; font-size: .9rem; border-left: 1px solid var(--border); border-radius: 0 var(--radius) var(--radius) 0; }
.nav-sub .icon { width: 17px; height: 17px; }

/* ── Durchgänge (Verwaltung) ───────────────────────── */
.dg-filter { margin: 0; }
.dg-anzahl { color: var(--muted); font-size: .85rem; font-weight: 600; }
.dg-row { gap: .9rem; }
.dg-row-link { text-decoration: none; color: inherit; }
.dg-row-link:hover .list-title { color: var(--accent); }
.dg-nr { color: var(--muted); font-weight: 500; font-size: .82rem; margin-left: .25rem; }
.dg-ueberfaellig { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700;
                   background: rgba(229, 83, 75, .14); color: #ff8a83; vertical-align: .1em; }
.dg-row-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.dg-row-actions form { display: inline-flex; margin: 0; }
.dg-row-actions .icon-btn { width: 38px; height: 38px; text-decoration: none; }
.dg-row-actions .icon-btn .icon { width: 20px; height: 20px; }
.dg-abschliessen { padding: .5rem .85rem; }
@media (max-width: 640px) {
    .dg-row { flex-wrap: wrap; }
    .dg-row-actions { width: 100%; justify-content: flex-end; }
}

/* ── Stallgruppen ──────────────────────────────────── */
.stall-checks-gruppe { border-bottom: 1px solid var(--border); }
.stall-checks-gname { padding: .45rem .8rem 0; font-weight: 600; }
.stall-checks-gname .icon { color: var(--accent); }
.stall-checks-gruppe .stall-checks-list { padding-left: 2.4rem; }
.stall-checks-ohne { padding: .45rem .8rem 0; font-size: .78rem; font-weight: 600; color: var(--muted); }
.check input:indeterminate + .check-box { border-color: var(--accent); background: rgba(242, 165, 22, .25); }
.stall-gruppe { margin-bottom: 1.6rem; }
.stall-gruppe-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.stall-gruppe-head h2 { display: flex; align-items: center; gap: .45rem; font-size: 1.05rem; }
.stall-gruppe-head h2 .icon { color: var(--accent); }
.stall-gruppe-head .muted { font-size: .82rem; }
.stall-gruppe-head .icon-btn { width: 34px; height: 34px; margin-left: .25rem; }
.stall-gruppe-head .icon-btn .icon { width: 18px; height: 18px; }
.page-head-actions { display: flex; align-items: center; gap: .6rem; }
.gruppe-hinweis { color: var(--muted); font-size: .75rem; font-weight: 500; }
.dg-cluster { border-bottom: 1px solid var(--border); }
.dg-cluster:last-child { border-bottom: none; }
.dg-cluster-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; padding: .75rem 1.25rem; background: rgba(242, 165, 22, .05); border-bottom: 1px solid var(--border); }
.dg-cluster-head .list-icon { background: rgba(242, 165, 22, .18); }
.dg-cluster .list-row { padding-left: 2.6rem; }
.dg-cluster .list-row:last-child { border-bottom: none; }
.kal-ev.is-gruppe .icon { opacity: 1; }
.stall-gruppe-link { color: var(--accent); text-decoration: none; } .stall-gruppe-link:hover { text-decoration: underline; }

/* ── Dienstplan ────────────────────────────────────── */
.dp-leiste { position: sticky; top: var(--topbar-h, 0px); z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
             margin-bottom: 1rem; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
             box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.dp-leiste-titel { display: inline-flex; align-items: center; gap: .4rem; margin-right: .4rem; color: var(--muted); font-size: .8rem; font-weight: 600; }
.dp-person, .dp-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .55rem .25rem .25rem; border-radius: 999px;
                       background: var(--surface-2); border: 1px solid var(--border); font-size: .85rem; font-weight: 600; user-select: none; white-space: nowrap; }
.dp-person { cursor: grab; touch-action: none; }
.dp-person:hover { border-color: var(--accent); }
.dp-anzahl:not(:empty) { min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: rgba(242, 165, 22, .15); color: var(--accent); font-size: .72rem; text-align: center; }
.dp { border-collapse: separate; border-spacing: 0; font-size: .88rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.dp th, .dp td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: .45rem .55rem; text-align: left; vertical-align: top; }
.dp tr > :last-child { border-right: none; }
.dp tbody tr:last-child > * { border-bottom: none; }
.dp thead th { position: sticky; top: calc(var(--topbar-h, 0px) + var(--dp-leiste-h, 0px)); z-index: 2; background: var(--surface-2); white-space: nowrap; }
.dp thead th small { color: var(--muted); font-weight: 500; }
.dp thead th.is-heute { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.dp thead th.is-we { color: var(--muted); }
.dp tbody th { position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; font-weight: 600; }
.dp-ecke { color: var(--muted); }
.dp-zelle { min-width: 118px; height: 3.1rem; transition: background .12s, box-shadow .12s; }
.dp-zelle .dp-chip { margin: 0 .25rem .25rem 0; }
.dp-zelle.is-heute { background: rgba(242, 165, 22, .04); }
.dp-zelle.is-leer { background-image: repeating-linear-gradient(135deg, rgba(138, 151, 166, .07) 0 6px, transparent 6px 12px); }
.dp-gruppe th { color: var(--accent); }
.dp-gruppe th .icon { opacity: 1; }
.dp-gruppe > * { background: rgba(242, 165, 22, .05); }
.dp-gzelle { height: 2.2rem; }
.dp.is-admin .dp-gzelle::after { content: 'alle'; color: var(--muted); font-size: .72rem; opacity: 0; transition: opacity .12s; }
.dp-ziehen .dp-gzelle::after { opacity: .7; }
.dp-ohne th { color: var(--muted); }
.dp-ingruppe th { padding-left: 1.4rem; }
.dp-chip { cursor: default; }
.dp.is-admin .dp-chip { cursor: grab; touch-action: none; }
.dp-chip.is-ich { border-color: var(--accent); background: rgba(242, 165, 22, .12); }
.dp-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: .1rem; padding: 0; border: none;
        border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.dp-x:hover { background: rgba(229, 83, 75, .15); color: #ff8a83; }
.dp-x .icon { width: 13px; height: 13px; }
.dp-zelle.is-ziel { background: rgba(242, 165, 22, .16); box-shadow: inset 0 0 0 2px var(--accent); }
.is-gezogen { opacity: .35; }
.dp-geist { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; opacity: .95; box-shadow: 0 10px 24px rgba(0, 0, 0, .45); border-color: var(--accent); }
.dp-ziehen, .dp-ziehen * { cursor: grabbing !important; user-select: none; }
.dp-legende { display: flex; align-items: center; gap: .45rem; margin-top: .75rem; color: var(--muted); font-size: .8rem; }
.dp-leer-muster { display: inline-block; width: 22px; height: 14px; border: 1px solid var(--border); border-radius: 3px;
                  background-image: repeating-linear-gradient(135deg, rgba(138, 151, 166, .25) 0 4px, transparent 4px 8px); }
.dp-person .avatar-xs, .dp-chip .avatar-xs { width: 24px; height: 24px; }
/* Kalender: Symbol-Knopf „Dienstplan“ am Tag (es ist jemand eingeteilt) */
.kal-dienst { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: auto; margin-left: .15rem;
              border-radius: 6px; color: var(--accent); text-decoration: none; opacity: .85; transition: background .15s, opacity .15s; }
.kal-dienst .icon { width: 15px; height: 15px; vertical-align: 0; }
.kal-dienst:hover { background: rgba(242, 165, 22, .15); opacity: 1; }
.kal-dienst-icon { color: var(--accent); opacity: 1; }
/* Dienstplan: Tag, zu dem man aus dem Kalender gesprungen ist */
.dp .is-sprung { box-shadow: inset 0 0 0 1px rgba(242, 165, 22, .5); background-color: rgba(242, 165, 22, .07); }
.dp thead th.is-sprung { color: var(--accent); }
/* Stall-Symbol in der gewählten Farbe (--sf aus bd_stall_symbol) */
.stall-icon[style*="--sf"] { color: var(--sf); background: color-mix(in srgb, var(--sf) 14%, transparent); }
.stall-icon.stall-icon-sm { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.stall-icon.stall-icon-sm .icon { width: 21px; height: 21px; }
/* Popup „Stall bearbeiten“: Symbol- und Farbauswahl */
.symbol-wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .45rem; margin-bottom: 1rem; }
.symbol-wahl label, .farb-wahl label { position: relative; cursor: pointer; }
.symbol-wahl input, .farb-wahl input { position: absolute; opacity: 0; pointer-events: none; }
.symbol-wahl span { display: flex; align-items: center; justify-content: center; height: 46px; border: 1px solid var(--border); border-radius: 10px;
                    background: var(--surface-2); color: var(--muted); transition: border-color .15s, color .15s, background .15s; }
.symbol-wahl span .icon { width: 24px; height: 24px; }
.symbol-wahl label:hover span { border-color: var(--muted); color: var(--text); }
.symbol-wahl input:checked + span { border-color: var(--sf, var(--accent)); color: var(--sf, var(--accent)); background: color-mix(in srgb, var(--sf, var(--accent)) 14%, transparent); }
.symbol-wahl input:focus-visible + span, .farb-wahl input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.farb-wahl { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1rem; }
.farb-wahl span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.farb-wahl input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.feld-titel { display: block; margin-bottom: .45rem; font-size: .8rem; font-weight: 600; color: var(--muted); }
.stall-vorschau { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2); }
.stall-vorschau b { font-size: 1.05rem; }
/* Kalender: Platzhalter-Ausstallung (letzter Tag der Durchlaufzeit, noch kein Ausstalldatum) – gestreift */
.kal-ev.is-plan { background: repeating-linear-gradient(135deg, rgba(229, 83, 75, .16) 0 5px, rgba(229, 83, 75, .04) 5px 10px);
                  border-style: dashed; opacity: .85; }
.kal-legende .is-plan { background: repeating-linear-gradient(135deg, var(--danger) 0 2px, transparent 2px 4px); border: 1px dashed var(--danger); }
.dg-plan { font-style: italic; }

/* ── Kalender: eigene Einträge ─────────────────────── */
.kal-ev.is-eintrag, .kal-legende .is-eintrag { background: rgba(74, 158, 255, .13); color: #8cc2ff; border-color: #4a9eff; }
.kal-legende .is-eintrag { background: #4a9eff; }
button.kal-ev { width: 100%; border-top: none; border-right: none; border-bottom: none; font-family: var(--font); cursor: pointer; text-align: left; }
.kal-ev.is-eintrag { margin-top: .2rem; min-width: 0; }
.kal-ev-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kal-zeit { flex-shrink: 0; font-variant-numeric: tabular-nums; opacity: .8; font-weight: 500; }
.kal-art-3 { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.kal-art label:has(input[value="eintrag"]:checked) { border-color: #4a9eff; background: rgba(74, 158, 255, .12); color: #8cc2ff; }
.ex-art label:has(input:checked) { border-color: var(--accent); background: rgba(242, 165, 22, .1); color: var(--accent); }
#exportDialog .check { padding: .4rem .2rem; }
.kal-zeit-felder { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 480px) { .kal-zeit-felder { grid-template-columns: 1fr 1fr; } .kal-zeit-felder .field:first-child { grid-column: 1 / -1; } }
.field textarea { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: .65rem .8rem;
                  font: inherit; outline: none; resize: vertical; min-height: 4.5rem; }
.field textarea:focus { border-color: var(--accent); }
.field input[type=time] { color-scheme: dark; }
.eintrag-wann { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.eintrag-info { white-space: pre-line; padding: .75rem .9rem; border-radius: 10px; background: var(--surface-2); margin-bottom: .5rem; overflow-wrap: anywhere; }
#eintragDialog .modal-actions form { margin: 0 auto 0 0; display: inline-flex; }
.kal-vorlage-icon { background: rgba(74, 158, 255, .13); color: #8cc2ff; }
/* Kalender: verknüpfte Ställe am Eintrag, Stall-Auswahl im Eintrag-Popup */
.kal-wo { font-weight: 500; opacity: .75; }
.kal-eintrag-staelle { margin-bottom: 1rem; }
.kal-eintrag-staelle > summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; padding: .55rem .8rem; border: 1px solid var(--border);
                                 border-radius: 10px; background: var(--surface-2); font-size: .88rem; font-weight: 600; list-style: none; }
.kal-eintrag-staelle > summary::-webkit-details-marker { display: none; }
.kal-eintrag-staelle > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.kal-eintrag-staelle[open] > summary::after { transform: rotate(180deg); }
.kal-eintrag-staelle[open] > summary { margin-bottom: .5rem; }

/* ── Dashboard ─────────────────────────────────────── */
.db-kopf { margin-bottom: 1.25rem; }
.db-kopf h2 { font-size: 1.45rem; }
.db-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.db-kachel { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border);
             border-radius: 12px; text-decoration: none; transition: border-color .15s, transform .15s; }
.db-kachel:hover { border-color: var(--muted); transform: translateY(-1px); }
.db-kachel.is-offen { border-color: rgba(242, 165, 22, .45); }
.db-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.db-wert { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.db-wert small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.db-zusatz { display: flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .8rem; }
.db-ok { color: #6fd59d; opacity: 1; }
.db-warn { color: var(--accent); opacity: 1; }
.db-hinweise { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.25rem; }
.db-hinweis { margin: 0; text-decoration: none; }
.db-hinweis > .icon:last-child { margin-left: auto; color: var(--muted); }
.db-spalten { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.db-spalten > .panel, .db-rechts > .panel { margin-bottom: 0; }
.db-rechts { display: flex; flex-direction: column; gap: 1.25rem; }
.db-spalten.is-einzeln { grid-template-columns: minmax(0, 1fr); }
.bt-daten { display: grid; grid-template-columns: 10rem 1fr; gap: .45rem 1rem; padding: 1rem 1.25rem 1.2rem; font-size: .92rem; }
.bt-daten dt { color: var(--muted); }
.bt-daten dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .bt-daten { grid-template-columns: 1fr; gap: 0; padding: .8rem 1rem 1rem; } .bt-daten dt { margin-top: .5rem; font-size: .78rem; } .bt-daten dt:first-child { margin-top: 0; } }
.db-planen { color: var(--accent); font-weight: 600; }
.db-weiter { display: inline-flex; align-items: center; gap: .35rem; margin-top: .6rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.db-weiter:hover { text-decoration: underline; }
.sidebar-betrieb { display: block; margin-top: -1.55rem; padding: 0 .55rem; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1000px) { .db-spalten { grid-template-columns: 1fr; } }
.db-gruppe { display: flex; align-items: center; gap: .35rem; padding: .45rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--border);
             color: var(--muted); font-size: .78rem; font-weight: 600; }
.db-gruppe .icon { color: var(--accent); opacity: 1; }
.db-stall { gap: .9rem; }
.db-erfasst { display: inline-flex; align-items: center; gap: .35rem; flex-shrink: 0; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.db-erfasst.is-voll  { background: rgba(63, 185, 120, .14); color: #6fd59d; }
.db-erfasst.is-teil  { background: rgba(242, 165, 22, .13); color: var(--accent); }
.db-erfasst.is-fehlt { background: rgba(229, 83, 75, .13); color: #ff8a83; }
.db-erfasst.is-leer  { background: var(--surface-2); color: var(--muted); }
.db-person { gap: .75rem; padding-top: .6rem; padding-bottom: .6rem; }
.db-person.is-ich .list-title { color: var(--accent); }
.db-termine { padding-bottom: .3rem; }
.db-termin { display: block; padding: .3rem 1.25rem; text-decoration: none; }
.db-termin .kal-ev { white-space: nowrap; }
.db-meine .list-row { gap: .9rem; }
.db-eintragen { padding: .5rem .9rem; flex-shrink: 0; }
.panel-head .icon-btn { width: 36px; height: 36px; text-decoration: none; }
.panel-head .icon-btn .icon { width: 19px; height: 19px; }

/* ── Handy (schmale Bildschirme) ───────────────────── */
@media (max-width: 560px) {
    .kal-legende { flex-wrap: wrap; gap: .35rem .8rem; font-size: .8rem; }
    .le-actions { flex-wrap: wrap; gap: .5rem; padding: .75rem; }
    .le-actions .le-spacer { display: none; }
    .le-actions .btn-primary { flex: 1; }
    .le-actions .btn-danger-ghost { order: 3; width: 100%; }
    .page-head { flex-wrap: wrap; }
    .stall-head { flex-wrap: wrap; }
    .stall-head .head-actions { width: 100%; justify-content: flex-end; }
    .kal-bar { gap: .6rem; }

    /* Arbeitszeiten: Tabelle wird zu Karten untereinander */
    .az-table, .az-table tbody, .az-table tfoot { display: block; }
    .az-table thead { display: none; }
    .az-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem .8rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border); }
    .az-table td { display: block; padding: 0; border: none; white-space: normal; text-align: left !important; }
    .az-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
    .az-table .az-datum { grid-column: 1 / -1; font-weight: 600; }
    .az-table .az-knopf { grid-column: 1 / -1; margin-top: .4rem; }
    .az-table .az-knopf .btn { width: 100%; }
    .az-table .az-aktion { position: absolute; right: .6rem; top: .6rem; width: auto; }
    .az-table tbody tr { position: relative; }
    .az-table .az-neu input { width: 100%; }
    .az-table tfoot tr { grid-template-columns: 1fr auto; align-items: center; border-bottom: none; }
    .az-table tfoot td:empty { display: none; }
    .az-table .az-leer { grid-column: 1 / -1; }
}
.dg-wahl { max-width: 100%; min-width: 0; } @media (max-width: 560px) { .dg-wahl { width: 100%; } .dg-wahl select { width: 100%; text-overflow: ellipsis; } }
@media (max-width: 560px) { .db-kacheln { grid-template-columns: 1fr 1fr; gap: .6rem; } .db-kachel { padding: .8rem .85rem; } .db-wert { font-size: 1.6rem; } .db-zusatz { font-size: .74rem; } }
/* Rechtsseiten: Adressen, Listen, Links */
.legal-body address { font-style: normal; color: #c3ccd5; line-height: 1.7; }
.legal-body ul { margin: .4rem 0 .8rem 1.2rem; color: #c3ccd5; }
.legal-body li { margin-bottom: .3rem; }
.legal-body p + p { margin-top: .5rem; }
.legal-body a { color: var(--accent); }
.legal-body b { color: var(--text); }
.legal-stand { margin-top: 2rem; font-size: .82rem; color: var(--muted) !important; }

/* ── Feedback-Fenster (Knopf oben rechts in der Kopfzeile) ── */
.nav-feedback { margin-top: auto; align-self: flex-start; border: none; background: none; font: inherit; cursor: pointer; }
.nav-feedback .icon { width: 21px; height: 21px; }
@media (min-width: 801px) { .sidebar .nav { flex: 1; } }
dialog.modal-wide { max-width: 560px; }
.field textarea { resize: vertical; min-height: 7rem; }
.fb-daten { margin: .25rem 0 1rem; padding: .7rem .85rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); font-size: .85rem; }
.fb-daten p { display: flex; align-items: flex-start; gap: .45rem; color: var(--muted); }
.fb-daten p .icon { flex-shrink: 0; margin-top: .15rem; color: var(--accent); }
.fb-daten dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: .5rem 0 0 1.55rem; }
.fb-daten dt { color: var(--muted); }
.fb-daten dd { font-weight: 600; overflow-wrap: anywhere; }
.fb-drop { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 1.1rem 1rem; text-align: center; cursor: pointer;
           border: 2px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: .85rem; transition: border-color .15s, background .15s; }
.fb-drop .icon { width: 28px; height: 28px; color: var(--accent); }
.fb-drop b { color: var(--text); font-size: .92rem; }
.fb-drop u { color: var(--accent); }
.fb-drop:hover, .fb-drop:focus-visible, .fb-drop.is-over { border-color: var(--accent); background: rgba(242, 165, 22, .06); outline: none; }
.fb-liste { list-style: none; display: flex; flex-direction: column; gap: .4rem; margin-top: .6rem; }
.fb-liste:empty { display: none; }
.fb-liste li { display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem .35rem .35rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); min-width: 0; }
.fb-liste img, .fb-typ { width: 38px; height: 38px; border-radius: 6px; flex-shrink: 0; object-fit: cover; }
.fb-typ { display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--accent); font-size: .66rem; font-weight: 700; }
.fb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.fb-liste small { color: var(--muted); font-size: .78rem; flex-shrink: 0; }
.fb-weg { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: none; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; flex-shrink: 0; font-size: .9rem; }
.fb-weg:hover { color: var(--danger); background: rgba(229, 83, 75, .1); }
#feedbackDialog .alert { margin: .8rem 0 0; }
.fb-danke { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; padding: 1.5rem .5rem .5rem; }
.fb-danke > .icon { width: 52px; height: 52px; color: #3fb978; }
.fb-danke b { font-size: 1.1rem; }
.fb-danke p { color: var(--muted); margin-bottom: .75rem; }

/* ── Archiv eines Durchgangs (durchgaenge/archiv.php) ── */
.stall-head h2 .dg-status { vertical-align: middle; margin-left: .35rem; font-size: .72rem; }
.ar-geschwister { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: .35rem; color: var(--muted); font-size: .85rem; }
.ar-geschwister a { color: var(--accent); text-decoration: none; font-weight: 600; }
.ar-geschwister a:hover { text-decoration: underline; }
.ar-kacheln .db-kachel:hover { transform: none; border-color: var(--border); }
.ar-geschwister { margin: 0 0 .75rem; }
.ar-kacheln { margin-bottom: 1.25rem; }
.bogen-knoepfe { display: contents; }
.stall-head .top-zurueck { flex-shrink: 0; margin-right: -.4rem; }
/* Reiter im Popup Stall-Einstellungen */
.modal .dg-tabs { margin-bottom: 1rem; }
button.dg-tab { flex: 1; justify-content: center; background: none; border-width: 0 0 2px; border-style: solid; border-color: transparent; font: inherit; cursor: pointer; }
button.dg-tab.active { border-bottom-color: var(--accent); }
.ar-verlauf { list-style: none; padding: 1rem 1.25rem 1.1rem; }
.ar-ev { position: relative; display: flex; gap: .85rem; padding-bottom: 1rem; }
.ar-ev:last-child { padding-bottom: 0; }
.ar-ev:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--border); }
.ar-punkt { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
            background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.ar-ev.is-ein .ar-punkt { color: #3fb978; border-color: rgba(63, 185, 120, .5); background: rgba(63, 185, 120, .1); }
.ar-ev.is-aus .ar-punkt { color: var(--danger); border-color: rgba(229, 83, 75, .5); background: rgba(229, 83, 75, .1); }
.ar-ev.is-plan .ar-punkt { color: var(--danger); border-style: dashed; background: none; }
.ar-ev.is-eintrag .ar-punkt { color: #8cc2ff; border-color: rgba(74, 158, 255, .5); background: rgba(74, 158, 255, .1); }
.ar-ev.is-zukunft { opacity: .7; }
.ar-inhalt { min-width: 0; padding-top: .1rem; }
.ar-zeit { color: var(--muted); font-size: .78rem; font-weight: 600; min-height: .2rem; }
.ar-titel { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-weight: 600; overflow-wrap: anywhere; }
.ar-art { padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .7rem; font-weight: 600; }
.ar-text { color: var(--muted); font-size: .86rem; margin-top: .15rem; overflow-wrap: anywhere; }
.ar-klein { font-size: .78rem; }
.ar-bogen-titel { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; margin-bottom: .75rem; }
.ar-bogen-titel .icon { color: var(--accent); }
.ar-bogen .panel-empty { padding: 1.25rem; }

/* ── Reiter Aktuell / Archiv auf durchgaenge/ ── */
.dg-tabs { display: flex; gap: .25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.dg-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .65rem 1rem; margin-bottom: -1px; color: var(--muted); text-decoration: none;
          font-weight: 600; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.dg-tab:hover { color: var(--text); }
.dg-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.dg-tab-anz { min-width: 1.5rem; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .75rem; text-align: center; }
.dg-tab.active .dg-tab-anz { background: rgba(242, 165, 22, .15); color: var(--accent); }
/* Archiv: Durchgänge mit gleichem Zeitraum, zum Aufklappen */
.dg-zeitraum > summary { cursor: pointer; list-style: none; flex-wrap: nowrap; }
.dg-zeitraum > summary::-webkit-details-marker { display: none; }
.dg-zeitraum > summary:hover { background: rgba(242, 165, 22, .09); }
.dg-zeitraum:not([open]) > summary { border-bottom: none; }
.dg-zeitraum .list-meta { overflow-wrap: anywhere; }
.dg-auf { margin-left: auto; display: inline-flex; color: var(--muted); transition: transform .15s; }
.dg-zeitraum[open] .dg-auf { transform: rotate(90deg); }
/* Archiv: Zeitraumfilter (Einstallung von / Ausstallung bis) */
.dg-zeitfilter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.dg-zeitfilter .field { margin-bottom: 0; }
.dg-zeitfilter input[type="date"] { color-scheme: dark; }
.dg-zeitfilter .btn, .dg-zeitfilter .btn-ghost { height: 42px; }
@media (max-width: 560px) { .dg-zeitfilter .field { flex: 1 1 140px; } .dg-zeitfilter .btn { flex: 1; } }

/* ── Handy-Eingabe: „Meine Arbeitszeit“ oben (erfassen/) ── */
.erf-az { margin-bottom: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.erf-az > summary { display: flex; align-items: center; gap: .6rem; padding: .85rem .95rem; cursor: pointer; list-style: none; user-select: none; }
.erf-az > summary::-webkit-details-marker { display: none; }
.erf-az > summary > .icon { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.erf-az-titel { font-weight: 700; }
.erf-az-heute { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.erf-az-auf { display: inline-flex; color: var(--muted); transition: transform .15s; }
.erf-az[open] .erf-az-auf { transform: rotate(90deg); }
.erf-az-body { padding: .2rem .95rem 1rem; border-top: 1px solid var(--border); }
.erf-az-ok { display: flex; align-items: center; gap: .45rem; margin: .8rem 0 .2rem; color: #6fd59d; font-size: .88rem; font-weight: 600; }
.erf-az-body .alert { margin: .8rem 0 0; }
.erf-az-liste { list-style: none; margin-top: .8rem; border: 1px solid var(--border); border-radius: var(--radius); }
.erf-az-liste li { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem .7rem; font-size: .88rem; }
.erf-az-liste li + li { border-top: 1px solid var(--border); }
.erf-az-liste span { color: var(--muted); }
.erf-az-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; margin-top: .9rem; }
.erf-az-form .field { margin-bottom: .75rem; min-width: 0; }
.erf-az-form input { width: 100%; min-width: 0; color-scheme: dark; font-size: 16px; } /* 16px: iPhone zoomt sonst beim Antippen */
.erf-az-datum { grid-column: 1 / -1; }
.erf-az-summe { grid-column: 1 / -1; margin: -.2rem 0 .7rem; font-weight: 700; color: var(--accent); }
.erf-az-summe.is-fehler { color: #ff8a83; }
.erf-az-form .btn { grid-column: 1 / -1; }
.erf-az-link { display: inline-flex; align-items: center; gap: .3rem; margin-top: .8rem; color: var(--muted); font-size: .85rem; text-decoration: none; }
.erf-az-link:hover { color: var(--accent); }

/* ══ Handy-Umbau (30.10.2026) ═══════════════════════════════════════════════
   Knöpfe nur mit Symbol (Name steht im title/aria-label). PC: Navigation links; Tablet quer (901–1200px):
   schmale Symbol-Leiste links; Handy/Tablet hoch (≤ 900px): Symbolleiste unten (.tabbar) + Menü „Mehr“,
   Popups kommen als Blatt von unten, Hauptaktion als runder Knopf unten rechts (.fab). */
.topbar { justify-content: flex-start; }
.topbar .page-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-zurueck { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -.5rem;
               border-radius: 10px; color: var(--muted); text-decoration: none; flex-shrink: 0; }
.top-zurueck:hover { color: var(--accent); background: var(--surface-2); }
.top-aktionen { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.top-aktionen .icon-btn { width: 40px; height: 40px; }
.icon-btn-sm { width: 36px; height: 36px; }
.icon-btn-sm .icon { width: 19px; height: 19px; }
.icon-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #1a1205; }
.icon-btn.is-primary:hover { background: var(--accent-dk); color: #1a1205; }
.icon-btn.is-danger { color: #ff8a83; border-color: rgba(229, 83, 75, .4); background: none; }
.icon-btn.is-danger:hover { background: rgba(229, 83, 75, .1); }
.btn { min-height: 42px; min-width: 46px; }
.btn .icon { width: 1.3em; height: 1.3em; }
.btn-ghost { min-height: 42px; min-width: 46px; justify-content: center; }
.btn-ghost .icon { width: 1.25em; height: 1.25em; }
.tabbar, .brand-kurz, dialog.mehr, .top-brand { display: none; }
/* Name „broilerdata.com“ oben rechts in der Kopfzeile, sobald die Navigation links ihn nicht mehr zeigt (≤ 1200px) */
@media (max-width: 1200px) {
    .top-brand { display: block; flex-shrink: 0; margin-left: .35rem; font-size: 1.05rem; white-space: nowrap; }
}
@media (max-width: 380px) { .top-brand { font-size: .92rem; } }
/* Handy hoch mit 3+ Symbol-Knöpfen im Kopf: Zeile 1 = Zurück · Titel · broilerdata.com, Zeile 2 = Knöpfe (rechtsbündig) */
@media (max-width: 600px) {
    .topbar:has(.top-aktionen > :nth-child(3)) { flex-wrap: wrap; row-gap: .3rem; }
    .topbar:has(.top-aktionen > :nth-child(3)) .top-brand { order: 2; }
    .topbar .top-aktionen:has(> :nth-child(3)) { order: 3; flex-basis: 100%; justify-content: flex-end; }
}

/* Tablet quer: Navigation nur als Symbole */
@media (min-width: 901px) and (max-width: 1200px) {
    :root { --sidebar-w: 74px; }
    .sidebar { padding: 1rem .65rem; align-items: center; }
    .sidebar .brand { display: none; }
    .sidebar .brand-kurz { display: block; font-size: 1.35rem; }
    .sidebar-betrieb { display: none; }
    .nav { align-items: center; }
    .nav-item { justify-content: center; width: 48px; height: 48px; padding: 0; }
    .nav-item span { display: none; }
    .nav-item .icon { width: 22px; height: 22px; }
    .nav-sub { margin-left: 0; border-left: none; border-radius: var(--radius); }
    .nav-sub .icon { width: 19px; height: 19px; opacity: .85; }
    .nav-feedback { align-self: center; }
}

@media (max-width: 900px) {
    body.app { display: block; }
    .sidebar, .footer, .user { display: none; }
    .main { margin-left: 0; min-height: 100vh; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .topbar { gap: .4rem; min-height: 56px; padding: .45rem .75rem; padding-top: max(.45rem, env(safe-area-inset-top)); }
    .top-zurueck { margin-left: -.35rem; }
    .page-title { font-size: 1.12rem; }
    .content { padding: .9rem .75rem 1.5rem; }
    .back-link { display: none; }

    .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: .25rem; padding: .3rem .5rem;
              padding-bottom: max(.3rem, env(safe-area-inset-bottom)); background: rgba(22, 29, 37, .97); border-top: 1px solid var(--border);
              backdrop-filter: blur(8px); }
    .tab { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; height: 52px; border: none; background: none;
           color: var(--muted); border-radius: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .tab .icon { width: 27px; height: 27px; }
    .tab.active { color: var(--accent); background: rgba(242, 165, 22, .1); }

    /* Popups als Blatt von unten (Daumen erreicht alles) */
    dialog.modal { margin: auto 0 0; width: 100%; max-width: none !important; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0;
                   border-bottom: none; padding: 1.1rem 1rem; padding-bottom: max(1.1rem, env(safe-area-inset-bottom)); }
    dialog.modal[open] { animation: blatt-hoch .22s ease-out; }
    .modal-actions { gap: .6rem; }
    .modal-actions .btn, .modal-actions .btn-ghost { flex: 1; min-height: 48px; }
    .form-actions .btn, .form-actions .btn-ghost { flex: 1; min-height: 48px; }

    /* Menü „Mehr“ */
    dialog.mehr[open] { display: block; }
    .mehr-user { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
    .mehr-user > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .mehr-user span:not(.avatar) { color: var(--accent); font-size: .8rem; font-weight: 600; }
    .mehr-user .avatar { width: 46px; height: 46px; }
    .mehr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .mehr-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 86px; padding: .6rem .3rem;
                 border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); color: var(--text); text-decoration: none;
                 font: 600 .78rem var(--font); cursor: pointer; text-align: center; }
    .mehr-item .icon { width: 28px; height: 28px; color: var(--accent); }
    .mehr-item.active { border-color: var(--accent); background: rgba(242, 165, 22, .1); }
    .mehr-recht { margin-top: 1rem; text-align: center; color: var(--muted); font-size: .8rem; }
    .mehr-recht a { color: var(--muted); }

    /* Hauptaktion einer Seite (z. B. Stall anlegen): runder Knopf unten rechts über der Leiste */
    .fab { position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 25; width: 58px; height: 58px; padding: 0;
           border-radius: 18px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
    .fab .icon { width: 28px; height: 28px; }
}
@keyframes blatt-hoch { from { transform: translateY(40px); opacity: .4; } }
/* Popups haben oben rechts ein ✕ – ein zweiter Schließen-Knopf unten wäre doppelt */
.modal-actions .btn-ghost[data-close] { display: none; }

/* Handy: Ställe (und Mitarbeiter) als schmale Zeilen statt großer Kacheln */
@media (max-width: 900px) {
    .page-head { margin-bottom: 1rem; }
    .stall-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .5rem; }
    .stall-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .85rem; row-gap: .1rem;
                  min-height: 0; padding: .7rem .85rem; border-radius: 14px; }
    .stall-card:hover { transform: none; box-shadow: none; }
    .stall-card > .stall-icon, .stall-card > .avatar { grid-row: 1 / 3; }
    .stall-card .stall-name { grid-column: 2; margin: 0; font-size: 1.05rem; line-height: 1.25; }
    .stall-card .stall-meta { grid-column: 2; }
    .stall-card .stall-arrow { position: static; grid-column: 3; grid-row: 1 / 3; }
    .stall-gruppe { margin-bottom: 1.2rem; }
    .stall-gruppe-head { margin-bottom: .5rem; }
}

/* ── Stall-Seite: Ansicht „ein Tag“ (assets/js/stall-tag.js) oder ganze Tabelle ── */
.bogen:not([data-ansicht]) .tag-ansicht, .bogen[data-ansicht="tabelle"] .tag-ansicht, .bogen[data-ansicht="tag"] .sheet-wrap { display: none; }
#ansichtKnopf .when-tabelle, #ansichtKnopf.is-tabelle .when-tag { display: none; }
#ansichtKnopf.is-tabelle .when-tabelle { display: inline-flex; }
.tag-ansicht { max-width: 620px; }
.tag-nav { position: sticky; top: var(--topbar-h, 0px); z-index: 5; display: flex; align-items: center; gap: .5rem; padding: .5rem 0; margin: -.5rem 0 .3rem;
           background: var(--bg); }
.tag-nav .icon-btn { width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0; }
.tag-nav .icon-btn .icon { width: 28px; height: 28px; }
.tag-nav .icon-btn:disabled { opacity: .3; cursor: default; }
.tag-titel { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50px;
             border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; line-height: 1.15; }
.tag-titel b { font-size: 1.12rem; }
.tag-titel small { color: var(--muted); font-size: .78rem; font-weight: 600; }
.tag-titel small:empty { display: none; }
.tag-titel select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.tag-nav.is-heute .tag-titel { border-color: var(--accent); background: rgba(242, 165, 22, .1); }
.tag-nav.is-heute .tag-titel small { color: var(--accent); }
.tag-felder { display: flex; flex-direction: column; gap: .5rem; touch-action: pan-y; }
.tag-felder .erf-feld { padding: .45rem .5rem .45rem .85rem; }
.tag-felder .erf-feld input { font-size: 1.2rem; padding: .65rem .7rem; }
.tag-felder .erf-feld.is-text input { font-size: 1.05rem; }
.tag-cell[readonly] { color: var(--muted); }
.tag-cell.is-saving { opacity: .6; }
.tag-cell.is-saved { border-color: #3fb978 !important; box-shadow: 0 0 0 3px rgba(63, 185, 120, .3); }
.tag-cell.is-error { border-color: var(--danger) !important; color: #ff8a83; }
.tag-prot { margin-top: .8rem; color: var(--muted); font-size: .8rem; text-align: center; }

@media (max-width: 900px) {
    /* Stall-Kopf: Name steht schon oben in der Kopfzeile → nur die Infozeile */
    .stall-head-seite { margin-bottom: .6rem; }
    .stall-head-seite .muted { display: none; }
    .stall-head { gap: .7rem; }
    .stall-head .stall-icon.lg { width: 44px; height: 44px; }
    .stall-head h2 { font-size: 1.2rem; }
    /* Durchgangs-Leiste kompakt: Auswahl + Symbole in einer Zeile, Termine darunter */
    .dg-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .5rem; padding: .55rem; margin: 0 0 .6rem; }
    .dg-bar .dg-wahl { grid-column: 1; grid-row: 1; width: auto; }
    .dg-bar .dg-wahl select { width: 100%; height: 42px; text-overflow: ellipsis; }
    .dg-bar .dg-actions { grid-column: 2; grid-row: 1; margin: 0; gap: .35rem; }
    .dg-bar .dg-actions .icon-btn { width: 42px; height: 42px; }
    .dg-bar .dg-status { display: none; }
    .dg-bar .termine { grid-column: 1 / -1; font-size: .8rem; gap: .15rem .35rem; padding: 0 .2rem; }
    .dg-bar .dg-bemerkung { grid-column: 1 / -1; padding: 0 .2rem; }
    .dg-hinweis { font-size: .82rem; }
}
/* ab 4 Knöpfen (Export, Auswertung …) wird es neben der Auswahl zu eng: Auswahl oben, Knöpfe gleichmäßig darunter */
@media (max-width: 520px) {
    .dg-bar:has(.dg-actions > :nth-child(4)) .dg-wahl { grid-column: 1 / -1; }
    .dg-bar:has(.dg-actions > :nth-child(4)) .dg-actions { grid-column: 1 / -1; grid-row: 2; display: flex; justify-content: space-between; }
    .dg-bar:has(.dg-actions > :nth-child(4)) .dg-actions .icon-btn { flex: 1; max-width: 64px; }
}

/* Dashboard: heute schon eingetragen (grün) / noch offen (Stift) je Stall */
.db-heute-ok, .db-heute-offen { display: inline-flex; flex-shrink: 0; }
.db-heute-ok { color: #3fb978; }
.db-heute-offen { color: var(--accent); opacity: .8; }
@media (max-width: 900px) {
    .db-kopf { margin-bottom: .9rem; }
    .db-kopf h2 { font-size: 1.2rem; }
    .db-kacheln { grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .9rem; }
    .db-kachel { padding: .7rem .8rem; gap: .15rem; }
    .db-wert { font-size: 1.45rem; }
    .db-label { font-size: .76rem; }
    .db-zusatz { font-size: .72rem; }
    .panel { border-radius: 14px; margin-bottom: .9rem; }
    .panel-head { padding: .8rem .9rem; }
    .panel-sub { font-size: .8rem; }
    .list-row { padding: .7rem .9rem; gap: .75rem; }
    .db-gruppe { padding: .4rem .9rem; }
    .db-termin { padding: .3rem .9rem; }
    .db-spalten, .db-rechts { gap: .9rem; }
    /* leere Ställe nur als schmale Zeile */
    .db-stall.is-leer { padding-top: .4rem; padding-bottom: .4rem; }
    .db-stall.is-leer .stall-icon { width: 30px; height: 30px; opacity: .55; }
    .db-stall.is-leer .stall-icon .icon { width: 17px; height: 17px; }
    .db-stall.is-leer .list-main { flex-direction: row; align-items: baseline; gap: .5rem; }
    .db-stall.is-leer .list-title { font-weight: 500; color: var(--muted); }
}

/* Handy: Durchgänge – Symbole rechts neben dem Text (untereinander), Name ist selbst der Link */
@media (max-width: 900px) {
    .dg-row, .dg-cluster-head { flex-wrap: nowrap !important; align-items: flex-start; padding: .7rem .8rem; gap: .65rem; }
    .dg-cluster .list-row { padding-left: .8rem; }
    .dg-row > .stall-icon { display: none; }
    .dg-cluster-head .list-icon { width: 34px; height: 34px; flex-shrink: 0; }
    .dg-row-actions { width: auto !important; flex-direction: column; gap: .35rem; }
    .dg-row-actions > a.icon-btn:last-child { display: none; }
    .dg-row-actions .icon-btn { width: 40px; height: 40px; }
    .dg-zeitraum > summary { align-items: center; }
    .dg-tabs { margin-bottom: .9rem; }
    .dg-tab { flex: 1; justify-content: center; padding: .7rem; }
    .dg-tab .icon { width: 22px; height: 22px; }
    .page-head .dg-filter, .page-head .dg-wahl, .page-head .dg-wahl select { width: 100%; }
    .page-head .dg-wahl select { height: 44px; font-size: 16px; }
    .dg-zeitfilter { gap: .5rem; }
    .dg-zeitfilter .btn, .dg-zeitfilter .btn-ghost { flex: 0 0 auto; height: 44px; }
}

/* ── Kalender am Handy: Raster mit farbigen Strichen, gewählter Tag darunter in groß ── */
.kal-tagbox { display: none; }
@media (max-width: 900px) {
    .kal-bar { margin-bottom: .6rem; }
    .kal-legende { gap: .3rem .75rem; font-size: .74rem; }
    .kal { border-radius: 14px; }
    .kal-wt { padding: .4rem 0; text-align: center; font-size: .66rem; letter-spacing: .03em; }
    .kal-tag { min-height: 54px; padding: .25rem .15rem .35rem; align-items: center; gap: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .kal-tag * { pointer-events: none; }
    .kal-kopf { justify-content: center; }
    .kal-plus, .kal-dienst { display: none; }
    .kal-nr { min-width: 28px; height: 28px; font-size: .88rem; }
    .kal-tag .kal-ev { width: 78%; height: 5px; padding: 0; margin: 0; border: none; border-radius: 3px; font-size: 0; background: currentColor; }
    .kal-tag .kal-ev > * { display: none; }
    .kal-tag .kal-ev.is-plan { opacity: .45; }
    .kal-tag.is-gewaehlt { background: rgba(242, 165, 22, .1); box-shadow: inset 0 0 0 2px var(--accent); }

    .kal-tagbox { display: block; margin-top: .9rem; padding: .85rem .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
    .kal-tagbox-kopf { display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
    .kal-tagbox-kopf h2 { flex: 1; font-size: 1.02rem; }
    .kal-tagbox-tools { display: flex; gap: .4rem; }
    .kal-tagbox-tools .icon-btn { display: inline-flex; width: 44px; height: 44px; opacity: 1; margin: 0; }
    .kal-tagbox-tools .icon-btn .icon { width: 22px; height: 22px; }
    .kal-tagbox-liste { display: flex; flex-direction: column; gap: .45rem; }
    .kal-tagbox .kal-ev { width: 100%; min-height: 46px; padding: .55rem .75rem; font-size: .9rem; white-space: normal; border-left-width: 4px; }
    .kal-tagbox .kal-ev .icon { display: inline-block; width: 18px; height: 18px; }
    .kal-tagbox .kal-ev-name { white-space: normal; }
    .kal-tagbox-leer { color: var(--muted); font-size: .88rem; }
}

/* ── Dienstplan: Person antippen = gewählt (dann Feld antippen); Handy: ein Tag auf einmal ── */
.dp-person.is-gewaehlt { border-color: var(--accent); background: rgba(242, 165, 22, .18); box-shadow: 0 0 0 2px rgba(242, 165, 22, .35); }
.dp.is-waehlen .dp-zelle { cursor: copy; }
.dp.is-waehlen .dp-zelle:hover { background-color: rgba(242, 165, 22, .1); }
.dp-knoepfe { display: flex; align-items: center; gap: .5rem; }
.icon-btn.dp-ex { width: auto; padding: 0 .55rem; gap: .1rem; }
.icon-btn.dp-ex .icon + .icon { width: 16px; height: 16px; color: var(--accent); }
.dp-tage { display: none; }
@media (max-width: 900px) {
    .kal-bar .az-monat-name { min-width: 0; font-size: .92rem; }
    .dp-leiste { padding: .55rem .6rem; gap: .4rem; border-radius: 14px; }
    .dp-leiste-titel { width: 100%; font-size: .76rem; }
    .dp-person { padding: .35rem .7rem .35rem .3rem; font-size: .9rem; }
    .dp-person .avatar-xs { width: 28px; height: 28px; }
    .dp-tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: .6rem; }
    .dp-tag { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 52px; border: 1px solid var(--border);
              border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; line-height: 1.1; }
    .dp-tag small { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; }
    .dp-tag b { font-size: 1.05rem; }
    .dp-tag.is-we { opacity: .75; }
    .dp-tag.is-heute b { color: var(--accent); }
    .dp-tag.active { background: var(--accent); border-color: var(--accent); opacity: 1; }
    .dp-tag.active small, .dp-tag.active b { color: #1a1205; }
    #dp { width: 100%; }
    #dp thead th { top: calc(var(--topbar-h, 0px) + var(--dp-leiste-h, 0px)); }
    .dp-zelle { min-width: 0; height: 3.4rem; }
    .dp-chip { padding: .3rem .6rem .3rem .3rem; font-size: .9rem; }
    .dp-x { width: 26px; height: 26px; }
    .dp-legende { font-size: .75rem; }
}
@media (max-width: 900px) {
    .kal-tagbox-tools .icon-btn { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; color: var(--accent); }
    #dp tbody th { width: 38%; white-space: normal; }
}

/* Blättern am Handy: nur ‹ Info › statt vieler Seitenzahlen */
@media (max-width: 900px) {
    .pager { flex-wrap: nowrap; gap: .5rem; }
    .pager-num { display: none; }
    .pager-btn { width: 46px; height: 42px; flex-shrink: 0; }
    .pager-btn:last-of-type { order: 3; }
    .pager-info { order: 2; flex: 1; margin: 0; text-align: center; font-size: .8rem; }
    .le-wrap .pager { padding: .6rem .75rem; }
    .le-general { padding: 1rem .9rem; gap: 1rem; }
    .form-card { padding: 1.1rem 1rem; border-radius: 14px; }
}
@media (max-width: 900px) { .le-table, .sheet { min-width: 100%; } }

/* ── Auswertung (auswertung/index.php, assets/js/auswertung.js) ── */
.aw-filter { display: flex; gap: .6rem; margin-bottom: .75rem; }
.aw-wahl { flex: 1; max-width: 420px; }
.aw-wahl select { width: 100%; height: 44px; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px;
                  padding: 0 .8rem; font: 600 1rem var(--font); outline: none; cursor: pointer; }
.aw-wahl select:focus { border-color: var(--accent); }
.aw-legende { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.aw-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem; border-radius: 999px; background: var(--surface);
           border: 1px solid var(--border); font-size: .85rem; font-weight: 600; }
.aw-chip small { color: var(--muted); font-weight: 500; }
.aw-chip i, .aw-tip i, .aw-tabelle th i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.aw-soll-muster { display: inline-block; width: 22px; height: 0; border-top: 2px dashed #8a97a6; vertical-align: middle; margin: 0 .15rem; }
.aw-chart { position: relative; padding: .75rem .5rem .5rem; }
.aw-svg { display: block; touch-action: pan-y; user-select: none; }
.aw-leer { padding: 2rem 1rem; text-align: center; color: var(--muted); font-size: .88rem; }
.aw-tip { position: absolute; top: .75rem; z-index: 3; min-width: 170px; max-width: 260px; padding: .55rem .7rem; border-radius: 10px; pointer-events: none;
          background: rgba(29, 38, 48, .97); border: 1px solid var(--border); box-shadow: 0 10px 24px rgba(0, 0, 0, .4); font-size: .82rem; }
.aw-tip b { display: block; margin-bottom: .3rem; }
.aw-tip span { display: flex; align-items: center; gap: .45rem; color: var(--muted); }
.aw-tip em { margin-left: auto; padding-left: .8rem; font-style: normal; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.aw-tip em small { color: var(--muted); font-weight: 500; }
.aw-tip-soll i { background: none !important; border-top: 2px dashed #8a97a6; border-radius: 0 !important; height: 0 !important; }
.aw-tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; }
.aw-tabelle th, .aw-tabelle td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.aw-tabelle thead th { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-2); }
.aw-tabelle th:first-child { text-align: left; }
.aw-tabelle tbody th { font-weight: 600; }
.aw-tabelle tbody th i { margin-right: .5rem; }
.aw-tabelle tbody th small { display: block; margin-left: 1.15rem; color: var(--muted); font-weight: 500; font-size: .75rem; }
.aw-tabelle td small { color: var(--muted); font-size: .75rem; }
.aw-tabelle tbody tr:last-child > * { border-bottom: none; }
.aw-tabelle tr.aw-ohne td { color: var(--muted); text-align: left; font-style: italic; }
.aw-plus { color: #6fd59d; } .aw-minus { color: #ff8a83; }
.aw-klein { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.aw-kachel { display: flex; flex-direction: column; gap: .3rem; min-width: 0; padding: .6rem .6rem .4rem; background: var(--surface); border: 1px solid var(--border);
             border-radius: 12px; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.aw-kachel:hover { border-color: var(--muted); }
.aw-kachel.active { border-color: var(--accent); }
.aw-kachel-name { padding: 0 .2rem; font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-kachel-chart { display: block; }
.aw-kachel .aw-leer { padding: 1.9rem 0; font-size: .75rem; }
.aw-dg-liste { max-height: 50vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .2rem .8rem; }
.aw-dg-gruppe { padding: .6rem 0 .1rem; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.aw-dg small { display: block; color: var(--muted); }
.aw-dg input:disabled + .check-box { opacity: .35; }
@media (max-width: 900px) {
    .aw-chart { padding: .5rem .25rem .25rem; }
    .aw-klein { grid-template-columns: 1fr 1fr; gap: .45rem; }
    /* Kennzahlen als Karten: je Durchgang ein Block, Werte zweispaltig */
    .aw-tabelle thead { display: none; }
    .aw-tabelle, .aw-tabelle tbody { display: block; }
    .aw-tabelle tr { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border); }
    .aw-tabelle tbody tr:last-child { border-bottom: none; }
    .aw-tabelle th, .aw-tabelle td { padding: 0; border: none; text-align: left; white-space: normal; }
    .aw-tabelle tbody th { grid-column: 1 / -1; margin-bottom: .2rem; }
    .aw-tabelle tr.aw-ohne { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
    .aw-tabelle tr.aw-ohne th { margin: 0; }
    .aw-tabelle tr.aw-ohne td { text-align: right; font-size: .8rem; }
    .aw-tabelle tr.aw-ohne td::before { display: none; }
    .aw-tabelle td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
}


/* ══ Registrierung (registrieren.php): Assistent in 4 Schritten ══════════════ */
.reg-card { max-width: 560px; }
.reg-card .brand-lg { text-decoration: none; }
.reg-steps { list-style: none; display: flex; margin: 0 0 1.4rem; padding: 0; counter-reset: s; }
.reg-steps li { flex: 1; position: relative; text-align: center; }
.reg-steps li + li::before { content: ''; position: absolute; top: 19px; right: calc(50% + 24px); left: calc(-50% + 24px); height: 2px;
                             background: var(--border); border-radius: 2px; }
.reg-steps li.is-fertig::before, .reg-steps li.is-aktiv::before { background: var(--accent); }
.reg-steps a, .reg-steps li > span { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-decoration: none; color: var(--muted); }
.reg-punkt { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
             border: 2px solid var(--border); background: var(--bg); color: var(--muted); transition: transform .15s; }
.reg-punkt .icon { width: 19px; height: 19px; }
.reg-name { font-size: .75rem; font-weight: 600; }
.reg-steps .is-fertig .reg-punkt { border-color: var(--accent); color: var(--accent); background: rgba(242, 165, 22, .1); }
.reg-steps .is-fertig a:hover .reg-punkt { transform: scale(1.08); }
.reg-steps .is-fertig .reg-name { color: var(--text); }
.reg-steps .is-aktiv .reg-punkt { border-color: var(--accent); background: var(--accent); color: #1a1205; box-shadow: 0 0 0 5px rgba(242, 165, 22, .18); }
.reg-steps .is-aktiv .reg-name { color: var(--accent); }
.reg-titel { font-size: 1.25rem; margin-bottom: 1rem; }
.reg-titel small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.reg-hinweis { color: var(--muted); font-size: .88rem; margin: -.3rem 0 1.1rem; line-height: 1.45; }
.reg-hinweis b { color: var(--text); }
.pflicht { color: var(--accent); font-weight: 700; }
.optional { font-style: normal; font-weight: 500; color: var(--muted); opacity: .7; font-size: .72rem; margin-left: .2rem; }
.field.is-fehler input, .field.is-fehler select { border-color: #e5534b; }
.feld-fehler { display: block; color: #ff8a83; font-size: .8rem; margin-top: -.1rem; }
.feld-info { display: block; color: var(--muted); font-size: .78rem; margin-top: -.1rem; }
.reg-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.reg-plz { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0 .8rem; }
.reg-plz > .field, .reg-zwei > .field { min-width: 0; }
.reg-plz .field input, .reg-zwei .field input { width: 100%; min-width: 0; }
.reg-gruppe { border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem .2rem; margin: 0 0 1rem; min-width: 0; }
.reg-gruppe legend { padding: 0 .4rem; margin-left: -.4rem; font-size: .8rem; font-weight: 700; color: var(--text); }
.reg-gruppe > .check { margin-bottom: .6rem; }
.reg-anschrift { margin-top: .2rem; }
.reg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pw-staerke { display: block; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin-top: .1rem; }
.pw-staerke i { display: block; height: 100%; width: 33%; background: #e5534b; transition: width .2s, background .2s; }
.pw-staerke[data-stufe="mittel"] i { width: 66%; background: var(--accent); }
.pw-staerke[data-stufe="stark"] i { width: 100%; background: #3fb978; }
.reg-stall-kopf, .reg-stall { display: grid; grid-template-columns: minmax(0, 1fr) 5.2rem 5.6rem 36px; gap: .45rem; align-items: center; }
.reg-stall-kopf { font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.reg-stall { margin-bottom: .45rem; }
.reg-stall input { width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
                   padding: .6rem .65rem; font: inherit; outline: none; }
.reg-stall input:focus { border-color: var(--accent); }
.reg-weg { position: static; transform: none; }
.reg-plus { margin: .2rem 0 .9rem; }
.reg-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; margin: -.2rem 0 .6rem 2.1rem; }
.reg-spalten .alert { grid-column: 1 / -1; }
.reg-eigene { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: .45rem; align-items: center; margin-top: .35rem; }
.reg-eigene input { width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: .55rem .7rem; font: inherit; outline: none; }
.reg-eigene input:focus { border-color: var(--accent); }
.check-sm small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; margin-top: .1rem; }
.reg-knoepfe { display: flex; gap: .6rem; margin-top: 1.3rem; }
.reg-knoepfe .btn-secondary { flex: 0 0 auto; min-width: 64px; }
.reg-weiter { flex: 1; }
.reg-pflicht-hinweis { font-size: .75rem; color: var(--muted); margin-top: .6rem; }
.reg-uebersicht { border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem; margin-bottom: .8rem; background: var(--bg); }
.reg-ue-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.reg-ue-kopf h2 { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.reg-ue-kopf h2 .icon { width: 18px; height: 18px; color: var(--accent); }
.reg-ue-kopf .pw-auge { position: static; transform: none; }
.reg-uebersicht dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: .3rem .8rem; font-size: .86rem; }
.reg-uebersicht dt { color: var(--muted); }
.reg-uebersicht dd { margin: 0; overflow-wrap: anywhere; }
.reg-ue-staelle { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-direction: column; gap: .3rem; font-size: .86rem; }
.reg-ue-staelle li { display: flex; justify-content: space-between; gap: .8rem; padding: .35rem .6rem; border-radius: 8px; background: var(--surface-2); }
.reg-ue-staelle span { color: var(--muted); }
.reg-leer { color: var(--muted); font-size: .86rem; margin-bottom: .5rem; }
.reg-ds { margin-top: .4rem; }
.reg-ds a { color: var(--accent); }
.reg-ds.is-fehler .check-box { border-color: #e5534b; }
@media (max-width: 520px) {
    .reg-card { padding: 1.5rem 1.1rem; }
    .reg-name { font-size: .68rem; }
    .reg-punkt { width: 36px; height: 36px; }
    .reg-steps li + li::before { top: 17px; right: calc(50% + 21px); left: calc(-50% + 21px); }
    .reg-zwei { grid-template-columns: 1fr; }
    .reg-plz { grid-template-columns: 6rem 1fr; }
    .reg-stall-kopf, .reg-stall { grid-template-columns: minmax(0, 1fr) 4.2rem 4.6rem 32px; gap: .35rem; }
    .reg-stall input { padding: .55rem .5rem; font-size: 16px; }
    .reg-eigene input { font-size: 16px; }
    .reg-spalten { grid-template-columns: 1fr; margin-left: 0; }
    .reg-uebersicht dl { grid-template-columns: 1fr; gap: 0; }
    .reg-uebersicht dt { margin-top: .35rem; font-size: .75rem; }
}

/* Aushilfen-Regeln (includes/aushilfe.php): Einstellungen › Aushilfen und Mitarbeiter-Seite einer Aushilfe */
.ah-zeile { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; }
.ah-zeile + .ah-zeile { border-top: 1px solid var(--border); }
.bogen-live { border-bottom: 1px solid var(--border); }
.ah-text { flex: 1; min-width: 0; }
.ah-text b { display: block; font-weight: 600; }
.ah-text small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.ah-zeile select { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius);
                   font: 500 .9rem var(--font); padding: .5rem .6rem; max-width: 46%; }
.ah-zeile select:focus { outline: none; border-color: var(--accent); }
.ah-zeile select.is-eigen { border-color: var(--accent); }
@media (max-width: 600px) { .ah-zeile { padding: .8rem 1rem; } .ah-zeile select { max-width: 52%; } }
/* Kippschalter */
.kipp { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; cursor: pointer; }
.kipp input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.kipp-bahn { position: absolute; inset: 0; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); transition: background .15s, border-color .15s; pointer-events: none; }
.kipp-bahn::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.kipp input:checked + .kipp-bahn { background: var(--accent); border-color: var(--accent); }
.kipp input:checked + .kipp-bahn::after { transform: translateX(20px); background: #1a1205; }
.kipp input:focus-visible + .kipp-bahn { outline: 2px solid var(--accent); outline-offset: 2px; }
.kipp input:disabled { cursor: default; }
.kipp input:disabled + .kipp-bahn { opacity: .55; }
/* Handy-Eingabe: schon eingetragener Wert, den die Aushilfe nicht ändern darf */
.erf-feld.is-fest { border-color: rgba(63, 185, 120, .45); }
.erf-fest { flex-shrink: 0; display: inline-flex; align-items: center; gap: .3rem; font: 600 1.15rem var(--font); color: var(--text); padding: .6rem .2rem; }
.erf-fest .icon { color: #3fb978; }
.erf-alles { text-align: center; color: var(--muted); margin: 1rem 0; }
/* Einstellungen › Daten eingeben: Standard je Rolle (Spalten Mitarbeiter / Aushilfe; Stallmanager dürfen alles) */
.rg-zeile { display: grid; grid-template-columns: 1fr repeat(2, 9.5rem); gap: .5rem 1rem; align-items: center; padding: .85rem 1.25rem; }
.rg-zeile + .rg-zeile { border-top: 1px solid var(--border); }
.rg-kopf { padding-top: .7rem; padding-bottom: .7rem; }
.rg-rolle { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rg-feld { display: flex; justify-content: center; }
.rg-feld select { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); font: 500 .88rem var(--font); padding: .5rem .5rem; }
.rg-feld select:focus { outline: none; border-color: var(--accent); }
@media (max-width: 760px) {
    .rg-kopf { display: none; }
    .rg-zeile { grid-template-columns: repeat(2, 1fr); padding: .8rem 1rem; }
    .rg-zeile .ah-text { grid-column: 1 / -1; }
    .rg-feld { flex-direction: column; align-items: center; gap: .3rem; }
    .rg-feld::before { content: attr(data-rolle); font-size: .72rem; font-weight: 600; color: var(--muted); }
    .rg-feld select { font-size: .8rem; padding: .45rem .3rem; }
}

/* ── Einladungen (mitarbeiter/einladen.php, Liste auf mitarbeiter/) ─ */
.page-head-knoepfe { display: flex; align-items: center; gap: .5rem; }
.abschnitt-titel { font-size: .95rem; color: var(--muted); font-weight: 600; margin: 2rem 0 .75rem; }
.einladung-liste { display: grid; gap: .5rem; max-width: 640px; }
.einladung { display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem .75rem; }
.einladung-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.einladung-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.einladung-text small { color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.form-hinweis { margin: -.4rem 0 1rem; line-height: 1.5; }
.link-kopie { display: flex; gap: .5rem; }
.link-kopie input { flex: 1; min-width: 0; font-size: .82rem; }
.link-kopie .btn-ghost.is-ok { color: #6fd59d; border-color: rgba(63, 185, 120, .5); }

/* Regelsystem (einstellungen/regel.php) */
.rs-link { text-decoration: none; color: inherit; }
.rs-link:hover b { color: var(--accent); }
.rs-rollen { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; margin-bottom: 1.1rem; }
.form-card .rs-rollen .check { margin: 0; }
.rs-spalten { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.25rem; }
.rs-zeile { display: flex; align-items: center; gap: 1rem; padding: .55rem .8rem; }
.rs-zeile + .rs-zeile { border-top: 1px solid var(--border); }
.rs-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rs-name small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.rs-zeile select { width: 9rem; flex-shrink: 0; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); font: 500 .88rem var(--font); padding: .5rem; }
.rs-zeile select:focus { outline: none; border-color: var(--accent); }
.rs-zeile select.is-eigen { border-color: var(--accent); }
.rs-weg { margin-right: auto; }
