/* ==========================================================================
   Obsthof – Grundgestaltung
   Hellgrauer Hintergrund, weiße Karten (12 px Radius), Grün als Primärfarbe.
   Mobile first: Seitenleiste ab 960 px fest, darunter einklappbar.
   ========================================================================== */

/* Montserrat lokal (SIL Open Font License, siehe assets/fonts/OFL.txt) */
@font-face {
    font-family: "Montserrat";
    src: local("Montserrat"), url("../fonts/Montserrat-Variable.ttf") format("truetype");
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f4f5f4;
    --card: #ffffff;
    --surface: #ffffff;
    --surface-2: #fafbfa;
    --hover: #f0f2f1;
    --side-bg: var(--card);
    --side-text: var(--text);
    --side-muted: var(--muted);
    --side-hover: var(--hover);
    --side-active-bg: var(--primary-soft);
    --side-active-text: var(--primary-dark);
    --text: #1f2a24;
    --muted: #6b7570;
    --line: #e3e6e4;
    --line-strong: #cfd4d1;
    --primary: #2f8f4e;
    --primary-dark: #247040;
    --primary-soft: #e6f3ea;
    --danger: #c0392b;
    --danger-soft: #fbeae8;
    --warning: #c98a12;
    --warning-soft: #fdf3dc;
    --info: #2a6f97;
    --info-soft: #e5f0f7;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 2px 8px rgba(20, 40, 30, .05);
    --shadow-lg: 0 10px 40px rgba(20, 40, 30, .18);
    --sidebar-w: 264px;
    --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --kpi-1: #2f8f4e;
    --kpi-2: #e0a526;
    --kpi-3: #2a6f97;
    --kpi-4: #8e44ad;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.6rem; }
.h2 { font-size: 1.35rem; }
.h3 { font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.h4 { font-size: .95rem; margin-top: 1.25rem; display: flex; align-items: center; gap: .4rem; }
p { margin: 0 0 .75em; }
code { font-size: .9em; background: var(--hover); padding: .1em .35em; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .85em; }
.grow { flex: 1 1 auto; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: -3px; }
.icon-xl { width: 40px; height: 40px; }

/* --------------------------------------------------------------------------
   Layout: Seitenleiste + Inhalt
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: .75rem;
    height: 56px; padding: 0 12px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
}
.topbar-title { flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    width: var(--sidebar-w); max-width: 86vw;
    display: flex; flex-direction: column;
    background: var(--side-bg); color: var(--side-text);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform .22s ease;
}
body.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
.sidebar-backdrop {
    position: fixed; inset: 0; z-index: 40;
    background: rgba(20, 30, 25, .35);
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

.sidebar-head { display: flex; align-items: center; gap: .5rem; padding: 14px 14px 10px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--side-text); flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--primary); color: #fff;
}
.brand-mark .icon { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .72rem; color: var(--side-muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }

.quick-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.quick-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 68px; padding: 8px 6px; border-radius: var(--radius-sm);
    background: var(--primary); color: #fff; font-weight: 600; font-size: .8rem; text-align: center;
}
.quick-tile .icon { width: 22px; height: 22px; }
.quick-tile:hover { background: var(--primary-dark); text-decoration: none; }
.quick-tile.is-active { outline: 3px solid color-mix(in srgb, var(--primary) 40%, #fff); }

.nav-group { margin-top: 12px; }
.nav-group-title {
    padding: 0 10px 4px;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    font-variant: small-caps; text-transform: lowercase;
    color: var(--muted);
}
.nav-group ul { list-style: none; margin: 0; padding: 0; }
.nav-group form { margin: 0; }
.nav-link {
    display: flex; align-items: center; gap: .65rem; width: 100%;
    padding: 7px 10px; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--side-text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer;
}
.nav-link .icon { color: var(--side-muted); }
.nav-link:hover { background: var(--side-hover); text-decoration: none; }
.nav-link.is-active { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 600; }
.nav-link.is-active .icon { color: var(--side-active-text); }
.nav-soon { margin-left: auto; color: var(--line-strong); font-size: 1.2rem; line-height: 1; }

.sidebar-foot { border-top: 1px solid var(--line); padding: 10px 12px 14px; }
.flags { display: flex; gap: 6px; margin: 0 0 10px; }
.flags-center { justify-content: center; margin-top: 18px; }
.flag {
    padding: 2px; border: 2px solid transparent; border-radius: 6px;
    background: none; cursor: pointer; line-height: 0; opacity: .6;
}
.flag img { border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.flag:hover { opacity: 1; }
.flag.is-active { border-color: var(--primary); opacity: 1; }
.flag-inline { vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

.user-chip { display: flex; align-items: center; gap: .6rem; color: var(--side-text); padding: 4px; border-radius: var(--radius-sm); flex: 1; min-width: 0; }
.user-chip:hover { background: var(--side-hover); text-decoration: none; }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; }
.user-chip-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-role { font-size: .75rem; color: var(--side-muted); }

.avatar {
    display: inline-grid; place-items: center; flex: 0 0 auto;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary-dark);
    font-weight: 700; font-size: .82rem;
}
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
a.avatar:hover { text-decoration: none; }

.main { padding: 16px 14px 48px; max-width: 1400px; }

@media (min-width: 960px) {
    .topbar { display: none; }
    .sidebar { transform: none; box-shadow: none; }
    .sidebar .sidebar-close, .sidebar-backdrop { display: none; }
    .main { margin-left: var(--sidebar-w); padding: 28px 32px 56px; }
}

/* --------------------------------------------------------------------------
   Seitenkopf, Karten, Raster
   -------------------------------------------------------------------------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin-bottom: .15em; }
.page-head p { margin: 0; }
/* Aufgeklapptes Menü in der Kopfzeile (z. B. Export im Spritztagebuch) liegt über dem Inhalt darunter – die Einblend-Bewegung der
   Kopfzeile (transform) machte sie zu einer eigenen Ebene, die Karte „Neue Spritzung“ lag darüber (Nutzer 11.11.2026, ANNAHMEN 472) */
.page-head:has(details[open]) { position: relative; z-index: 40; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    margin-bottom: 16px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.info-card { background: var(--surface-2); }

.grid-2, .grid-3 { display: grid; grid-template-columns: 1fr; gap: 0 18px; }
.grid-zip { display: grid; grid-template-columns: 110px 1fr; gap: 0 12px; }
.grid-dash { display: grid; grid-template-columns: 1fr; gap: 16px; }
.grid-dash > .card { margin-bottom: 0; }
@media (min-width: 720px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
    .grid-dash { grid-template-columns: 2fr 1fr; }
}

/* KPI-Karten mit farbiger linker Kante */
.kpi-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
@media (min-width: 600px) { .kpi-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi {
    background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px 18px; border-left: 5px solid var(--kpi-1);
}
.kpi-2 { border-left-color: var(--kpi-2); }
.kpi-3 { border-left-color: var(--kpi-3); }
.kpi-4 { border-left-color: var(--kpi-4); }
.kpi-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 1.9rem; font-weight: 800; line-height: 1.2; margin: 4px 0; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: .78rem; color: var(--muted); }
.kpi.is-pending .kpi-value { color: var(--line-strong); }

.tile-big {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    text-align: center; color: var(--text); min-height: 180px;
}
.tile-big .icon { color: var(--primary); }
.tile-big:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.tile-big-title { font-size: 1.2rem; font-weight: 700; }

.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.list-rows li:first-child { border-top: 0; }

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

.placeholder { text-align: center; padding: 42px 20px; }
.placeholder-icon {
    display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
    background: var(--primary-soft); color: var(--primary); margin-bottom: 14px;
}
.placeholder .h3, .placeholder h1 { justify-content: center; }
.placeholder p { max-width: 520px; margin: 0 auto 18px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Schaltflächen, Chips, Badges
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 40px; padding: 8px 16px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    font: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2;
    cursor: pointer; white-space: nowrap; text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a33024; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); }
.btn-danger-text { color: var(--danger); }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: .82rem; }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: 6px 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
    font-size: .85rem; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.chip:hover { text-decoration: none; border-color: var(--primary); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-sm { padding: 2px 10px; font-size: .75rem; cursor: default; }

.badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    background: var(--hover); color: var(--muted); font-size: .74rem; font-weight: 600; white-space: nowrap;
    vertical-align: 1px;
}
.badge-green { background: var(--primary-soft); color: var(--primary-dark); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-yellow { background: var(--warning-soft); color: #8a5d00; }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-grey { background: var(--hover); color: #7c8580; }
.badge-role-admin { background: var(--primary-soft); color: var(--primary-dark); }
.badge-role-mitarbeiter { background: var(--info-soft); color: var(--info); }
.badge-role-terminal { background: var(--warning-soft); color: #8a5d00; }

/* --------------------------------------------------------------------------
   Reiter
   -------------------------------------------------------------------------- */

/* Reiter (Layout-Runde 30.10.2026): eine Optik für alle Seiten, umbrechen statt Schiebebalken */
.tabs {
    display: flex; flex-wrap: wrap; gap: 2px 4px; margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.tab {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: 10px 14px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0;
    background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .88rem; white-space: nowrap; cursor: pointer;
}
.tab .icon { width: 16px; height: 16px; }
.tab:hover { color: var(--text); background: var(--hover); text-decoration: none; }
.tab.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab-danger.is-active { color: var(--danger); border-bottom-color: var(--danger); }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

.form .h3:first-child, .form h2:first-of-type { margin-top: 0; }
.form-narrow { max-width: 620px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; font-size: .84rem; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=tel], input[type=search], input[type=time], select, textarea {
    width: 100%; min-height: 42px; padding: 9px 12px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: inherit; font-size: 16px; /* 16px verhindert Zoom auf iOS */
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 143, 78, .18); }
input:disabled, select:disabled { background: var(--hover); color: var(--muted); }
.input-short { max-width: 110px; }
.input-mid { max-width: 260px; }
.field-hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field-error { font-size: .8rem; color: var(--danger); margin-top: 4px; font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }

.check { display: flex; align-items: center; gap: .55rem; margin: 6px 0; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }

.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0; }
.rule-row label, .rule-row span { font-weight: 500; }
.rule-row input { width: 90px; }
.rule-arrow { color: var(--muted); }

/* --------------------------------------------------------------------------
   Tabellen
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
    padding: 11px 14px; text-align: left; white-space: nowrap;
    font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
    background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table tr.is-inactive td { color: var(--muted); }
.row-actions { display: inline-flex; gap: 4px; align-items: center; }
.row-actions form { margin: 0; }
.cell-user { display: flex; align-items: center; gap: 10px; }

@media (max-width: 719px) {
    .hide-sm { display: none !important; }
}

/* --------------------------------------------------------------------------
   Modale Dialoge (<dialog>)
   -------------------------------------------------------------------------- */

.modal {
    width: min(720px, calc(100vw - 20px)); max-height: calc(100vh - 20px);
    padding: 0; border: 0; border-radius: var(--radius);
    box-shadow: var(--shadow-lg); color: var(--text);
}
.modal-sm { width: min(460px, calc(100vw - 20px)); }
.modal::backdrop { background: rgba(20, 30, 25, .45); }
.modal-box { display: flex; flex-direction: column; max-height: calc(100vh - 20px); margin: 0; }
.modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   Meldungen
   -------------------------------------------------------------------------- */

.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px 11px 14px; border-radius: var(--radius-sm);
    background: var(--info-soft); color: var(--info); font-weight: 500;
}
.flash > span { flex: 1; }
.flash-success { background: var(--primary-soft); color: var(--primary-dark); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-warning { background: var(--warning-soft); color: #8a5d00; }
.flash-close { border: 0; background: none; color: inherit; cursor: pointer; padding: 2px; line-height: 0; opacity: .7; }
.flash-close:hover { opacity: 1; }

/* --------------------------------------------------------------------------
   Gefahrenzone
   -------------------------------------------------------------------------- */

.danger-zone { border: 1px solid #efc6c1; }
.danger-zone .h3 { color: var(--danger); }
.reset-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.reset-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.reset-item:hover { background: #fdf8f7; }
.reset-item input { width: 20px; height: 20px; accent-color: var(--danger); flex: 0 0 auto; }
.reset-text { display: flex; flex-direction: column; flex: 1; }

/* --------------------------------------------------------------------------
   Schlichtes Layout (Anmeldung, Einrichtung)
   -------------------------------------------------------------------------- */

body.plain { min-height: 100vh; }
.plain-wrap { max-width: 460px; margin: 0 auto; padding: 40px 16px; }
.plain-wrap:has(.plain-card-wide) { max-width: 760px; }
.plain-brand { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-bottom: 22px; font-size: 1.25rem; }
.plain-card { padding: 26px; }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; }
.checklist li { display: flex; gap: .5rem; align-items: center; padding: 3px 0; font-size: .9rem; }
.checklist .ok { color: var(--primary-dark); }
.checklist .fail { color: var(--danger); font-weight: 600; }
.checklist .warn { color: #8a5d00; }
.steps-text { padding-left: 1.2rem; }
.steps-text li { margin-bottom: .35rem; }
/* Admin-Code: Zifferntastatur auf der zweiten Anmeldeseite (ANNAHMEN 244) */
.pin-display { display: flex; justify-content: center; gap: 10px; margin: 6px 0 16px; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.pin-dot.is-set { background: var(--primary); border-color: var(--primary); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto 10px;
    user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.pin-key { min-height: 58px; font-size: 1.5rem; font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--surface); color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pin-key:active { background: var(--surface-2); transform: scale(.97); }
.pin-key-fn { font-size: .95rem; font-weight: 500; color: var(--muted, var(--text)); }
.pin-cancel { text-align: center; margin: 14px 0 0; font-size: .9rem; }
.code-block {
    white-space: pre-wrap; word-break: break-word; font-size: .8rem;
    background: #1f2a24; color: #e8efe9; padding: 12px; border-radius: var(--radius-sm); max-height: 360px; overflow: auto;
}
.plain-list { margin: 0; padding-left: 1.1rem; }
.plain-list li { margin-bottom: .3rem; }

/* --------------------------------------------------------------------------
   Druck
   -------------------------------------------------------------------------- */

@media print {
    .sidebar, .topbar, .sidebar-backdrop, .page-actions, .flashes, .row-actions { display: none !important; }
    .main { margin: 0; padding: 0; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* --------------------------------------------------------------------------
   Phase 2: Stammdaten
   -------------------------------------------------------------------------- */

.modal-lg { width: min(1040px, calc(100vw - 20px)); }

.color-dot {
    display: inline-block; width: 11px; height: 11px; border-radius: 50%;
    margin-right: 6px; vertical-align: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.12);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip-muted { color: var(--muted); border-style: dashed; }
.chip-warn { color: #8a5a00; background: #fff6e0; border-color: #f2c14e; }
.inline-form { display: inline; margin: 0; }
.link-btn {
    border: 0; background: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer;
    display: inline-flex; align-items: center; gap: .3rem;
}
.link-btn:hover { text-decoration: underline; }

/* Aufklappbare Karten (Obstarten) */
.accordion { padding: 0; overflow: hidden; }
.accordion-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; cursor: pointer; list-style: none;
}
.accordion-head::-webkit-details-marker { display: none; }
.accordion-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.accordion-arrow { transition: transform .15s; }
.accordion:not([open]) .accordion-arrow { transform: rotate(-90deg); }
.accordion[open] .accordion-head { border-bottom: 1px solid var(--line); }
.accordion .empty { padding: 18px; }

/* Auswahl-Chips mit Häkchen */
.check-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.check-chip {
    margin: 0; padding: 5px 12px 5px 8px; border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: .85rem; background: var(--surface);
}
.check-chip input { width: 16px; height: 16px; }
.check-chip:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.check-group { margin-top: 10px; }
.check-group-title .check { margin: 0; }

.readonly-value {
    min-height: 42px; padding: 9px 12px; border-radius: var(--radius-sm);
    background: var(--hover); font-weight: 700; font-variant-numeric: tabular-nums;
}
input[type=color].input-color { width: 72px; height: 42px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }

/* Karten */
.map { width: 100%; background: #dfe5e1; }
.map-overview { height: 340px; }
.map-edit { height: 380px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
@media (max-width: 719px) { .map-overview { height: 260px; } .map-edit { height: 300px; } }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.leaflet-container { font-family: var(--font); }
.leaflet-draw-tooltip { font-family: var(--font); }

/* Bearbeitbare Tabellen (Sortenblöcke) */
.table-edit td { padding: 6px 6px; vertical-align: top; }
.table-edit th { padding: 8px 6px; }
.table-edit select, .table-edit input { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.table-edit select { min-width: 120px; }
.table-edit .input-num { width: 96px; text-align: right; }
.table-edit .input-year { width: 84px; text-align: right; }
.table-edit tfoot td { border-top: 2px solid var(--line); border-bottom: 0; padding-top: 10px; }
.table-edit tr.is-cleared td { background: #f7f7f5; color: var(--muted); }
.table-edit tr.is-cleared select, .table-edit tr.is-cleared input:not([type=date]) { color: var(--muted); }
.input-with-btn { display: inline-flex; align-items: center; gap: 2px; }
.icon-btn-sm { width: 30px; height: 30px; font-size: .9rem; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.cleared-box { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cleared-box input { width: 150px; }

/* Drag & Drop */
.col-handle { width: 34px; }
.drag-handle { cursor: grab; font-size: 1.15rem; color: var(--muted); user-select: none; padding: 2px 4px; }
.drag-handle:active { cursor: grabbing; }
tr.is-dragging td { background: var(--primary-soft) !important; opacity: .8; }

.toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
    padding: 10px 18px; border-radius: 999px; background: #1f2a24; color: #fff; font-weight: 600;
    box-shadow: var(--shadow-lg);
}
.toast-error { background: var(--danger); }

/* Lagerort-Typen */
.badge-loc-hof { background: #fdf3dc; color: #8a5d00; }
.badge-loc-lager, .badge-loc-kuehl { background: var(--info-soft); color: var(--info); }
.badge-loc-ca { background: #ece4f5; color: #6c3d99; }
.badge-loc-sortierpartner { background: var(--primary-soft); color: var(--primary-dark); }
.badge-loc-extern { background: var(--hover); color: #5f6864; }

/* Aktionsknöpfe in Tabellen: unter 1280 px nur Symbole (Text als Tooltip) */
@media (max-width: 1279px) {
    .row-actions .hide-sm { display: none; }
    .row-actions .btn-sm { padding: 5px 7px; }
}
.nowrap { white-space: nowrap; }

/* Einklappbare Menügruppen und Abzeichen (Video 1, 27.10.2026) */
.nav-group-title {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    border: 0; background: none; cursor: pointer; text-align: left; font-family: inherit;
    border-radius: 6px; padding-top: 3px; padding-bottom: 3px;
}
.nav-group-title:hover { color: var(--text); background: var(--hover); }
.nav-group-arrow { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.is-collapsed .nav-group-arrow { transform: rotate(-90deg); }
.nav-group.is-collapsed ul { display: none; }
.nav-badge {
    margin-left: auto; padding: 1px 7px; border-radius: 999px;
    background: var(--hover); color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .04em;
}
.nav-badge + .nav-soon { margin-left: 6px; }

.dash-blocks > .card { margin-bottom: 16px; }

/* ==========================================================================
   Phase 3 – Etiketten, Drucker
   ========================================================================== */
.chip-inline { margin-top: 0; }
.code-big { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .12em; background: #f1f4f2; padding: 2px 8px; border-radius: 6px; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; }
.steps-list { margin: .25rem 0 0 1.2rem; padding: 0; line-height: 1.7; }
.text-danger { color: var(--danger, #c0392b); }
.card-pad { padding: 16px 20px 0; }
.input-date { min-width: 9.5rem; }
.table-edit .input-short { width: 4.5rem; }

/* Assistent „Etiketten erstellen“ */
.wizard { max-width: 920px; }
.wizard-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wizard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wizard-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; padding: 0; list-style: none; }
.wizard-steps li { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: .82rem; font-weight: 600; }
.wizard-steps li .num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .75rem; }
.wizard-steps li.is-current { background: var(--primary); color: #fff; }
.wizard-steps li.is-current .num { color: var(--primary); }
.wizard-steps li.is-done { background: #dff0e4; color: var(--primary); cursor: pointer; }
.wizard-steps li.is-done .num { background: var(--primary); color: #fff; }
.wizard-question { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; }
.wizard-sub { color: var(--muted); margin: 0 0 14px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tile {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
    padding: 14px 16px; min-height: 76px; border: 2px solid var(--line-strong); border-radius: 14px;
    background: var(--surface); cursor: pointer; font: inherit; color: var(--text);
}
.tile:hover { border-color: var(--primary); }
.tile.is-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(47, 143, 78, .15); }
.tile-title { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 6px; }
.tile-sub { color: var(--muted); font-size: .82rem; }
.tile-number { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.tile.tile-num { align-items: center; justify-content: center; min-height: 90px; }
.wizard-map { height: 480px; height: min(480px, 62vh); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.wizard-map-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: var(--surface); margin-bottom: 12px; }
.segmented button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button.is-active { background: var(--primary); color: #fff; }
.summary-box { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); margin: 14px 0; }
.summary-box dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.summary-box dt { color: var(--muted); }
.summary-box dd { margin: 0; font-weight: 600; }
.net-display { font-size: 2.6rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.output-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.wizard-result { text-align: center; padding: 30px 10px; }
.wizard-result .icon-xl { color: var(--primary); }
.wizard-result .btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.big-input { font-size: 1.6rem; font-weight: 700; max-width: 220px; }

/* Etikettenliste */
.label-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; padding: 10px 0; }
.label-code { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: .85rem; }
.label-code.has-error { border-color: var(--danger); }
.label-code.is-deleted { opacity: .5; text-decoration: line-through; }
.batch-details td { background: #f7f9f8; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filter-bar .field { margin: 0; min-width: 140px; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px; flex-wrap: wrap; }

@media (max-width: 640px) {
    .wizard-question { font-size: 1.15rem; }
    .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wizard-map { height: 60vh; }
}
.btn-lg { min-height: 48px; padding: 10px 22px; font-size: 1.02rem; }

/* Feldnamen fest auf der Karte im Etiketten-Assistenten */
.leaflet-tooltip.field-label {
    background: transparent; border: 0; box-shadow: none; padding: 0;
    color: #fff; font-weight: 700; font-size: .78rem; text-align: center; white-space: nowrap;
    text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 0 6px rgba(0, 0, 0, .7);
    cursor: pointer; pointer-events: auto;
}
.leaflet-tooltip.field-label::before { display: none; }
.download-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; }
.printer-alert { margin-bottom: 14px; }
.printer-alert .btn { margin-left: auto; }

/* Reihenernte */
.rh-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rh-marker { display: grid; place-items: center; }
.rh-marker span {
    display: inline-block; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: #222;
    font-size: .74rem; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
    border: 2px solid var(--rh-color, #a4243b); cursor: pointer;
}
.rh-marker.is-done span { background: #dff0e4; }
.rh-marker.is-dim span { opacity: .45; }
.rh-marker small { font-weight: 500; color: #555; }
.kpi-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.yield-list { display: flex; flex-direction: column; gap: 6px; }
.yield-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr minmax(90px, auto) auto; align-items: center; gap: 10px; }
.yield-bar { height: 12px; background: var(--hover); border-radius: 999px; overflow: hidden; }
.yield-bar span { display: block; height: 100%; border-radius: 999px; }
.yield-value { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.text-good { color: var(--primary); }
.yield-legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .82rem; color: var(--muted); }
.legend-low, .legend-high { display: inline-block; width: 14px; height: 14px; border-radius: 50%; }
.legend-low { background: #f2c14e; }
.legend-high { background: #2f8f4e; }
@media (max-width: 640px) {
    .yield-row { grid-template-columns: 1fr auto; }
    .yield-bar { grid-column: 1 / -1; order: 3; }
    .yield-action { grid-column: 2; }
}
[hidden] { display: none !important; }

/* Phase 4 – Scan */
.scan-page { max-width: 720px; }
.scan-modes { margin-bottom: 12px; }
.scan-camera { position: relative; width: 100%; min-height: 240px; border-radius: 14px; overflow: hidden; background: #1d2420; margin-bottom: 10px; }
.scan-camera video { width: 100% !important; display: block; }
.scan-camera-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #cfd6d2; }
/* Sortierrechnung: Rechnungsempfänger unter der Preisleiste über die ganze Breite */
.invoice-recipient { flex-basis: 100%; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.4fr); gap: 0 14px; }
@media (max-width: 640px) { .invoice-recipient { grid-template-columns: 1fr; } }
/* Rechnungstool (ANNAHMEN 250) */
.invoice-lines td { vertical-align: top; }
.invoice-lines input[type="text"] { width: 100%; min-width: 4.5rem; }
.invoice-lines td:first-child { min-width: 18rem; }
.invoice-lines select { min-width: 6rem; }
.invoice-lines .input-short { min-width: 5.5rem; }
.invoice-lines .input-detail { margin-top: 4px; font-size: .85em; }
.invoice-lines .is-missing { border-color: var(--danger, #c0392b); }
.invoice-lines .has-error { border-color: var(--danger, #c0392b); }
.invoice-new-line td { background: var(--surface-2, rgba(0,0,0,.025)); }
.invoice-totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; max-width: 420px; margin: 0 0 0 auto; }
.invoice-totals dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.invoice-totals .strong { font-weight: 700; border-top: 1px solid currentColor; padding-top: 4px; }
/* E-Rechnung (ANNAHMEN 251): Schiebeschalter */
.einvoice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.einvoice-row form { margin: 0; }
.einvoice-xml { margin-left: auto; }
.einvoice-problems { margin: 12px 0 0; }
.einvoice-problems ul { margin: 4px 0 0; padding-left: 1.2rem; }
.switch { display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { flex: none; width: 46px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Rückmeldung über dem Kamerabild (Nutzer 02.11.2026) */
.scan-toast { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 20; padding: 12px 14px; border-radius: 12px;
    font-weight: 700; font-size: 1.05rem; line-height: 1.3; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    opacity: 0; transform: translateY(-140%); transition: transform .25s ease, opacity .25s ease; pointer-events: none; }
.scan-toast.is-show { opacity: 1; transform: none; }
.scan-toast.is-success { background: #2f8f4e; color: #fff; }
.scan-toast.is-warning { background: #f2c230; color: #2b2200; }
.scan-toast.is-error { background: #c62f2f; color: #fff; }
/* Handy: Kamerabild nimmt etwa drei Viertel des Bildschirms ein, Überschrift weg */
@media (max-width: 760px) and (pointer: coarse) {
    .scan-head { display: none; }
    .scan-modes { margin-bottom: 8px; }
    .scan-camera { height: 72vh; height: 72dvh; min-height: 0; }
    .scan-camera #scan-video, .scan-camera #scan-video video { width: 100% !important; height: 100% !important; object-fit: cover; }
}
.scan-manual { margin-top: 14px; }
/* Eigener QR-Leser (ANNAHMEN 317) */
.qr-video { display: block; width: 100%; height: auto; }
.qr-aim { display: none; }
/* Massenscan-Leiste oben nicht unter der Kopfzeile verstecken (Handy/Tablet) */
@media (max-width: 959px) { .scan-page .scan-bar { top: 64px; } }
/* Handy: Kamera über den ganzen Bildschirm, unten eine Leiste mit den gescannten Kisten und Zurück/Fertig */
html.scan-fullscreen, html.scan-fullscreen body { overflow: hidden; }
html.scan-fullscreen .scan-camera { position: fixed; left: 0; right: 0; top: 0; bottom: var(--scan-dock-h, 170px); z-index: 1000;
    height: auto; min-height: 0; margin: 0; border-radius: 0; background: #000; }
html.scan-fullscreen .scan-camera #scan-video, html.scan-fullscreen .qr-video { width: 100% !important; height: 100% !important; object-fit: cover; }
html.scan-fullscreen .qr-aim { display: block; position: absolute; left: 50%; top: 50%; width: 64vmin; height: 64vmin; transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, .9); border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .22); pointer-events: none; }
html.scan-fullscreen .scan-toast { top: calc(env(safe-area-inset-top, 0px) + 12px); }
.scan-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; display: flex; flex-direction: column; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #1d2420; color: #fff; }
.scan-dock-head { display: flex; align-items: center; gap: 10px; }
.scan-dock-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.scan-dock-title .small { color: rgba(255, 255, 255, .7); }
.scan-dock-title strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-dock .badge { font-size: 1rem; padding: 4px 12px; }
.scan-dock-list { list-style: none; margin: 0; padding: 0 0 2px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.scan-dock-list::-webkit-scrollbar { display: none; }
.scan-chip { flex: none; display: flex; flex-direction: column; max-width: 58vw; padding: 6px 10px; border-radius: 10px;
    background: rgba(255, 255, 255, .1); border-left: 4px solid #9aa39e; font-size: .8rem; line-height: 1.3; }
.scan-chip .code { font-weight: 700; letter-spacing: .04em; }
.scan-chip .small { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-chip.is-ok { border-left-color: #4cc274; }
.scan-chip.is-warn { border-left-color: #f2c14e; }
.scan-chip.is-error { border-left-color: #e05a4f; background: rgba(198, 47, 47, .35); }
.scan-chip.is-empty { border-left-color: transparent; opacity: .75; }
.scan-dock-actions { display: grid; grid-template-columns: auto 1fr 1fr; gap: 8px; }
.scan-dock-actions .btn { min-height: 50px; font-size: 1rem; justify-content: center; }
.scan-dock-actions .btn:not(.btn-primary) { background: rgba(255, 255, 255, .14); color: #fff; border-color: transparent; }
.scan-again { margin-bottom: 14px; }
.scan-manual label { font-weight: 600; display: block; margin-bottom: 4px; }
.scan-manual input { font-size: 1.15rem; letter-spacing: .08em; text-transform: uppercase; }
.scan-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px;
    background: var(--primary); color: #fff; border-radius: 14px; }
.scan-bar > div { flex: 1; display: flex; flex-direction: column; }
.scan-bar .muted { color: rgba(255, 255, 255, .8); }
.scan-bar .badge { font-size: 1rem; padding: 4px 12px; }
.scan-group-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.scan-target { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; margin-bottom: 6px;
    border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font: inherit; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
.scan-target:hover:not(:disabled) { border-color: var(--primary); }
.scan-target:disabled { opacity: .5; cursor: not-allowed; }
.scan-target.is-current { background: var(--primary-soft); border-color: var(--primary); }
.scan-target.is-danger { color: var(--danger); border-color: #f0c5bf; }
.scan-new-dn { padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.scan-new-dn .field { display: block; margin-bottom: 10px; }
.scan-new-dn .field > span:first-child { display: block; margin-bottom: 4px; font-size: .84rem; font-weight: 600; }
.scan-new-dn .field-hint { display: block; }
.scan-new-dn .field-error { margin: 0 0 10px; }
.scan-box-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.scan-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0; }
.scan-facts dt { color: var(--muted); }
.scan-facts dd { margin: 0; font-weight: 600; }
.scan-history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.scan-history li { display: flex; gap: 10px; font-size: .88rem; }
.scan-list { list-style: none; padding: 0 16px 12px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.scan-item { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; border-left: 4px solid var(--line-strong); background: var(--surface-2); }
.scan-item.is-ok { border-left-color: var(--primary); }
.scan-item.is-warn { border-left-color: #f2c14e; }
.scan-item.is-error { border-left-color: var(--danger); background: var(--danger-soft); }
.scan-item.is-pending { border-left-color: #9aa39e; }

/* Phase 4 – Lagerbestand */
.stock-toolbar { display: flex; flex-direction: column; gap: 10px; }
.stock-toolbar .segmented { margin-bottom: 0; align-self: flex-start; }
.stock-search { max-width: 420px; }
.stock-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stock-buttons .is-active { background: var(--primary); color: #fff; }
.stock-summary { margin: 4px 2px 10px; color: var(--muted); font-size: .88rem; }
.stock-group { padding: 0; overflow: hidden; }
.stock-group-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 14px 16px 8px;
    border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.stock-group-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.stock-group-amount { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.stock-bar { display: flex; height: 10px; margin: 0 16px; border-radius: 999px; overflow: hidden; background: var(--hover); }
.stock-bar span { height: 100%; }
.stock-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 16px 12px; font-size: .76rem; color: var(--muted); }
.stock-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.stock-positions { border-top: 1px solid var(--line); }
.stock-position { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.stock-position:last-child { border-bottom: 0; }
.stock-position.is-selected { background: var(--primary-soft); }
.stock-select-all { grid-template-columns: auto 1fr auto; cursor: pointer; font-weight: 600; background: var(--surface-2, transparent); }
.stock-position-label, .stock-position-amount { display: flex; flex-direction: column; }
.stock-position-amount { align-items: flex-end; font-variant-numeric: tabular-nums; }
.stock-position-actions { display: flex; gap: 4px; }
.stock-icon { font-size: 1.05rem; line-height: 1; }
.stock-actionbar { position: sticky; bottom: 12px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px;
    background: #1d2420; color: #fff; border-radius: 14px; box-shadow: var(--shadow); margin-top: 12px; }
.stock-actionbar .btn-ghost { color: #fff; }
.stock-actionbar .spacer { flex: 1; }
.move-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.move-field { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); }
.move-field input { width: 7rem; }
@media (max-width: 640px) {
    .move-row { grid-template-columns: 1fr 1fr; }
    .move-row > div:first-child { grid-column: 1 / -1; }
}

/* Sortierung (Phase 5) */
.flash-info { background: var(--info-soft); color: var(--info); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.sorting-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 0; color: var(--muted); font-size: .88rem; }
.sorting-meta strong { color: var(--text); }
.sorting-locked { align-items: center; }
.danger-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.sub-form { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px 4px; margin: 0 0 12px; }
.sub-form legend { font-weight: 700; font-size: .85rem; padding: 0 6px; }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:hover { background: var(--surface-2); }
.mini-bar { height: 5px; background: var(--hover); border-radius: 999px; overflow: hidden; margin-top: 4px; min-width: 70px; }
.mini-bar span { display: block; height: 100%; background: var(--primary); }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: inline; } }
.show-md { display: none; }
@media (max-width: 1199px) { .hide-md { display: none; } .show-md { display: inline; } }
.sort-cockpit { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .sort-cockpit { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); } }
.sort-main, .sort-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sort-cockpit .card, #sorting-app > .card { margin-bottom: 0; }
#sorting-app > * + * { margin-top: 16px; }
.card-head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 8px; }
.size-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 12px;
    border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.size-tile:hover:not(:disabled) { border-color: var(--primary); }
.size-tile.is-selected { border-color: var(--primary); background: #e9f5ec; box-shadow: 0 0 0 3px rgba(47, 143, 78, .18); }
.size-tile:disabled, .size-tile.is-disabled { opacity: .7; cursor: default; }
.size-name { font-weight: 800; font-size: 1.05rem; padding-right: 18px; hyphens: auto; }
.size-sub { font-size: .76rem; color: var(--muted); }
.size-key { position: absolute; top: 6px; right: 8px; font-size: .68rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
.size-tile.is-waste { padding: 0; border-color: #e8c3bd; background: var(--danger-soft); flex-direction: row; align-items: stretch; }
.waste-main { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 0; background: none; font: inherit; color: var(--danger); cursor: pointer; text-align: left; position: relative; }
.waste-minus { border: 0; border-left: 1px solid #e8c3bd; background: none; color: var(--danger); font-size: 1.2rem; width: 30px; cursor: pointer; }
.size-tile.is-add { border-style: dashed; color: var(--muted); align-items: center; justify-content: center; }
.scale-card { background: #f3f8ec; border: 1px solid #d5e6c6; }
.scale-card.is-idle { background: var(--card); border-color: var(--line); }
.scale-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.scale-grid { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 14px; padding: 6px 0 12px; border-bottom: 1px solid #d5e6c6; }
.scale-label { color: var(--muted); font-size: .88rem; }
.scale-input { font-size: 2.4rem; font-weight: 800; text-align: right; width: 12rem; max-width: 50vw; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.scale-tare { font-size: 1.4rem; font-weight: 700; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale-net { font-size: 2.8rem; font-weight: 800; text-align: right; color: var(--primary); font-variant-numeric: tabular-nums; border-top: 2px solid var(--text); padding-top: 4px; }
.scale-net.is-negative { color: var(--danger); }
.format-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.format-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 8px 30px 8px 12px; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; }
.format-btn.is-selected { border-color: var(--text); background: var(--text); color: #fff; }
.format-btn.is-selected .size-key { color: #fff; border-color: rgba(255, 255, 255, .5); }
.scale-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.input-list { list-style: none; margin: 10px 0 0; padding: 0; }
.input-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.progress-big { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.progress-big strong { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.dist-list { display: flex; flex-direction: column; gap: 6px; }
.dist-row { display: grid; grid-template-columns: minmax(70px, auto) 1fr auto; align-items: center; gap: 8px; font-size: .85rem; }
.dist-row.is-waste .dist-name { color: var(--danger); }
.dist-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.is-new td { background: var(--primary-soft); }
.result-row { display: grid; grid-template-columns: 1fr 7rem 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.result-sum { margin: 10px 0 0; font-size: .9rem; }
.sizes-search { width: 100%; margin-bottom: 10px; }
.sizes-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 4px 10px; max-height: 50vh; overflow-y: auto; }
.pdf-frame { width: 100%; height: 78vh; border: 0; display: block; border-radius: var(--radius); }
@media (max-width: 640px) {
    .result-row { grid-template-columns: 1fr 6rem; }
    .scale-input { font-size: 1.9rem; width: 9rem; }
    .scale-net { font-size: 2.2rem; }
}
.input-panel { border: 2px solid var(--primary); }
.input-panel .input-with-btn { margin: 10px 0; }
.input-camera { margin: 8px 0; }
.input-camera .scan-camera { margin-bottom: 8px; }
.from-stock { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.from-stock summary, .input-details summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 4px 0; }
.from-stock-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.from-stock-row select { min-width: 220px; }
.from-stock-row input { width: 6rem; }
.input-panel .scan-list { padding: 0; }
.cost-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cost-row input { width: 10rem; }
.cost-result { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: 1.05rem; }
.result-row { grid-template-columns: 1fr 8rem auto; }
/* „Wo abziehen?“ (externe Sortierung, Ergebnis verringert) */
.alloc-class { padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.alloc-class:last-child { border-bottom: 0; }
.alloc-row { display: grid; grid-template-columns: 1fr 7rem; gap: 10px; align-items: center; margin: 6px 0; font-size: .92rem; }

/* ---- Verkauf, Kunden, Lieferschein (Phase 6) ---------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.spacer { flex: 1; }
.text-warn { color: #8a5a00; }
label.is-disabled { opacity: .45; }
.kpi-link { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s; }
.kpi-link:hover { box-shadow: var(--shadow-lg); }
.kpi-5 { border-left-color: #7b61c4; }
@media (min-width: 1200px) { .kpi-grid-5 { grid-template-columns: repeat(5, 1fr); } }
.kpi-grid-5 .kpi-value { font-size: 1.45rem; }
.sales-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .sales-layout { grid-template-columns: 290px minmax(0, 1fr); } }
.sales-customers { position: sticky; top: 12px; }
@media (max-width: 1099px) { .sales-customers { position: static; } .sales-customer-list { max-height: 240px; } }
.sales-customer-list { display: flex; flex-direction: column; max-height: 75vh; overflow-y: auto; }
.sales-customer { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 16px; color: inherit; text-decoration: none; border-left: 4px solid transparent; border-top: 1px solid var(--line); }
.sales-customer:hover { background: var(--surface-2); }
.sales-customer.is-active { background: var(--primary-soft); border-left-color: var(--primary); }
.sales-customer.is-inactive strong { color: var(--muted); }
.sales-customer > .muted { grid-column: 1; }
.sales-customer-badges { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sales-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sales-main > .kpi-grid { margin-bottom: 0; }
.sales-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sales-head h2 { margin: 0; }
.sales-mirror tbody tr { cursor: pointer; }
.sales-mirror tbody tr:hover { background: var(--surface-2); }
.sales-mirror tbody tr.is-active td { background: var(--primary-soft); }
.dn-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 0; }
.dn-toolbar input[type=search] { flex: 1 1 220px; max-width: 320px; }
.dn-month-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 16px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dn { border-bottom: 1px solid var(--line); }
.dn-head { display: grid; grid-template-columns: 52px minmax(90px, 140px) minmax(0, 1fr) 80px 90px auto 100px 20px; gap: 10px; align-items: center;
    width: 100%; padding: 10px 16px; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.dn-head:hover { background: #f9faf9; }
.dn-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.dn-no { font-weight: 700; }
.dn-content { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.dn-boxes, .dn-kg, .dn-amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dn-kg { font-weight: 600; }
.dn-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dn-arrow .icon { transition: transform .15s; }
.dn.is-open .dn-arrow .icon { transform: rotate(180deg); }
.dn.is-open > .dn-head { background: var(--primary-soft); }
.dn.is-storniert .dn-head { opacity: .6; }
.dn.is-storniert .dn-no { text-decoration: line-through; }
.dn-body { padding: 4px 16px 16px; background: #fcfdfc; }
.dn-state { margin: 6px 0 10px; }
.dn-items .input-num { width: 6.5rem; text-align: right; }
.dn-items tfoot td { border-top: 2px solid var(--line-strong); }
.dn-items td.actions { width: 1%; white-space: nowrap; }
.dn-changes { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px; margin: 8px 0 4px; }
.dn-changes ul { margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.dn-items .icon-btn-inline { display: inline-flex; vertical-align: middle; width: 26px; height: 26px; margin-left: 2px; }
.dn-head-fields { margin-top: 12px; }
.dn-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
@media (max-width: 900px) {
    .dn-head { grid-template-columns: 48px 1fr auto 20px; grid-template-areas: "date no kg arrow" "content content badges badges"; row-gap: 4px; }
    .dn-date { grid-area: date; } .dn-no { grid-area: no; } .dn-kg { grid-area: kg; } .dn-arrow { grid-area: arrow; }
    .dn-content { grid-area: content; } .dn-badges { grid-area: badges; }
    .dn-boxes, .dn-amount { display: none; }
}
.out-rows { display: flex; flex-direction: column; }
.out-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 32px; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
.out-row-main select { width: 100%; }
.out-row .move-field input { width: 6.5rem; }
@media (max-width: 640px) {
    .out-row { grid-template-columns: 1fr 1fr 32px; }
    .out-row-main { grid-column: 1 / -1; }
}
.out-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.out-text { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.out-text summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 4px 0; }
.tpl-box { margin-top: 8px; }
.tpl-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tpl-row select, .tpl-row input { flex: 1; min-width: 0; }
.tpl-msg { margin-bottom: 8px; }
.split-rows { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: grid; grid-template-columns: minmax(0, 1fr) 6rem 6rem 32px; gap: 8px; align-items: end; }
.split-row select { width: 100%; }
.split-row .move-field input { width: 100%; }
.customers-table td:first-child { min-width: 190px; }
.customers-table .chip-list { gap: 4px; }

/* ==========================================================================
   Phase 7: Personal, Lohn, Zeiterfassung, Tablet
   ========================================================================== */
.list-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.list-toolbar input[type=search] { flex: 1 1 220px; max-width: 320px; }
.list-toolbar select { width: auto; min-width: 200px; }
.link-back { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.link-back .icon { width: 16px; height: 16px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px 4px; margin: 6px 0 12px; }
.fieldset legend { font-size: .84rem; font-weight: 700; padding: 0 6px; }
.pick-list { max-height: 220px; overflow-y: auto; }
.input-code { font-size: 1.4rem; letter-spacing: .15em; text-transform: uppercase; text-align: center; }
.table tr.is-alert td { background: var(--danger-soft); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 640px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Zeiterfassung */
.time-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.time-toolbar input[type=date] { width: auto; }
.time-toolbar select { width: auto; min-width: 180px; }
.time-changes { margin-top: 4px; font-size: .8rem; }
.time-changes summary { cursor: pointer; list-style: none; display: inline-block; }
.time-changes summary::-webkit-details-marker { display: none; }
.time-changes ul { margin: 6px 0 0; padding: 0; list-style: none; min-width: 200px; }
.time-changes li { padding: 4px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.time-weekday { font-weight: 600; min-width: 6.5em; }
.break-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.break-row input[type=time] { width: 9rem; }
.time-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.time-range input[type=date] { width: auto; }

/* Tablet (Video 26): groß, gut zu treffen, Farbe je Status */
.terminal-body { background: var(--bg); }
.terminal { max-width: 1400px; margin: 0 auto; padding: 20px 24px 40px; }
.terminal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.terminal-head h1 { font-size: 1.5rem; margin: 0 0 2px; }
.terminal-right { display: flex; align-items: center; gap: 16px; }
.terminal-right .flags { margin: 0; }
.terminal-clock { font-size: 2.6rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; line-height: 1; }
.terminal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.t-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 22px; border: 0; border-radius: 12px;
    font: inherit; font-size: 1.05rem; font-weight: 700; color: #fff; cursor: pointer; }
.t-btn .icon { width: 22px; height: 22px; }
.t-btn:disabled { opacity: .35; cursor: not-allowed; }
.t-start { background: #2f8f4e; }
.t-pause { background: #2a6f97; }
.t-resume { background: var(--surface); color: #2a6f97; box-shadow: inset 0 0 0 2px #2a6f97; }
.t-stop { background: #c0392b; }
.terminal-message { min-height: 8px; }
.terminal-message .flash { margin: 0 0 10px; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.t-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 120px; padding: 14px 16px; text-align: left;
    border: 1px solid var(--line-strong); border-left-width: 6px; border-radius: 12px; background: var(--surface); font: inherit; cursor: pointer; }
.t-tile:active { transform: scale(.98); }
.t-initials { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    background: rgba(0, 0, 0, .06); font-weight: 700; font-size: .9rem; }
.t-name { font-weight: 700; font-size: 1.05rem; }
.t-state { font-size: .88rem; color: var(--muted); }
.t-tile.t-work { background: #e8f5ec; border-color: #9fd3b0; border-left-color: #2f8f4e; }
.t-tile.t-break { background: #e5f0f7; border-color: #a8cbe0; border-left-color: #2a6f97; }
.t-tile.t-done { background: #f1f2f1; border-left-color: #8a938e; }
.t-tile.t-none { border-left-color: var(--line-strong); }
.terminal-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.t-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--surface); border: 1px solid var(--line-strong); }
.t-legend.t-work i { background: #2f8f4e; border-color: #2f8f4e; }
.t-legend.t-break i { background: #2a6f97; border-color: #2a6f97; }
.t-legend.t-done i { background: #8a938e; border-color: #8a938e; }
.terminal-dialog .t-person-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.terminal-dialog .t-person-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.t-pick { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.t-pick-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.t-pick-row input { width: 24px; height: 24px; }
@media (max-width: 700px) {
    .terminal { padding: 14px; }
    .terminal-head { flex-direction: column; }
    .terminal-clock { font-size: 2rem; }
    .t-btn { flex: 1 1 45%; }
}

/* ---- Aufgaben (Phase 8) ---------------------------------------------------- */
.task-desc { margin-top: 2px; max-width: 520px; }
.task-field-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 10px; }
.task-map { height: 320px; border-radius: var(--radius, 10px); overflow: hidden; margin-bottom: 12px; }
.task-cards { display: grid; gap: 12px; }
.task-card { margin: 0; }
.task-card h2 { margin: 0 0 6px; }
.task-card.is-overdue { border-left: 4px solid var(--danger); }
.task-card.is-done { opacity: .75; }
.task-text { margin: 0 0 8px; white-space: normal; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-meta .icon { width: 15px; height: 15px; }
.task-meta .text-danger { color: var(--danger); }
.chips-end { margin-left: auto; }
.task-every { display: flex; align-items: center; gap: 8px; }
.icon-xs { width: 13px; height: 13px; vertical-align: -2px; }

/* ---- Auswertung (Phase 9a) ---------------------------------------------------- */
.eval-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.eval-side { position: sticky; top: 12px; padding: 14px; }
.eval-side-block { margin-bottom: 14px; }
.eval-side-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 6px 0; }
.eval-tree { display: flex; flex-direction: column; gap: 1px; }
.eval-node { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; color: inherit; text-decoration: none; font-size: .9rem; cursor: pointer; }
.eval-node:hover { background: var(--primary-soft); text-decoration: none; }
.eval-node.is-active { background: var(--primary); color: #fff; }
.eval-node.is-active .muted { color: rgba(255,255,255,.8); }
.eval-node .icon { width: 15px; height: 15px; }
.eval-fruit { font-weight: 700; margin-top: 4px; }
.eval-variety { padding-left: 20px; }
.eval-rest summary { list-style: none; }
.eval-rest summary::-webkit-details-marker { display: none; }
.eval-main { min-width: 0; }
.fp-eval { margin-top: 24px; }   /* Auswertung im Steckbrief Feld (ANNAHMEN 506) */
.fp-eval-title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 1.3rem; }
.eval-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 34%); gap: 18px; }
.eval-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.eval-kpi-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.eval-kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.eval-kpi-note { font-size: .8rem; }
.eval-kpi-note.is-up, .eval-delta.is-up { color: var(--primary-dark); }
.eval-kpi-note.is-down, .eval-delta.is-down { color: var(--danger); }
.eval-kpi-open .eval-kpi-value { color: #8a5d00; }
.eval-vbars { display: flex; align-items: flex-end; gap: 8px; min-height: 120px; overflow-x: auto; padding-bottom: 4px; }
.eval-vbar { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 44px; color: inherit; text-decoration: none; font-size: .72rem; position: relative; }
.eval-vbar:hover { text-decoration: none; }
.eval-vbar-col { width: 26px; background: #b9d8c3; border-radius: 4px 4px 0 0; }
.eval-vbar.is-active .eval-vbar-col { background: var(--primary); }
.eval-vbar.is-active .eval-vbar-lab { font-weight: 700; }
.eval-vbar-val { color: var(--muted); white-space: nowrap; }
.eval-vbar-badge { font-size: .6rem; background: var(--info-soft); color: var(--info); border-radius: 6px; padding: 0 4px; }
.eval-tabs { margin: 14px 0 12px; }
.eval-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 16px; }
.eval-pane .card { margin-bottom: 16px; }
.eval-donut-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.eval-donut { width: 170px; height: 170px; flex: none; }
.eval-donut path.is-click { cursor: pointer; }
.eval-donut-main { font-size: 15px; font-weight: 700; fill: var(--text, #1d2b24); }
.eval-donut-sub { font-size: 10px; fill: var(--muted); }
.eval-legend { flex: 1; min-width: 200px; }
.eval-legend-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; font-size: .88rem; }
.eval-legend-row.is-click { cursor: pointer; }
.eval-legend-row.is-click:hover { background: var(--primary-soft); }
.eval-legend-row.is-indent { padding-left: 24px; font-size: .82rem; }
.eval-legend-row i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.eval-legend-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eval-legend-val { font-weight: 600; white-space: nowrap; }
.eval-legend-pct { font-size: .78rem; white-space: nowrap; }
.eval-chev { display: inline-block; transition: transform .15s; color: var(--muted); font-weight: 700; }
.eval-chev.is-open { transform: rotate(90deg); }
.eval-class-legend { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 8px; }
.eval-class-legend .eval-legend-row { grid-template-columns: 12px auto; padding: 2px 4px; font-size: .75rem; }
.eval-class-legend .eval-legend-val, .eval-class-legend .eval-legend-pct { display: none; }
.eval-bar-row { display: grid; grid-template-columns: minmax(80px, 26%) minmax(70px, 1fr) auto; gap: 10px; align-items: center; padding: 4px 6px; border-radius: 6px; }
.eval-bar-row.is-click { cursor: pointer; }
.eval-bar-row.is-click:hover { background: var(--primary-soft); }
.eval-bar-label { display: flex; flex-direction: column; font-size: .86rem; overflow: hidden; }
.eval-bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eval-bar-track { height: 14px; background: var(--hover); border-radius: 7px; overflow: hidden; }
.eval-bar-fill { height: 100%; display: flex; border-radius: 7px; overflow: hidden; }
.eval-bar-fill span { height: 100%; }
.eval-bar-value { font-size: .84rem; font-weight: 600; white-space: nowrap; text-align: right; }
.eval-band-row { display: grid; grid-template-columns: minmax(80px, 20%) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 6px; }
.eval-band-track { position: relative; height: 12px; background: var(--hover); border-radius: 6px; }
.eval-band { position: absolute; top: 2px; height: 8px; border-radius: 4px; opacity: .75; }
.eval-band-avg { position: absolute; top: -2px; width: 4px; height: 16px; margin-left: -2px; background: var(--text, #1d2b24); border-radius: 2px; }
.eval-lines { width: 100%; height: auto; }
.eval-line { fill: none; stroke-width: 2.5; }
.eval-grid { stroke: #e3e8e5; stroke-width: 1; }
.eval-axis { font-size: 10px; fill: var(--muted); }
.eval-line-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; margin-top: 6px; }
.eval-line-legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.eval-map { height: 320px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.eval-best td { font-weight: 700; background: var(--primary-soft); }
.eval-delta { font-weight: 600; }
.eval-empty { padding: 12px 0; }
.table-compact td, .table-compact th { padding: 6px 8px; }
.segmented-sm { margin-bottom: 8px; }
.segmented-sm button { padding: 4px 12px; font-size: .82rem; }
@media (max-width: 1150px) {
    .eval-layout { grid-template-columns: minmax(0, 1fr); }
    .eval-side { position: static; }
}
@media (max-width: 980px) {
    .eval-head, .eval-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Saison nachtragen (Phase 9b) ------------------------------------------------------------- */
.bf-season { margin-bottom: 4px; }
.bf-season .field { min-width: min(100%, 360px); }
.bf-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bf-boxes { display: flex; flex-direction: column; gap: 8px; }
.bf-box-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 6rem minmax(5.5rem, auto) 32px; gap: 8px; align-items: center; }
.bf-box-row select { width: 100%; }
.bf-boxes-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 6px; }
.bf-items input.input-num { width: 6rem; text-align: right; }
.bf-items tr[hidden] { display: none; }
.bf-box-sum { font-size: .95rem; }
.bf-more { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 6px; }
.bf-more[hidden] { display: none; }
.bf-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.bf-pool { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; margin: 4px 0 14px;
    border-radius: 10px; background: var(--surface-2); }
.bf-pool > div { display: flex; flex-direction: column; gap: 2px; }
.bf-pool.is-warn { background: var(--warning-soft); }
.bf-pool-warn { grid-column: 1 / -1; margin: 0; color: #8a5d00; display: flex; gap: 6px; align-items: center; }
.bf-pool-warn[hidden] { display: none; }
@media (max-width: 1440px) {
    .bf-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .bf-box-row { grid-template-columns: minmax(0, 1fr) 5rem 32px; }
    .bf-box-row > span:nth-of-type(1) { display: none; }
    .bf-box-row > span.small { grid-column: 1 / -1; order: 5; }
    .bf-pool { grid-template-columns: minmax(0, 1fr); }
}

/* Ernteschätzung (Phase 9c) */
.he-table td { vertical-align: top; }
.he-table .he-group th { background: var(--surface-2); font-size: .95rem; text-transform: none; letter-spacing: 0; color: var(--text); }
.he-own-inputs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.he-own-inputs input.input-num { width: 5.2rem; text-align: right; }
.he-last { color: var(--info); margin-top: 2px; }
.he-state { display: block; min-height: 1em; }
.he-state.is-ok { color: var(--primary-dark); }
.he-state.is-error { color: var(--danger); }
.he-why-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.he-why-btn:hover strong { text-decoration: underline dotted; }
.he-why { margin-top: 6px; padding: 8px 10px; border-radius: var(--radius-sm); background: #f4f6f5; max-width: 26rem; }
.he-why[hidden] { display: none; }
.he-trend { font-weight: 700; }
.he-trend-up { color: var(--primary); }
.he-trend-down { color: var(--danger); }
.he-trend-flat { color: var(--muted); }
.he-conf-hoch { background: var(--primary-soft); color: var(--primary-dark); }
.he-conf-mittel { background: var(--warning-soft); color: #8a5d00; }
.he-conf-niedrig { background: var(--hover); color: #5f6864; }
.he-done-col { text-align: center; width: 1%; white-space: nowrap; }
.he-done input { width: 20px; height: 20px; cursor: pointer; }
.he-done input:disabled { cursor: not-allowed; }
.he-expected { color: var(--info); }
.he-table .is-up { color: var(--primary-dark); }
.he-table .is-down { color: var(--danger); }
.he-beta { margin-left: 6px; font-size: .65rem; vertical-align: middle; }
.he-how { margin-top: 16px; }
.he-how summary { cursor: pointer; font-weight: 600; }
.he-how ul { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }
.he-how li { margin-bottom: 6px; }
.segmented a { padding: 6px 16px; border-radius: 999px; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented a.is-active { background: var(--primary); color: #fff; }
.he-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.he-card { margin: 0; }
.he-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.he-card-sum { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.he-card-sum strong { font-size: 1.3rem; white-space: nowrap; }
.he-warn { margin: 0; color: #8a5d00; background: var(--warning-soft); display: flex; gap: 6px; align-items: center; }
.he-edit { border: 0; background: none; padding: 2px 4px; font: inherit; color: inherit; cursor: pointer;
    border-bottom: 1px dashed var(--line-strong); border-radius: 0; }
.he-edit:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }
.he-edit.is-over { font-weight: 700; color: var(--info); border-bottom-color: var(--info); }
.he-reset { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--muted); font-size: .95rem; }
.he-reset:hover { color: var(--danger); }
.he-input { width: 5.5rem; text-align: right; }
.he-error { display: block; color: var(--danger); white-space: normal; }
.he-classes tr[hidden] { display: none; }
.he-more { padding-top: 6px; padding-bottom: 10px; }
@media (max-width: 900px) {
    .he-table thead { display: none; }
    .he-table, .he-table tbody, .he-table tfoot, .he-table tr, .he-table td, .he-table th { display: block; width: 100%; }
    .he-table tr.he-row { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
    .he-table tr.he-row > td { padding: 0; border: 0; text-align: left; }
    .he-table tr.he-row > td:first-child, .he-table tr.he-row > td.he-own { grid-column: 1 / -1; }
    .he-table td.num { text-align: left; }
    .he-table td.he-done-col { text-align: left; }
    .he-table tfoot tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 10px 12px; }
    .he-table tfoot th { padding: 0; border: 0; text-align: left; }
    .he-table td.num::before, .he-table td.he-comp::before, .he-table td.he-own::before, .he-table td.he-done-col::before {
        content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
}

/* ---- Pflanzenschutz: Geräte (Video 27) ------------------------------------------- */
.sd-settings { padding: 8px 14px; }
.sd-settings summary { cursor: pointer; font-size: .84rem; font-weight: 700; padding: 2px 0 6px; }
.sd-settings[open] summary { margin-bottom: 4px; }
.sd-parts { align-items: end; }
.sd-parts .check { margin-bottom: 14px; }
.sd-jki-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: #f7faf8; }
.sd-jki-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-jki-head [data-sd-jki-remove] { margin-left: auto; }
.sd-jki-type { margin-top: 6px; font-weight: 600; }
.sd-jki-cond { margin-top: 4px; line-height: 1.4; }
.sd-jki-full { margin-top: 4px; line-height: 1.4; }
.sd-jki-full summary { cursor: pointer; }
.sd-applied { color: var(--primary); margin: -4px 0 8px; }
.sd-nozzle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sd-nozzle:first-child { padding-top: 0; }
[data-sd-nozzles]:not(:empty) { margin-bottom: 10px; }
.jp-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.jp-bar input[type=search] { flex: 1 1 220px; }
.jp-bar .check { margin: 0; }
.jp-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.jp-item { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--surface);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; }
.jp-item:hover { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(47, 143, 78, .12); }
.jp-item.is-expired { opacity: .7; }
.jp-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jp-item-type { margin-top: 4px; font-weight: 600; font-size: .92rem; }
.jp-item-cond { margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sd-table td { vertical-align: top; }
.sd-nozzle-cell { white-space: nowrap; }
.sd-nozzle-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-nozzle-manual { display: flex; gap: 8px; margin-top: 10px; }
.sd-nozzle-manual input { flex: 1 1 auto; min-width: 0; }
[data-sd-jki-optional] { margin: 0 0 8px; }

/* ---- Pflanzenschutz: Mittel (Video 28) -------------------------------------------- */
.psm-sync { margin-bottom: 12px; }
.psm-filter { margin-bottom: 10px; padding-bottom: 14px; }   /* Haken „Sondergenehmigungen“ klebte am Rand (31.10.2026) */
.psm-search { display: flex; gap: 8px; margin-bottom: 10px; }
.psm-search input { flex: 1 1 auto; min-width: 0; }
.psm-bbch-row { display: flex; align-items: center; gap: 6px; }
.psm-bbch-row input { width: 64px; }
.psm-permit { margin: 10px 0 0; }
.psm-count { margin: 6px 2px 10px; }
.psm-list { list-style: none; margin: 0; padding: 0; }
.psm-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.psm-item:first-child { border-top: 0; }
.psm-item > details, .psm-item > .psm-static { flex: 1 1 auto; min-width: 0; }
.psm-item summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; list-style: none; }
.psm-item summary::-webkit-details-marker { display: none; }
.psm-item summary::before { content: '▸'; color: var(--muted); margin-right: 2px; }
.psm-item details[open] > summary::before { content: '▾'; }
.psm-name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.psm-meta { white-space: nowrap; }
.psm-action { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.psm-body { padding: 10px 0 4px 14px; }
.pd-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pd-ingredients { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pd-title { margin: 12px 0 8px; font-size: .95rem; }
.pd-use { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.pd-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.pd-awg { margin-left: auto; }
.pd-dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; font-size: .9rem; }
.pd-dl dt { color: var(--muted); font-weight: 600; font-size: .8rem; }
.pd-dl dd { margin: 0; }
.pd-cond summary { cursor: pointer; color: var(--primary-dark); font-size: .85rem; }
.pd-cond-product { margin-top: 6px; }
.pd-cond-product h5 { margin: 10px 0 4px; font-size: .82rem; }
.pd-cond-list { margin: 6px 0 0; padding-left: 18px; font-size: .84rem; line-height: 1.45; }
.pd-cond-list li { margin-bottom: 6px; }
.pd-code { font-family: ui-monospace, monospace; font-size: .78rem; background: #eef2ef; border-radius: 4px; padding: 1px 5px; }
.pd-reduced { color: var(--primary-dark); font-weight: 600; }
.psm-em-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.psm-em-bar .check { margin: 0; }
.psm-em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.psm-em { display: flex; flex-direction: column; gap: 8px; }
.psm-em.is-expired { opacity: .7; }
.psm-em-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.psm-em-uses { line-height: 1.45; }
.psm-em-period { color: var(--muted); }
.psm-em-bar-track { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.psm-em-bar-track span { display: block; height: 100%; background: var(--primary); }
.psm-em-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; flex-wrap: wrap; }
@media (max-width: 640px) {
    .pd-dl { grid-template-columns: 1fr; gap: 2px; }
    .pd-dl dd { margin-bottom: 6px; }
    .psm-item { flex-direction: column; }
    .psm-action { justify-content: flex-start; }
    .psm-body { padding-left: 0; }
    .psm-em-grid { grid-template-columns: 1fr; }
}
.psm-name .badge { align-self: flex-start; }

/* ---- Pflanzenschutz: Spritztagebuch (Video 29) --------------------------------------- */
.sd-year select { min-width: 96px; }
.sd-export { position: relative; }
.sd-export > summary { list-style: none; cursor: pointer; }
.sd-export > summary::-webkit-details-marker { display: none; }
.sd-export-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: var(--surface); border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; min-width: 200px; }
.sd-export-menu a { padding: 9px 14px; color: var(--text); }
.sd-export-menu a:hover { background: #f2f6f3; text-decoration: none; }
.cu-pill { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; margin: 0 0 12px; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); width: fit-content; max-width: 100%; }
.cu-pill:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--primary); }
.cu-pill-label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.cu-pill-bar, .cu-track { position: relative; display: inline-block; height: 8px; border-radius: 4px; background: var(--line); }
.cu-pill-bar { width: 120px; overflow: hidden; }
.cu-pill-bar span, .cu-fill { display: block; height: 100%; border-radius: 4px; background: #2f8f4e; }
.cu-1 .cu-pill-bar span, .cu-1 .cu-fill { background: #b8a200; }
.cu-2 .cu-pill-bar span, .cu-2 .cu-fill { background: #e08a00; }
.cu-near .cu-pill-bar span, .cu-near .cu-fill, .cu-over .cu-pill-bar span, .cu-over .cu-fill { background: var(--danger); }
.cu-pill.cu-near, .cu-pill.cu-over { border-color: var(--danger); }
.cu-card { margin-bottom: 14px; }
.cu-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.cu-big { font-size: 2.2rem; font-weight: 800; line-height: 1.1; }
.cu-big span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.cu-msg { max-width: 420px; font-weight: 600; }
.cu-2 .cu-msg, .cu-1 .cu-msg { color: #8a5d00; }
.cu-near .cu-msg, .cu-over .cu-msg { color: var(--danger); }
.cu-scale { margin: 14px 0 6px; }
.cu-track { display: block; height: 14px; border-radius: 7px; }
.cu-track .cu-fill { border-radius: 7px; }
.cu-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #555; }
.cu-ticks { display: flex; justify-content: space-between; margin-top: 4px; }
.sd-grid { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 14px; align-items: start; }
.sd-fields { position: sticky; top: 10px; max-height: calc(100vh - 20px); display: flex; flex-direction: column; }
.sd-fields-head h2, .sd-form h2 { font-size: 1.05rem; margin: 0 0 8px; }
.sd-quick-row { display: flex; gap: 8px; margin-top: 8px; }
.sd-quick-row select { flex: 1 1 auto; min-width: 0; }
.sd-field-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-top: 1px solid var(--line); }
.sd-f { border-bottom: 1px solid var(--line); }
.sd-f.is-on { background: var(--primary-soft); }
.sd-f-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; }
.sd-f-row input[type=checkbox] { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.sd-f-name { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.sd-f-none { color: #8a5d00; }
.sd-f-part { color: var(--primary-dark); font-weight: 600; }
.sd-f-caret { color: var(--muted); }
.sd-f-body { padding: 0 14px 10px 42px; }
.sd-f-fruit { margin-bottom: 4px; }
.sd-f-fruit .check { margin: 4px 0; }
.sd-block { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.sd-block h3 { font-size: .92rem; margin: 0 0 8px; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sd-chip-x { border: 0; background: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0 0 4px; color: var(--muted); }
.btn-link { border: 0; background: none; padding: 0; color: var(--primary-dark); cursor: pointer; text-decoration: underline; font: inherit; }
.sd-area-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.sd-area-row span:first-child { flex: 1 1 auto; }
.sd-area-row input { width: 90px; }
.sd-inv { margin-bottom: 8px; }
.sd-cu-tag { font-size: .7rem; font-weight: 800; color: #8a5d00; background: #fff3cf; border-radius: 4px; padding: 0 4px; }
.sd-em-tag { font-size: .7rem; font-weight: 700; color: #8a5d00; }
.sd-search { margin-bottom: 8px; }
.sd-search input { width: 100%; }
.sd-search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 240px; overflow-y: auto; }
.sd-search-item { text-align: left; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; font: inherit; }
.sd-search-item:hover { border-color: var(--primary); }
.sd-prod { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px; background: var(--surface-2); }
.sd-prod-head { display: flex; align-items: center; gap: 8px; }
.sd-prod-head button { margin-left: auto; }
.sd-prod-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sd-dose, .sd-ind { display: flex; flex-direction: column; gap: 2px; }
.sd-ind { flex: 1 1 240px; min-width: 0; }
.sd-ind select { width: 100%; }
.sd-dose-in { display: flex; gap: 4px; }
.sd-dose-in input { width: 90px; }
.sd-prod-info { margin-top: 6px; line-height: 1.5; }
.sd-cu-line { color: #8a5d00; }
.sd-cu-preview { border-radius: var(--radius-sm); padding: 8px 10px; background: var(--primary-soft); margin-top: 6px; }
.sd-cu-preview.cu-1, .sd-cu-preview.cu-2 { background: var(--warning-soft); color: #8a5d00; }
.sd-cu-preview.cu-near, .sd-cu-preview.cu-over { background: var(--danger-soft); color: var(--danger); }
.sd-dirs { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-dir-field .label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; }
.sd-submit { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 10px; }
.sd-submit p { margin: 0; }
.sd-list-filter { margin-bottom: 8px; }
.sd-cu-filter { margin: 0 0 6px; }
.sd-month { font-size: .95rem; margin: 16px 0 8px; color: var(--muted); }
.sd-job { margin-bottom: 8px; }
.sd-job-sum { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; list-style: none; }
.sd-job-sum::-webkit-details-marker { display: none; }
.sd-job-date { display: flex; flex-direction: column; min-width: 92px; }
.sd-job-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.sd-job-badges { display: flex; gap: 6px; }
.sd-job-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.sd-job-warn { margin-top: 10px; }
.sd-job-warn ul { margin: 4px 0; padding-left: 18px; }
.sd-dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 12px; margin: 12px 0; font-size: .9rem; }
.sd-dl dt { color: var(--muted); font-weight: 600; font-size: .8rem; }
.sd-dl dd { margin: 0; }
.table-sm th, .table-sm td { padding: 6px 10px; font-size: .88rem; }
.sd-water { background: #eef5fb; border-radius: var(--radius-sm); padding: 8px 10px; margin: 10px 0; line-height: 1.5; }
.sd-job-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 900px) {
    .sd-grid { grid-template-columns: 1fr; }
    .sd-fields { position: static; max-height: none; }
    .sd-field-list { max-height: 50vh; }
    .sd-job-sum { flex-wrap: wrap; }
    .sd-dl { grid-template-columns: 1fr; }
}

/* ---- Spritztagebuch: Karte und Altes Land Pflanzenschutzverordnung ----------------------- */
.sd-fields-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.sd-fields-title h2 { margin: 0; }
.sd-view { margin: 0; }
.sd-map { height: 460px; height: min(460px, 60vh); }
.sd-alv { background: #eef5fb; border-radius: var(--radius-sm); padding: 10px 12px; border-top: 0; }
.sd-alv-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sd-alv-list li { line-height: 1.45; }
.sd-alv-list .ok, .sd-alv-list li.ok { color: #1f6b3a; }
.sd-alv-list .bad, .sd-alv-list li.bad { color: var(--danger); font-weight: 600; }
.sd-alv-grid { display: grid; grid-template-columns: 110px repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-items: center; margin-bottom: 8px; }
.sd-alv-grid input { width: 100%; min-width: 0; }
.sd-ops { grid-column: 1 / -1; display: grid; gap: 8px; }
.sd-ops:empty { display: none; }
.sd-op-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.sd-op-add { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 560px) { .sd-op-row { grid-template-columns: 1fr; } }
.sd-alv-rec { background: #eef5fb; border-radius: var(--radius-sm); padding: 8px 10px; margin: 10px 0; line-height: 1.5; }
@media (max-width: 640px) {
    .sd-alv-grid { grid-template-columns: 80px repeat(3, minmax(0, 1fr)); }
}

/* Notfallzulassung: Anwendungen laut Bescheid (Dialog + Inventar) */
.psm-em-use { display: block; }
.psm-em-links { display: inline-flex; flex-direction: column; gap: 2px; }
.psm-em-links .icon { width: 15px; height: 15px; vertical-align: -2px; }
.psm-em-rows { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.psm-em-row { border: 1px solid var(--border, #e3e6e1); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.psm-em-row [data-em-remove] { align-self: flex-end; }
.psm-em-grid-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.psm-em-grid-row .field { margin: 0; }
.psm-em-grid-row .field span { font-size: .78rem; color: var(--muted, #6b7280); }
.psm-em-eppo { grid-column: span 2; }
.psm-em-pest { grid-column: span 4; }
.psm-em-dose, .psm-em-unit { grid-column: span 1; }
.psm-em-crown { grid-column: span 2; }
.psm-em-max { grid-column: span 2; }
.psm-em-apps, .psm-em-interval, .psm-em-wait { grid-column: span 2; }
@media (max-width: 640px) {
    .psm-em-grid-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .psm-em-eppo, .psm-em-pest, .psm-em-crown { grid-column: span 2; }
    .psm-em-dose, .psm-em-unit, .psm-em-max, .psm-em-apps, .psm-em-interval, .psm-em-wait { grid-column: span 1; }
}

/* Spritztagebuch: Hinweis im Export-Menü (nur intern, nicht im Ausdruck) */
.sd-export-warn { display: flex; gap: 6px; align-items: flex-start; padding: 8px 10px; margin-bottom: 4px; border-radius: 8px;
    background: var(--warn-bg, #fff4dc); color: var(--warn-text, #7a4b00); max-width: 300px; line-height: 1.35; }
.sd-export-warn .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.sd-export-menu .sd-export-warn a { display: inline; padding: 0; text-decoration: underline; color: inherit; }

/* Auswertung: Preisentwicklung „Preis je Saison“ (Tafelware durchgezogen, alle Klassen gestrichelt) */
.eval-ptrend-sub { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; }
.eval-ptrend-legend { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.eval-ptrend-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.eval-ptrend-legend i.is-tafel { background: var(--ptrend-tafel, #26302b); }
.eval-ptrend-legend i.is-all { background: var(--ptrend-all, #8b9590); }
.eval-ptrend-tafel { fill: none; stroke: var(--ptrend-tafel, #26302b); stroke-width: 2.5; stroke-linejoin: round; }
.eval-ptrend-all { fill: none; stroke: var(--ptrend-all, #8b9590); stroke-width: 1.8; stroke-dasharray: 6 5; }
.eval-ptrend-dot-tafel { fill: var(--ptrend-tafel, #26302b); }
.eval-ptrend-dot-all { fill: var(--ptrend-all, #8b9590); }
.eval-ptrend-val { font-size: 11px; font-weight: 700; fill: var(--ptrend-tafel, #26302b); }
.eval-ptrend-val.is-all { font-weight: 500; fill: var(--ptrend-all, #8b9590); }
.eval-ptrend-now { fill: rgba(120, 130, 125, .12); }
.eval-ptrend-year.is-now { font-weight: 700; fill: var(--text, #1d2521); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --ptrend-tafel: #e4ebe7; --ptrend-all: #9aa5a0; }
}
:root[data-theme="dark"] { --ptrend-tafel: #e4ebe7; --ptrend-all: #9aa5a0; }

/* ---- Düngung: Dünger, Düngetagebuch, Blattdünger im Spritztagebuch ---------------------------------- */
.fert-kind { font-weight: 500; }
.fert-kind-mineral { background: #e6eef9; color: #2c5694; }
.fert-kind-organic { background: #f3ece2; color: #7a5122; }
.fert-kind-foliar { background: var(--primary-soft); color: var(--primary-dark); }
.fert-kind-bio { background: #eef5e0; color: #4d6b12; }
.fert-kind-lime { background: #ececec; color: #555555; }
.fert-pct-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.fert-preview { color: var(--muted); margin: 0; min-height: 1.2em; }
.fert-tpl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fert-tpl-list li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.fert-pill { cursor: default; }
.fert-pill:hover { box-shadow: none; }
.fd-ferts { display: grid; gap: 8px; margin-bottom: 8px; }
.fd-fert-group > .small { display: block; margin-bottom: 2px; }
.fd-unit { align-self: center; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.fd-sum { border-radius: var(--radius-sm); padding: 8px 10px; background: var(--primary-soft); margin-top: 6px; line-height: 1.5; }
.sd-foliar-line { margin: 6px 0; }
@media (max-width: 640px) {
    .fert-pct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .fert-kind-mineral { background: #22324a; color: #a9c4ef; }
    :root:not([data-theme="light"]) .fert-kind-organic { background: #3a2e20; color: #e2c29a; }
    :root:not([data-theme="light"]) .fert-kind-lime { background: #333333; color: #cccccc; }
    :root:not([data-theme="light"]) .fert-kind-bio { background: #2c3a1a; color: #c4dc8e; }
    :root:not([data-theme="light"]) .fd-sum { background: rgba(47, 143, 78, .15); }
}
:root[data-theme="dark"] .fert-kind-mineral { background: #22324a; color: #a9c4ef; }
:root[data-theme="dark"] .fert-kind-organic { background: #3a2e20; color: #e2c29a; }
:root[data-theme="dark"] .fert-kind-lime { background: #333333; color: #cccccc; }
:root[data-theme="dark"] .fert-kind-bio { background: #2c3a1a; color: #c4dc8e; }
:root[data-theme="dark"] .fd-sum { background: rgba(47, 143, 78, .15); }
/* lange Dünger-/Mittelnamen mit Art-Abzeichen dürfen das Formular auf dem Handy nicht verbreitern */
.sd-grid > * { min-width: 0; }
.sd-prod-head { flex-wrap: wrap; }
/* Nährstoffvergleich (Düngetagebuch) */
.bal-form .card { margin-bottom: 14px; }
.bal-table input { width: 80px; text-align: right; }
.bal-table .bal-factor { width: 60px; }
.bal-table .bal-empty td { color: var(--muted); }
.bal-table .bal-sum td { border-top: 2px solid var(--line); }
.bal-diff { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 8px; }
.bal-diff-item { display: flex; flex-direction: column; min-width: 110px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--line); }
.bal-diff-item strong { font-size: 1.4rem; }
.bal-diff-item.bal-plus { background: var(--primary-soft); color: var(--primary-dark); }
.bal-diff-item.bal-minus { background: var(--warning-soft); color: #8a5d00; }
.bal-table td, .bal-table th { white-space: nowrap; }
/* Düngeplan + Bodenproben (Düngung Schritt 2) */
.plan-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.plan-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.plan-tools-row input[type=text] { width: 70px; }
.plan-card { margin-bottom: 12px; }
.plan-card.has-plan { border-left: 4px solid var(--primary); }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plan-head .badge { margin-left: auto; }
.plan-info { margin: 4px 0 8px; line-height: 1.5; }
.plan-grid { display: grid; grid-template-columns: minmax(90px, auto) repeat(3, minmax(60px, 90px)) auto; gap: 4px 10px; align-items: center; }
.plan-grid input { width: 100%; text-align: right; }
.plan-sug, .plan-sum, .plan-ist { text-align: right; }
.plan-sum.plan-ok { color: var(--primary-dark); font-weight: 600; }
.plan-sum.plan-low { color: #8a5d00; font-weight: 600; }
.plan-sum.plan-high { color: var(--danger); font-weight: 600; }
.plan-items { display: grid; gap: 6px; margin-top: 10px; }
.plan-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.plan-item select { max-width: 220px; }
.plan-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.plan-note { flex: 1 1 180px; }
.plan-save { position: sticky; bottom: 0; background: var(--bg, #fff); padding: 8px 0; z-index: 2; }
.plan-st-none { background: var(--line); color: var(--muted); }
.plan-st-open { background: #e6eef9; color: #2c5694; }
.plan-st-partial { background: var(--warning-soft); color: #8a5d00; }
.plan-st-done { background: var(--primary-soft); color: var(--primary-dark); }
.plan-st-over { background: var(--danger-soft); color: var(--danger); }
.bal-backfill { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 8px; }
.bal-backfill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.bal-backfill-grid label { display: flex; flex-direction: column; gap: 2px; }
.bal-backfill-grid input { width: 110px; }
.soil-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.soil-actions p { margin: 0; flex: 1 1 260px; }
.soil-card { margin-bottom: 12px; }
.soil-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.soil-head h3 { margin: 0; }
.soil-head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.soil-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 640px) {
    .soil-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .plan-grid { grid-template-columns: minmax(70px, auto) repeat(3, minmax(50px, 1fr)); }
    .plan-grid > button, .plan-grid > span:empty { grid-column: 1 / -1; justify-self: start; }
}
.plan-warn { color: #8a5d00; background: var(--warning-soft); border-radius: var(--radius-sm); padding: 2px 8px; margin: 0 0 6px; }
.plan-item-warn { flex-basis: 100%; margin: 0; }
.plan-tools-row input[data-plan-phmin] { width: 55px; }
.fd-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.fd-block-head h3 { margin: 0; }
#einkauf .bal-table input { width: 64px; }
#einkauf .bal-table td, #einkauf .bal-table th { padding-left: 6px; padding-right: 6px; }
#einkauf .bal-table th { white-space: normal; }
/* Wetter */
.weather-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 4px; }
.weather-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.weather-tile strong { font-size: 1.5rem; }
.weather-tile.is-wet { border-color: var(--primary); background: var(--primary-soft); }
.weather-chart-head, .weather-month { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.weather-chart-head h2, .weather-month h2 { margin: 0; }
.weather-svg { width: 100%; height: auto; display: block; }
.weather-svg .w-label { font-size: 10px; font-weight: 600; fill: var(--muted); }
.weather-svg .w-value { font-size: 10px; font-weight: 600; fill: var(--text, #222); }
.weather-svg .w-tick { font-size: 9px; fill: var(--muted); }
.weather-svg .w-axis { stroke: var(--line); stroke-width: 1; }
.weather-svg .w-grid { stroke: var(--line); stroke-width: .5; stroke-dasharray: 2 3; }
.weather-svg .w-zero { stroke: #2c5694; stroke-width: 1; stroke-dasharray: 4 3; }
.weather-svg .w-temp { fill: none; stroke: #c0392b; stroke-width: 1.6; }
.weather-svg .w-hum { fill: none; stroke: #2c5694; stroke-width: 1.3; }
.weather-svg .w-wind { fill: none; stroke: #7a5122; stroke-width: 1.3; }
.weather-svg .w-rain { fill: #3b82c4; }
.weather-svg .w-wet { fill: #2f8f4e; }
.weather-svg .w-strip-bg { fill: var(--line); opacity: .5; }
.weather-daily .is-frost td:nth-child(2) { color: #2c5694; font-weight: 600; }
.weather-test { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.weather-status { margin-top: 14px; }
.weather-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 14px; margin: 12px 0; color: inherit; }
.weather-strip:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--primary); }
.weather-strip-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sd-weather-auto { color: var(--primary-dark); }
.weather-daily td:first-child { white-space: nowrap; }
.rain-bad { color: #b45309; }
.weather-svg .w-rain-bad { fill: #f59e0b; opacity: .55; }
.psm-scab { display: inline-flex; align-items: center; gap: 4px; }
.psm-scab select { width: auto; padding: 2px 6px; font-size: .85rem; }
.weather-map { height: 320px; border-radius: var(--radius-sm); margin: 6px 0; }
.weather-fc { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0; }
.weather-fc-day { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.weather-fc-day .fc-min { color: #2c5694; }
.weather-fc-day .fc-max { color: #c0392b; font-weight: 600; }
.dash-scab { display: flex; gap: 8px; text-decoration: none; color: inherit; }
.psm-scab { flex-wrap: wrap; }
.psm-belag { display: inline-flex; align-items: center; gap: 3px; }
.psm-belag input { width: 3.6em; padding: 2px 4px; font-size: .85rem; }
.sd-belag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sd-belag input { width: 4.5em; }
.ann-status { margin: -4px 0 10px; }
.ann-upload-btn { cursor: pointer; }
.ann-upload-log { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface, #fff); }
.ann-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ann-filter-row input[type=search] { flex: 1 1 220px; min-width: 0; }
.ann-list { padding: 0; }
.ann-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ann-row:last-child { border-bottom: 0; }
.ann-row.is-new { background: var(--info-soft); }
.ann-main { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: inherit; text-decoration: none; }
.ann-main:hover strong { text-decoration: underline; }
.ann-topics { flex-basis: 100%; color: var(--muted); }
.ann-snippet { flex-basis: 100%; font-style: italic; }
.ann-meta { flex: 0 0 auto; white-space: nowrap; padding-top: 2px; }
.ann-mailbox { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; }
.ann-mb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.ann-mb-grid > * { min-width: 0; }
@media (max-width: 640px) { .ann-row { flex-wrap: wrap; } .ann-meta { white-space: normal; } }
.ann-ai-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; }
:root { --tl-s1: #e3f0e1; --tl-s2: #c6e2c6; --tl-s3: #9fcea5; --tl-s4: #72b583; --tl-s5: #4a9a65; --tl-s6: #2f7d4b; --tl-s7: #1b5c35; --tl-a: #1baf7a; --tl-b: #eb6834; --tl-e: #2a78d6; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --tl-s1: #24352a; --tl-s2: #2c4a35; --tl-s3: #2f6242; --tl-s4: #357b50; --tl-s5: #49985f; --tl-s6: #70b980; --tl-s7: #a9dcb1; --tl-a: #199e70; --tl-b: #d95926; --tl-e: #3987e5; }
}
:root[data-theme="dark"] { --tl-s1: #24352a; --tl-s2: #2c4a35; --tl-s3: #2f6242; --tl-s4: #357b50; --tl-s5: #49985f; --tl-s6: #70b980; --tl-s7: #a9dcb1; --tl-a: #199e70; --tl-b: #d95926; --tl-e: #3987e5; }
.tl { display: grid; gap: 14px; min-width: 0; font-variant-numeric: tabular-nums; }
.tl-card { display: grid; gap: 10px; min-width: 0; }
.tl-ago-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.tl-ago-head h2 { margin: 0; }
.tl-ago-nav { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.tl-ago-line { margin: 0; }
.tl-ago-table { min-width: 720px; }
.tl-ago-table td, .tl-ago-table th { vertical-align: top; }
.tl-ago-now { background: var(--primary-soft); }
.tl-card h2, .tl-card h3 { margin: 0; }
.tl-card h3 { font-size: 15px; margin-top: 6px; }
.tl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tl-fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; }
.tl-fact b { display: block; font-size: 20px; line-height: 1.25; }
.tl-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; }
.tl-ctl { display: grid; gap: 3px; }
.tl-ctl > span { font-size: 12px; color: var(--muted); }
.tl-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--card); }
.tl-seg button { font: inherit; font-size: 14px; color: var(--text); background: none; border: 0; border-right: 1px solid var(--line); padding: 6px 11px; cursor: pointer; }
.tl-seg button:last-child { border-right: 0; }
.tl-seg button[aria-pressed="true"] { background: var(--primary); color: #fff; font-weight: 600; }
.tl-seg button:disabled { opacity: .45; cursor: not-allowed; }
.tl-scroll { overflow-x: auto; }
.tl-svg { min-width: 680px; width: 100%; height: auto; display: block; }
.tl-svg text { fill: var(--muted); font: 12px var(--font); }
.tl-svg .tl-strong { fill: var(--text); font-weight: 600; }
.tl-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tl-table th, .tl-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tl-table th { font-weight: 600; color: var(--muted); font-size: 13px; }
.tl-table .num { text-align: right; white-space: nowrap; }
.tl-table .tl-hl, .tl-table .tl-sel td { background: var(--primary-soft); }
.tl-narrow { max-width: 420px; }
.tl-when { white-space: nowrap; font-weight: 600; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); align-items: center; }
.tl-key { display: inline-flex; align-items: center; gap: 6px; }
.tl-sw { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.tl-sw-a { background: var(--tl-a); } .tl-sw-b { background: var(--tl-b); } .tl-sw-e { background: var(--tl-e); width: 10px; border-radius: 50%; } .tl-sw-d { background: var(--text); width: 8px; height: 8px; border-radius: 50%; }
.tl-ramp { display: inline-flex; gap: 2px; }
.tl-ramp i { width: 14px; height: 10px; border-radius: 2px; display: block; }
.tl-grid { --tl-lab: 190px; display: grid; gap: 1px; min-width: 760px; }
.tl-grp { font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 0 2px; }
.tl-row { display: grid; grid-template-columns: var(--tl-lab) 1fr; align-items: center; cursor: pointer; border-radius: 4px; background: none; border: 0; padding: 0; width: 100%; font: inherit; color: inherit; text-align: left; }
.tl-row:hover .tl-lab { color: var(--primary); }
.tl-row.is-open { background: var(--primary-soft); }
.tl-lab { font-size: 14px; padding: 1px 8px 1px 2px; overflow-wrap: anywhere; }
.tl-cells { display: grid; gap: 1px; height: 20px; }
.tl-cells i { display: block; position: relative; border-radius: 2px; }
.tl-cells i.is-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 1.5px var(--card); }
.tl-axis { display: grid; grid-template-columns: var(--tl-lab) 1fr; font-size: 12px; color: var(--muted); }
.tl-ticks { display: grid; }
.tl-ticks span { white-space: nowrap; border-left: 1px solid var(--line); padding-left: 3px; }
.tl-detail { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; display: grid; gap: 10px; margin: 4px 0 8px; }
.tl-win { display: grid; gap: 3px; border-left: 3px solid var(--primary); padding-left: 10px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.tl-chip { background: var(--primary-soft); border-radius: 6px; padding: 1px 7px; font-size: 13px; }
.tl-chip b { font-weight: 600; }
.tl-edit summary { cursor: pointer; font-size: 14px; }
.tl-edit-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin: 8px 0; }
.tl-edit-form label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.tl-tip { position: fixed; z-index: 200; max-width: 300px; background: var(--text); color: var(--card); font-size: 13px; line-height: 1.35; padding: 6px 9px; border-radius: 6px; pointer-events: none; display: none; }
@media (max-width: 640px) { .tl-grid { --tl-lab: 130px; } .tl-when { white-space: normal; } }
/* Sammelzeile in Händler-Abrechnungen */
.ts-collective { display: flex; align-items: center; gap: 6px; }
.ts-collective input { width: auto; }
/* Neue Ordnung der Seitenleiste (ANNAHMEN 353): Unterseiten eingerückt */
.nav-sub { list-style: none; margin: 0 0 2px; padding: 0 0 0 22px; }
.nav-sub .nav-link { font-size: .8rem; padding-top: 3px; padding-bottom: 3px; opacity: .85; }
.nav-sub .nav-link .icon { width: 14px; height: 14px; }
.nav-sub .nav-link.is-active { opacity: 1; }
.filter-memory-list { font-weight: 600; }
.eval-gap { margin: 8px 0 0; }
/* Startseite „Heute“ (ANNAHMEN 355) */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 14px 0; }   /* minmax(0): Tabellen dürfen die Spalte nicht aufweiten (Handy) */
@media (min-width: 980px) { .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dash-sec { padding: 14px 16px; }
.dash-sec > .h3, .dash-sec .card-head .h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.dash-sec .card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dash-attention { margin: 12px 0; border-left: 4px solid var(--danger, #b42318); }
.dash-rows { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.dash-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 8px; color: inherit; text-decoration: none; line-height: 1.35; }
.dash-row .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--muted); }
.dash-row > span:first-of-type { flex: 1; }
a.dash-row:hover { background: var(--hover); }
.dash-go { color: var(--muted); font-size: 1.2rem; line-height: 1; }
.dash-warn .icon { color: var(--warning, #b54708); }
.dash-bad .icon { color: var(--danger, #b42318); }
.dash-bad > span:first-of-type { font-weight: 600; }
.dash-cal { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.dash-yesterday { white-space: nowrap; }
.dash-money { margin: 16px 0; }
.dash-money > .h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.kpi-est { font-size: .72rem; font-weight: 600; color: var(--muted); vertical-align: middle; }
/* Steckbrief Sorte (ANNAHMEN 356) */
.vp-dot { width: 14px; height: 14px; margin-right: 8px; vertical-align: middle; }
.vp-years { margin: 0 0 12px; }
.vp-kpis { margin-bottom: 4px; }
.vp-bars { display: flex; flex-direction: column; gap: 4px; }
.vp-bar-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 4px 6px; border-radius: 6px; color: inherit; text-decoration: none; }
.vp-bar-row:hover, .vp-bar-row.is-active { background: var(--hover); }
.vp-bar-row.is-active .vp-bar-label { font-weight: 700; }
.vp-bar { height: 10px; background: var(--surface-2, #eee); border-radius: 5px; overflow: hidden; }
.vp-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.vp-bar-val { white-space: nowrap; font-size: .9rem; }
.vp-prices { margin: 10px 0 0; }
.vp-quality { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.vp-q { display: flex; flex-direction: column; min-width: 90px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.vp-q strong { font-size: 1.2rem; }
.vp-sub { margin: 14px 0 6px; }
.vp-open { margin-bottom: 10px; }
.fp-map { display: block; width: 100%; max-height: 320px; }
.cp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.cp-badges .badge { text-decoration: none; }
.cp-weeks { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 6px; }
.cp-week { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 8px; }
.cp-week span { display: block; width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; }
.cp-week small { font-size: .62rem; color: var(--muted); margin-top: 2px; }
.cp-scroll { max-height: 360px; overflow-y: auto; }
.kpi-warn .kpi-value { color: var(--warning, #b54708); }
.ep-pay td, .ep-pay th { padding: 5px 8px; }
.ep-pay-sum td { border-top: 2px solid var(--line); }
.ep-done { opacity: .75; }
@media (min-width: 980px) { .vp-wide { grid-column: 1 / -1; } }
.stock-profile-link { display: inline-block; margin: 0 14px 6px; }
/* Gemeinsame Jahreswahl (ANNAHMEN 361) */
.year-scope { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; padding: 6px 10px; border-radius: 8px; background: var(--warning-soft, #fff4e0); font-size: .88rem; }
.year-scope .icon { width: 15px; height: 15px; }
.year-scope a { margin-left: auto; font-weight: 600; }
.eval-yearpick { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.eval-yearpick label { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.eval-yearpick select { width: auto; }
/* BBCH-Vorschlag im Spritztagebuch */
.sd-bbch-hints { display: grid; gap: 6px; margin: 6px 0 2px; padding: 8px 10px; border-radius: 6px; background: var(--primary-soft); }
.sd-bbch-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); gap: 4px 10px; align-items: center; }
@media (max-width: 640px) { .sd-bbch-row { grid-template-columns: minmax(0, 1fr); } }
/* Blüh-Uhr */
.bloom-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-bottom: 12px; }
.bloom-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.bloom-card h2, .bloom-card p { margin: 0; }
.bloom-date { font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bloom-date-quiet { font-size: 1rem; font-weight: 600; color: var(--muted); }
.bloom-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bloom-bar span { display: block; height: 100%; border-radius: 4px; background: var(--primary); }
.bloom-test summary { cursor: pointer; }
.bloom-test .table { font-size: .82rem; }
.bloom-test .table th, .bloom-test .table td { padding: 4px 6px; letter-spacing: 0; }
/* Preise unter Mittel und Dünger */
.psm-item:has(> .ip-box) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.psm-item > .ip-box { grid-column: 1 / -1; }
@media (max-width: 640px) { .psm-item:has(> .ip-box) { grid-template-columns: minmax(0, 1fr); } }
/* Inventar der Mittel übersichtlich (Nutzer 11.11.2026, ANNAHMEN 473): Gruppen, Karten nebeneinander, Status als Pille, Einstellungen unten abgesetzt */
.inv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inv-filter { max-width: 320px; }
.inv-group { padding: 0 14px 14px; }
.inv-group-title { display: flex; align-items: center; gap: 8px; margin: 10px 0 8px; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.inv-group[hidden], .inv-list .psm-item[hidden] { display: none; }
.inv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 12px; }
.inv-list .psm-item, .inv-list .psm-item:has(> .ip-box) { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.inv-list .psm-item:first-child { border-top: 1px solid var(--line); }
.inv-list .psm-item:hover { border-color: var(--line-strong); }
.inv-list .psm-name strong { font-size: 1.02rem; }
.inv-list .psm-action { justify-content: flex-start; gap: 8px 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.inv-list .psm-action > form:last-child { margin-left: auto; }
.inv-list .psm-item > .ip-box { margin: 0; }
.inv-list .input-stock-info { text-align: left; font-size: .78rem; margin-top: -4px; }
.inv-pill { align-self: flex-start; display: inline-block; margin-top: 2px; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.inv-pill-ok { background: var(--primary-soft); color: var(--primary-dark); }
.inv-pill-bad { background: #fde8e8; color: #b42318; }
/* Einstufung eigener Mittel ohne Zulassungsnummer (ANNAHMEN 474) */
.inv-reg { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.inv-reg input { flex: 1 1 240px; max-width: 480px; min-width: 0; }
.ip-box { display: grid; gap: 6px; min-width: 200px; }
.ip-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-variant-numeric: tabular-nums; }
.ip-suggest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 8px; border-radius: 6px; background: var(--primary-soft); }
.ip-suggest > span { flex: 1 1 220px; min-width: 0; }
.ip-form { display: grid; gap: 8px; justify-items: start; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ip-form h3 { margin: 0; font-size: 15px; }
.ip-form .grid-3, .ip-form .field, .ip-form select { width: 100%; }
.ip-custom { padding: 12px 14px; margin-top: 12px; }
.ip-custom summary { cursor: pointer; font-weight: 600; }
.ip-custom-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ip-custom-form .field { margin: 0; }
.ts-deleted { padding: 12px 14px; margin-top: 12px; }
.ts-deleted summary { cursor: pointer; font-weight: 600; }
.circ-deadlines { padding: 12px 14px; margin-bottom: 12px; }
.circ-deadlines ul { list-style: none; margin: 6px 0 0; padding: 0; }
.circ-deadlines li { display: flex; gap: 10px; padding: 3px 0; }
.circ-deadlines time { flex: 0 0 auto; font-weight: 600; }
.circ-doc { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.circ-doc:last-child { border-bottom: 0; }
.circ-doc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.circ-points { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.circ-point { padding-left: 10px; border-left: 3px solid var(--line); }
.circ-point.is-w3 { border-left-color: var(--primary); }
.circ-point p { margin: 2px 0 0; }
.circ-point-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ann-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ann-pdf { width: 100%; height: 80vh; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ann-sec { margin-bottom: 14px; }
.ann-sec h3 { margin: 0 0 6px; font-size: 1rem; }
.ann-sec ul { margin: 4px 0; padding-left: 18px; }
.ann-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; font-size: .92rem; }
.ann-kv dt { color: var(--muted); }
.ann-kv dd { margin: 0; }
.ann-apply { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.ann-apply select, .ann-apply input { padding: 3px 6px; font-size: .88rem; }
.ann-apply input { width: 5em; }
.ann-apply input[type=date] { width: auto; }
.ann-belag { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 6px; }
@media (max-width: 900px) { .ann-detail { grid-template-columns: 1fr; } .ann-pdf { height: 60vh; } }
.ann-cmp td { vertical-align: top; }
.ann-cmp-mark { font-weight: 700; }
.ann-cmp-ok .ann-cmp-mark { color: var(--success, #2e7d32); }
.ann-cmp-similar .ann-cmp-mark { color: #b07d00; }
.ann-cmp-off .ann-cmp-mark { color: var(--danger); }
.ann-cmp-off td { background: var(--danger-soft); }
.ann-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ann-stat > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.prog-durchsagen { margin: 8px 0; }
.prog-durchsagen ul { margin: 4px 0; padding-left: 18px; }
.prog-variante { display: inline-flex; gap: 6px; align-items: center; }
.ann-periods { list-style: none; padding: 0; margin: 6px 0 14px; }
.ann-periods li { padding: 4px 0; border-bottom: 1px solid var(--line); }

/* ---- QS-Handbuch (Teil A) ---------------------------------------------------------------- */
.qs-work { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
@media (min-width: 960px) { .qs-work { grid-template-columns: 280px minmax(0, 1fr); } }
.qs-side { display: flex; flex-direction: column; max-height: calc(100vh - 150px); overflow: hidden; }
@media (max-width: 959px) { .qs-side { max-height: 260px; } }
.qs-tabs { display: flex; border-bottom: 1px solid var(--line); }
.qs-tab { flex: 1; border: 0; background: none; padding: 9px 4px; font: inherit; font-weight: 600; font-size: .78rem; color: var(--muted); cursor: pointer; display: inline-flex; gap: 4px; align-items: center; justify-content: center; }
.qs-tab .icon { width: 14px; height: 14px; }
.qs-tab.is-active { color: var(--primary-dark); box-shadow: inset 0 -2px 0 var(--primary); }
.qs-count { background: var(--line); border-radius: 10px; padding: 0 6px; font-size: .75rem; }
.qs-panel { flex: 1; overflow-y: auto; padding: 8px; min-height: 0; }
.qs-panel > p { margin: 0 0 6px; }
.qs-filter { width: 100%; margin-bottom: 6px; }
.qs-pagelist { list-style: none; margin: 0; padding: 0; }
.qs-pagelist button { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; width: 100%; text-align: left; border: 0; background: none; padding: 5px 6px; border-radius: var(--radius-sm); font: inherit; font-size: .8rem; cursor: pointer; color: var(--text); }
.qs-pagelist button:hover { background: var(--bg); }
.qs-pagelist button.is-current { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.qs-pn { color: var(--muted); text-align: right; }
.qs-pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-pc { color: var(--muted); font-size: .75rem; }
.qs-side-foot { border-top: 1px solid var(--line); padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.qs-side-foot form { margin-left: auto; }
.qs-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.qs-toolbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 10px; position: sticky; top: 8px; z-index: 5; }
.qs-group { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.qs-pageno input { width: 64px; text-align: right; padding: 4px 6px; }
.qs-mode .btn.is-active, .qs-group [data-qs-tool].is-active { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary); }
.icon-btn.is-active { color: var(--warning); }
.qs-status { margin-left: auto; }
.qs-menu { position: relative; display: inline-block; }
.qs-menu-list { position: absolute; top: 100%; left: 0; z-index: 20; min-width: 240px; max-height: 360px; overflow-y: auto; padding: 6px; margin-top: 4px; box-shadow: var(--shadow-lg); }
.qs-menu-list > button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: var(--radius-sm); font: inherit; font-size: .85rem; cursor: pointer; color: var(--text); }
.qs-menu-list > button:hover { background: var(--bg); }
.qs-menu-list p { margin: 4px 8px; }
.qs-font { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.qs-font label { display: flex; gap: 6px; align-items: center; font-size: .85rem; }
.qs-font input { width: 70px; }
.qs-font .btn { justify-content: flex-start; }
.qs-progress progress, .modal progress { width: 100%; }
.qs-progress p { margin: 0 0 6px; }
.qs-stage { position: relative; overflow: auto; height: calc(100vh - 150px); min-height: 420px; background: #8a908c; border-radius: var(--radius); padding: 8px 12px 12px; }
.qs-sheet { width: fit-content; margin: 0 auto 18px; }
.qs-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #fff; font-size: .78rem; padding: 2px 0 4px; }
.qs-sheet-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.qs-sheet-actions { display: inline-flex; gap: 6px; flex-shrink: 0; }
.qs-sheet-btn { border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .15); color: #fff; border-radius: 6px; padding: 1px 8px; font: inherit; cursor: pointer; }
.qs-sheet-btn:hover { background: rgba(0, 0, 0, .3); }
.qs-sheet .qs-menu-list { left: auto; right: 0; min-width: 210px; }
.qs-page { position: relative; background: var(--surface); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.qs-page canvas { display: block; position: absolute; inset: 0; }
.qs-layer { position: absolute; inset: 0; }
.qs-stage.is-drawing .qs-layer { cursor: crosshair; }
.qs-field { position: absolute; box-sizing: border-box; font-family: Helvetica, Arial, sans-serif; line-height: 1.15; }
.qs-field textarea, .qs-field input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 1px; border: 0; border-radius: 0; background: rgba(42, 111, 151, .10); color: #0b2a6b; font: inherit; line-height: inherit; resize: none; overflow: hidden; white-space: pre; box-shadow: none; min-height: 0; }
.qs-field.is-multi textarea { white-space: pre-wrap; }
.qs-field textarea:focus, .qs-field input:focus { outline: 2px solid var(--info); outline-offset: 0; background: rgba(255, 255, 255, .9); }
.qs-field.is-over textarea, .qs-field.is-over input { box-shadow: inset 0 0 0 1px var(--danger); }
.qs-checkbox { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 1px solid rgba(42, 111, 151, .6); background: rgba(42, 111, 151, .10); color: #0b2a6b; font: inherit; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qs-checkbox:focus-visible { outline: 2px solid var(--info); }
.qs-star { position: absolute; top: -8px; right: -8px; font-size: 11px; line-height: 1; color: var(--warning); pointer-events: none; text-shadow: 0 0 2px #fff; }
.qs-handle { display: none; position: absolute; right: -4px; bottom: -4px; width: 8px; height: 8px; background: var(--primary); border: 1px solid #fff; cursor: nwse-resize; }
.qs-stage.is-edit .qs-field { outline: 1px dashed rgba(47, 143, 78, .9); cursor: move; }
.qs-stage.is-edit .qs-field textarea, .qs-stage.is-edit .qs-field input, .qs-stage.is-edit .qs-checkbox { pointer-events: none; background: rgba(47, 143, 78, .12); }
.qs-stage.is-edit .qs-field.is-selected { outline: 2px solid var(--primary); z-index: 2; }
.qs-stage.is-edit .qs-field.is-selected .qs-handle { display: block; }
.qs-field.is-selected:not(:focus-within) textarea, .qs-field.is-selected:not(:focus-within) input { background: rgba(42, 111, 151, .22); }
.qs-ghost { position: absolute; border: 1px dashed var(--primary); background: rgba(47, 143, 78, .15); pointer-events: none; }
.qs-import-result { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--info-soft); margin: 8px 0; font-size: .9rem; }
.qs-deleted { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; align-items: center; padding: 5px 6px; font-size: .8rem; border-bottom: 1px solid var(--line); }
.qs-deleted .qs-pl { white-space: normal; }
.qs-howto { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.qs-howto .check { align-items: flex-start; }
.qs-doclist { list-style: none; margin: 0 0 8px; padding: 0; }
.qs-doclist li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.qs-doc-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 280px; }
.qs-doc-rename { display: flex; gap: 6px; }
.qs-doc-rename input { flex: 1; min-width: 0; }
.qs-doc-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qs-doc-actions form { margin: 0; }
.qs-doc-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qs-doc-upload label.btn { cursor: pointer; }
/* QS-Handbuch Teil B: Unterschriften, PDF */
.qs-signature { display: flex; }
.qs-sigselect { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 2px; border: 1px dashed rgba(142, 68, 173, .7); border-radius: 0; background: rgba(142, 68, 173, .08); color: #5b2c6f; font: inherit; font-size: max(10px, .9em); min-height: 0; }
.qs-field.is-signed .qs-sigselect { background: rgba(142, 68, 173, .16); }
.qs-stage.is-edit .qs-sigselect { pointer-events: none; }
.qs-siglist { list-style: none; margin: 0 0 14px; padding: 0; }
.qs-siglist li[data-id] { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qs-sig-img { height: 44px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: 6px; font-size: .72rem; color: var(--muted); background: var(--surface); overflow: hidden; }
.qs-sig-img img { max-width: 100%; max-height: 100%; }
.qs-sig-who { display: flex; flex-direction: column; min-width: 0; }
.qs-sig-btns { display: inline-flex; gap: 4px; align-items: center; }
.qs-sig-new { border-top: 1px solid var(--line); padding-top: 10px; }
.qs-sig-formbtns { display: flex; gap: 8px; }
.qs-pad-wrap { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.qs-pad { display: block; width: 100%; height: 240px; touch-action: none; cursor: crosshair; }
.qs-pad-line { position: absolute; left: 6%; right: 6%; bottom: 28%; border-bottom: 1px solid #c9cfcb; pointer-events: none; }
.qs-pad-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 10px; }
@media (max-width: 700px) {
    .qs-sign-modal { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
    .qs-sign-modal .modal-box { max-height: 100vh; height: 100%; }
    .qs-sign-modal.is-pad .qs-pad { height: calc(100vh - 230px); min-height: 220px; }
    .qs-siglist li[data-id] { grid-template-columns: 90px 1fr; }
    .qs-sig-btns { grid-column: 1 / -1; }
}
.qs-chapters { display: flex; flex-direction: column; gap: 4px; padding-left: 26px; max-height: 220px; overflow-y: auto; }
.qs-range { display: flex; gap: 12px; padding-left: 26px; }
.qs-range input { width: 80px; }
.qs-overflow { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; }
.qs-annex-pick { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.qs-annex-pick legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.qs-signerpick { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 2px 8px; border-radius: var(--radius-sm); background: rgba(142, 68, 173, .1); color: #5b2c6f; }
.qs-signerpick select { padding: 3px 6px; font-size: .85rem; max-width: 220px; }

/* ==========================================================================
   Layout-Runde (30.10.2026): Darstellung je Benutzer – Farben, Schrift, Navigation, Kopfleiste, Handy-Leiste
   ========================================================================== */

/* ---- Farbvorschläge ------------------------------------------------------- */
/* Helle Farben (Nutzer 30.10.2026: hellerer Hintergrund) – Karten mit feiner Kante statt Schatten */
html[data-theme="frutavo"], html[data-theme="apfel"], html[data-theme="wiese"], html[data-theme="weiss"] {
    --shadow: 0 1px 2px rgba(20, 40, 30, .04);
}
html[data-theme="frutavo"] .card, html[data-theme="apfel"] .card, html[data-theme="wiese"] .card, html[data-theme="weiss"] .card { border: 1px solid var(--line); }
/* Klassisch hell: nah an frutavo, sehr helles warmes Weiß */
html[data-theme="frutavo"] { --bg: #fbfaf7; --line: #ece8e1; --line-strong: #dcd6cc; }
/* Apfel: frisches Grün, grüne Seitenleiste (heller als der erste Entwurf) */
html[data-theme="apfel"] {
    --bg: #f8faf6; --line: #e5ebe1; --line-strong: #d0d9cb;
    --primary: #4c9a2a; --primary-dark: #3a7a1e; --primary-soft: #eaf4e4;
    --side-bg: #2f5a41; --side-text: #f1f7f2; --side-muted: #b5cfbd; --side-hover: rgba(255, 255, 255, .10);
    --side-active-bg: #5aa832; --side-active-text: #ffffff;
}
html[data-theme="apfel"] .sidebar { border-right-color: #2f5a41; }
html[data-theme="apfel"] .sidebar-foot, html[data-theme="apfel"] .nav-favs { border-color: rgba(255, 255, 255, .15); }
html[data-theme="apfel"] .nav-acc ul { border-left-color: rgba(255, 255, 255, .18); }
html[data-theme="apfel"] .sidebar .icon-btn { color: var(--side-text); }
html[data-theme="apfel"] .nav-acc-title.is-active .icon:first-child { color: #c9ecb3; }
/* Wiese: ganz hell, hellgrüne Seitenleiste */
html[data-theme="wiese"] {
    --bg: #fafcf9; --line: #e4ebe1; --line-strong: #cfd9cb;
    --primary: #4c9a2a; --primary-dark: #3a7a1e; --primary-soft: #e9f4e3;
    --side-bg: #e9f3e6; --side-text: #1f3a29; --side-muted: #5f7a66; --side-hover: rgba(76, 154, 42, .10);
    --side-active-bg: #4c9a2a; --side-active-text: #ffffff;
}
html[data-theme="wiese"] .sidebar { border-right-color: #d6e6d0; }
/* Salbei (Nutzer 06.11.2026): Standard, gedecktes warmes Grün auf Creme */
html[data-theme="salbei"] {
    --shadow: 0 1px 2px rgba(60, 40, 20, .05);
    --tl-s1: color-mix(in srgb, var(--primary) 12%, var(--card)); --tl-s2: color-mix(in srgb, var(--primary) 25%, var(--card)); --tl-s3: color-mix(in srgb, var(--primary) 38%, var(--card));
    --tl-s4: color-mix(in srgb, var(--primary) 52%, var(--card)); --tl-s5: color-mix(in srgb, var(--primary) 68%, var(--card)); --tl-s6: var(--primary); --tl-s7: var(--primary-dark);
    --bg: #f8f6ef; --card: #fffefa; --surface: #fffefa; --surface-2: #f7f4ea; --hover: #f0eee1;
    --text: #2f3327; --muted: #686c5c; --line: #e8e5d8; --line-strong: #d8d5c4;
    --primary: #66784b; --primary-dark: #4f5e39; --primary-soft: #eef0df;
    --side-bg: #eceedd; --side-text: #333a28; --side-muted: #646c52; --side-hover: rgba(102, 120, 75, .12);
    --side-active-bg: #66784b; --side-active-text: #ffffff;
}
html[data-theme="salbei"] .card { border: 1px solid var(--line); }
html[data-theme="salbei"] .sidebar { border-right-color: #dfe2cc; }
/* Weiß: reines Weiß, Flächen nur durch feine Linien getrennt */
html[data-theme="weiss"] {
    --bg: #ffffff; --line: #e7ebe8; --line-strong: #d3d9d5; --side-bg: #f6f8f5;
}
/* Dunkel – auch für „wie das Gerät“, wenn das Gerät dunkel eingestellt ist */
html[data-theme="dunkel"] {
    --bg: #121614; --card: #1b211e; --surface: #1b211e; --surface-2: #202723; --hover: #27302b;
    --text: #e3eae5; --muted: #9aa69f; --line: #2c3631; --line-strong: #3b4741;
    --primary: #4fb06e; --primary-dark: #8fd6a6; --primary-soft: #1f3a2a;
    --danger: #e0685a; --danger-soft: #3a2220; --warning: #e0a83a; --warning-soft: #3a3020; --info: #6aa9d1; --info-soft: #1f2f3a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .6);
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        --bg: #121614; --card: #1b211e; --surface: #1b211e; --surface-2: #202723; --hover: #27302b;
        --text: #e3eae5; --muted: #9aa69f; --line: #2c3631; --line-strong: #3b4741;
        --primary: #4fb06e; --primary-dark: #8fd6a6; --primary-soft: #1f3a2a;
        --danger: #e0685a; --danger-soft: #3a2220; --warning: #e0a83a; --warning-soft: #3a3020; --info: #6aa9d1; --info-soft: #1f2f3a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 10px 40px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}
@media (prefers-color-scheme: light) { html[data-theme="auto"] { --bg: #f6f3ee; } }
html[data-theme="dunkel"] input, html[data-theme="dunkel"] select, html[data-theme="dunkel"] textarea { color: var(--text); }
html[data-theme="dunkel"] .qs-stage, html[data-theme="dunkel"] .leaflet-container { filter: none; }

/* ---- Schriftgröße ----------------------------------------------------------- */
html[data-font="gross"] { font-size: 112.5%; }
html[data-font="gross"] body { font-size: 17px; }
html[data-font="gross"] .nav-link { font-size: 1rem; padding-top: 9px; padding-bottom: 9px; }

/* ---- Seitenleiste: Bereiche, Favoriten, Akkordeon ------------------------------ */
.nav-section-title { display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px; font-size: .72rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--side-muted); }
.nav-section-title .icon { width: 14px; height: 14px; }
.nav-favs ul, .nav-areas { list-style: none; margin: 0; padding: 0; }
.nav-favs { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav-areas { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-area { padding-top: 10px; padding-bottom: 10px; font-weight: 600; }
.nav-count { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--side-muted); }
.nav-link.is-active .nav-count { color: inherit; opacity: .8; }
.nav-acc { margin-top: 2px; }
.nav-acc-title { display: flex; align-items: center; gap: .65rem; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
    background: none; color: var(--side-text); font: inherit; font-size: .92rem; font-weight: 600; text-align: left; cursor: pointer; }
.nav-acc-title .icon { color: var(--side-muted); }
.nav-acc-title:hover { background: var(--side-hover); }
.nav-acc-title.is-active .icon:first-child { color: var(--primary); }
.nav-acc-title .nav-group-arrow { margin-left: auto; }
.nav-acc ul { padding-left: 14px; margin-bottom: 4px; border-left: 2px solid var(--line); margin-left: 18px; }
.nav-acc .nav-link { font-size: .86rem; padding-top: 6px; padding-bottom: 6px; }
.user-row { display: flex; align-items: center; gap: 4px; }
.user-row form { margin: 0; }
.user-row .icon-btn { color: var(--side-muted); }

/* ---- Kopfleiste über dem Inhalt: Bereich › Seite, Favorit, Reiter ------------------- */
.pagebar { margin: -6px 0 16px; }
.pagebar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); min-width: 0; }
.crumbs .icon { width: 15px; height: 15px; }
.crumb-area { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.crumb-page { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid transparent; background: none; color: var(--muted);
    font: inherit; font-size: .8rem; padding: 3px 8px; border-radius: 999px; cursor: pointer; }
.fav-btn:hover { border-color: var(--line-strong); }
.fav-btn .icon { width: 16px; height: 16px; }
.fav-btn.is-on { color: var(--warning); }
.fav-btn.is-on .icon { fill: currentColor; }

/* ---- Handy-Leiste unten ------------------------------------------------------- */
.bottombar { display: none; }
@media (max-width: 959px) {
    .bottombar {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
        background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bb-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px;
        border: 0; background: none; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; padding: 6px 2px; }
    .bb-item .icon { width: 22px; height: 22px; }
    .bb-item.is-active { color: var(--primary); }
    .bb-item:hover { text-decoration: none; }
    .main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    .pagebar { margin-top: 0; }
}

/* ---- Fenster „Darstellung“ ------------------------------------------------------- */
.ui-choices { display: grid; gap: 8px; }
.ui-choices.ui-row { display: flex; gap: 18px; }
.ui-choice { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.ui-choice:has(input:checked), .ui-theme:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ui-nav-sketch { position: relative; flex: 0 0 64px; height: 44px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.ui-nav-sketch i { position: absolute; left: 4px; width: 14px; height: 4px; border-radius: 2px; background: var(--primary); }
.ui-nav-sketch i:nth-child(1) { top: 8px; } .ui-nav-sketch i:nth-child(2) { top: 16px; } .ui-nav-sketch i:nth-child(3) { top: 24px; }
.ui-nav-sketch b { position: absolute; left: 24px; right: 4px; top: 8px; bottom: 6px; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.ui-nav-areas b { border-top: 6px solid var(--primary-soft); }
.ui-nav-groups i:nth-child(2) { left: 8px; width: 10px; opacity: .6; } .ui-nav-groups i:nth-child(3) { left: 8px; width: 10px; opacity: .6; }
.ui-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ui-theme { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; }
.ui-theme input, .ui-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ui-swatch { position: relative; height: 46px; border-radius: 6px; border: 1px solid var(--line-strong); overflow: hidden; }
.ui-swatch span:first-child { position: absolute; left: 0; top: 0; bottom: 0; width: 30%; }
.ui-swatch span:last-child { position: absolute; left: 38%; right: 10%; top: 14px; height: 10px; border-radius: 5px; }
.ui-favs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* ==========================================================================
   Layout-Runde (30.10.2026): Seiten aufräumen – Grundregeln
   ========================================================================== */
.pagebar .tabs { margin: 8px 0 0; }
/* Reiter der zusammengefassten Seiten (Navigation zusammengefasst 31.10.2026) – auch am Handy */
.family-tabs { margin: -4px 0 14px; }
@media print { .family-tabs { display: none; } }
@media (max-width: 959px) {
    .pagebar { display: none; }
    .topbar .fav-btn { padding: 6px; border: 0; }
    .page-head { margin-bottom: 12px; }
    .page-head h1 { font-size: 1.35rem; }
}
.topbar .fav-btn .icon { width: 20px; height: 20px; }

/* Erklärtext: erster Satz, Rest hinter ⓘ */
.info-btn { border: 0; background: none; color: var(--primary); font-size: 1rem; line-height: 1; padding: 0 2px; cursor: pointer; vertical-align: baseline; }
.info-btn[aria-expanded="true"] { color: var(--muted); }
.intro-more { display: block; margin-top: 4px; }

/* Filter einklappbar */
.filter-toggle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; align-self: flex-end; min-height: 38px; }
.filter-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; cursor: pointer; }
.filter-chip { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); white-space: nowrap; }
.filter-bar.is-collapsed .filter-more { display: none !important; }
.psm-filter .filter-bar.is-collapsed { margin-top: 6px; }

/* „⋯ Mehr“ */
.more-menu { position: relative; display: inline-block; }
.more-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 230px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
    box-shadow: var(--shadow-lg); margin: 0; }
.more-list[hidden] { display: none; }
.more-list { max-width: calc(100vw - 16px); }   /* nie breiter als der Bildschirm (31.10.2026) */
.more-list > *, .more-list form > .btn { width: 100%; justify-content: flex-start; }
.more-list .btn { border-color: transparent; background: none; box-shadow: none; }
.more-list .btn:hover { background: var(--hover); }
.more-list .hide-sm { display: inline !important; }
.more-list form { margin: 0; }

/* Einstellungen: Liste links statt Reiter */
.side-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.side-nav-select { width: 100%; }
.side-nav-list { display: none; list-style: none; margin: 0; padding: 6px; }
.side-nav-link { display: flex; align-items: center; gap: .6rem; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .9rem; }
.side-nav-link .icon { color: var(--muted); }
.side-nav-link:hover { background: var(--hover); text-decoration: none; }
.side-nav-link.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.side-nav-link.is-active .icon { color: var(--primary); }
.side-nav-link.is-danger { color: var(--danger); }
.side-body { min-width: 0; }
@media (min-width: 900px) {
    .side-layout { grid-template-columns: 230px minmax(0, 1fr); }
    .side-nav { position: sticky; top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
    .side-nav-select { display: none; }
    .side-nav-list { display: block; }
}

/* Handy: Listen-Tabellen als Karten */
@media (max-width: 700px) {
    table.table-cards, table.table-cards tbody, table.table-cards tr, table.table-cards td { display: block; width: 100%; }
    table.table-cards thead { display: none; }
    table.table-cards tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 10px; padding: 6px 10px; background: var(--card); }
    table.table-cards tr[hidden] { display: none; }
    table.table-cards td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
    table.table-cards td[data-label]::before { content: attr(data-label); font-size: .75rem; font-weight: 600; color: var(--muted); text-align: left; flex: 0 0 38%; }
    table.table-cards td:not([data-label]) { display: block; text-align: left; }
    .table-wrap:has(> table.table-cards) { overflow: visible; }
}

/* Layout-Runde (30.10.2026): einzelne Seiten */
.hide-mobile { }
@media (max-width: 700px) { .hide-mobile { display: none !important; } }
/* Dashboard: Drucker-Warnung als schmale Zeile, Kennzahlen am Handy 2 × 2 */
.printer-alert { padding: 6px 12px; font-size: .85rem; gap: 8px; }
.printer-alert .btn { padding: 3px 10px; }
@media (min-width: 700px) { .printer-alert > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 599px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi-grid .kpi { padding: 12px; }
    .kpi-grid .kpi-value { font-size: 1.3rem; }
}
/* Spritztagebuch: Kupfer-Anzeige am Handy schmal */
@media (max-width: 700px) {
    .cu-pill-compact { padding: 4px 10px; gap: 6px; font-size: .8rem; }
    .cu-pill-compact .cu-pill-bar { width: 70px; }
    .cu-pill-compact .muted.small { display: none; }
}
/* Ernteschätzung u. a.: Erklärung zum Aufklappen */
.info-fold { margin: 0 0 12px; }
.info-fold > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--primary-dark); font-size: .85rem; font-weight: 600; list-style: none; }
.info-fold > summary::-webkit-details-marker { display: none; }
.info-fold > summary .icon { width: 16px; height: 16px; }
.info-fold[open] > p { margin: 6px 0 0; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
/* Felder: Karte am Handy kleiner */
@media (max-width: 719px) { .map-overview { height: 190px; } }
@media (max-width: 700px) {
    .tabs { gap: 0 2px; }
    .tab { padding: 8px 9px; font-size: .8rem; }
    .tab .icon { display: none; }
}

/* ==========================================================================
   Kundenportal (30.10.2026)
   ========================================================================== */
body.portal { background: var(--bg); }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--side-bg); color: var(--side-text); }
.portal-brand { display: flex; align-items: center; gap: 10px; color: var(--side-text); }
.portal-brand:hover { text-decoration: none; }
.portal-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.portal-sub { font-size: .75rem; color: var(--side-muted); }
.portal-user { display: flex; align-items: center; gap: 10px; text-align: right; font-size: .85rem; }
.portal-user form { margin: 0; }
.portal-main { max-width: 960px; margin: 0 auto; padding: 20px 16px 48px; }
.portal-main h1 { font-size: 1.4rem; }
.portal-card { max-width: 440px; margin: 40px auto; padding: 24px; }
.portal-alt { margin-top: 14px; text-align: center; }
.portal-stock { border-top: 1px solid var(--line); padding: 8px 0; }
.portal-stock > summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; flex-wrap: wrap; }
.portal-sum { margin-left: auto; font-weight: 600; }
.portal-stock .table-wrap { margin-top: 6px; }
.portal-users { list-style: none; margin: 0 0 12px; padding: 0; }
.portal-users li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.portal-u-who { display: flex; flex-direction: column; min-width: 0; }
.portal-u-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.portal-invite { border-top: 1px solid var(--line); padding-top: 10px; }
.dn-mail-to { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
@media (max-width: 600px) {
    .portal-main { padding: 14px 10px 40px; }
    .portal-main .card { padding: 12px; }
    .portal-main .table th, .portal-main .table td { padding: 6px 5px; font-size: .8rem; }
    .portal-head { padding: 8px 10px; }
    .portal-who .small { display: none; }
}

/* ---- Nachrichten (Kundenportal und Lager & Verkauf → Nachrichten) ---- */
.msg { max-width: 80%; align-self: flex-start; }
.tabs .tab .badge { margin-left: 4px; }
@media (max-width: 760px) {
    .msg-layout { grid-template-columns: 1fr; }
    .msg-layout.has-current .msg-list { display: none; }
    .msg-layout:not(.has-current) .msg-main { display: none; }
    .msg-back { display: inline-flex; }
    .msg { max-width: 92%; }
    .msg-form { flex-direction: column; align-items: stretch; }
}

/* ---- Kundenportal: Begrüßungs-Animation nach der Anmeldung (ca. 12 s, überspringbar) ----
   Ablauf: 0–2,4 s Jasper grüßt · 2,2–4,1 s geht zum Traktor, steigt ein · 4,3–6,6 s Fahrt zum Lager (Marco ruft) ·
   6,9–8,6 s Kisten abladen (Marcel antwortet) · ab 9,3 s „Verkauft!“ mit Münzen · 11,6–12,6 s ausblenden */
.portal-intro { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(240, 246, 236, .97); animation: pi-out 12.6s linear forwards; cursor: pointer; }
.pi-box { position: relative; width: 100%; max-width: 680px; text-align: center; }
.pi-scene { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 12px 40px rgba(30, 60, 30, .18); background: #e6f3fa; }
.pi-caption { display: grid; margin: 14px 0 6px; font-size: 1.2rem; font-weight: 700; color: #2f5a41; min-height: 1.6em; }
.pi-caption span { grid-area: 1 / 1; opacity: 0; }
.pi-t1 { animation: pi-t1 12s linear forwards; }
.pi-t2 { animation: pi-t2 12s linear forwards; }
.pi-t3 { animation: pi-t3 12s linear forwards; }
.pi-skip { margin-top: 4px; }
.pi-scene * { transform-box: view-box; }
.pi-man { animation: pi-man 12s linear forwards; }
.pi-leg { transform-origin: 0 -18px; }
.pi-leg.l1 { animation: pi-step .4s ease-in-out 2.2s 4 alternate; }
.pi-leg.l2 { animation: pi-step2 .4s ease-in-out 2.2s 4 alternate; }
.pi-arm { transform-origin: 0 -32px; animation: pi-step2 .4s ease-in-out 2.2s 4 alternate; }
.pi-driver { opacity: 0; animation: pi-driver 12s linear forwards; }
.pi-tractor { animation: pi-drive 12s linear forwards; }
.pi-wheel { transform-origin: 0 0; animation: pi-wheel 12s linear forwards; }
.pi-smoke circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pi-smoke .9s ease-out 4.4s 3; }
.pi-smoke .s2 { animation-delay: 4.85s; }
.pi-crate.c3 { animation: pi-c3 12s linear forwards; }
.pi-crate.c2 { animation: pi-c2 12s linear forwards; }
.pi-crate.c1 { animation: pi-c1 12s linear forwards; }
.pi-door { animation: pi-door 12s linear forwards; }
.pi-wave { transform-origin: 5px -32px; }
.pi-marco .pi-wave { animation: pi-wave .45s ease-in-out 4.6s 5 alternate; }
.pi-marcel .pi-wave { animation: pi-wave .45s ease-in-out 7.1s 5 alternate; }
.pi-bubble { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; }
.pi-b-jasper { animation: pi-b-jasper 12s linear forwards; }
.pi-b-marco { animation: pi-b-marco 12s linear forwards; }
.pi-b-marcel { animation: pi-b-marcel 12s linear forwards; }
.pi-sold { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pi-sold 12s linear forwards; }
.pi-coin { opacity: 0; animation: pi-coin 1.4s ease-out both; }
.pi-coin.k1 { animation-delay: 9.5s; }
.pi-coin.k2 { animation-delay: 9.75s; }
.pi-coin.k3 { animation-delay: 10s; }
.pi-coin.k4 { animation-delay: 10.25s; }
.pi-cloud { animation: pi-cloud 12s linear forwards; }
@keyframes pi-out { 0% { opacity: 0; } 2.4% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes pi-t1 { 0%, 1.5% { opacity: 0; } 3%, 29% { opacity: 1; } 31.5%, 100% { opacity: 0; } }
@keyframes pi-t2 { 0%, 32% { opacity: 0; } 34.5%, 72% { opacity: 1; } 74.5%, 100% { opacity: 0; } }
@keyframes pi-t3 { 0%, 75% { opacity: 0; } 78%, 100% { opacity: 1; } }
@keyframes pi-man { 0%, 18.3% { transform: translate(112px, 0); opacity: 1; } 31.7% { transform: translate(190px, 0); opacity: 1; }
    34.2%, 100% { transform: translate(198px, -16px); opacity: 0; } }
@keyframes pi-step { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
@keyframes pi-step2 { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes pi-driver { 0%, 33% { opacity: 0; } 35%, 100% { opacity: 1; } }
@keyframes pi-drive { 0%, 35.8% { transform: translateX(0); animation-timing-function: ease-in-out; } 55%, 100% { transform: translateX(205px); } }
@keyframes pi-wheel { 0%, 35.8% { transform: rotate(0); animation-timing-function: ease-in-out; } 55%, 100% { transform: rotate(720deg); } }
@keyframes pi-smoke { 0% { opacity: .8; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(-14px, -26px) scale(2.2); } }
@keyframes pi-c3 { 0%, 57.5% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; } 60.4% { transform: translate(80px, -58px); animation-timing-function: ease-in; }
    63.3% { transform: translate(160px, 20px); opacity: 1; } 64.6%, 100% { transform: translate(160px, 26px); opacity: 0; } }
@keyframes pi-c2 { 0%, 60.8% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; } 63.8% { transform: translate(92px, -58px); animation-timing-function: ease-in; }
    66.7% { transform: translate(184px, 20px); opacity: 1; } 68%, 100% { transform: translate(184px, 26px); opacity: 0; } }
@keyframes pi-c1 { 0%, 64.2% { transform: translate(0, 0); opacity: 1; animation-timing-function: ease-out; } 67.1% { transform: translate(104px, -58px); animation-timing-function: ease-in; }
    70% { transform: translate(208px, 20px); opacity: 1; } 71.3%, 100% { transform: translate(208px, 26px); opacity: 0; } }
@keyframes pi-door { 0%, 55.8% { opacity: 1; } 58%, 72.5% { opacity: 0; } 75%, 100% { opacity: 1; } }
@keyframes pi-wave { from { transform: rotate(-150deg); } to { transform: rotate(-110deg); } }
@keyframes pi-b-jasper { 0%, 2% { opacity: 0; transform: scale(.6); } 4%, 20% { opacity: 1; transform: scale(1); } 23%, 100% { opacity: 0; transform: scale(1); } }
@keyframes pi-b-marco { 0%, 37.5% { opacity: 0; transform: scale(.6); } 40%, 55.8% { opacity: 1; transform: scale(1); } 57.5%, 100% { opacity: 0; transform: scale(1); } }
@keyframes pi-b-marcel { 0%, 58.3% { opacity: 0; transform: scale(.6); } 60.8%, 75% { opacity: 1; transform: scale(1); } 77%, 100% { opacity: 0; transform: scale(1); } }
@keyframes pi-sold { 0%, 77.5% { opacity: 0; transform: scale(.2); } 80.8% { opacity: 1; transform: scale(1.12); } 83.3%, 100% { opacity: 1; transform: scale(1); } }
@keyframes pi-coin { 0% { opacity: 0; transform: translateY(12px); } 20% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-64px); } }
@keyframes pi-cloud { from { transform: translateX(0); } to { transform: translateX(60px); } }
@media (prefers-reduced-motion: reduce) {
    .portal-intro { display: none; }
}
@media (max-width: 600px) {
    .pi-caption { font-size: 1rem; }
}

/* ---- Phase 10a: Export-Knopf und Druckansicht für alle Seiten ---- */
.export-menu { position: relative; display: inline-block; }
@media print {
    /* ohne Seitenrand druckt der Browser keine Adresse/Datum; Rand kommt von .print-frame (app.js), Nutzer 31.10.2026 */
    @page { margin: 0; }
    .print-frame { width: 100%; border-collapse: collapse; }
    .print-frame > thead > tr > td, .print-frame > tfoot > tr > td { height: 12mm; padding: 0; border: 0; }
    .print-frame > tbody > tr > td { padding: 0 12mm; border: 0; }
    .bottombar, .pagebar, .export-menu, .more-menu, .page-actions, .btn, .icon-btn, dialog, .modal, .flash, .no-print,
    .filter-toggle, .portal-intro, .msg-form, .info-btn, .chip:not(.is-active), .segmented button:not(.is-active),
    input[type="search"]:placeholder-shown, .dn-arrow, .stock-buttons, .stock-actionbar { display: none !important; }
    html, body, .main, .app, .content { background: #fff !important; }
    .main, .content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .table-wrap { overflow: visible !important; }
    .table th, .table td { padding: 3px 5px; }
    thead { display: table-header-group; }
    tr { page-break-inside: avoid; }
    .card { break-inside: auto; box-shadow: none !important; }
    a { color: inherit; text-decoration: none; }
    .tabs .tab:not(.is-active) { display: none; }
    .msg-thread { max-height: none; overflow: visible; }
}
html.is-exporting, html.is-exporting * { cursor: progress !important; }

/* ---- Phase 10b: Feinschliff Handy (Tippflächen ≥ 40 px, Häkchen 24 px, Auswahlfelder 16 px gegen iPhone-Zoom) ---- */
.sd-f-check { display: flex; align-items: flex-start; flex: none; padding: 10px 6px 10px 14px; margin: -10px 0 -10px -14px; cursor: pointer; }
.sd-f-check input[type=checkbox] { margin: 4px 0 0; width: 18px; height: 18px; }
@media (max-width: 700px) {
    .chip { min-height: 40px; padding: 8px 14px; }
    .chip-sm, .chip-inline { min-height: 0; padding: 2px 10px; }
    .segmented button { min-height: 40px; padding: 8px 14px; }
    .link-btn { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
    .info-btn { padding: 6px 8px; margin: -6px -4px; }
    .sd-f-check { padding: 12px 10px 12px 14px; margin: -12px 0 -12px -14px; }
    .sd-f-check input[type=checkbox], .he-done input[type=checkbox] { width: 24px; height: 24px; margin-top: 2px; }
    .he-done { display: inline-flex; padding: 8px; margin: -8px; }
    select, input, textarea { font-size: 16px; }
    table.table-cards td { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
    html .weather-month input, html .prog-page .feld select, html .prog-page .feld input, html .prog-page .feld textarea { font-size: 16px; }
}
@media (max-width: 700px) {
    table.table-cards .chip-list { justify-content: flex-end; }
    table.table-cards .chip { white-space: normal; text-align: left; }
}
.tc-val { display: contents; }
@media (max-width: 700px) {
    table.table-cards .tc-val { display: block; flex: 1 1 auto; min-width: 0; text-align: right; }
}

/* ---- Feldmarkierungen (Video 6) ---- */
.fm-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.fm-ask { text-align: center; padding: 28px 16px; }
.fm-ask-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.fm-ask-btns .btn { min-height: 52px; padding: 10px 20px; font-size: 1rem; }
.fm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.fm-toolbar .chips { margin: 0; }
.fm-toolbar select { width: auto; min-width: 150px; }
.fm-toolbar .btn[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.fm-map-wrap { position: relative; margin-bottom: 8px; }
.fm-map { height: min(62vh, 560px); border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.fm-mark-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 0; }
.fm-mark-bar p { margin: 0; }
.fm-mark-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fm-mark-btns .btn { min-height: 46px; }
.fm-cluster { background: none; border: 0; }
.fm-cluster span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(47, 90, 65, .92);
    color: #fff; font-weight: 700; font-size: .85rem; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.fm-pin { background: none; border: 0; }
.fm-pin span { position: absolute; left: 3px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; background: #ffdd00; border: 3px solid #2f3b45;
    transform: rotate(-45deg); box-shadow: 0 2px 5px rgba(0,0,0,.45); }
.fm-pop { font-size: .85rem; }
.fm-pop-note { margin: 6px 0; white-space: pre-line; }
.fm-pop-photos { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.fm-pop-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.fm-pop-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.fm-done { color: var(--primary-dark); }
.fm-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fm-list-head h2 { margin: 0; }
.fm-group-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 14px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fm-row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding-right: 10px; }
.fm-row.is-done { opacity: .65; }
.fm-row-main { flex: 1; display: flex; align-items: flex-start; gap: 4px; text-align: left; background: none; border: 0; padding: 10px 14px; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.fm-row-main:hover { background: var(--hover); }
.fm-row-main .fm-dot { margin-top: 4px; }
.fm-row-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.fm-row-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-dist { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.fm-row-check { min-width: 40px; min-height: 40px; font-size: 1.1rem; justify-content: center; }
.fm-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 1500; background: #2f5a41; color: #fff; padding: 10px 16px;
    border-radius: 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: calc(100vw - 32px); font-size: .9rem; }
.fm-toast.is-error { background: var(--danger); }
.fm-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fm-thumb { position: relative; display: inline-block; }
.fm-thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.fm-thumb.is-new img { border-color: var(--primary); }
.fm-thumb-x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.fm-photo-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-photo-btns .btn { cursor: pointer; }
.fm-status { margin-bottom: 12px; }
.fm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fm-stat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fm-stat-head h3 { margin: 0; }
.fm-stat-types { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-stat-types li { display: flex; flex-direction: column; gap: 4px; }
.fm-types-table input[type=color] { width: 44px; height: 36px; padding: 2px; }
@media (max-width: 700px) {
    .fm-map { height: 58vh; }
    .fm-toolbar select { flex: 1 1 140px; }
    .fm-mark-btns { width: 100%; }
    .fm-mark-btns .btn { flex: 1 1 auto; justify-content: center; }
}
.fm-map-wrap { scroll-margin-top: 72px; }
.fm-map .leaflet-interactive:focus { outline: none; }
/* Karten allgemein: angeklickte Fläche ohne Fokus-Rechteck des Browsers (Nutzer 31.10.2026) */
.leaflet-container .leaflet-interactive:focus, .leaflet-container path:focus { outline: none; }

/* ---- Wurzelschnitt-Karte ---- */
.rc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
.rc-toolbar select { width: auto; min-width: 90px; }
.rc-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-modes .btn.is-active { outline: 3px solid var(--primary-soft); }
.rc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); }
.rc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rc-key { display: inline-block; width: 26px; height: 0; border-top: 4px solid; }
.rc-key-cut { border-color: #22c55e; }
.rc-key-prev { border-top-style: dashed; border-color: #f59e0b; }
.rc-key-note { border-color: #3b82f6; }
.rc-panel { padding: 12px 14px; }
.rc-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rc-cut { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.rc-big { min-height: 64px; font-size: 1.2rem; justify-content: center; }
.rc-status { margin: 0; font-weight: 600; }
.rc-editbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; border: 2px solid var(--primary); }
.rc-map-wrap { margin-bottom: 8px; }
.rc-map { height: min(66vh, 620px); border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.rc-map .leaflet-interactive:focus { outline: none; }
.rc-me { background: none; border: 0; }
.rc-me span { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #2b6cb0; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
.rc-me span::after { content: ""; position: absolute; left: 50%; top: -13px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 10px solid #2b6cb0; }
.rc-me span.no-dir::after { display: none; }
.rc-pop { font-size: .85rem; }
.rc-pop-note { margin: 6px 0; white-space: pre-line; }
.rc-pop-btns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rc-note-tip { font-weight: 600; }
.rc-settings { padding: 10px 14px; }
.rc-settings summary { cursor: pointer; font-weight: 600; }
.rc-offset { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 8px; }
.rc-offset .field { margin: 0; }
.rc-offset input { width: 90px; }
.rc-offset p { flex-basis: 100%; margin: 0; }
@media (max-width: 700px) {
    .rc-map { height: 60vh; }
    .rc-modes { width: 100%; }
    .rc-modes .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; }
}

/* ---- Rechtegruppen ---- */
html[data-readonly] main form[method="post"]:not([data-keep]), html[data-readonly] main [data-open-dialog]:not([data-keep]),
html[data-readonly] main .row-actions, html[data-readonly] main .page-actions .btn-primary { display: none !important; }
.perm-area-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.perm-area-head h2 { margin: 0; }
.perm-area-head select { width: auto; }
.perm-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 6px 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.perm-page { display: flex; align-items: center; gap: 8px; }
.perm-levels { margin: 0; }
.perm-level { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; }
.perm-level input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perm-level.is-active { background: var(--primary); color: #fff; }
.perm-level:focus-within { outline: 2px solid var(--primary-soft); }
.perm-rights { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 18px; padding-left: 28px; }
.perm-rights.is-off { opacity: .45; }
.perm-rights .check { margin: 2px 0; font-weight: 400; font-size: .9rem; }
@media (max-width: 700px) {
    .perm-row { grid-template-columns: 1fr; }
    .perm-level { min-height: 40px; }
    .perm-rights { padding-left: 0; }
}

/* ---- Lagerkontrolle ---- */
.sc-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.sc-room { display: flex; flex-direction: column; gap: 6px; border-top: 5px solid var(--line); }
.sc-room.sc-good { border-top-color: #2f8f4e; }
.sc-room.sc-warn { border-top-color: #e0a526; }
.sc-room.sc-bad { border-top-color: #c0392b; }
.sc-room.sc-stale { border-top-color: #9aa5a0; }
.sc-room-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-room-head h2 { margin: 0; }
.sc-badge { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--hover); white-space: nowrap; }
.sc-badge-good { background: #e3f4e8; color: #1f6b3a; }
.sc-badge-warn { background: #fff4d6; color: #8a5d00; }
.sc-badge-bad { background: #fde3df; color: #a12a1b; }
.sc-badge-stale { background: #eceeed; color: #5f6b66; }
.sc-temp { font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.sc-temp small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.sc-syms { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-sym { font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.sc-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 6px 0 0; }
.sc-vals dt { font-size: .75rem; color: var(--muted); }
.sc-vals dd { margin: 0; font-weight: 600; }
.sc-vals small { font-weight: 400; color: var(--muted); }
.sc-room .sc-change { align-self: flex-start; margin-top: 4px; }
.sc-chart-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.sc-chart-head h2 { margin: 0 auto 0 0; }
.sc-chart-head .segmented { margin: 0; }
.sc-chart { height: 260px; }
.sc-chart-gas { height: 200px; }
.sc-tabs { margin: 6px 0 10px; }
.sc-cmd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sc-cmd-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.sc-cmd-list small { flex-basis: 100%; }
.sc-cmd-st { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--hover); }
.sc-cmd-done { background: #e3f4e8; color: #1f6b3a; }
.sc-cmd-failed, .sc-cmd-expired { background: #fde3df; color: #a12a1b; }
.sc-cmd-queued, .sc-cmd-running { background: #fff4d6; color: #8a5d00; }
.sc-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-chart-bar { height: 220px; }
@media (max-width: 760px) { .sc-bars { grid-template-columns: 1fr; } }
.sc-errors { margin-bottom: 10px; }
.sc-report-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.sc-report-row .field { margin-bottom: 0; min-width: 160px; }
.sc-report-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-report-btns form { margin: 0; }
.sc-report .sc-report-row + .sc-report-row { margin-top: 12px; }
.sc-main-switch { margin: 4px 0 8px; }
.sc-secret { display: flex; gap: 6px; align-items: center; }
.sc-secret input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; }
[data-copy].is-done { color: var(--brand, #2f5a41); }
.stock-climate { font-size: .82rem; font-weight: 600; padding: 2px 14px 6px; color: var(--muted); }
.stock-climate.sc-line-good { color: #1f6b3a; }
.stock-climate.sc-line-warn { color: #8a5d00; }
.stock-climate.sc-line-bad { color: #a12a1b; }

/* ---- Terminplaner (Kalender, Dashboard-Kachel) ---- */
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; vertical-align: middle; }
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { margin: 0 0 0 6px; }
.cal-toolbar .segmented { margin: 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: .85rem; }
.cal-leg { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cal-synced { margin: 8px 0 0; }
.cal-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card));
    color: var(--text); font: inherit; font-size: .76rem; line-height: 1.25; padding: 1px 4px; margin-top: 2px; border-radius: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-chip.is-allday { background: var(--c); color: #fff; border-left-color: var(--c); }
.cal-chip-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-month .cal-wd, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd div { font-size: .75rem; color: var(--muted); padding: 2px 4px; text-transform: capitalize; }
.cal-grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-cell { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 2px 3px 4px; min-width: 0; cursor: default; }
.cal-cell.is-out { background: var(--surface-2); }
.cal-cell.is-out .cal-daynum { color: var(--muted); }
.cal-daynum { border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 600; padding: 1px 5px; border-radius: 999px; cursor: pointer; color: var(--text); }
.cal-cell.is-today .cal-daynum { background: var(--primary); color: #fff; }
.cal-more { border: 0; background: none; color: var(--primary-dark); font-size: .75rem; padding: 1px 4px; cursor: pointer; }
.cal-tg { --gutter: 48px; }
.cal-tg-head, .cal-tg-allday { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.cal-tg-day { border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 600; padding: 4px; cursor: pointer; color: var(--text); text-align: center; }
.cal-tg-day.is-today { color: var(--primary-dark); }
.cal-tg-allday { border-bottom: 1px solid var(--line-strong); }
.cal-tg-allday > div:first-child { padding: 4px 2px; }
.cal-tg-adcell { border-left: 1px solid var(--line); min-height: 26px; padding: 1px 2px 3px; min-width: 0; }
.cal-tg-scroll { max-height: 62vh; overflow-y: auto; }
.cal-tg-grid { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.cal-tg-hours div { font-size: .7rem; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-6px); box-sizing: border-box; }
.cal-tg-col { position: relative; border-left: 1px solid var(--line);
    background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 44px); cursor: copy; }
.cal-tg-col.is-today { background-color: color-mix(in srgb, var(--primary) 5%, transparent); }
.cal-tg-ev { position: absolute; overflow: hidden; border: 0; border-left: 3px solid var(--c); border-radius: 4px; text-align: left; padding: 2px 4px; font: inherit;
    font-size: .74rem; line-height: 1.2; color: var(--text); background: color-mix(in srgb, var(--c) 20%, var(--card)); cursor: pointer; }
.cal-tg-ev small { display: block; color: var(--muted); }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); pointer-events: none; }
.cal-list-day h3 { margin: 14px 0 4px; text-transform: none; }
.cal-list-day.is-today h3 { color: var(--primary-dark); }
.cal-list-day ul { list-style: none; margin: 0; padding: 0; }
.cal-list-ev { display: flex; gap: 12px; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c); background: var(--surface-2); color: var(--text);
    font: inherit; padding: 8px 10px; margin-bottom: 4px; border-radius: 6px; cursor: pointer; min-height: 44px; align-items: center; }
.cal-list-time { flex: 0 0 104px; font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); }
.cal-list-title { display: flex; flex-direction: column; min-width: 0; }
.cal-times { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cal-steps { margin: 4px 0 12px; padding-left: 20px; }
.cal-tile { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-tile ul { list-style: none; margin: 2px 0 0; padding: 0; }
.cal-tile ul li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.cal-tile-date { font-weight: 700; font-size: .85rem; }
.cal-tile-day.is-today .cal-tile-date { color: var(--primary-dark); }
.cal-tile-time { flex: 0 0 64px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; }
@media (max-width: 700px) {
    .cal-cell { min-height: 64px; padding: 1px; }
    .cal-chip { font-size: .68rem; padding: 0 2px; }
    .cal-chip-time { display: none; }
    .cal-tg { --gutter: 38px; }
    .cal-list-time { flex-basis: 84px; }
}

/* ---- Kistenfoto ---- */
.bp-code-row { display: flex; gap: 8px; }
.bp-code-row input { flex: 1; min-width: 0; text-transform: uppercase; }
.bp-cam { max-width: 420px; margin: 8px 0; }
.bp-cam-close { display: none; }
/* QR-Kamera am Handy im Vollbild statt irgendwo in der Seite (Nutzer 09.11.2026) */
html.bp-cam-full, html.bp-cam-full body { overflow: hidden; }
html.bp-cam-full .bp-cam:not([hidden]) { position: fixed; inset: 0; z-index: 1200; max-width: none; margin: 0; background: #000; display: flex; flex-direction: column; justify-content: center; }
html.bp-cam-full #bp-cam { width: 100%; }
html.bp-cam-full .bp-cam-close { display: block; position: absolute; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); min-height: 48px; }
.bp-buttons { scroll-margin-top: 84px; }
.bp-list[data-collapsed] > .bp-item:nth-child(n+7) { display: none; }
.bp-more { margin: 10px 0 0; text-align: center; }
.sorting-forecast details { margin: 8px 0; }
.sorting-forecast-quality { font-weight: 600; }
.bp-linked { margin: 4px 0 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bp-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.bp-file { cursor: pointer; min-height: 48px; }
.bp-tips ul { margin: 6px 0 0; padding-left: 20px; }
.bp-list { display: flex; flex-direction: column; gap: 10px; }
.bp-item { display: flex; gap: 14px; align-items: flex-start; }
.bp-thumb { flex: 0 0 180px; }
.bp-thumb img { width: 180px; height: auto; max-height: 220px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.bp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bp-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.bp-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; margin: 4px 0 0; }
.bp-vals dt { font-size: .75rem; color: var(--muted); }
.bp-vals dd { margin: 0; font-weight: 600; }
.bp-dist { display: flex; flex-direction: column; gap: 3px; max-width: 460px; }
.bp-dist-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 8px; align-items: center; font-size: .8rem; }
.bp-dist-bar { height: 10px; background: var(--hover); border-radius: 5px; overflow: hidden; }
.bp-dist-bar span { display: block; height: 100%; background: var(--primary); }
.bp-dist-pct { text-align: right; font-variant-numeric: tabular-nums; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-dist-inline .chip { margin: 1px 0; }
@media (max-width: 600px) {
    .bp-item { flex-direction: column; }
    .bp-thumb, .bp-thumb img { width: 100%; flex-basis: auto; max-height: 260px; }
}
.bp-bins td.bp-bin-top { font-weight: 700; }
.bp-bins th, .bp-bins td { white-space: nowrap; }
.bp-var-toggle { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; }
.bp-var-toggle:hover { color: var(--primary, inherit); }
.bp-chev { display: inline-block; width: 1em; transition: transform .15s; }
.bp-var-toggle[aria-expanded="true"] .bp-chev { transform: rotate(90deg); }
.bp-var-row td { font-weight: 600; }
.bp-var-row td.bp-bin-top { font-weight: 800; }
.bp-field-row td:first-child { padding-left: 2.2rem; }
.bp-field-row td { background: var(--surface-2, rgba(0,0,0,.025)); }

/* ---- Spurführung ---- */
.sr-runs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.sr-run { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.sr-run .btn { align-self: flex-start; margin-top: 4px; }
.sr-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; border: 0; padding: 0; margin: 0 0 10px; }
.sr-drive { display: flex; flex-direction: column; height: calc(100dvh - 120px); min-height: 520px; margin: -8px -8px 0; }
.sr-top { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.sr-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-map-wrap { flex: 1; min-height: 260px; position: relative; display: flex; }
.sr-map { flex: 1; min-height: 260px; border-radius: 10px; }
.sr-notice { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 1000; padding: 18px 14px; border-radius: 12px; color: #fff; font-size: 1.35rem; font-weight: 800; text-align: center; line-height: 1.25; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); cursor: pointer; }
.sr-notice-on { background: #1f9d55; }
.sr-notice-off { background: #d9480f; }
.sr-notice-tank { background: #1c64c8; }
.sr-where { margin: 0; font-weight: 700; }
/* Sorte links/rechts im Traktor (ANNAHMEN 375): groß und gut lesbar */
.sr-sides { position: absolute; left: 8px; right: 8px; bottom: 26px; z-index: 450; display: flex; justify-content: space-between; gap: 8px;
    font-size: 1.2rem; font-weight: 800; pointer-events: none; }
.sr-sides[hidden] { display: none; }
/* Knopf Gesamtansicht / Zu mir über der Karte (ANNAHMEN 377) */
.sr-viewbtn { position: absolute; top: 10px; right: 10px; z-index: 460; padding: 8px 14px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .95);
    color: #1f2a24; font: inherit; font-weight: 800; font-size: 1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); cursor: pointer; }
.sr-viewbtn[aria-pressed="true"] { background: #2f80ed; color: #fff; }
.sr-awake { margin: 0; }
.sr-crew { display: flex; flex-direction: column; gap: 4px; }   /* Fahrer und wer fertig ist (ANNAHMEN 379) */
.sr-crew-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sr-crew-row > span:first-child { font-weight: 700; min-width: 90px; }
.sr-crew-me { margin: 4px 0 0; }
/* Vollbild im Traktor (ANNAHMEN 378): Karte über den ganzen Bildschirm, Knöpfe und Kachel darauf, Details als Blatt von unten */
body.sr-fullscreen .sr-drive { position: fixed; inset: 0; z-index: 1200; height: auto; min-height: 0; margin: 0; background: #1b1f1d; display: block; }
body.sr-fullscreen .sr-map-wrap { position: absolute; inset: 0; min-height: 0; }
body.sr-fullscreen .sr-map { position: absolute; inset: 0; border-radius: 0; z-index: 0; }
body.sr-fullscreen .leaflet-control-zoom { display: none; }
body.sr-fullscreen .sr-top { position: absolute; z-index: 470; top: calc(env(safe-area-inset-top) + 8px); left: 8px; max-width: calc(100% - 190px); padding: 3px 12px 3px 3px;
    border-radius: 12px; background: rgba(255, 255, 255, .95); color: #1f2a24; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
body.sr-fullscreen .sr-top .icon-btn { color: #1f2a24; }
body.sr-fullscreen .sr-top .sr-title .small { display: none; }
body.sr-fullscreen .sr-viewbtn { top: calc(env(safe-area-inset-top) + 8px); }
body.sr-fullscreen .sr-notice { top: calc(env(safe-area-inset-top) + 80px); }   /* unter der Kopfzeile: der Zurück-Knopf bleibt frei (Nutzer 11.11.2026, ANNAHMEN 466) */
/* genau auf der Kachel (Stelle und Größe setzt spray-run.js, ANNAHMEN 469): Form wie die Kachel, Text in der Mitte */
.sr-notice.sr-notice-tile { right: auto; bottom: auto; box-sizing: border-box; display: flex; align-items: center; justify-content: center; padding: 6px 12px;
    border-radius: 14px; line-height: 1.2; overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.sr-notice.sr-notice-tile[hidden] { display: none; }
.sr-tile { display: none; }
body.sr-fullscreen .sr-tile { display: flex; flex-direction: column; position: absolute; z-index: 465; top: calc(env(safe-area-inset-top) + 60px); left: 8px; right: 8px;
    padding: 8px 12px 6px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .95); color: #1f2a24; font: inherit; text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sr-tile-page { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; animation: sr-tile-in .18s ease-out; }
.sr-tile-page[hidden] { display: none; }
@keyframes sr-tile-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.sr-tv { display: flex; flex-direction: column; min-width: 0; }
.sr-tv[hidden] { display: none; }
.sr-tv small { font-size: .75rem; color: #5b6660; font-weight: 600; }
.sr-tv b { font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-tv em { font-style: normal; font-size: .85rem; color: #3d4a43; font-weight: 600; }
.sr-tile-me { grid-column: 1 / -1; font-size: .85rem; font-weight: 600; color: #3d4a43; }
body.sr-following .sr-map-wrap { overflow: hidden; }
body.sr-following .sr-map { will-change: transform; } .sr-medot { position: absolute; left: 50%; top: 50%; z-index: 440; pointer-events: none; } .sr-medot svg, .sr-rig svg { display: block; overflow: visible; filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .95)) drop-shadow(0 1px 3px rgba(0, 0, 0, .5)); } .sr-rig { transition: transform .6s linear; } .sr-mist { fill: rgba(70, 160, 255, .62); display: none; } .is-on .sr-mist { display: inline; }
body.sr-following .leaflet-control-attribution { display: none; }
body.sr-following .leaflet-popup-content-wrapper { transform: rotate(var(--sr-rot, 0deg)); }
body.sr-following .leaflet-popup-tip-container { display: none; }
.sr-upright { display: inline-block; }
body.sr-following .sr-upright { transform: rotate(var(--sr-rot, 0deg)); }
.sr-attr { display: none; position: absolute; right: 4px; bottom: 2px; z-index: 460; font-size: 10px; padding: 0 4px; background: rgba(255, 255, 255, .7); color: #333; }
body.sr-following .sr-attr { display: block; }
.sr-pick { position: fixed; inset: 0; z-index: 3000; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sr-pick[hidden] { display: none; }
.sr-rainbtn { position: absolute; right: 10px; top: 56%; z-index: 460; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 50px; height: 50px; padding: 0 13px; border: 0; border-radius: 25px; background: rgba(255, 255, 255, .97); color: #1c64c8; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transition: background .2s, color .2s; } .sr-rainbtn .icon { width: 26px; height: 26px; flex: none; } .sr-rainbtn [data-sr-rainlabel]:empty { display: none; } .sr-rainbtn:active { transform: scale(.95); }
.sr-rainbtn[aria-pressed="true"] { background: #1c64c8; color: #fff; } .sr-rainbtn.is-alert::after { content: ''; position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: #f08c00; border: 2px solid #fff; }
.sr-rainbtn[hidden] { display: none; }
.sr-tile-rain { color: #1c64c8; }
.sr-pick-box { background: var(--card, #fff); border-radius: 14px; padding: 16px; width: min(420px, 100%); }
.sr-pick-list { display: grid; gap: 8px; margin: 10px 0; }
.sr-pick-list .btn { width: 100%; justify-content: flex-start; padding: 14px; font-size: 1.05rem; }
.sr-tile-dots { display: flex; justify-content: center; gap: 5px; margin-top: 4px; }
.sr-tile-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7cec9; }
.sr-tile-dots i.is-on { background: #1f2a24; }
.sr-bar { display: none; }
body.sr-fullscreen .sr-bar { display: flex; gap: 8px; position: absolute; z-index: 470; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 22px); }
body.sr-fullscreen .sr-bar .sr-spray { flex: 1; min-height: 64px; box-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
body.sr-fullscreen .sr-bar .sr-spray:not(.is-on) { background: #4f5a55; }
.sr-more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 76px; min-height: 64px; margin-left: auto; border: 0; border-radius: 12px;
    background: rgba(255, 255, 255, .95); color: #1f2a24; font: inherit; font-size: .8rem; font-weight: 700; box-shadow: 0 2px 12px rgba(0, 0, 0, .35); cursor: pointer; }
.sr-more .icon { width: 22px; height: 22px; }
body.sr-fullscreen .sr-sides { bottom: calc(env(safe-area-inset-bottom) + 98px); }
.sr-sheet-head { display: none; }
body.sr-fullscreen .sr-panel { position: absolute; z-index: 1100; left: 0; right: 0; bottom: 0; max-height: 78%; overflow-y: auto; padding: 4px 12px calc(env(safe-area-inset-bottom) + 14px);
    background: var(--card); color: var(--text); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .35); transform: translateY(105%); transition: transform .25s ease; }
body.sr-fullscreen .sr-drive.sheet-open .sr-panel { transform: none; }
body.sr-fullscreen .sr-sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--card); padding: 8px 0; z-index: 1; }
@media (min-width: 900px) { body.sr-fullscreen .sr-tile { right: auto; width: 420px; } body.sr-fullscreen .sr-panel { left: auto; width: 460px; right: 12px; } }
.sr-side, .sr-side-both { padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .94); color: #1f2a24; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.sr-side-r { margin-left: auto; text-align: right; }
.sr-side-both { margin: 0 auto; }
.sr-fieldlist { margin: 0; }
.sr-tank.is-low { border-color: #d9480f; background: #fff1e8; }
.sr-auto { margin-right: auto; }
.sr-order { display: flex; flex-direction: column; gap: 4px; }
.sr-order p { margin: 0; }
.sr-stats.sr-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sr-mix { font-weight: 700; }
.sr-ofields ul { list-style: none; margin: 4px 0 0; padding: 0; }
.sr-ofields li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) auto; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.so-fruits { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.so-detail { margin: 0 0 12px; }
.so-vars { margin-bottom: 4px; }
.so-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; margin-top: 8px; }
.so-fieldbox { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.so-plot { padding-left: 1.4rem; }
.so-detail summary { cursor: pointer; color: var(--primary-dark, inherit); }
.so-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 14px; margin: 8px 0; }
.so-group > strong { grid-column: 1 / -1; }
.so-products { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.so-product { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.so-product select { flex: 1 1 180px; min-width: 0; }
.so-product input { width: 90px; }
.so-sum { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.so-sum > div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.sr-enter-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.sr-panel { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.sr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sr-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; display: flex; flex-direction: column; }
.sr-k { font-size: .7rem; color: var(--muted); }
.sr-v { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sr-gps { margin: 0; }
.sr-spray { width: 100%; min-height: 64px; border: 0; border-radius: 12px; font: inherit; font-size: 1.15rem; font-weight: 700; color: #fff; background: #6b7570; cursor: pointer; }
.sr-spray.is-on { background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .3); }
.sr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sr-actions form { margin: 0; }
.sr-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sr-sw { display: inline-block; width: 18px; height: 5px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }
.sr-sw-open { background: #bfc6c2; }
.sr-sw-done { background: #21c25e; }
.sr-sw-side { background: #9be7b4; }
.sr-sw-part { background: linear-gradient(90deg, #21c25e 50%, #bfc6c2 50%); }
.sr-net { white-space: nowrap; }
.sr-pop .btn { margin-top: 6px; }
@media (max-width: 600px) { .sr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sr-drive { height: calc(100dvh - 140px); } .sr-notice { font-size: 1.2rem; } }

/* ---- Reihen aus Luftbild (Bearbeiten) ---- */
.fr-edit { display: flex; flex-direction: column; gap: 10px; }
.fr-map { height: min(68vh, 640px); min-height: 360px; border-radius: 10px; }
.fr-map .leaflet-interactive:focus { outline: none; }
.fr-panel { display: flex; flex-direction: column; gap: 8px; }
.fr-panel p { margin: 0; }
.fr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.fr-tools form { margin: 0; }
.fr-save { border-top: 1px solid var(--line); padding-top: 8px; }
.fr-handle { background: #ffe14d; border: 2px solid #1f2a24; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); cursor: grab; }
.fr-handle.is-sel { background: #ffffff; }
.fr-take { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }   /* Flächen übernehmen (ANNAHMEN 383) */
.fr-joint { background: #ffffff; border: 3px solid #1c64c8; border-radius: 4px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); cursor: grab; }   /* Knickpunkt (ANNAHMEN 386) */
.fr-ghost { background: rgba(255, 255, 255, .75); border: 2px dashed #1c64c8; border-radius: 50%; cursor: grab; }
.fr-split { background: #ffffff; border: 3px solid #e03131; border-radius: 3px; transform: rotate(45deg); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); cursor: grab; }   /* Teilung einer Reihe (ANNAHMEN 374) */
.fr-assign { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fr-assign select { max-width: 220px; }
.fr-double { display: inline-flex; align-items: center; gap: 6px; }
.fr-double input { width: 4.2em; }
.fr-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.fr-leg i { display: inline-block; width: 18px; height: 5px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.fr-area-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }

/* ---- Nachrüstungen 31.10.2026 ---- */
/* weicher Übergang beim Seitenwechsel (Chrome/Edge/Safari; andere wechseln wie bisher) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* Karte (Leaflet bringt eigene Ebenen bis 1000 mit) bleibt unter Handy-Leiste und Menü (Nutzer: Karte verdeckte die untere Leiste) */
.leaflet-container { isolation: isolate; z-index: 0; }
/* Hinweis „Gemerkte Filter aktiv“ */
.filter-memory { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; padding: 6px 10px; border-radius: 8px;
    background: var(--hover); color: var(--text); font-size: .85rem; }
.filter-memory .icon { width: 15px; height: 15px; }
.filter-memory a { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
/* PDF-Ansicht in der App (31.10.2026) */
.pdfv-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 0; background: var(--bg); }
.pdfv-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pdfv-pages { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 80px; }
.pdfv-pages canvas { max-width: 100%; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }

/* Fenster (Dialoge) auf dem Handy (Nutzer 31.10.2026: bei „Neues Gerät“ waren die Knöpfe unten verdeckt): 100vh ist auf
   dem iPhone höher als der sichtbare Bereich (Safari-Leiste) – sichtbare Höhe (dvh) nehmen und Abstand zum Home-Balken */
.modal { max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.modal-box { max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.modal-body { min-height: 0; overscroll-behavior: contain; }
.modal-foot { flex-shrink: 0; }
.modal-head { flex-shrink: 0; }
/* Fenster ohne seitliche Bildlaufleiste (Nutzer 31.10.2026: „Neues Gerät“ – Knopf „Von Hand eintragen“ brach nicht um,
   Rahmen (fieldset) waren nie schmaler als ihr Inhalt); senkrechte Leiste schmal und unaufdringlich */
.modal-body { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.modal-body fieldset { min-width: 0; }
.modal-body .btn { max-width: 100%; white-space: normal; }
.sd-nozzle-actions { flex-wrap: wrap; }
/* „Feld bearbeiten“: Kasten „Reihen aus Luftbild“ (ANNAHMEN 224) */
.field-rows-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px;
    margin: 14px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.field-rows-box h3 { margin: 0 0 2px; }
.field-rows-box p { margin: 0; }

/* Reihen aller Felder: auf dem Handy ohne seitliches Schieben (Nutzer 31.10.2026) – Stand darf umbrechen, schmalere Ränder */
@media (max-width: 600px) {
    #fr-list .badge { white-space: normal; }
    #fr-list .table th, #fr-list .table td { padding-left: 6px; padding-right: 6px; white-space: normal; }
}

/* ---- Auswertung auf dem Handy (Nutzer 31.10.2026, ANNAHMEN 227) ---- */
.eval-filter > summary { list-style: none; }
.eval-filter > summary::-webkit-details-marker { display: none; }
.eval-filter-sum { display: none; }
.eval-more-btn, .eval-xchev, .eval-vbar-note { display: none; }
.eval-xrow { display: none; }
@media (max-width: 700px) {
    /* 1 Filter als eine Zeile */
    .eval-side { padding: 10px 12px; }
    .eval-filter-sum { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .92rem; }
    .eval-filter-sum .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
    .eval-filter-sum > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .eval-filter-change { color: var(--primary-dark); font-size: .82rem; white-space: nowrap; }
    .eval-filter-change::after { content: ' ▾'; }
    .eval-filter[open] .eval-filter-change::after { content: ' ▴'; }
    .eval-filter[open] > summary { margin-bottom: 10px; }
    /* 2 Kennzahlen kompakt, Saison-Balken ohne Überlappen */
    .eval-head { gap: 12px; padding: 12px; }
    .eval-kpis { gap: 10px 12px; }
    .eval-kpi-label { font-size: .72rem; }
    .eval-kpi-value { font-size: 1.12rem; white-space: nowrap; }
    .eval-kpi-note { font-size: .72rem; line-height: 1.3; }
    .eval-vbars { gap: 4px; min-height: 100px; }
    .eval-vbar { min-width: 0; flex: 1 1 0; font-size: .64rem; }
    .eval-vbar-col { width: 70%; max-width: 26px; }
    .eval-vbar-badge { display: none; }
    .eval-vbar.is-backfilled .eval-vbar-col { background: repeating-linear-gradient(135deg, #b9d8c3 0 4px, #dcebe1 4px 8px); }
    .eval-vbar.is-backfilled.is-active .eval-vbar-col { background: repeating-linear-gradient(135deg, var(--primary) 0 4px, #8fbf9f 4px 8px); }
    .eval-vbar-note { display: block; font-size: .7rem; margin: 2px 0 0; }
    /* 3 Reiter in einer Zeile, wischbar, bleiben oben stehen */
    .eval-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: sticky; top: 56px; z-index: 6;
        background: var(--bg); margin: 10px -14px 12px; padding: 0 14px; }
    .eval-tabs::-webkit-scrollbar { display: none; }
    .eval-tabs .tab { padding: 10px 10px; font-size: .84rem; }
    /* 4 + 5 Legenden und Balken: Rest hinter „Weitere“ / „Alle anzeigen“; Sortennamen ganz */
    .eval-more { display: none !important; }
    .is-all > .eval-more { display: grid !important; }
    .eval-more-btn { display: inline-block; margin: 6px 6px 0; font-size: .85rem; }
    .eval-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 5px 4px; }
    .eval-bar-row .eval-bar-label { grid-column: 1; grid-row: 1; }
    .eval-bar-row .eval-bar-value { grid-column: 2; grid-row: 1; }
    .eval-bar-row .eval-bar-track { grid-column: 1 / -1; grid-row: 2; height: 10px; }
    .eval-bar-label { flex-direction: row; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
    .eval-bar-label span { white-space: normal; }
    .eval-class-legend { gap: 0 6px; }
    /* 6 Tabellen: nur wichtige Spalten, Zeile antippen = Rest */
    .eval-xtable .eval-xcol { display: none; }
    .eval-xtable tr.eval-xmain { cursor: pointer; }
    .eval-xchev { display: inline-block; margin-right: 6px; color: var(--muted); font-weight: 700; transition: transform .15s; }
    .eval-xmain.is-open .eval-xchev { transform: rotate(90deg); }
    .eval-xmain.is-open + .eval-xrow { display: table-row; }
    .eval-xrow > td { background: var(--hover); padding: 6px 10px 8px 24px; }
    .eval-xlist { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: .84rem; }
    .eval-xlist dt { color: var(--muted); font-weight: 600; }
    .eval-xlist dd { margin: 0; text-align: right; }
    .eval-xtable td.nowrap { white-space: normal; }
    .eval-xtable .eval-delta { display: block; font-size: .72rem; }
    .eval-xtable th, .eval-xtable td { padding-left: 6px; padding-right: 6px; }
    /* Umschalter (t/ha, Woche …) und Kopfzeilen der Karten umbrechen statt die Seite zu verbreitern */
    .eval-pane .card-head-row { flex-wrap: wrap; gap: 6px 10px; }
    .eval-pane .segmented { flex-wrap: wrap; max-width: 100%; border-radius: 14px; }
    .eval-donut-row { flex-direction: column; align-items: stretch; }
    .eval-donut-row .eval-donut { align-self: center; }
    .eval-legend { min-width: 0; width: 100%; flex: none; }
    .eval-legend .eval-legend-row { grid-template-columns: 12px minmax(0, 1fr) auto auto; row-gap: 0; }
    .eval-legend .eval-legend-pct { grid-column: 2 / -1; grid-row: 2; white-space: normal; font-size: .74rem; }
    .eval-legend .eval-legend-pct:empty { display: none; }
}

/* Datensicherung (ANNAHMEN 231) */
.backup-last { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--ok, #2f7a3e); }
.backup-last.is-old { color: var(--danger, #b3261e); }
.backup-headline { margin: 6px 0; }
.backup-diff { list-style: none; margin: 8px 0 12px; padding: 0; border-top: 1px solid var(--line); }
.backup-diff li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.backup-diff .bk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-chip { padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--hover); white-space: nowrap; }
.bk-chip.is-add { background: #e3f1e5; color: #22622f; }
.bk-chip.is-chg { background: #fdf1d8; color: #7a5300; }
.bk-chip.is-del { background: #fbe4e2; color: #8f1f17; }
.backup-other summary { cursor: pointer; margin: 4px 0; }
.backup-pick .danger-zone { margin-top: 12px; }
tr.is-selected td { background: var(--hover); }

/* Jahresmappe im Export-Menü (ANNAHMEN 233) */
.sd-export-menu .sd-export-book { border-top: 1px solid var(--line); font-weight: 600; }

/* Düngeplan: passende Dünger (ANNAHMEN 234) */
.plan-match { margin: 8px 0 4px; padding: 6px 10px; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.plan-match summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.plan-match ul { list-style: none; margin: 6px 0; padding: 0; }
.plan-match li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.plan-match li:first-child { border-top: 0; }
.plan-fit { background: var(--hover); }
/* Mittel: FiBL-Eintrag (ANNAHMEN 234) */
.pd-fibl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 10px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--hover); }
.pd-fibl-label { font-weight: 600; font-size: .85rem; }
.pd-fibl-edit { flex-basis: 100%; }
.pd-fibl-edit summary { cursor: pointer; }
.pd-fibl-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 6px 8px; align-items: end; margin-top: 6px; }
.pd-fibl-form label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
@media (max-width: 700px) { .pd-fibl-form { grid-template-columns: 1fr; } }

/* Nährstoffe je Feld (ANNAHMEN 235) */
.npk-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.npk-pick select { max-width: 100%; }
.npk-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; color: var(--muted); }
.npk-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.npk-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px 22px; }
@media (max-width: 700px) { .npk-charts { grid-template-columns: 1fr; } }
.npk-box h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 4px 0; }
.npk-box h3 .bal-plus, .npk-box h3 .bal-minus { margin-left: auto; font-weight: 600; }
.npk-chart { width: 100%; height: auto; display: block; }
.npk-chart .npk-grid { stroke: var(--line); stroke-width: 1; }
.npk-chart .npk-base { stroke: var(--muted); stroke-width: 1; }
.npk-chart .npk-ax { fill: var(--muted); font-size: 13px; }
.npk-chart .npk-saldo { fill: var(--muted); font-size: 13px; font-weight: 600; }
.npk-chart .npk-saldo.is-plus { fill: #2f7a3e; }
.npk-chart .npk-saldo.is-minus { fill: #b3261e; }
.npk-in { fill: #4f8f5b; background: #4f8f5b; }
.npk-out { fill: #e0913a; background: #e0913a; }
.npk-table td a { font-weight: 600; }

.npk-table .bal-minus, .npk-box .bal-minus { color: #b3261e; }
.npk-table .bal-plus, .npk-box .bal-plus { color: #2f7a3e; }
/* Spurführung: Bildschirm aus mit Traccar Client, Benachrichtigungen (ANNAHMEN 238) */
.trk-card h2 .icon, .trk-h .icon { vertical-align: -3px; }
.trk-token { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; margin: 8px 0; border-radius: var(--radius-sm); background: var(--hover); }
.trk-token code { font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; user-select: all; }
.trk-steps { margin: 8px 0 10px 1.2em; padding: 0; display: grid; gap: 4px; }
.trk-steps code { word-break: break-all; }
.trk-status, .trk-push { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.trk-status form { margin: 0; }
.trk-h { margin-top: 14px; }
.sr-trk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; }
/* Assistent „Handy einrichten“ (ANNAHMEN 239) */
.ps { display: grid; gap: 12px; max-width: 760px; }
.ps-step h2 { display: flex; align-items: center; gap: 10px; }
.ps-n { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hover); font-size: .95rem; font-weight: 700; flex: none; }
.ps-step.is-done .ps-n { background: var(--primary); color: #fff; }
.ps-step.is-done { border-color: var(--primary-soft); }
.ps-ok { color: var(--primary); margin-left: auto; }
.ps-ok .icon { width: 24px; height: 24px; }
.ps-list { margin: 6px 0 8px 1.2em; padding: 0; display: grid; gap: 4px; }
.ps-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ps-desk { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.ps-desk code { word-break: break-all; }
.ps-qr { background: #fff; padding: 8px; border-radius: var(--radius-sm); display: inline-block; line-height: 0; }
.ps-qr svg { max-width: 220px; height: auto; }
.ps-qr-box { margin-top: 10px; }
.sr-setup-hint { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--warning-soft); color: #6b4a00; text-decoration: none; font-size: .9rem; flex-basis: 100%; }
.sr-setup-hint .icon { flex: none; margin-top: 2px; }
.ph-state { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ps-keep { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; margin: 8px 0; border-radius: var(--radius-sm); background: var(--info-soft); font-size: .9rem; }
.ps-keep .icon { flex: none; margin-top: 2px; color: var(--info); }
.ps-keep p { margin: 4px 0 0; }
/* Jahresabschlüsse (ANNAHMEN 242) */
.fin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 900px) { .fin-grid { grid-template-columns: 1fr; } }
.fin-checks ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; font-size: .9rem; }
.fin-chk { display: flex; gap: 6px; align-items: flex-start; }
.fin-chk .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.fin-chk-ok { color: var(--primary-dark); }
.fin-chk-bad { color: var(--danger); }
.fin-chk-na { color: var(--muted, #7c8580); }
.fin-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 8px; align-items: end; }
.fin-totals label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fin-totals .fin-note { grid-column: 1 / -1; }
.fin-upload form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fin-pages { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 520px; overflow: auto; }
.fin-page { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px; border-radius: var(--radius-sm); background: var(--hover); }
.fin-page-failed { outline: 1px solid var(--danger); }
.fin-thumb { width: 56px; height: 72px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 4px; background: #fff; }
.fin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fin-page-info { display: flex; flex-direction: column; min-width: 0; }
.fin-page-act { display: flex; gap: 4px; align-items: center; }
.fin-page-act form { margin: 0; }
.fin-lines { margin-bottom: 12px; }
.fin-edit input[type="text"], .fin-edit select { width: 100%; min-width: 0; padding: 4px 6px; font-size: .88rem; }
.fin-edit td { padding: 3px 4px; vertical-align: top; }
.fin-edit .fin-acc-in { width: 7.5em; }
.fin-edit .fin-num, .fin-cult .fin-num { text-align: right; }
.fin-edit tr.fin-err { background: var(--danger-soft); }
.fin-extra { display: block; margin-top: 2px; }
.fin-filter { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: end; }
.fin-filter label { display: flex; flex-direction: column; gap: 2px; }
.fin-notes ul { margin: 6px 0 0 1.1em; padding: 0; display: grid; gap: 2px; font-size: .92rem; }
.fin-chart { width: 100%; height: 280px; }
.fin-chart-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fin-cmp tbody tr[data-fin-row] { cursor: pointer; }
.fin-cmp tbody tr[data-fin-row]:hover, .fin-cmp tbody tr.is-sel { background: var(--hover); }
.fin-cmp tbody th { font-weight: 500; white-space: normal; }
.fin-cmp .fin-sec th { background: var(--hover); font-weight: 700; padding-top: 10px; }
.fin-cmp td.fin-up { color: var(--primary-dark); font-weight: 600; }
.fin-cmp td.fin-down { color: var(--danger); font-weight: 600; }
.fin-acc select { min-width: 12em; }
.fin-acc tr.fin-new-acc { background: var(--warning-soft); }
.fin-cult input { width: 6.5em; padding: 3px 5px; }
.fin-cult .fin-pct { width: 4em; }
.fin-cult input[data-src="obsthof"] { background: var(--primary-soft); }
.fin-cult-h { text-align: center; border-left: 1px solid var(--border, #e3e6e4); }
.fin-sync { margin-bottom: 10px; }
@media print { .fin-filter, .tabs, .fin-chart-card { display: none !important; } }
.fin-alloc-cell label { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.fin-alloc-cell label + label { margin-top: 4px; }
.fin-alloc-cell select { min-width: 9.5em; }
/* Auswertung im Fenster des Hofbüros (ANNAHMEN 270): Filter als eine Zeile wie auf dem Handy */
@media (max-width: 1150px) {
    html.in-beam .eval-filter-sum { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .92rem; }
    html.in-beam .eval-filter-sum .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
    html.in-beam .eval-filter-sum > span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html.in-beam .eval-filter-change { color: var(--primary-dark); font-size: .82rem; white-space: nowrap; }
    html.in-beam .eval-filter-change::after { content: ' ▾'; }
    html.in-beam .eval-filter[open] .eval-filter-change::after { content: ' ▴'; }
    html.in-beam .eval-filter[open] > summary { margin-bottom: 10px; }
}

/* Düngeplan als Liste, Nährstoffvergleich auf einen Blick, Bodenproben als Karten, Karten-Ansicht merken (ANNAHMEN 283) – nur im Hofbüro (html.in-beam), die normalen Seiten bleiben wie vorher */
html.in-beam .plan-card:not(.is-open) { padding-top: 10px; padding-bottom: 10px; }
html.in-beam .plan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
html.in-beam .plan-open { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 10px;
    padding: 4px 10px; cursor: pointer; color: inherit; font: inherit; }
html.in-beam .plan-open:hover { border-color: var(--primary); }
html.in-beam .plan-mini { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 8px; border-radius: 8px; background: var(--surface-2, #f4f6f2); font-size: .8rem; }
html.in-beam .plan-mini b { font-variant-numeric: tabular-nums; }
html.in-beam .plan-mini.plan-ok { background: color-mix(in srgb, #3f8f2a 16%, transparent); }
html.in-beam .plan-mini.plan-low { background: color-mix(in srgb, #e0a32c 22%, transparent); }
html.in-beam .plan-mini.plan-high { background: color-mix(in srgb, #c23b2f 16%, transparent); }
html.in-beam .plan-chev { color: var(--muted); }
html.in-beam .plan-body { margin-top: 10px; }
html.in-beam .bal-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 10px 0 6px; }
html.in-beam .bal-glance-card { padding: 14px 16px; border-top: 4px solid var(--muted); }
html.in-beam .bal-glance-card.bal-plus { border-top-color: #3f8f2a; }
html.in-beam .bal-glance-card.bal-minus { border-top-color: #e0a32c; }
html.in-beam .bal-glance-card header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
html.in-beam .bal-glance-card header strong { font-size: 1.1rem; }
html.in-beam .bal-glance-saldo { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
html.in-beam .bal-glance-saldo small { font-size: .7rem; font-weight: 400; color: var(--muted); }
html.in-beam .bal-plus .bal-glance-saldo { color: #3f8f2a; }
html.in-beam .bal-minus .bal-glance-saldo { color: #b7700a; }
html.in-beam .bal-glance-row { display: grid; grid-template-columns: 110px 1fr 54px; align-items: center; gap: 8px; margin-bottom: 6px; }
html.in-beam .bal-glance-row b { text-align: right; font-variant-numeric: tabular-nums; }
html.in-beam .bal-glance-bar { height: 12px; border-radius: 6px; background: var(--surface-2, #eef1ec); overflow: hidden; }
html.in-beam .bal-glance-bar i { display: block; height: 100%; border-radius: 6px; }
html.in-beam .bal-glance-bar i.is-in { background: #4c9a2a; }
html.in-beam .bal-glance-bar i.is-out { background: #e0832c; }
html.in-beam .bal-more { margin-top: 8px; }
html.in-beam .bal-more > summary { cursor: pointer; font-weight: 600; padding: 10px 2px; color: var(--primary-dark); }
html.in-beam .soil-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
html.in-beam .soil-cards .soil-card { margin: 0; }
html.in-beam .soil-latest-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
html.in-beam .soil-tools { display: inline-flex; gap: 2px; align-items: center; }
html.in-beam .soil-tools form { display: inline; }
html.in-beam .soil-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
html.in-beam .soil-tile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; border-radius: 10px; background: var(--surface-2, #f4f6f2); text-align: center; }
html.in-beam .soil-tile small { color: var(--muted); font-size: .7rem; }
html.in-beam .soil-tile b { font-size: 1.2rem; }
html.in-beam .soil-tile.is-low { background: color-mix(in srgb, #e0a32c 25%, transparent); }
html.in-beam .soil-c-a { background: color-mix(in srgb, #c23b2f 22%, transparent); }
html.in-beam .soil-c-b { background: color-mix(in srgb, #e0a32c 24%, transparent); }
html.in-beam .soil-c-c { background: color-mix(in srgb, #3f8f2a 22%, transparent); }
html.in-beam .soil-c-d { background: color-mix(in srgb, #2f6fa8 18%, transparent); }
html.in-beam .soil-c-e { background: color-mix(in srgb, #2f6fa8 32%, transparent); }
html.in-beam .soil-older { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
html.in-beam .soil-older-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; align-items: center; }
html.in-beam .sd-map-tools { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
@media (max-width: 700px) { html.in-beam .soil-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } html.in-beam .soil-cards { grid-template-columns: 1fr; } }
html:not(.in-beam) .bal-glance, html:not(.in-beam) .bal-glance-note, html:not(.in-beam) .soil-beam, html:not(.in-beam) .sd-map-tools { display: none; }
html:not(.in-beam) .bal-more > summary { display: none; }
html.in-beam .soil-std { display: none; }

/* Knopf „Frag den Hof“ (ANNAHMEN 312) */
.assist-fab { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; box-shadow: var(--shadow-lg); text-decoration: none; }
.assist-fab:hover { background: var(--primary-dark); text-decoration: none; }
.assist-fab .icon { width: 22px; height: 22px; }
html.in-farm3d .assist-fab { display: none; }
@media (max-width: 900px) { .assist-fab { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); width: 44px; height: 44px; } }
@media print { .assist-fab { display: none; } }

/* Regenradar (ANNAHMEN 313) */
.rain-radar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 10px 14px; margin: 12px 0; color: inherit; }
a.rain-radar:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--primary); }
.rain-radar.is-soon, .rain-radar.is-now { border-color: var(--primary); background: var(--primary-soft); }
.rain-radar-text { display: inline-flex; align-items: center; gap: 8px; }
.rain-radar-name { display: block; line-height: 1.2; }
.rain-radar-chart { flex: 1 1 200px; max-width: 420px; display: block; }
.rain-radar-chart svg { display: block; width: 100%; height: 34px; }
.rain-radar-chart rect { fill: var(--line); }
.rain-radar-chart rect.is-wet { fill: #3b82d6; }
.rain-radar-chart rect.is-gap { fill: transparent; }
.rain-radar-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); }
.rain-radar-at { margin-left: auto; }
/* Wetter-Kachel der Startseite (Nutzer 12.11.2026, ANNAHMEN 482/485): zugeklappt eine Zeile Wetterstation + Regenradar,
   ein Klick lässt darunter 3 Tage Regen und die kleine Regenkarte aufgleiten */
.wx-tile { margin: 12px 0; padding: 0; overflow: hidden; }
.wx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; position: relative; }
.wx-head[data-wx-toggle] { cursor: pointer; padding-right: 46px; -webkit-tap-highlight-color: transparent; transition: background-color .15s ease; }
.wx-head[data-wx-toggle]:hover { background: var(--hover); }
.wx-head[data-wx-toggle]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.wx-station { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.wx-temp, .wx-val { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.wx-temp b { font-size: 1.15rem; font-weight: 700; }
.wx-temp .icon, .wx-val .icon { width: 17px; height: 17px; color: var(--muted); }
.wx-val { font-size: .9rem; }
.wx-val.is-wet { color: #2563a8; font-weight: 600; }
.wx-val.is-wet .icon { color: #3b82d6; }
.wx-head .rain-radar { margin: 0; padding: 0; border: 0; background: none; flex: 1 1 300px; min-width: 0; }
.wx-head .rain-radar.is-soon, .wx-head .rain-radar.is-now { background: none; }
.wx-head .rain-radar-at { display: none; }
.wx-station + .rain-radar { padding-left: 16px; border-left: 1px solid var(--line); }
.wx-chev { position: absolute; right: 12px; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; background: var(--hover); color: var(--muted); transition: rotate .25s ease, background-color .15s; }
.wx-chev .icon { width: 18px; height: 18px; }
.wx-tile.is-open .wx-chev { rotate: 180deg; background: var(--primary-soft); color: var(--primary-dark); }
.wx-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.wx-tile.is-open .wx-more { grid-template-rows: 1fr; }
.wx-more-in { overflow: hidden; min-height: 0; }
.wx-more-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 36%); border-top: 1px solid var(--line); }
.wx-more-main { display: flex; flex-direction: column; min-width: 0; }
.wx-details { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 14px 6px; }
.wx-links { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 4px 14px 12px; margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .wx-more, .wx-chev { transition: none; } }
@media (max-width: 760px) {
    .wx-station + .rain-radar { padding-left: 0; border-left: 0; }
    .wx-more-grid { grid-template-columns: 1fr; }
}
.rain-days { padding: 10px 14px 8px; display: flex; flex-direction: column; gap: 4px; }
.rain-days-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.rain-days-sum { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; }
.rain-days-sum b { font-weight: 600; }
.rain-days-chart { display: block; width: 100%; height: 56px; }
.rain-days-chart rect { fill: var(--line); }
.rain-days-chart rect.is-wet { fill: #3b82d6; }
.rain-days-chart rect.is-gap { fill: transparent; }
.rain-days-sep { stroke: var(--line-strong, #c9cfc4); stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.rain-days-axis { position: relative; height: 1.1em; font-size: .72rem; color: var(--muted); }
.rain-days-axis span { position: absolute; top: 0; white-space: nowrap; }
.rain-days-axis span + span { transform: translateX(3px); }
.rain-days-src { font-size: .7rem; }
.rain-mini { position: relative; display: block; min-height: 200px; border-left: 1px solid var(--line); color: inherit; background: #e9ece5; }
.rain-mini-map { position: absolute; inset: 0; }
.rain-mini .leaflet-container { background: #e9ece5; cursor: pointer; font: inherit; }
.rain-mini-time, .rain-mini-open { position: absolute; z-index: 500; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .88);
    font-size: .74rem; font-weight: 600; color: #22301c; pointer-events: none; }
.rain-mini-time { left: 8px; top: 8px; font-variant-numeric: tabular-nums; }
.rain-mini-time:empty { display: none; }
.rain-mini-time.is-ahead { background: #3f7fd8; color: #fff; }   /* Vorhersage (ANNAHMEN 487) */
.rain-mini-open { right: 8px; bottom: 8px; }
@media (max-width: 760px) {
    .rain-mini { min-height: 210px; border-left: 0; border-top: 1px solid var(--line); }
}
/* Handy-Leiste oben: Scannen, Ernteetikett, Spritzen als Symbole neben dem Stern (ANNAHMEN 483) */
/* eine weiche Leiste aus drei runden Feldern in der Hausfarbe; die geöffnete Seite liegt hell obenauf (ANNAHMEN 484) */
.topbar-acts { display: none; }
@media (max-width: 959px) {
    .topbar { gap: .5rem; }
    .topbar-acts { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 15px; flex: none;
        background: var(--primary-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 14%, transparent); }
    .topbar-act { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 34px; border-radius: 12px;
        color: var(--primary-dark); -webkit-tap-highlight-color: transparent; transition: background-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease; }
    .topbar-act .icon { width: 21px; height: 21px; stroke-width: 1.9; }
    .topbar-act:hover { background: color-mix(in srgb, var(--card) 60%, transparent); text-decoration: none; }
    .topbar-act:active { transform: scale(.92); }
    .topbar-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
    .topbar-act.is-on { background: var(--card); color: var(--primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .03); }
}
@media (max-width: 380px) {
    .topbar-act { width: 34px; }
}
/* Spurführung: Traccar-Teil zum Aufklappen (ANNAHMEN 483) */
.trk-card > summary { list-style: none; cursor: pointer; }
.trk-card > summary::-webkit-details-marker { display: none; }
.trk-card > summary h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.trk-card > summary::after { content: '›'; float: right; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.trk-card[open] > summary::after { transform: rotate(90deg); }
.trk-card[open] > summary { margin-bottom: 10px; }
/* Offene Spurführung auf der Startseite (Nutzer 12.11.2026, ANNAHMEN 484) */
.dash-runs { margin: 12px 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.dash-runs .card-head { margin: 0; }
.dash-run { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--hover); }
.dash-run-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: inherit; }
.dash-run-main:hover { text-decoration: none; }
.dash-run-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dash-run .sr-prog { margin: 0; }
@media (max-width: 600px) {
    .dash-run { grid-template-columns: 1fr; }
    .dash-run .btn { justify-self: start; }
}
.dash-cols-emp { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

/* „Nächste Lieferschein-Nummer übernehmen“ (ANNAHMEN 314) */
.scan-next-dn, [data-out-next] { margin: 2px 0 10px; border: 1px solid var(--line-strong); }
[data-out-next] { margin-top: 6px; }
[data-out-last] { display: block; }

/* Kistenfoto gegen Sortierung, Herkunft des Klassenmixes (ANNAHMEN 325) */
.bp-cmp-list { display: grid; gap: 6px; }
.bp-cmp { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.bp-cmp > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.bp-cmp-field { margin-left: 18px; }
.bp-cmp-mid { margin-left: auto; }
.bp-cmp .table-wrap { margin-top: 6px; }
.bp-cmp td.bp-cmp-big { font-weight: 700; color: #8a5d00; }
.he-source { color: var(--muted); margin-top: 2px; }
@media (max-width: 700px) { .bp-cmp-field { margin-left: 8px; } .bp-cmp-mid { margin-left: 0; } }

/* ---- Händler-Abrechnungen (ANNAHMEN 328) ---- */
.ts-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.ts-pick .btn { cursor: pointer; }
.ts-queue { margin: 4px 0 8px; padding-left: 20px; font-size: .9rem; }
.ts-queue li { display: flex; align-items: center; gap: 6px; }
.ts-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
@media (max-width: 900px) { .ts-grid { grid-template-columns: 1fr; } }
.ts-file-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ts-file-list li { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 96px; text-align: center; overflow-wrap: anywhere; }
.ts-thumb { width: 72px; height: 96px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 4px; background: #fff; border: 1px solid var(--line); }
.ts-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ts-siblings { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.ts-siblings .chip.is-active { background: var(--primary); color: #fff; }
.ts-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .92rem; }
.ts-hints li::before { content: '• '; }
.ts-hint-good { color: var(--primary-dark); }
.ts-hint-good::before { content: '✓ ' !important; }
.ts-hint-bad { color: var(--danger); }
.ts-hint-warn { color: #a86b00; }
.ts-group h3 { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ts-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 16px; margin: 6px 0 10px; }
.ts-compare > div { display: flex; flex-direction: column; gap: 2px; }
.ts-ok { display: inline-flex; vertical-align: -3px; }
.ts-ok .icon { width: 16px; height: 16px; }
.ts-ok-yes { color: var(--primary-dark); }
.ts-ok-no { color: var(--danger); }
.ts-unused td { color: var(--muted, #7c8580); }
.ts-edit summary { list-style: none; }
.ts-edit summary::-webkit-details-marker { display: none; }
.ts-edit[open] { position: relative; }
.ts-edit-form { position: absolute; right: 0; z-index: 5; width: min(340px, 86vw); background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); display: grid; gap: 6px; }
.ts-edit-form .field { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.ts-edit-form input, .ts-edit-form select { width: 100%; }
@media (max-width: 700px) { .ts-edit-form { position: fixed; left: 8px; right: 8px; top: 20%; width: auto; } }
.ts-file-list li .small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.ts-rows td.num, .ts-lines td.num { white-space: nowrap; }

/* ---- Bio-Zertifikate (ANNAHMEN 329) ---- */
.oc-actions { display: flex; gap: 2px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.oc-actions form { margin: 0; }
.oc-dialog { width: min(640px, 94vw); max-height: 86dvh; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: var(--card, #fff); color: inherit; }
.oc-dialog::backdrop { background: rgba(0,0,0,.35); }
.oc-dialog-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }
.oc-dialog-search { display: flex; gap: 6px; }
.oc-dialog-search input { flex: 1; min-width: 0; }
.oc-hits { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; overflow: auto; max-height: 60dvh; }
.oc-hits li { display: flex; gap: 8px; justify-content: space-between; align-items: center; padding: 8px; border-radius: var(--radius-sm); background: var(--hover); }
.oc-hits li > div { min-width: 0; }

/* ---- Eingangsrechnungen aus Paperless (ANNAHMEN 330) ---- */
.pl-settings { display: grid; gap: 12px; margin-top: 8px; }
.pl-actions { display: flex; gap: 2px; justify-content: flex-end; }
.pl-actions form { margin: 0; }
.pl-cat { max-width: 190px; }
.pl-cat.pl-saved { outline: 2px solid var(--primary); }
.pl-cat.pl-error { outline: 2px solid var(--danger); }
.pl-more summary { cursor: pointer; color: var(--muted, #7c8580); }
.pl-more ul { margin: 4px 0; padding-left: 18px; }
.pl-dup { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 400; }
.pl-dup-form { display: inline-flex; gap: 4px; }
.pl-cmp-row > td { padding-top: 0; }
.pl-trash { margin-top: 6px; }
.pl-cmp summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.pl-cmp-table th:first-child { width: 110px; }
.pl-cmp-table .pl-diff td { background: var(--warning-soft); font-weight: 700; }
.pl-cmp-pdfs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.pl-cmp-pdfs iframe { width: 100%; height: 640px; border: 1px solid var(--border, #e3e7e4); border-radius: 6px; background: #fff; }
@media (max-width: 900px) { .pl-cmp-pdfs { grid-template-columns: 1fr; } .pl-cmp-pdfs iframe { height: 460px; } }
.pl-dup-row td > strong, .pl-dup-row .num { opacity: .55; }
.pl-dup-row .num { text-decoration: line-through; }
.pl-progress { margin: 8px 0; }
.pl-progress-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.pl-pct { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.pl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--muted, #7c8580); flex: none; }
.pl-dot.is-aktiv { background: var(--primary); animation: pl-pulse 1.4s ease-in-out infinite; }
.pl-dot.is-wartet { background: #d9a400; }
.pl-dot.is-fertig { background: var(--primary); }
@keyframes pl-pulse { 50% { opacity: .35; transform: scale(.8); } }
.pl-bar { height: 10px; border-radius: 5px; background: var(--border, #e3e7e4); overflow: hidden; }
.pl-bar span { display: block; height: 100%; border-radius: 5px; background: var(--primary); transition: width .4s ease; }
.pl-bar span.is-moving { background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); background-size: 60px 100%; background-repeat: no-repeat; animation: pl-move 1.3s linear infinite; }
@keyframes pl-move { from { background-position: -60px 0; } to { background-position: calc(100% + 60px) 0; } }
@media (prefers-reduced-motion: reduce) { .pl-dot.is-aktiv, .pl-bar span.is-moving { animation: none; } }
.pl-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.pl-sort:hover { text-decoration: underline; }
.pl-split summary { cursor: pointer; color: var(--muted, #7c8580); margin-top: 4px; }
.pl-split-form { display: grid; gap: 6px; margin-top: 6px; min-width: 260px; }
.pl-split-row { display: flex; gap: 6px; }
.pl-split-row select { flex: 1; min-width: 0; }
.pl-split-row input { width: 100px; }
.pl-parts { margin: 4px 0 0; padding-left: 16px; }
/* Darstellung „Dinge des Hofs“ (ANNAHMEN 364) und Suche Strg+K (ANNAHMEN 365) */
.nav-things { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-things .nav-link { font-weight: 500; }
.nav-things-gap { height: 14px; }
.ui-nav-dinge i { width: 16px; } .ui-nav-dinge b { top: 4px; height: 6px; bottom: auto; border-radius: 3px; }
.ui-nav-dinge b::after { content: ""; position: absolute; left: -1px; right: -1px; top: 8px; height: 26px; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.searchbar { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.searchbar-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px;
    padding: 9px 14px; color: var(--muted); font: inherit; text-align: left; cursor: text; }
.searchbar-field:hover { border-color: var(--primary); }
.searchbar-field .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.searchbar-ph { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbar kbd, .search-foot kbd { font: inherit; font-size: .72rem; border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.searchbar-btn { white-space: nowrap; }
html[data-nav="dinge"] .pagebar { margin-top: 0; }
.thing-select { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.thing-select select { width: auto; min-width: 220px; }
.search-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(30, 34, 26, .32); display: flex; justify-content: center; align-items: flex-start; padding: 8vh 12px 12px; }
.search-overlay[hidden] { display: none; }
.search-box { width: 100%; max-width: 640px; max-height: 80vh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-strong);
    border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.search-in .icon { width: 20px; height: 20px; color: var(--muted); flex: 0 0 auto; }
.search-in input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.05rem; padding: 4px 0; box-shadow: none; min-width: 0; }
.search-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; flex: 0 0 auto; }
.search-close:hover { background: var(--hover); color: var(--text); }
.search-close .icon { width: 18px; height: 18px; }
.search-list { overflow-y: auto; padding: 4px 0 8px; }
.search-grp { font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); padding: 10px 16px 4px; }
.search-hit { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 16px; color: var(--text); text-decoration: none; }
.search-hit.is-sel { background: var(--primary-soft); }
.search-hit em { font-style: normal; font-weight: 700; }
.search-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-kind { flex: 0 0 auto; font-size: .72rem; color: var(--muted); background: var(--surface-2); border-radius: 5px; padding: 2px 7px; }
.search-ask .search-label { color: var(--primary-dark); font-weight: 600; }
.search-empty { padding: 18px 16px; color: var(--muted); }
.search-foot { border-top: 1px solid var(--line); padding: 8px 16px; font-size: .72rem; color: var(--muted); }
html.search-open { overflow: hidden; }
@media (max-width: 719px) {
    .searchbar { margin-bottom: 10px; }
    .search-overlay { padding: 0; }
    .search-box { max-width: none; max-height: 100%; height: 100%; border-radius: 0; border: 0; }
    .thing-select { display: flex; } .thing-select select { flex: 1; min-width: 0; }
}
@media (max-width: 959px) {
    html[data-nav="dinge"] .pagebar { display: block; margin: 0 0 12px; }   /* Reiter des Dings auch am Handy (Bereich + Stern stehen oben) */
    html[data-nav="dinge"] .pagebar-row { display: none; }
    html[data-nav="dinge"] .pagebar .tabs { margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    html[data-nav="dinge"] .pagebar .tabs::-webkit-scrollbar { display: none; }
    html[data-nav="dinge"] .pagebar .tab { flex: 0 0 auto; }
}
.searchbar-box { flex: 1; min-width: 0; position: relative; display: flex; }
@media print { .searchbar, .search-overlay { display: none !important; } }
/* Startseite Stufe C (ANNAHMEN 366): Jahreslauf, Was ansteht, rechte Spalte */
.dash-phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0 0 14px; }
.dash-phase { text-align: center; font-size: .8rem; padding: 7px 4px; border-radius: 8px; background: var(--surface-2, var(--hover)); color: var(--muted);
    border: 1px solid var(--line); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.dash-phase:hover { border-color: var(--line-strong); color: var(--text); }
.dash-phase.is-on { background: var(--primary-soft); color: var(--primary-dark); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); font-weight: 600; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 16px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-side .dash-sec, .dash-cols .dash-agenda { margin: 0; }
.dash-grp { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }
.dash-agenda h2 + .dash-grp { margin-top: 4px; }
.dash-grp-now { color: var(--danger); }
.dash-done { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.dash-stat { background: var(--surface-2, var(--hover)); border-radius: 9px; padding: 8px 10px; color: var(--text); text-decoration: none; }
.dash-stat b { display: block; font-size: 1.05rem; }
.dash-stat span { font-size: .72rem; color: var(--muted); }
.dash-list { display: flex; flex-direction: column; }
.dash-li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.dash-li:last-child { border-bottom: 0; }
a.dash-li:hover span:first-child { color: var(--primary-dark); }
.dash-li.is-bad, .dash-li.is-bad .small { color: var(--danger); font-weight: 600; }
@media (max-width: 1099px) { .dash-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .dash-phases { grid-template-columns: repeat(5, minmax(100px, 1fr)); overflow-x: auto; scrollbar-width: none; } .dash-phase { font-size: .72rem; } }
/* Steckbrief-Knöpfe (Stufe D, ANNAHMEN 367) */
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
@media (max-width: 640px) { .profile-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .profile-actions .btn { flex: 0 0 auto; } }
.plink { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 45%, transparent); text-underline-offset: 2px; }
.plink:hover { color: var(--primary-dark); text-decoration-color: currentColor; }
/* Handy „Dinge des Hofs“ (Stufe E, ANNAHMEN 368): Scan und Etikett als Symbol-Knöpfe neben der Suche */
@media (max-width: 719px) { .searchbar { gap: 8px; } .searchbar-btn { padding: 9px 11px; } .searchbar-btn span { display: none; } .searchbar-btn .icon { margin: 0; } }
/* ==========================================================================
   Darstellung „Werkbank“ (Nutzer 07.11.2026, ANNAHMEN 369): kein Seitenmenü, Kopfleiste mit Brotkrume und Befehlsfeld,
   Seitenfenster rechts, Statusleiste unten, dichter. Farben: eigene Themen „werkbank“ (hell) und „werkbank-dunkel“.
   ========================================================================== */
html[data-theme="werkbank"] {
    --bg: #f6f5f1; --card: #fcfcfa; --surface: #fcfcfa; --surface-2: #f1f0eb; --hover: #ecebe5;
    --text: #1e2119; --muted: #747a6e; --line: rgba(30, 30, 20, .09); --line-strong: rgba(30, 30, 20, .18);
    --primary: #5f7a46; --primary-dark: #4b6136; --primary-soft: #e9efdf;
    --danger: #b2452f; --danger-soft: #f6e5df; --warning: #a8770f; --warning-soft: #faf0d8; --info: #3d6a86; --info-soft: #e4eef3;
    --radius: 10px; --radius-sm: 7px; --shadow: none; --shadow-lg: 0 16px 50px rgba(20, 25, 10, .18);
    --side-bg: #f1f0eb; --side-text: var(--text); --side-muted: var(--muted); --side-hover: rgba(0,0,0,.05); --side-active-bg: var(--primary); --side-active-text: #fff;
}
html[data-theme="werkbank-dunkel"] {
    --bg: #141613; --card: #1b1e19; --surface: #1b1e19; --surface-2: #20241e; --hover: #262b24;
    --text: #e8eae3; --muted: #9ba195; --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .16);
    --primary: #9db57a; --primary-dark: #b7cc98; --primary-soft: #26301f;
    --danger: #e07b64; --danger-soft: #3a241e; --warning: #d9a73a; --warning-soft: #352c17; --info: #7fa7c4; --info-soft: #1e2a33;
    --radius: 10px; --radius-sm: 7px; --shadow: none; --shadow-lg: 0 16px 50px rgba(0, 0, 0, .5);
    --side-bg: #1b1e19; --side-text: var(--text); --side-muted: var(--muted); --side-hover: rgba(255,255,255,.06); --side-active-bg: var(--primary); --side-active-text: #141613;
    color-scheme: dark;
}
html[data-theme^="werkbank"] .card { border: 1px solid var(--line); }
html[data-theme^="werkbank"] .table th { font-size: .7rem; letter-spacing: .05em; }
html[data-theme^="werkbank"] .table td { padding: 8px 12px; }
html[data-theme^="werkbank"] .btn { box-shadow: none; }
html[data-theme^="werkbank"] h1 { letter-spacing: -.015em; }

/* Rahmen */
body.wb { display: block; }
body.wb .sidebar-backdrop { }
.wb-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.wb-brand { font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.wb-crumbs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-crumbs a:hover { color: var(--text); }
.wb-crumbs b { color: var(--text); font-weight: 600; }
.wb-sep { color: var(--line-strong); }
.wb-cmd { margin-left: auto; display: flex; align-items: center; gap: 10px; width: min(380px, 40vw); border: 1px solid var(--line-strong); background: var(--bg); border-radius: 8px; padding: 5px 10px; color: var(--muted); font: inherit; font-size: .85rem; cursor: text; text-align: left; }
.wb-cmd:hover { border-color: var(--primary); }
.wb-cmd .icon { width: 16px; height: 16px; flex: 0 0 auto; }
.wb-cmd span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-top kbd, .wb-status kbd, .wb-peek kbd { font: 600 .7rem/1 var(--font); border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 5px; color: var(--muted); background: var(--card); }
.wb-quick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 10px; font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.wb-quick .icon { width: 16px; height: 16px; }
.wb-quick.is-pri { background: var(--primary); border-color: var(--primary); color: #fff; }
.wb-quick.is-active { background: var(--primary-soft); color: var(--primary-dark); }
.wb-user { position: relative; }
.wb-user summary { list-style: none; cursor: pointer; }
.wb-user summary::-webkit-details-marker { display: none; }
.wb-menu { position: absolute; right: 0; top: 38px; width: 240px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; display: flex; flex-direction: column; }
.wb-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.wb-menu a, .wb-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.wb-menu a:hover, .wb-menu button:hover { background: var(--hover); }
.wb-menu .icon { width: 16px; height: 16px; color: var(--muted); }
.wb-langs { display: flex; gap: 4px; padding: 4px 10px 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.wb-langs button { width: auto; padding: 4px 8px; font-size: .8rem; color: var(--muted); }
.wb-langs button.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
body.wb .main { margin-left: 0; max-width: none; padding: 18px 24px 64px; }
body.wb .pagebar { margin-top: 0; }
body.wb .pagebar-row { display: none; }   /* Bereich und Stern stehen in der Kopfleiste */
body.wb .pagebar .tabs { margin-top: 0; }
.wb-fav { padding: 6px; color: var(--muted); }
.wb-fav.is-on { color: var(--warning); }
body.wb .wb-status { position: fixed; left: 0; right: 0; bottom: 0; height: 28px; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: var(--card); border-top: 1px solid var(--line); font-size: .72rem; color: var(--muted); z-index: 30; }
.wb-status-right { margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Seitenfenster */
.wb-peek { position: fixed; top: 46px; right: 0; bottom: 28px; width: min(560px, 46vw); background: var(--card); border-left: 1px solid var(--line); z-index: 35; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(20, 25, 10, .08); }
.wb-peek[hidden] { display: none; }
html.wb-peek-open body.wb .main { padding-right: calc(min(560px, 46vw) + 24px); }
.wb-peek-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.wb-peek-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-peek-sp { flex: 1; }
.wb-peek-open { display: inline-flex; padding: 6px; border-radius: 6px; color: var(--muted); }
.wb-peek-open:hover { background: var(--hover); color: var(--text); }
.wb-peek-body { overflow: auto; padding: 14px 18px 24px; }
.wb-peek-body .page-head h1 { font-size: 1.25rem; }
.wb-peek-body .kpi-grid, .wb-peek-body .vp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.wb-peek-body .vp-cols, .wb-peek-body .fp-cols, .wb-peek-body .cp-cols, .wb-peek-body .ep-cols { grid-template-columns: minmax(0, 1fr) !important; }
.wb-peek-body .fp-map, .wb-peek-body .leaflet-container { display: none; }
.wb-peek-loading { padding: 40px; text-align: center; color: var(--muted); }
body.wb .wb-row-on > td, body.wb .wb-row-on { background: var(--primary-soft) !important; }
/* Steckbriefe als Dokument (Kombination, ANNAHMEN 369): große Überschrift, Titelstreifen, Haarlinien */
body.wb .page-head + .profile-actions, body.wb .profile-actions + .yearscope-bar { }
body.wb #main > .page-head:has(+ .profile-actions) h1 { font-size: 2rem; }
body.wb .profile-actions { margin: 2px 0 20px; }
body.wb .profile-actions .btn { border-radius: 8px; }
/* Handy: Kopfleiste schlank, Seitenfenster als ganze Seite, Statusleiste weg */
@media (max-width: 959px) {
    .wb-top { height: 52px; gap: 8px; padding: 0 10px; }
    .wb-crumbs, .wb-brand { display: none; }
    .wb-top { overflow: hidden; }
    .wb-top > * { min-width: 0; flex-shrink: 0; }
    .wb-cmd { width: auto; flex: 1 1 0; margin-left: 0; flex-shrink: 1; }
    .wb-cmd kbd { display: none; }
    .wb-quick { padding: 7px 9px; }
    .wb-quick span { display: none; }
    body.wb .wb-status { display: none; }
    .wb-peek { top: 0; bottom: 0; width: 100%; box-shadow: none; }
    html.wb-peek-open body.wb .main { padding-right: 24px; }
    body.wb .main { padding: 12px 14px 90px; }
    .wb-menu { position: fixed; top: 54px; right: 10px; }
}
@media (min-width: 960px) {
    body.wb .sidebar, body.wb .sidebar-backdrop { display: none; }
}
@media print { .wb-top, .wb-status, .wb-peek { display: none !important; } }
/* Hofkarte (ANNAHMEN 369) */
.fm { position: relative; height: calc(100vh - 46px - 28px - 36px - 60px); min-height: 520px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #1d2a1c; }
body:not(.wb) .fm { height: calc(100vh - 150px); }
.fm-map { position: absolute; inset: 0; }
/* Karte füllt den grünen Kasten bis unten (vorher erbte sie die Höhe der Feldmarkierungs-Karte), mit schmalem grünem Rand (Nutzer 12.11.2026, ANNAHMEN 494) */
.fm > .fm-map { inset: 6px; height: auto; border: 0; border-radius: calc(var(--radius) - 4px); overflow: hidden; }
.fm-views { position: absolute; top: 12px; left: 12px; z-index: 500; display: flex; gap: 4px; background: rgba(252,251,246,.85); backdrop-filter: blur(12px); border-radius: 12px; padding: 4px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.fm-view { white-space: nowrap; flex: none; border: 0; background: transparent; font: inherit; font-size: .82rem; font-weight: 600; color: #5b6152; padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.fm-view.is-on { background: var(--primary); color: #fff; }
.fm-legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: flex; gap: 12px; background: rgba(252,251,246,.85); backdrop-filter: blur(12px); border-radius: 10px; padding: 6px 10px; font-size: .75rem; color: #3a3f33; }
.fm-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fm-sheet { position: absolute; top: 12px; right: 12px; max-height: calc(100% - 24px); width: 340px; z-index: 500; background: rgba(252,251,246,.9); backdrop-filter: blur(16px); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.28); padding: 16px 18px; color: #22261c; overflow: auto; display: flex; flex-direction: column; }
.fm-sheet-empty { margin: auto; text-align: center; color: #737869; }
.fm-sheet-empty .icon { width: 32px; height: 32px; }
/* ohne gewähltes Feld nur ein kleiner Hinweis oben rechts (ANNAHMEN 494) */
.fm-sheet.is-empty { width: auto; padding: 8px 14px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.fm-sheet.is-empty .fm-sheet-empty { margin: 0; display: flex; align-items: center; gap: 8px; }
.fm-sheet.is-empty .fm-sheet-empty .icon { width: 18px; height: 18px; }
.fm-sheet.is-empty .fm-sheet-empty p { margin: 0; font-size: .85rem; font-weight: 600; }
.fm-sheet h2 { margin: 0 0 2px; font-size: 1.25rem; }
.fm-sheet .muted { color: #737869; }
.fm-big { margin: 14px 0; font-size: 1.1rem; }
.fm-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.08); font-size: .9rem; }
.fm-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
/* Blatt der Hofkarte vom Server (ANNAHMEN 498): Abschnitte, Listen, Jahresvergleich */
.fm-sec { margin: 14px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #4f5a43; display: flex; justify-content: space-between; gap: 8px; }
.fm-sec .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.fm-list > div, .fm-list > a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.08); font-size: .88rem; color: inherit; text-decoration: none; }
.fm-list > a:hover { background: rgba(79,122,58,.08); }
.fm-list .num, .fm-years .num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.fm-list .color-dot { margin-right: 6px; }
.fm-list p { margin: 6px 0; }
.fm-note { margin: 0 0 6px; color: #4f5a43; }
.fm-warn { color: #b0461f; font-weight: 600; }
.fm-sheet .fm-acts form { display: contents; }
.fm-years > div { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px; padding: 4px 0; font-size: .88rem; }
.fm-years .fm-bar { height: 8px; border-radius: 4px; background: rgba(0,0,0,.07); overflow: hidden; }
.fm-years .fm-bar i { display: block; height: 100%; border-radius: 4px; background: #9aa39e; }
.fm-years .is-now { font-weight: 700; }
.fm-years .is-now .fm-bar i { background: #4f7a3a; }
/* Unterstatistik je Sorte und Reihen-Fenster (ANNAHMEN 499) */
.fm-list > .fm-pick, .fm-list .fm-month > .fm-mark { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; border: 0; border-bottom: 1px solid rgba(0,0,0,.08); background: none; font: inherit; font-size: .88rem; color: inherit; text-align: left; cursor: pointer; }
.fm-list .fm-month > .fm-mark { font-size: .84rem; border-bottom: 0; }
.fm-list .fm-month > .fm-mark:hover,
.fm-list > .fm-pick:hover { background: rgba(79,122,58,.08); }
.fm-pick .icon { width: 14px; height: 14px; vertical-align: -2px; color: #737869; }
.fm-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 10px 0 2px; padding: 5px 10px 5px 6px; border: 0; border-radius: 8px; background: rgba(79,122,58,.12); color: #2f4a23; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.fm-back:hover { background: rgba(79,122,58,.2); }
.fm-back .icon { width: 16px; height: 16px; }
.fm-crumb { margin: 6px 0 0; font-size: .95rem; }
.fm-sheet .fm-home { margin: 0 0 10px; }
/* Sicht „Einstellungen“ ohne Feld: Zusammenfassung, Neues Feld, Reihen aller Felder (ANNAHMEN 507) */
/* Reiter der Karte in der Kopfleiste (ANNAHMEN 512) */
.fm-tabs button.tab { font: inherit; cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; }
/* Handy (ANNAHMEN 513): kein Suchfeld über der Karte; Blatt als eigener Bereich unter der Karte, Griff = größer/kleiner */
.fm-grip, .fm-peek-hint { display: none; }
/* Warnschild Wartezeit (ANNAHMEN 516) */
.fm-wait { background: none; border: 0; }
.fm-wait svg { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.fm-waitbox { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; background: #fff1e6; color: #8a3a06; font-size: .88rem; }
.fm-waitbox .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #e8590c; }
@media (max-width: 719px) {
    body:has(.fm-tabs) .searchbar { display: none; }
    .fm.has-sheet .fm-map { bottom: 50%; }
    .fm.has-sheet .fm-sheet { left: 0; right: 0; bottom: 0; top: auto; height: 50%; max-height: none; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.25); overscroll-behavior: contain; padding-top: 0; background: rgba(252,251,246,.98); }
    .fm.has-sheet .fm-map { bottom: 72%; }
    .fm.has-sheet .fm-sheet { height: 72%; }
    /* eingeklappt (ANNAHMEN 514): nur Name und „Antippen für mehr Details“, Karte fast ganz frei */
    .fm.has-sheet.sheet-peek .fm-map { bottom: 74px; }
    .fm.has-sheet.sheet-peek .fm-sheet { height: 74px; overflow: hidden; cursor: pointer; }
    .fm.has-sheet.sheet-peek .fm-sheet > *:not(.fm-grip):not(.fm-sheet-head):not(.fm-peek-hint) { display: none; }
    .fm.has-sheet.sheet-peek .fm-sheet-head p { display: none; }
    .fm.has-sheet.sheet-peek .fm-sheet-head h2 { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fm.has-sheet.sheet-peek .fm-peek-hint { display: block; order: 3; margin: 2px 0 0; font-size: .8rem; color: #737869; }
    .fm.has-sheet.sheet-peek .fm-grip { margin-bottom: 2px; height: 16px; }
    .fm.has-sheet .fm-grip { display: block; position: sticky; top: 0; z-index: 2; width: calc(100% + 28px); margin: 0 -14px 6px; height: 22px; border: 0; background: rgba(252,251,246,.98); cursor: pointer; }
    .fm.has-sheet .fm-grip::after { content: ""; display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 3px; background: rgba(0,0,0,.25); }
    .fm.has-sheet .fm-legend { display: none; }
    .fm.has-sheet .leaflet-bottom.leaflet-left { bottom: 8px; }
}
@media (max-width: 720px) { .pagebar .fm-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .pagebar .fm-tabs .tab { flex: 0 0 auto; } }
.fm-tools { position: absolute; top: 62px; right: 12px; z-index: 500; display: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(252,251,246,.92); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0,0,0,.25); color: #22261c; }
.fm[data-view="einstellungen"] .fm-tools[data-for="einstellungen"], .fm[data-view="markierungen"] .fm-tools[data-for="markierungen"] { display: flex; }
.fm.fm-marking .fm-tools { display: none !important; }
/* Markieren direkt auf der Karte (ANNAHMEN 510) */
.fm-markbar { position: absolute; left: 50%; bottom: 48px; transform: translateX(-50%); z-index: 600; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 12px; background: rgba(252,251,246,.95); box-shadow: 0 6px 24px rgba(0,0,0,.3); color: #22261c; font-size: .88rem; font-weight: 600; max-width: calc(100% - 24px); }
.fm-markbar[hidden] { display: none; }
.fm.fm-marking .fm-map, .fm.fm-marking .fm-map .leaflet-interactive { cursor: crosshair; }
.fm-mark-row { display: flex; align-items: stretch; border-top: 1px solid rgba(0,0,0,.05); }
.fm-mark-row .fm-mark { flex: 1; display: flex; text-align: left; padding: 6px 4px 6px 12px; border: 0; background: none; font: inherit; font-size: .84rem; color: inherit; cursor: pointer; }
.fm-mark-row .fm-mark:hover { background: rgba(79,122,58,.08); }
.fm-mark-act { flex: none; width: 32px; border: 0; background: none; color: #4f7a3a; cursor: pointer; border-radius: 6px; }
.fm-mark-act:hover { background: rgba(79,122,58,.12); }
.fm-mark-act.is-del { color: #b0461f; }
.fm-mark-act.is-del:hover { background: rgba(176,70,31,.1); }
.fm-mark-act .icon { width: 16px; height: 16px; }
.fm .fm-sheet:not(.is-empty) ~ .fm-tools { display: none; }
.fm-list .fm-month > .fm-mark { padding-left: 12px; border-top: 1px solid rgba(0,0,0,.05); }   /* Markierung im Blatt (ANNAHMEN 508) */
.fm-month .color-dot { margin-right: 6px; }
.fm-tools-sum { margin: 0 2px 2px; font-size: .82rem; font-weight: 600; color: #4f5a43; }
/* Spritzungen: Umschalter Nach Mittel / Nach Monat / Alle (ANNAHMEN 503) */
/* Nährstoffe je Feld: drei Kacheln N / P₂O₅ / K₂O (ANNAHMEN 504) */
.fm-npk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 4px; }
.fm-npk > div { display: flex; flex-direction: column; align-items: center; padding: 8px 4px 6px; border-radius: 10px; background: rgba(0,0,0,.05); border-top: 3px solid #9aa39e; }
.fm-npk b { font-size: 1.35rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fm-npk span { font-size: .78rem; font-weight: 600; color: #4f5a43; }
.fm-npk .fm-npk-n { border-top-color: #4f7a3a; }
.fm-npk .fm-npk-p2o5 { border-top-color: #c98b2b; }
.fm-npk .fm-npk-k2o { border-top-color: #7a5aa6; }
.fm-seg { display: flex; gap: 2px; margin: 4px 0 6px; padding: 2px; border-radius: 9px; background: rgba(0,0,0,.06); }
.fm-seg button { flex: 1; border: 0; background: transparent; padding: 5px 6px; border-radius: 7px; font: inherit; font-size: .78rem; font-weight: 600; color: #4f5a43; cursor: pointer; }
.fm-seg button.is-on { background: #fff; color: #22261c; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.fm-month { border-bottom: 1px solid rgba(0,0,0,.08); }
.fm-month > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0; font-size: .88rem; cursor: pointer; list-style: none; }
.fm-month > summary::-webkit-details-marker { display: none; }
.fm-month > summary > span:first-child::before { content: '›'; display: inline-block; width: 12px; color: #737869; transition: transform .15s; }
.fm-month[open] > summary > span:first-child::before { transform: rotate(90deg); }
.fm-month > summary .muted { margin-left: 12px; }
.fm-list .fm-month > a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0 6px 12px; border-top: 1px solid rgba(0,0,0,.05); font-size: .85rem; color: inherit; text-decoration: none; }
.fm-list .fm-month > a:hover { background: rgba(79,122,58,.08); }
.fm-month[open] { padding-bottom: 4px; }   /* zurück zur ganzen Hofkarte (ANNAHMEN 502) */
/* Bildlaufleiste schmal, salbeigrün, ohne Schiene: Blatt der Hofkarte und Seiten im Fenster (Nutzer 13.11.2026, ANNAHMEN 502) */
.fm-sheet, html.in-dialog { scrollbar-width: thin; scrollbar-color: rgba(79,122,58,.38) transparent; }
.fm-sheet::-webkit-scrollbar, html.in-dialog::-webkit-scrollbar { width: 8px; }
.fm-sheet::-webkit-scrollbar-track, html.in-dialog::-webkit-scrollbar-track { background: transparent; }
.fm-sheet::-webkit-scrollbar-thumb, html.in-dialog::-webkit-scrollbar-thumb { background: rgba(79,122,58,.38); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
.fm-sheet::-webkit-scrollbar-thumb:hover, html.in-dialog::-webkit-scrollbar-thumb:hover { background-color: rgba(79,122,58,.6); }
html.in-dialog .fp-crumb { display: none; }
.fm-rows-dlg { width: min(1280px, calc(100vw - 20px)); }
.fm-rows-dlg .modal-box { height: calc(100dvh - 20px); }
.fm-rows-frame { flex: 1; width: 100%; border: 0; background: var(--bg, #f8f6ef); }
html.in-dialog .searchbar, html.in-dialog .pagebar, html.in-dialog .page-head h1, html.in-dialog .page-head .page-actions { display: none !important; }   /* „Zurück zu den Feldern“ – das Fenster schließt das Kreuz */
html.in-dialog .fr-map { height: calc(100vh - 240px); }
html.in-dialog .rh-intro { display: none; }   /* Reihenernte im Fenster der Hofkarte (ANNAHMEN 500) */
.fm-rooms { position: absolute; right: 364px; bottom: 12px; z-index: 500; background: rgba(252,251,246,.85); backdrop-filter: blur(12px); border-radius: 12px; padding: 8px 12px; font-size: .8rem; color: #22261c; min-width: 200px; }
.fm-rooms div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.fm-rooms .is-bad { color: var(--danger); font-weight: 600; }
.fm-tip { font-family: var(--font); font-weight: 600; }
.fm .leaflet-control-attribution { font-size: 10px; }
.fm .leaflet-bottom.leaflet-left { bottom: 40px; }   /* Plus/Minus über der Farblegende (ANNAHMEN 494) */
@media (max-width: 719px) {
    .fm { height: calc(100vh - 150px); }
    .fm-sheet { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 46%; border-radius: 16px; padding: 12px 14px; }
    .fm-sheet.is-empty { left: auto; padding: 6px 12px; }
    .fm-rooms { display: none; }
    .fm-legend { bottom: auto; top: 54px; }
    .fm-views { left: 8px; right: 8px; top: 8px; overflow-x: auto; scrollbar-width: none; }   /* Reiter in einer Zeile, wischbar (ANNAHMEN 498) */
}
.ui-nav-werkbank i { display: none; } .ui-nav-werkbank b { left: 4px; right: 4px; top: 10px; }
.ui-nav-werkbank b::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 5px; border-radius: 2px; background: var(--primary); }
.ui-nav-werkbank b::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 40%; border-left: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 0 3px 3px 0; }
/* ==========================================================================
   Farbe „Glas“ (Apple-Stil, Nutzer 07.11.2026 „ein wenig Richtung Apple“, ANNAHMEN 370): Systemschrift (SF auf iPhone/Mac),
   gruppierter grauer Hintergrund, weiße Flächen ohne Rahmen, durchscheinende Leisten mit Weichzeichner, große Titel,
   abgerundete Knöpfe und Felder in Grau, Reiter als Segment-Steuerung, Grün als einzige Akzentfarbe. Mit jeder Navigation.
   ========================================================================== */
html[data-theme="glas"] {
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --bg: #f2f2f7; --card: #ffffff; --surface: #ffffff; --surface-2: #f2f2f7; --hover: #ececf0;
    --text: #1c1c1e; --muted: #8a8a8e; --line: #e5e5ea; --line-strong: #d1d1d6;
    --primary: #2f9e4f; --primary-dark: #248a3d; --primary-soft: #e3f4e7;
    --danger: #e5352b; --danger-soft: #ffe8e6; --warning: #c46a00; --warning-soft: #fff1dc; --info: #0a6fdc; --info-soft: #e6f1ff;
    --radius: 14px; --radius-sm: 10px; --shadow: none; --shadow-lg: 0 20px 60px rgba(0, 0, 0, .18);
    --gl-bar: rgba(249, 249, 249, .78); --gl-fill: rgba(118, 118, 128, .12); --gl-fill-2: rgba(118, 118, 128, .2);
    --side-bg: rgba(246, 246, 248, .82); --side-text: #1c1c1e; --side-muted: #8a8a8e; --side-hover: rgba(118, 118, 128, .1);
    --side-active-bg: rgba(118, 118, 128, .16); --side-active-text: #1c1c1e;
}
html[data-theme="glas-dunkel"] {
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
    --bg: #000000; --card: #1c1c1e; --surface: #1c1c1e; --surface-2: #2c2c2e; --hover: #2c2c2e;
    --text: #ffffff; --muted: #98989f; --line: #38383a; --line-strong: #48484a;
    --primary: #30d158; --primary-dark: #30d158; --primary-soft: #16301e;
    --danger: #ff453a; --danger-soft: #3a1714; --warning: #ff9f0a; --warning-soft: #3a2a0d; --info: #0a84ff; --info-soft: #0d2540;
    --radius: 14px; --radius-sm: 10px; --shadow: none; --shadow-lg: 0 20px 60px rgba(0, 0, 0, .6);
    --gl-bar: rgba(22, 22, 24, .78); --gl-fill: rgba(118, 118, 128, .24); --gl-fill-2: rgba(118, 118, 128, .32);
    --side-bg: rgba(28, 28, 30, .82); --side-text: #ffffff; --side-muted: #98989f; --side-hover: rgba(118, 118, 128, .2);
    --side-active-bg: rgba(118, 118, 128, .32); --side-active-text: #ffffff;
    color-scheme: dark;
}
html[data-theme^="glas"] body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -.005em; }
html[data-theme^="glas"] h1 { font-size: 2.05rem; font-weight: 700; letter-spacing: -.022em; }
html[data-theme^="glas"] h2, html[data-theme^="glas"] h3 { letter-spacing: -.012em; }
/* Flächen */
html[data-theme^="glas"] .card, html[data-theme^="glas"] .kpi { border: 0; box-shadow: none; border-radius: 14px; }
html[data-theme^="glas"] .kpi { background: var(--card); }
html[data-theme^="glas"] .table th { background: transparent; text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
html[data-theme^="glas"] .table td { border-bottom-color: var(--line); }
html[data-theme^="glas"] .table tr:last-child td { border-bottom: 0; }
html[data-theme^="glas"] .badge { border-radius: 7px; font-weight: 600; }
html[data-theme^="glas"] .flash { border-radius: 12px; border: 0; }
/* Knöpfe und Felder */
html[data-theme^="glas"] .btn { border-radius: 10px; min-height: 38px; font-weight: 600; transition: background .15s, transform .08s; }
html[data-theme^="glas"] .btn:active:not(:disabled) { transform: scale(.98); }
html[data-theme^="glas"] .btn-secondary { background: var(--gl-fill); border-color: transparent; color: var(--primary-dark); }
html[data-theme^="glas"] .btn-secondary:hover:not(:disabled) { background: var(--gl-fill-2); }
html[data-theme^="glas"] .btn-ghost { color: var(--primary-dark); }
html[data-theme^="glas"] input[type=text], html[data-theme^="glas"] input[type=email], html[data-theme^="glas"] input[type=password],
html[data-theme^="glas"] input[type=number], html[data-theme^="glas"] input[type=date], html[data-theme^="glas"] input[type=tel],
html[data-theme^="glas"] input[type=search], html[data-theme^="glas"] input[type=time], html[data-theme^="glas"] select, html[data-theme^="glas"] textarea {
    background: var(--gl-fill); border-color: transparent; border-radius: 10px;
}
html[data-theme^="glas"] input:focus, html[data-theme^="glas"] select:focus, html[data-theme^="glas"] textarea:focus {
    background: var(--card); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent);
}
/* Reiter als Segment-Steuerung */
html[data-theme^="glas"] .tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--gl-fill); border: 0; border-radius: 11px; max-width: 100%; }
html[data-theme^="glas"] .tab { border: 0; margin: 0; border-radius: 8px; padding: 6px 12px; font-size: .84rem; color: var(--text); }
html[data-theme^="glas"] .tab:hover { background: transparent; color: var(--text); opacity: .75; }
html[data-theme^="glas"] .tab.is-active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04); }
html[data-theme="glas-dunkel"] .tab.is-active { background: #636366; }
html[data-theme^="glas"] .tab .icon { color: var(--muted); }
html[data-theme^="glas"] .tab.is-active .icon { color: var(--primary); }
html[data-theme^="glas"] .dash-phase { border: 0; background: var(--gl-fill); color: var(--muted); border-radius: 9px; }
html[data-theme^="glas"] .dash-phase.is-on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
/* Leisten aus Glas */
html[data-theme^="glas"] .sidebar { background: var(--side-bg); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border-right: 1px solid var(--line); }
html[data-theme^="glas"] .nav-link { border-radius: 8px; font-weight: 500; }
html[data-theme^="glas"] .nav-link .icon { color: var(--primary); }
html[data-theme^="glas"] .nav-link.is-active { font-weight: 600; }
html[data-theme^="glas"] .nav-link.is-active .icon { color: var(--primary); }
html[data-theme^="glas"] .nav-count { color: var(--muted); font-weight: 500; }
html[data-theme^="glas"] .nav-section-title { text-transform: none; letter-spacing: 0; font-size: .78rem; font-weight: 600; }
html[data-theme^="glas"] .topbar, html[data-theme^="glas"] .wb-top, html[data-theme^="glas"] .wb-status {
    background: var(--gl-bar); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border-color: var(--line);
}
html[data-theme^="glas"] .searchbar { position: sticky; top: 0; z-index: 20; margin: -6px -8px 14px; padding: 6px 8px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 14px; }
html[data-theme^="glas"] .searchbar-field, html[data-theme^="glas"] .wb-cmd { background: var(--gl-fill); border-color: transparent; border-radius: 10px; }
html[data-theme^="glas"] .wb-quick { border-color: transparent; background: var(--gl-fill); border-radius: 10px; color: var(--primary-dark); }
html[data-theme^="glas"] .wb-quick.is-pri { background: var(--primary); color: #fff; }
@media (max-width: 959px) {
    html[data-theme^="glas"] .bottombar { background: var(--gl-bar); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); box-shadow: none; border-top: 1px solid var(--line); }
    html[data-theme^="glas"] .bb-item { font-weight: 500; font-size: .66rem; }
    html[data-theme^="glas"] .bb-item.is-active { color: var(--primary); }
    html[data-theme^="glas"] .searchbar { margin: -4px -6px 10px; }
}
/* Fenster und Suche */
html[data-theme^="glas"] .modal-box, html[data-theme^="glas"] dialog.modal { border-radius: 16px; }
html[data-theme^="glas"] dialog::backdrop { background: rgba(0, 0, 0, .25); backdrop-filter: blur(6px); }
html[data-theme^="glas"] .search-overlay { background: rgba(0, 0, 0, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-theme^="glas"] .search-box { border: 0; border-radius: 16px; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }
html[data-theme^="glas"] .search-hit.is-sel { background: var(--primary); color: #fff; }
html[data-theme^="glas"] .search-hit.is-sel .search-kind, html[data-theme^="glas"] .search-hit.is-sel .muted { color: rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .18); }
html[data-theme^="glas"] .wb-peek { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border-left: 1px solid var(--line); }
html[data-theme^="glas"] .wb-menu { border: 0; border-radius: 14px; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }
/* Startseite und Steckbriefe */
html[data-theme^="glas"] .dash-row { border-radius: 10px; }
html[data-theme^="glas"] .dash-grp { text-transform: none; letter-spacing: 0; font-size: .8rem; }
html[data-theme^="glas"] .weather-strip { border: 0; }
html[data-theme^="glas"] .fm { border: 0; border-radius: 16px; }
/* Feldliste: angetippte Zeile kurz hervorheben (Karte → Liste, 08.11.2026) */
@keyframes row-flash { 0%, 35% { background: var(--primary-soft); box-shadow: inset 4px 0 0 var(--primary); } 100% { background: transparent; box-shadow: none; } }
tr.is-flash > td { animation: row-flash 2.5s ease-out; }
tr.is-flash { animation: row-flash 2.5s ease-out; }

/* Regenradar als Karte (ANNAHMEN 404, 405) */
.rain-map { padding: 0; overflow: hidden; }
.rain-map-stage { position: relative; }
.rain-map-canvas { height: calc(100vh - 390px); min-height: 440px; max-height: 760px; background: #1c2320; }
.rain-map .rm-sat { filter: brightness(.66) saturate(.85); }
.rain-map .rm-gl { position: absolute; left: 0; top: 0; pointer-events: none; }
.rain-map .leaflet-control-attribution { background: rgba(255, 255, 255, .55); font-size: 10px; }
.rain-map.is-sat .leaflet-control-attribution { background: rgba(0, 0, 0, .4); color: #ddd; }
.rain-map.is-sat .leaflet-control-attribution a { color: #eee; }
.leaflet-tooltip.rm-bubble { background: rgba(24, 30, 27, .84); color: #fff; border: 0; border-radius: 10px; padding: 5px 10px; font-size: .82rem; box-shadow: 0 3px 12px rgba(0, 0, 0, .35); white-space: nowrap; }
.leaflet-tooltip.rm-bubble.leaflet-tooltip-top::before { border-top-color: rgba(24, 30, 27, .84); }
.rain-map-status { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 900; background: rgba(24, 30, 27, .84); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .85rem; white-space: nowrap; }
.rain-map-status[hidden] { display: none; }
.rain-map-base { position: absolute; right: 12px; top: 12px; z-index: 900; background: rgba(24, 30, 27, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; padding: 7px 13px; font: inherit; font-size: .85rem; cursor: pointer; }
.rain-map-base:hover { background: rgba(24, 30, 27, .92); }
.rain-map-bar { position: absolute; left: 12px; right: 12px; bottom: 24px; z-index: 900; display: grid; grid-template-columns: auto auto minmax(100px, 1fr); align-items: center; column-gap: 14px; row-gap: 6px; padding: 10px 16px 10px 10px; border-radius: 16px; color: #fff; background: rgba(24, 30, 27, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .12); }
.rain-map-modes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-left: 2px; }
.rain-map-modes button { border: 0; border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .8rem; color: #fff; background: rgba(255, 255, 255, .14); cursor: pointer; }
.rain-map-modes button:hover { background: rgba(255, 255, 255, .24); }
.rain-map-modes button.is-on { background: #fff; color: #1c2320; }
.rain-map-modes button[hidden] { display: none; }
.rain-compare { margin-top: 14px; }
.rain-compare td.num, .rain-compare th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rain-map-play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #1c2320; display: grid; place-items: center; cursor: pointer; padding: 0; }
.rain-map-play svg { width: 24px; height: 24px; fill: currentColor; }
.rain-map-play .ic-pause, .rain-map-play.is-playing .ic-play { display: none; }
.rain-map-play.is-playing .ic-pause { display: block; }
.rain-map-when { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 132px; }
.rain-map-when strong { font-size: 1.2rem; }
.rain-map-kind { margin-left: 6px; font-size: .76rem; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.rain-map-kind.is-now { background: #fff; color: #1c2320; }
.rain-map-kind.is-future { background: #3f7fd8; }
.rain-map-track { position: relative; display: flex; align-items: center; }
.rain-map-bar input[type="range"] { width: 100%; margin: 0; accent-color: #fff; }
.rain-map-now { position: absolute; top: -5px; bottom: -5px; width: 2px; background: #fff; pointer-events: none; opacity: .7; }
.rain-map-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .76rem; padding-left: 4px; }
.rain-map-legend, .rain-map-speed { display: inline-flex; align-items: center; gap: 8px; opacity: .92; }
.rain-map-scale { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #a8dbff, #5caef7, #296bde, #2438ab, #8c2ec2, #e6298c); }
.rain-map-speed input[type="range"] { width: 110px; }
@media (max-width: 560px) {
    .rain-map-canvas { height: calc(100vh - 410px); min-height: 430px; }
    .rain-map-bar { grid-template-columns: auto 1fr; left: 8px; right: 8px; padding: 8px 12px 8px 8px; }
    .rain-map-track { grid-column: 1 / -1; padding: 0 2px; }
    .rain-map-scale { width: 76px; }
    .rain-map-speed input[type="range"] { width: 76px; }
}
.rain-map-back, .rain-map-cmp { display: none; }
/* Handy: Karte über den ganzen Bildschirm wie die Scan-Kamera (ANNAHMEN 409) */
html.rain-map-full, html.rain-map-full body { overflow: hidden; }
html.rain-map-full .rain-map { position: fixed; inset: 0; z-index: 1000; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #1c2320; }
html.rain-map-full .rain-map-stage { position: absolute; inset: 0; }
html.rain-map-full .rain-map-canvas { position: absolute; inset: 0; height: auto; min-height: 0; max-height: none; }
html.rain-map-full .rain-map .leaflet-bottom { bottom: env(safe-area-inset-bottom, 0px); }
html.rain-map-full .rain-map-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
html.rain-map-full .rain-map-status { top: calc(env(safe-area-inset-top, 0px) + 62px); }
html.rain-map-full .rain-map-base, html.rain-map-full .rain-map-cmp { top: calc(env(safe-area-inset-top, 0px) + 10px); height: 42px; padding: 0 13px; }
html.rain-map-full .rain-map-back { display: grid; place-items: center; position: absolute; z-index: 900; left: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); width: 42px; height: 42px; border-radius: 50%; color: #fff; background: rgba(24, 30, 27, .78); border: 1px solid rgba(255, 255, 255, .18); }
html.rain-map-full .rain-map-back svg { width: 24px; height: 24px; }
html.rain-map-full .rain-map-cmp { display: block; position: absolute; z-index: 900; left: 62px; background: rgba(24, 30, 27, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; font: inherit; font-size: .85rem; }
html.rain-map-full .rain-map-cmp[hidden] { display: none; }
html.rain-map-full .rain-compare { display: none; }
html.rain-map-full.rain-map-sheet .rain-compare { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100; margin: 0; max-height: 70%; overflow-y: auto; border-radius: 16px 16px 0 0; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
@media (max-height: 480px) { html.rain-map-full .rain-map-foot { display: none; } }
html.rain-map-full .rain-map .leaflet-control-zoom { display: none; }

/* Umschalter Luftbild / Bodenkarte (ANNAHMEN 411) */
.soil-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; }
.soil-seg { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.soil-seg button { border: 0; background: transparent; font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); padding: 6px 14px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.soil-seg button.is-on { background: var(--primary); color: #fff; }
.soil-theme { width: auto; max-width: 100%; }
.soil-note { margin: 0; font-size: .85rem; color: var(--danger); flex-basis: 100%; }
.soil-details { flex-basis: 100%; }
.soil-details summary { cursor: pointer; font-size: .85rem; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.soil-details summary::-webkit-details-marker { display: none; }
.soil-details summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate .2s ease; margin: 0 2px 0 1px; opacity: .7; }
.soil-details[open] summary::before { rotate: 45deg; }
/* eigene Legende statt des LBEG-Bildes (Nutzer 12.11.2026, ANNAHMEN 491) */
.soil-legend { margin-top: 8px; font-size: .78rem; line-height: 1.3; }
.soil-leg-list { list-style: none; margin: 0; padding: 0; columns: 220px 4; column-gap: 20px; }
.soil-leg-row { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; break-inside: avoid; }
.soil-leg-row b { font-weight: 600; }
.soil-sw { flex: none; width: 16px; height: 12px; margin-top: 1px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.soil-sw.is-line { box-shadow: inset 0 0 0 2px #e30000; }
.soil-scale { display: flex; height: 14px; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); max-width: 360px; }
.soil-scale span { flex: 1; }
.soil-scale-ticks { position: relative; height: 1.3em; max-width: 360px; margin: 3px 0 4px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.soil-scale-ticks span { position: absolute; top: 0; translate: -50% 0; white-space: nowrap; }
.soil-scale-ticks span:first-child { translate: 0 0; }
.soil-scale-ticks span:last-child { translate: -100% 0; }
.soil-leg-note { margin: 6px 0 0; font-size: .72rem; color: var(--muted); }
.soil-leg-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.soil-source { margin: 0; flex-basis: 100%; }
.fm .soil-bar[hidden] { display: none; }
.fm .soil-bar { position: absolute; top: 12px; left: 12px; z-index: 500; max-width: min(340px, calc(100% - 24px)); max-height: calc(100% - 130px); overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.22) transparent; background: rgba(252,251,246,.92); backdrop-filter: blur(12px); border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); color: #22261c; padding: 6px 8px; }
.fm .soil-bar.is-open { padding: 10px 12px; width: 268px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; overflow: hidden; }
.fm .soil-bar.is-open > * { flex: none; }
.fm .soil-bar.is-open .soil-seg { align-self: flex-start; }
.fm .soil-bar.is-open .soil-theme { width: 100%; font-size: .85rem; }
/* nur die Legende scrollt (dünne Leiste), die Box bleibt innerhalb der Karte */
.fm .soil-bar.is-open .soil-details { flex: 0 1 auto; min-height: 0; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; scrollbar-color: rgba(0,0,0,.22) transparent; }
.fm .soil-details::-webkit-scrollbar { width: 6px; }
.fm .soil-details::-webkit-scrollbar-thumb { background: rgba(0,0,0,.22); border-radius: 3px; }
.fm .soil-details::-webkit-scrollbar-track { background: transparent; }
.fm .soil-leg-list { columns: auto; }
.fm .soil-scale-ticks, .fm .soil-leg-note { color: #5b6152; }
.fm .soil-seg { background: rgba(0,0,0,.06); }
.fm .soil-seg button { color: #5b6152; }
.fm .soil-seg button.is-on { color: #fff; }
.fm .soil-bar.is-open .soil-source { color: #5b6152; font-size: .72rem; }
@media (max-width: 719px) { .fm .soil-bar { top: 54px; left: 8px; max-width: calc(100% - 16px); max-height: 46%; } }

/* Vergleich der Wetterdienste (ANNAHMEN 414) */
.fc-radio { position: absolute; opacity: 0; pointer-events: none; }
.fc-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 3px; margin: 4px 0 10px; }
.fc-switch label { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; margin: 0; }
.fc-table tbody { display: none; }
.fc-table .nowrap, .fc-table th { white-space: nowrap; }
#fc-rain:checked ~ .table-wrap tbody[data-m="rain"], #fc-tmin:checked ~ .table-wrap tbody[data-m="tmin"], #fc-tmax:checked ~ .table-wrap tbody[data-m="tmax"], #fc-wind:checked ~ .table-wrap tbody[data-m="wind"] { display: table-row-group; }
#fc-rain:checked ~ .fc-switch label[data-m="rain"], #fc-tmin:checked ~ .fc-switch label[data-m="tmin"], #fc-tmax:checked ~ .fc-switch label[data-m="tmax"], #fc-wind:checked ~ .fc-switch label[data-m="wind"] { background: var(--primary); color: #fff; }
.fc-radio:focus-visible ~ .fc-switch { outline: 2px solid var(--primary); outline-offset: 2px; }
.fc-credit { margin: 10px 0 0; }
.fc-key { padding: 12px 0; border-top: 1px solid var(--line); }
.fc-key-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fc-key p { margin: 4px 0 8px; }
.fc-key input[type="password"] { width: 100%; max-width: 480px; }

/* Regenradar: Karte mit Europa-Radar (ANNAHMEN 420, 427) */
.rain-europe { padding: 0; overflow: hidden; }
.rain-europe-stage { position: relative; }
.rain-europe-canvas { height: calc(100vh - 390px); min-height: 440px; max-height: 760px; background: #1c2320; }
.rain-europe .rm-sat { filter: brightness(.66) saturate(.85); }
.rain-europe .rw-canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.rain-europe.is-sat .leaflet-control-attribution { background: rgba(0, 0, 0, .4); color: #ddd; }
.rain-europe.is-sat .leaflet-control-attribution a { color: #eee; }
.rain-europe .leaflet-control-attribution { background: rgba(255, 255, 255, .55); font-size: 10px; }
.rain-europe-gray { display: inline-flex; align-items: center; gap: 6px; opacity: .92; }
.rain-europe-gray::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: #9a9a9a; }
.rain-europe.is-forecast .rain-europe-gray { display: none; }
/* OPERA steht, DWD springt ein (ANNAHMEN 481) */
.rain-europe-src { flex: 1 1 100%; padding: 3px 10px; border-radius: 8px; background: rgba(240, 163, 58, .9); color: #2b1a00; font-size: .8rem; font-weight: 600; line-height: 1.3; }
.rain-europe.is-forecast .rain-europe-src { display: none; }
.rain-map-foot:has(.rain-europe-src) { flex-wrap: wrap; row-gap: 6px; }
.rain-europe-close { display: none; }
html.rain-europe-full .rain-europe { display: block; position: fixed; inset: 0; z-index: 1000; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
html.rain-europe-full .rain-europe-stage { position: absolute; inset: 0; }
html.rain-europe-full .rain-europe-canvas { position: absolute; inset: 0; height: auto; min-height: 0; max-height: none; }
html.rain-europe-full .rain-europe .leaflet-top { top: calc(env(safe-area-inset-top, 0px) + 56px); }
html.rain-europe-full .rain-europe .rain-map-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); }
html.rain-europe-full .rain-europe-close { display: grid; place-items: center; position: absolute; z-index: 900; left: 10px; top: calc(env(safe-area-inset-top, 0px) + 10px); width: 42px; height: 42px; padding: 0; border-radius: 50%; color: #fff; background: rgba(24, 30, 27, .78); border: 1px solid rgba(255, 255, 255, .18); }
html.rain-europe-full .rain-europe-close svg { width: 24px; height: 24px; }
/* Startseite für Mitarbeiter am Handy (ANNAHMEN 442): sechs Kacheln, zwei nebeneinander, drei untereinander */
body.start { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f3f5ef; }
.start-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, 1fr); gap: 12px; padding: calc(env(safe-area-inset-top) + 12px) 12px 6px; }
.start-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 0; padding: 10px; border-radius: 18px; background: var(--tc); color: #fff; text-decoration: none; font-size: clamp(1rem, 5.2vw, 1.3rem); font-weight: 800; text-align: center; line-height: 1.15; overflow-wrap: anywhere; hyphens: auto; box-shadow: 0 4px 14px rgba(0, 0, 0, .16); -webkit-tap-highlight-color: transparent; }
.start-tile:active { transform: scale(.97); }
.start-tile .start-icon { width: 56px; height: 56px; stroke-width: 1.8; }
.start-none { grid-column: 1 / -1; align-self: center; text-align: center; }
.start-foot { margin: 0; padding: 4px 12px calc(env(safe-area-inset-bottom) + 10px); text-align: center; font-size: .85rem; }
.start-foot a { color: #5b6660; }
/* Bestand an Mitteln und Düngern (ANNAHMEN 449) */
.input-stock { display: inline-flex; align-items: center; gap: 4px; }
.input-stock input { width: 6em; padding: 2px 6px; font-size: .9rem; text-align: right; }
.input-stock input.is-neg { color: #c92a2a; font-weight: 600; }
.input-stock-info { flex-basis: 100%; text-align: right; }
td .input-stock-info { text-align: left; }
.input-buy { margin-bottom: 12px; }
.input-buy > summary { cursor: pointer; }
/* Zeitfelder ohne Uhr-Zeichen, überall (Nutzer 11.11.2026, ANNAHMEN 451, 454, 470): die Zeit wird eingetippt. Vorher nur bei Maus bzw. ab 900 px –
   bei Touch-PCs oder schmalen Fenstern blieb die Uhr. Am Handy öffnet ein Tipp ins Feld die Auswahl ohnehin selbst. */
input[type="time"]::-webkit-calendar-picker-indicator { display: none; width: 0; height: 0; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
/* Auswahlfelder in „Spritzung eintragen“: eigene aufgeklappte Liste statt der Windows-Liste, in allen Browsern gleich
   (Nutzer 11.11.2026, ANNAHMEN 472/479/480; Firefox kann base-select nicht). Das zugeklappte Feld bleibt das normale Auswahlfeld. */
.fs-list { position: fixed; z-index: 1000; box-sizing: border-box; width: max-content; max-width: min(540px, calc(100vw - 24px)); overflow-y: auto;
    padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .06); font-size: .95rem; overscroll-behavior: contain; }
.fs-opt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.fs-opt + .fs-opt { margin-top: 1px; }
.fs-opt.is-active { background: var(--hover); }
.fs-opt.is-selected { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.fs-opt.is-selected.is-active { background: color-mix(in srgb, var(--primary-soft) 80%, var(--primary) 20%); }
.fs-opt.is-none { color: var(--muted); }
.fs-opt.is-disabled { opacity: .45; cursor: default; }
.fs-group { margin: 6px 4px 2px; padding-top: 6px; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fs-group:first-child { margin-top: 0; padding-top: 2px; }
.fs-opt + .fs-group { border-top: 1px solid var(--line); }
/* Indikation: Nummer-Schild, Schaderreger, Zeitpunkt, Schilder für Abstand / AA0033 / Genehmigung */
.sd-o-no { flex: none; margin-top: 1px; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--muted);
    font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
.sd-o-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sd-o-title { font-weight: 600; color: var(--text); }
.sd-o-sub { font-size: .82rem; font-weight: 400; color: var(--muted); }
.sd-o-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sd-o-tag { padding: 1px 8px; border-radius: 999px; background: var(--hover); color: var(--text); font-size: .74rem; font-weight: 400; }
.sd-o-tag.is-ok { background: var(--primary-soft); color: var(--primary-dark); }
.sd-o-tag.is-warn { background: color-mix(in srgb, #f0a33a 22%, transparent); color: #8a4b05; }
.fs-opt.is-selected .sd-o-no { background: var(--primary); color: #fff; }
.fs-opt.is-selected .sd-o-tag { background: var(--surface); }
/* Offene Fahrten: Karte mit Knöpfen Weiterfahren/Ändern (ANNAHMEN 453) */
.sr-run-main { display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; }
.sr-run-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Offene Fahrten: Stand (ANNAHMEN 455/456) */
.sr-prog { display: flex; flex-direction: column; gap: 3px; margin: 2px 0 4px; }
.sr-prog-bar { height: 10px; border-radius: 5px; background: var(--surface-2, #e9ece5); overflow: hidden; }
.sr-prog-bar > span { display: block; height: 100%; border-radius: 5px; background: #2f8a3a; transition: width .4s; }
.sr-prog-line { font-size: .95rem; }
.sr-prog-driver { display: flex; align-items: center; gap: 6px; }
.sr-live { width: 9px; height: 9px; border-radius: 50%; background: #9aa3a0; flex: none; }
.sr-live.is-on { background: #2f8a3a; box-shadow: 0 0 0 3px rgba(47, 138, 58, .2); }
.sr-prog-rain { color: var(--muted); }
.sr-prog-rain.is-warn { color: #b8590a; font-weight: 600; }
/* Auftrag ändern: Felder außerhalb des Auftrags oben und hervorgehoben (ANNAHMEN 453) */
.so-extra.has-extra { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, #f0a33a 14%, transparent); border: 1px solid color-mix(in srgb, #f0a33a 45%, transparent); }
.badge-orange { background: color-mix(in srgb, #f0a33a 22%, transparent); color: #8a4b05; }

/* ==========================================================================
   Karte „Felder“ – Runde 1 und 2 der Prüfung (Nutzer 13.11.2026, ANNAHMEN 518)
   ========================================================================== */
.fm-x, .fm-fab, .fm-tab-short, .fm-pick-pc { display: none; }
.fm-sheet { padding-bottom: 0; }
.fm-sheet .fm-muted, .fm-sheet .muted { color: #4f5a43; }
/* feste Knopfleiste unten im Blatt: Hauptaufgabe · Zweitaufgabe · Steckbrief */
.fm-sheet .fm-acts { position: sticky; bottom: 0; z-index: 2; margin: auto -18px 0; padding: 10px 18px 14px; background: rgba(252,251,246,.97); border-top: 1px solid rgba(0,0,0,.08); }
.fm-sheet .fm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }   /* Hauptknopf ganze Breite, Rest zweispaltig */
.fm-sheet .fm-acts > .btn, .fm-sheet .fm-acts > form .btn { width: 100%; justify-content: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-sheet .fm-acts > .btn-primary:first-child { grid-column: 1 / -1; }
.fm-sheet .fm-acts > .btn:last-child:nth-child(even) { grid-column: 1 / -1; }
.fm-sheet .fm-acts > .btn:only-child { grid-column: 1 / -1; }
.fm-danger { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
.fm-danger form { display: contents; }
.fm-more { margin: 4px 0 0; }
.fm-more > summary { cursor: pointer; padding: 6px 0; font-size: .85rem; font-weight: 600; color: #4f5a43; }
.fm-npk span { font-size: .78rem; }
.fm-npk small { font-size: .7rem; color: #4f5a43; }
/* Markierung antippen: Erledigt und Löschen erst dann, mit Abstand */
.fm-mark-opts { display: none; width: 100%; justify-content: space-between; gap: 12px; padding: 4px 4px 8px 12px; }
.fm-mark-row { flex-wrap: wrap; }
.fm-mark-row.is-open { background: rgba(79,122,58,.06); }
.fm-mark-row.is-open .fm-mark-opts { display: flex; }
/* Standort-Knopf */
.fm-locate { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: rgba(252,251,246,.97); color: #2b6cb0; box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }
.fm.is-locating .fm-locate { animation: fm-pulse 1s infinite alternate; }
@keyframes fm-pulse { to { background: #dbe8f7; } }
.fm-markbar { flex-wrap: wrap; justify-content: center; }
.fm-markbar-t { display: inline-flex; align-items: center; gap: 6px; }
.fm-markbar-b { display: inline-flex; gap: 8px; }
.fm-pick-touch { display: inline; }
@media (min-width: 720px) {
    .fm-pick-touch { display: none; }
    .fm-pick-pc { display: inline; }
}
@media (min-width: 1280px) {
    .fm-sheet { width: 380px; }
    .fm-rooms { right: 404px; }
}
@media (max-width: 719px) {
    /* Reiter: sechs gleich breite Felder mit Symbol und Kurzname, nichts abgeschnitten */
    html .pagebar .tabs.fm-tabs { display: grid !important; width: 100%; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; overflow: visible; padding: 4px; }
    html .pagebar .tabs.fm-tabs .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 4px 2px; border-radius: 12px; font-size: 12px; line-height: 1.1; text-align: center; }
    html .pagebar .tabs.fm-tabs .tab .icon { display: block !important; width: 20px; height: 20px; margin: 0; }
    .fm-tab-long { display: none; }
    .fm-tab-short { display: inline; }
    /* Platz oben nutzen, Kästen deckend */
    .fm-legend { top: 8px; left: 8px; bottom: auto; max-width: calc(100% - 196px); flex-wrap: wrap; gap: 4px 10px; font-size: 14px; background: rgba(252,251,246,.97); }
    .fm-legend i { width: 14px; height: 14px; }
    .fm .soil-bar { top: 8px; background: rgba(252,251,246,.97); }
    .fm-tools { top: 8px; right: 8px; max-width: 180px; padding: 8px; background: rgba(252,251,246,.97); backdrop-filter: none; }
    .fm-tools .fm-primary { display: none; }
    .fm-tools:not(:has(.btn:not(.fm-primary))) { display: none !important; }
    .fm-tools .btn { min-height: 44px; font-size: 14px; }
    .fm-tools-sum { font-size: 13px; }
    .fm .leaflet-control-zoom { display: none; }
    .fm .leaflet-bottom.leaflet-left { bottom: 8px; }
    .fm-locate { width: 48px; height: 48px; border-radius: 14px; }
    .fm .fm-cluster span { width: 44px; height: 44px; font-size: 15px; }
    /* großer Hauptknopf unten rechts (Daumen) */
    .fm-fab { position: absolute; right: 10px; bottom: 60px; z-index: 550; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; border: 0; border-radius: 26px; background: var(--primary, #4f7a3a); color: #fff; font: 600 16px/1 var(--font); box-shadow: 0 6px 18px rgba(0,0,0,.35); cursor: pointer; }
    .fm-fab .icon { width: 22px; height: 22px; }
    .fm[data-view="ernte"] .fm-fab[data-for="ernte"], .fm[data-view="markierungen"] .fm-fab[data-for="markierungen"], .fm[data-view="schutz"] .fm-fab[data-for="schutz"],
    .fm[data-view="einstellungen"] .fm-fab[data-for="einstellungen"], .fm[data-view="wurzelschnitt"] .fm-fab[data-for="wurzelschnitt"] { display: flex; }
    .fm.has-sheet .fm-fab, .fm.fm-marking .fm-fab { display: none !important; }
    .fm-sheet.is-empty { padding: 8px 12px; }
    .fm-sheet.is-empty .fm-sheet-empty p { font-size: 14px; }
    /* Blatt: Schrift und Knöpfe */
    .fm-x { display: flex; position: absolute; top: 14px; right: 8px; z-index: 3; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 22px; background: rgba(0,0,0,.06); color: #22261c; cursor: pointer; }
    .fm-x .icon { width: 20px; height: 20px; }
    .fm-sheet .fm-home { display: none; }
    .fm-sheet { position: absolute; }
    .fm-sheet-head { padding-right: 48px; }
    .fm-big { font-size: 20px; }
    .fm-rows > div, .fm-list > div, .fm-list > a, .fm-list > .fm-pick, .fm-month > summary, .fm-mark-row .fm-mark { font-size: 16px; }
    .fm-sheet .small, .fm-sheet .muted.small, .fm-list .small { font-size: 14px; }
    .fm-sec { font-size: 13px; }
    .fm-seg button { min-height: 40px; font-size: 14px; }
    .fm-back { min-height: 44px; font-size: 15px; }
    .fm-npk b { font-size: 24px; }
    .fm-sheet .fm-acts { margin: auto -14px 0; padding: 8px 14px 10px; gap: 6px; }
    .fm-sheet .fm-acts .btn, .fm-sheet .fm-acts form .btn { min-height: 44px; font-size: 15px; justify-content: center; }
    .fm-danger .btn, .fm-mark-opts .btn { min-height: 44px; font-size: 15px; }
    .fm-grip { height: 28px !important; }
    /* eingeklappt: Name + Kennzahl, ✕ rechts */
    .fm.has-sheet.sheet-peek .fm-map { bottom: 104px; }
    .fm.has-sheet.sheet-peek .fm-sheet { height: 104px; }
    .fm.has-sheet.sheet-peek .fm-sheet > *:not(.fm-grip):not(.fm-sheet-head):not(.fm-peek-hint):not(.fm-big):not(.fm-x) { display: none; }
    .fm.has-sheet.sheet-peek .fm-sheet > .fm-big { display: block !important; }   /* ältere Regel (ANNAHMEN 514) blendete alles außer dem Kopf aus */
    .fm.has-sheet.sheet-peek .fm-sheet > .fm-x { display: flex !important; }
    .fm.has-sheet.sheet-peek .fm-sheet-head h2 { font-size: 18px; }
    .fm.has-sheet.sheet-peek .fm-big { order: 2; margin: 2px 0 0; font-size: 15px; color: #4f5a43; }
    .fm.has-sheet.sheet-peek .fm-big b::after { content: "  ▲"; font-size: 12px; }
    .fm.has-sheet.sheet-peek .fm-sheet:has(.fm-big) .fm-peek-hint { display: none; }
    .fm.has-sheet.sheet-peek .fm-peek-hint { font-size: 14px; color: #4f5a43; }
    .fm.has-sheet.sheet-peek .fm-x { top: 22px; }
}

/* Handy-Navigation (Nutzer 13.11.2026, ANNAHMEN 519): Lupe oben in der Leiste statt eigener Suchzeile, Menü nur noch über „Mehr“ unten,
   „Mehr“ als Blatt von unten. Der Rest der Bedienbarkeits-Etappen 1–6 ist zurückgenommen (Nutzer geht ihn selbst Schritt für Schritt durch). */
.topbar-search { display: none; }
.sidebar-close-wide, .logout-txt { display: none; }
@media (max-width: 719px) {
    html[data-nav="dinge"] .topbar-search { display: inline-flex; }
    html[data-nav="dinge"] .main > .searchbar { display: none; }
    html[data-nav="dinge"] body:has(.bottombar) .topbar [data-sidebar-toggle] { display: none; }
}
@media (max-width: 959px) {
    .sidebar { inset: auto 0 0 0; width: 100%; max-width: none; max-height: 88vh; border-right: 0; border-radius: 20px 20px 0 0; transform: translateY(102%); }
    body.sidebar-open .sidebar { transform: none; }
    .sidebar .nav-things { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
    .sidebar .nav-things .nav-link { min-height: 48px; }
    .sidebar-close-wide { display: flex; justify-content: center; min-height: 46px; width: calc(100% - 24px); margin: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
    .logout-btn { display: inline-flex; flex-direction: row; align-items: center; width: auto !important; min-height: 44px; padding: 0 12px; gap: 6px; white-space: nowrap; border: 1px solid var(--line); border-radius: 12px; }
    .logout-txt { display: inline; font-size: 15px; }
}

/* Lupe oben in der Navigation, Suche gleitet herein (Nutzer 13.11.2026, ANNAHMEN 520) */
.sidebar-search { display: none; }
@media (min-width: 960px) {
    .sidebar-search { display: flex; width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; margin: 0 0 6px; }
    .sidebar-search kbd { margin-left: auto; font: inherit; font-size: .7rem; border: 1px solid var(--side-muted); border-radius: 5px; padding: 0 5px; color: var(--side-muted); opacity: .8; }
    .sidebar-search:active .icon { transform: scale(.9); }
}
.dash-row > span.color-dot:first-of-type { flex: none; margin-top: 5px; }
@media (max-width: 959px) { html[data-nav="dinge"] .topbar-search { display: inline-flex; } }
.search-overlay:not([hidden]) { animation: search-fade .2s ease-out; }
.search-overlay:not([hidden]) .search-box { animation: search-slide .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes search-fade { from { background: rgba(30, 34, 26, 0); } }
@keyframes search-slide { from { transform: translateY(-36px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .search-overlay:not([hidden]), .search-overlay:not([hidden]) .search-box { animation: none; } }

/* Hofkarte am Handy: Blatt gleitet hoch und runter, ✕ eckig wie die Leistenknöpfe (Nutzer 13.11.2026, ANNAHMEN 521) */
@media (max-width: 719px) {
    .fm.sheet-anim .fm-sheet { transition: height .3s cubic-bezier(.2, .8, .2, 1); }
    .fm.sheet-anim .fm-map { transition: bottom .3s cubic-bezier(.2, .8, .2, 1); }
    .fm-x { width: 44px; height: 40px; border-radius: 12px; background: rgba(0, 0, 0, .07); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }
    .fm-x:active { transform: scale(.92); }
}
@media (max-width: 719px) and (prefers-reduced-motion: reduce) { .fm.sheet-anim .fm-sheet, .fm.sheet-anim .fm-map { transition: none; } }

/* Steckbrief je Hofkarten-Sicht, Umriss auf dem Luftbild (Nutzer 13.11.2026, ANNAHMEN 522) */
.fp-focus { margin: 0 0 16px; }
.fp-lmap { height: 300px; border-radius: 10px; overflow: hidden; background: #2b3326; }
.fp-yt th, .fp-yt td { white-space: nowrap; }
.fp-yt td:first-child, .fp-yt th:first-child { white-space: normal; min-width: 120px; }
.fp-yt .fp-sum { font-weight: 700; border-left: 2px solid var(--line); }
.fp-yt tfoot th { border-top: 2px solid var(--line-strong); }
.fp-yt .fp-yt-sep td { border-top: 2px solid var(--line-strong); }
.fp-miss { color: var(--muted); margin-left: 2px; cursor: help; }
.fp-done { color: var(--primary-dark, #3d6b2a); }
.fp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2, var(--hover)); font-size: .85rem; }
.fp-scroll { max-height: 360px; overflow-y: auto; }
.fp-sub { margin: 14px 0 6px; }
html.in-dialog .fp-lmap { height: 260px; }
.wb-peek-body .fp-lmap { display: none; }
@media (max-width: 719px) { .fp-lmap { height: 240px; } }

/* Steckbrief: Sorte wählen, Entzug, Markierungen auf der Karte (Nutzer 13.11.2026, ANNAHMEN 523) */
.fp-vchips { margin-bottom: 8px; }
.fp-vchips .chip .color-dot { margin-right: 6px; }
.fp-h1-var { color: var(--muted); font-weight: 600; }
.fp-yt .fp-yt-head td { font-size: .8rem; color: var(--muted); padding-top: 10px; border-top: 2px solid var(--line-strong); }
.fp-bal { font-size: .75rem; font-weight: 700; }
.fp-bal.is-pos { color: var(--primary-dark, #3d6b2a); }
.fp-bal.is-neg { color: #b4472e; }
.fp-yt td a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.fp-yt td a:hover { text-decoration-color: currentColor; }
.table tr.is-selected td { background: var(--hover, rgba(0,0,0,.04)); font-weight: 600; }
.fp-mk-row { align-items: center; }
.fp-mk-show { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.fp-mk-show:hover { text-decoration: underline; }
.fp-mk-acts { display: inline-flex; gap: 4px; flex: none; }
.fp-mk-acts .btn { padding: 4px 8px; }
.fp-mk-acts .icon { width: 16px; height: 16px; }
.fp-mk-pop { line-height: 1.4; }
.fp-mk-pop-btns { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fp-map-hint { margin: 6px 0 0; }

/* Steckbrief Schutz: Kacheln zu Spritz- und Düngetagebuch (Nutzer 13.11.2026, ANNAHMEN 525) */
.fp-diaries { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0 0 16px; }
@media (min-width: 600px) { .fp-diaries { grid-template-columns: 1fr 1fr; } }
.fp-diary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
    color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s, box-shadow .15s; }
.fp-diary:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.fp-diary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fp-diary-ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.fp-diary-ic .icon { width: 22px; height: 22px; }
.fp-diary-spray .fp-diary-ic { background: rgba(58, 125, 184, .13); color: #2f6c9f; }
.fp-diary-fert .fp-diary-ic { background: rgba(92, 140, 60, .15); color: #4b7a2e; }
.fp-diary-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fp-diary-tx b { font-size: 1rem; }
.fp-diary-tx span { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.fp-diary-go { flex: none; font-size: 1.6rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.fp-diary:hover .fp-diary-go { transform: translateX(3px); color: inherit; }
@media (prefers-reduced-motion: reduce) { .fp-diary, .fp-diary-go { transition: none; } .fp-diary:hover { transform: none; } }

/* Seitenleiste: Ernten, Scannen, Spritzen unter dem Betriebsnamen (Nutzer 13.11.2026, ANNAHMEN 527) */
.sidebar-acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 0 14px 12px; }
.sidebar-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; padding: 8px 4px; border-radius: 12px;
    background: var(--primary-soft, rgba(92, 140, 60, .14)); color: var(--primary-dark, #3d6b2a); font-size: .78rem; font-weight: 700; text-decoration: none;
    transition: background .15s, transform .15s; }
.sidebar-act .icon { width: 20px; height: 20px; }
.sidebar-act:hover { background: var(--primary, #5c8c3c); color: #fff; }
.sidebar-act:active { transform: scale(.96); }
.sidebar-act.is-on { background: var(--primary, #5c8c3c); color: #fff; }
.sidebar-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sidebar-act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (min-width: 960px) {
    html[data-theme="minze"] .sidebar-acts { padding: 0 13px 10px; }   /* Leiste ist am PC immer offen (ANNAHMEN 528) */
}
@media (prefers-reduced-motion: reduce) { .sidebar-act { transition: none; } .sidebar-act:active { transform: none; } }

/* Navigation (Nutzer 13.11.2026, ANNAHMEN 529): Knöpfe ohne Unterstreichung; Handy: Suchen, Ernten, Scannen, Spritzen mit Namen in einer Gruppe */
.sidebar-act, .sidebar-act:hover, .sidebar-act:focus, .topbar-act, .topbar-act:hover, .topbar-act:focus { text-decoration: none; }
@media (max-width: 959px) {
    .topbar-acts .topbar-act { flex-direction: column; gap: 1px; width: auto; min-width: 50px; height: 44px; padding: 4px 6px 3px; border: 0; background: transparent;
        font: inherit; font-size: 10.5px; font-weight: 650; line-height: 1.1; cursor: pointer; }
    .topbar-acts .topbar-act .icon { width: 19px; height: 19px; }
    .topbar-acts .topbar-act span { white-space: nowrap; }
    .topbar-acts .topbar-act:hover { background: color-mix(in srgb, var(--card) 60%, transparent); }
    .topbar-acts .topbar-act.is-on { background: var(--card); }
    .topbar-acts .topbar-search { display: none; }
    .topbar-title { min-width: 0; }
}
@media (max-width: 959px) { html[data-nav="dinge"] .topbar-acts .topbar-search { display: inline-flex; } }
@media (min-width: 720px) and (max-width: 959px) { html[data-nav="dinge"] .topbar-acts .topbar-search { display: none; } }
@media (max-width: 380px) {
    .topbar-acts .topbar-act { min-width: 44px; padding: 4px 3px 3px; font-size: 10px; }
}

/* Hofkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 530): kein GPS-Knopf unter Ernte, Spritzen, Boden; Bodenkarte-Auswahl im Blatt, Legende auf der Karte;
   beim Markieren füllt die Karte den ganzen Bildschirm */
.fm-soil-leg { display: none; }
@media (max-width: 719px) {
    .fm[data-view="ernte"] .fm-locate, .fm[data-view="schutz"] .fm-locate, .fm[data-view="boden"] .fm-locate { display: none; }
    .fm .fm-sheet .soil-bar, .fm .fm-sheet .soil-bar.is-open { position: static; width: auto; max-width: none; max-height: none; margin: 10px 0 6px; padding: 0;
        background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; overflow: visible; }
    .fm .fm-sheet .soil-bar .soil-theme { width: 100%; min-height: 44px; font-size: 15px; }
    .fm .fm-sheet .soil-bar .soil-source { font-size: 11.5px; line-height: 1.35; margin-top: 4px; }
    .fm.fm-soil-in-sheet .fm-sheet.is-empty { left: 8px; right: 8px; display: flex; flex-direction: column; align-items: stretch; padding: 10px 12px; border-radius: 16px; }
    .fm.fm-soil-in-sheet .fm-sheet.is-empty .soil-bar { margin: 0 0 8px; }
    .fm.fm-soil-in-sheet .fm-sheet.is-empty .soil-source { display: none; }
    .fm.fm-soil-in-sheet .fm-sheet.is-empty .fm-sheet-empty { justify-content: center; }
    .fm-soil-leg:not([hidden]) { display: block; position: absolute; top: 8px; left: 8px; z-index: 500; max-width: calc(100% - 16px); max-height: 42%; overflow: auto;
        padding: 8px 12px; border-radius: 12px; background: rgba(252,251,246,.97); box-shadow: 0 6px 24px rgba(0,0,0,.25); color: #22261c; }
    .fm-soil-leg .soil-details { margin: 0; }
    .fm-soil-leg .soil-details summary { font-size: 14px; min-height: 28px; }
    body.fm-marking-full { overflow: hidden; }
    body.fm-marking-full .fm.fm-marking { position: fixed; inset: 0; z-index: 1500; height: auto !important; min-height: 0; border: 0; border-radius: 0; }
    body.fm-marking-full .fm.fm-marking > .fm-map { inset: 0 !important; border-radius: 0; }
    body.fm-marking-full .fm.fm-marking .fm-sheet, body.fm-marking-full .fm.fm-marking .fm-legend, body.fm-marking-full .fm.fm-marking .fm-fab { display: none !important; }
    body.fm-marking-full .fm.fm-marking .fm-markbar { bottom: calc(16px + env(safe-area-inset-bottom)); }
    body.fm-marking-full .fm.fm-marking .leaflet-bottom.leaflet-left { bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* Handy: Abschnitte zum Aufklappen (Nutzer 13.11.2026, ANNAHMEN 531) */
.fm-stat-sum { display: none; }
@media (max-width: 719px) {
    .fold-ready > .fold-head { cursor: pointer; position: relative; padding-right: 30px; -webkit-tap-highlight-color: transparent; user-select: none; }
    .fold-ready > .fold-head::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
        border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .55; transition: transform .2s ease; }
    .fold-ready.is-folded > .fold-head::after { transform: rotate(-45deg); margin-top: -4px; }
    .fold-ready.is-folded > :not(.fold-head) { display: none !important; }
    .fold-ready.is-folded > .fold-head { margin-bottom: 0 !important; }
    .fold-ready.is-folded { padding-bottom: 14px; }
    .fp-eval.fold-ready.is-folded { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
    .fp-eval.fold-ready > .fold-head { margin: 0; font-size: 1.05rem; }
    .vp-years { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .vp-years::-webkit-scrollbar { display: none; }
    .vp-years > .chip { flex: none; }
    .fm-stats { gap: 8px; }
    .fm-stat-field.fold-ready { padding: 12px 14px; }
    .fm-stat-field.is-folded .fm-stat-sum { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
    .fm-stat-sum > span { display: inline-flex; align-items: center; gap: 3px; }
    .fm-stat-field .fm-stat-head h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Handy: Spritzung und Düngung Schritt für Schritt (Nutzer 13.11.2026, ANNAHMEN 532) */
.msteps-head, .msteps-foot { display: none; }
@media (max-width: 719px) {
    .msteps-on .mstep-off { display: none !important; }
    .msteps-head { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
    .msteps-dots { display: flex; align-items: center; }
    .msteps-dots i { flex: 1; height: 2px; background: var(--line); margin: 0 4px; }
    .msteps-dots button { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: var(--muted);
        font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 0; }
    .msteps-dots button.is-done { border-color: var(--primary); color: var(--primary); }
    .msteps-dots button.is-on { border-color: var(--primary); background: var(--primary); color: #fff; }
    .msteps-t { display: flex; flex-direction: column; }
    .msteps-t span { font-size: 13px; color: var(--muted); }
    .msteps-t b { font-size: 19px; }
    .msteps-foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; margin: 0; padding: 10px 14px;
        background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); }   /* sitzt auf der unteren Leiste, als wäre sie höher (ANNAHMEN 537) */
    .msteps-foot .btn { min-height: 48px; justify-content: center; font-size: 16px; }
    .msteps-on .sd-submit .btn { display: none; }
    .msteps-on > .card { margin-bottom: 0; }
    .msteps-on .sd-form > h2 { font-size: 16px; color: var(--muted); }
}
@media (max-width: 719px) {
    .msteps-on .sd-form > .grid-2, .msteps-on .sd-block.grid-2, .msteps-on .sd-block.grid-3 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .msteps-on .sd-block.grid-2 > .field:first-child, .msteps-on .sd-dir-field, .msteps-on .sd-ops, .msteps-on .sd-op-add { grid-column: 1 / -1; }
    .msteps-on .sd-form .field { margin-bottom: 0; }
    .msteps-on .sd-dirs button { min-height: 40px; min-width: 44px; }
}

/* Handy: Spritztagebuch-Liste kompakt (Nutzer 13.11.2026, ANNAHMEN 533): je Spritzung zwei, drei Zeilen; Felder-Tabelle im Eintrag mit eigenem Scrollbereich */
@media (max-width: 719px) {
    .sd-job, .sd-job.card { margin-bottom: 6px; padding: 0; }
    .sd-job-sum { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 3px 10px; padding: 10px 12px; align-items: start; position: relative; padding-right: 30px; }
    .sd-job-sum::after { content: ""; position: absolute; right: 12px; top: 18px; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .45; }
    .sd-job[open] > .sd-job-sum::after { transform: rotate(-135deg); top: 22px; }
    .sd-job-date { min-width: 0; grid-row: 1 / span 2; }
    .sd-job-date strong { font-size: 14px; }
    .sd-job-date .small { font-size: 12px; }
    .sd-job-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
    .sd-job-main .small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 13px; }
    .sd-job[open] .sd-job-main .small { -webkit-line-clamp: unset; line-clamp: none; }
    .sd-job-badges { grid-column: 2; flex-wrap: wrap; gap: 4px; }
    .sd-job-badges:empty { display: none; }
    .sd-job-body { padding: 0 12px 12px; }
    .sd-job-body .sd-dl + .table-wrap { max-height: 300px; overflow: auto; }
    .sd-job-body .sd-dl + .table-wrap th:nth-child(3), .sd-job-body .sd-dl + .table-wrap td:nth-child(3) { display: none; }
    .sd-month { margin: 12px 0 6px; }
}

/* Wurzelschnitt (Nutzer 13.11.2026, ANNAHMEN 534/535): Fahrt mit Traccar, Nachtragen per Reihe; am Handy nur Schneiden, groß und einfach */
.rc-trk { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--surface-2, var(--hover)); }
.rc-trk.is-on { background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary-dark, inherit); }
.rc-trk:empty { display: none; }
.rc-pick { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.rc-pick-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rc-pick-btns .btn { justify-content: center; min-height: 40px; }
@media (max-width: 719px) {
    .rc-modes [data-rc-mode="draw"], .rc-panel[data-rc-panel="draw"], .rc-settings { display: none !important; }
    .rc-cut .rc-big { min-height: 76px; font-size: 1.35rem; border-radius: 18px; }
    .rc-cut .rc-status { font-size: 17px; font-weight: 650; margin: 0; }
    .rc-recording .rc-toolbar, .rc-recording [data-rc-close] { display: none; }
    .rc-recording .rc-cut { position: sticky; top: 64px; z-index: 30; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
}
@media (max-width: 719px) {
    .rc-head p.muted { display: none; }
    .rc-app { display: flex; flex-direction: column; gap: 10px; }
    .rc-app > * { margin-top: 0; margin-bottom: 0; }
    .rc-app > .rc-cut { order: -1; }
    .rc-app .rc-legend { display: none; }
}
@media (max-width: 719px) { .rc-cut [data-rc-close] { display: none; } }

/* Hofkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 536): Karte über die ganze Breite, unten direkt an der Navigationsleiste – das Blatt gleitet aus der Leiste heraus */
@media (max-width: 719px) {
    body:has(#farm-map) .main { padding-bottom: 0; }
    .fm { margin-left: -14px; margin-right: -14px; border: 0; border-radius: 22px 22px 0 0; }
    .fm > .fm-map { inset: 0; border-radius: 22px 22px 0 0; }
    .fm.has-sheet .fm-sheet { border-radius: 18px 18px 0 0; box-shadow: 0 -6px 18px rgba(0,0,0,.22); border-bottom: 1px solid var(--line); }
    .fm .fm-sheet.is-empty { bottom: 10px; }
}

/* Handy: Spritzung/Düngung eintragen (Nutzer 13.11.2026, ANNAHMEN 537): nur noch Schritte – Seitenkopf, Kupfer, Reiter weg; Kopf als Karte;
   Zurück/Weiter fest auf der unteren Leiste; jeder Schritt als eigene, aufgeräumte Karte */
@media (max-width: 719px) {
    .main:has(> [data-msteps]) > .page-head, .main:has(> [data-msteps]) > .cu-pill, .main:has(> [data-msteps]) > p.hide-mobile { display: none !important; }   /* Reiter bleiben sichtbar – Weg zu den fertigen Einträgen (Nutzer 14.11.2026, ANNAHMEN 602) */
    body.has-msteps .main { padding-bottom: calc(160px + env(safe-area-inset-bottom)); }
    body.has-msteps .bottombar { border-top-color: transparent; box-shadow: none; }
    .msteps-head { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 14px; gap: 10px; margin: 0 0 10px; }
    .msteps-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
    .msteps-sub { color: var(--muted); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .msteps-top a { flex: none; font-weight: 650; text-decoration: none; }
    .msteps-t b { font-size: 20px; line-height: 1.2; }
    .msteps-on { gap: 10px; }
    .msteps-on > .card { border-radius: 18px; }
    .msteps-on .sd-form { padding: 14px; }
    .msteps-on .sd-form > h2, .msteps-on .sd-fields-title h2 { display: none; }
    .msteps-on .sd-fields-title { justify-content: flex-end; margin: 0 0 8px; }
    .msteps-on .sd-fields-head { padding: 12px 14px; }
    .msteps-on .sd-field-list { max-height: none; overflow: visible; }
    .msteps-on .sd-f-row { padding: 12px 14px; }
    .msteps-on .sd-f-row input[type=checkbox] { width: 22px; height: 22px; margin-top: 2px; }
    .msteps-on .sd-block { margin: 0; padding: 0; border: 0; }
    .msteps-on .sd-form > :not(.mstep-off) + :not(.mstep-off) { margin-top: 14px; }
    .msteps-on .sd-block h3 { font-size: 15px; margin: 0 0 8px; }
    .msteps-on .sd-inv, .msteps-on .sd-block .chip-list { gap: 6px; }
    .msteps-on .sd-inv .chip, .msteps-on .sd-block .chip-list .chip { min-height: 40px; font-size: 14px; }
    .msteps-on .sd-form input:not([type=checkbox]):not([type=radio]), .msteps-on .sd-form select, .msteps-on .sd-form textarea { min-height: 46px; font-size: 16px; width: 100%; }
    .msteps-on .sd-form label, .msteps-on .sd-form .label { font-size: 14px; font-weight: 600; }
    .msteps-on .fd-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
    .msteps-on .sd-submit { margin: 0; }
    .msteps-on .sd-submit p:empty { display: none; }
    .msteps-on [data-sd-errors], .msteps-on [data-fd-errors] { margin: 0 0 10px; }
}
@media (max-width: 719px) {
    .msteps-on > .sd-fields.card { padding: 0; overflow: hidden; }
    .msteps-on [data-sd-quick], .msteps-on [data-fd-quick] { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
    .msteps-on [data-sd-quick] .chip, .msteps-on [data-fd-quick] .chip { width: auto; min-height: 38px; font-size: 13.5px; }
    .msteps-on .sd-quick-row { display: flex; gap: 8px; align-items: center; }
    .msteps-on .sd-quick-row select { flex: 1; min-height: 42px; }
    .msteps-on .sd-fields-title { margin: 0 0 10px; }
    .msteps-on .sd-fields-title .segmented { width: 100%; }
    .msteps-on .sd-fields-title .segmented button { flex: 1; }
}
@media (max-width: 719px) {
    /* Abschnitte innerhalb eines Schritts mit Überschrift und Trennlinie (ANNAHMEN 537) */
    .msteps-on .sd-form > [data-step]:not(:has(> h3)):not(:has(> .fd-block-head))::before { content: attr(data-step); display: block; grid-column: 1 / -1; font-size: 15px; font-weight: 700; margin: 0 0 8px; }
    .msteps-on .sd-form > [data-step]:not(.mstep-off) ~ [data-step]:not(.mstep-off) { border-top: 1px solid var(--line); padding-top: 14px; }
    .msteps-on .sd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .msteps-on .sd-bbch-hints { font-size: 13.5px; }
}
@media (max-width: 719px) {
    .msteps-foot { grid-template-columns: auto 1fr; }
    .msteps-foot .btn { min-width: 0; padding-left: 14px; padding-right: 14px; white-space: nowrap; overflow: hidden; font-size: 15px; }
    .msteps-foot .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .msteps-on .sd-form > [data-mstep="4"].grid-3::before { content: none; }
}

/* Bodenkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 538): Legende immer offen, ohne weißen Kasten – dunkel durchscheinend auf dem Luftbild */
@media (max-width: 719px) {
    .fm-soil-leg:not([hidden]) { background: rgba(18, 22, 16, .52); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: none; color: #fff;
        padding: 6px 10px; border-radius: 10px; max-width: min(250px, calc(100% - 16px)); max-height: 46%; }
    .fm-soil-leg .soil-details > summary { display: none; }
    .fm-soil-leg .soil-legend { margin-top: 0; font-size: 12px; }
    .fm-soil-leg .soil-legend, .fm-soil-leg .soil-leg-row b, .fm-soil-leg .soil-scale-ticks, .fm-soil-leg .soil-leg-note { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
    .fm-soil-leg .soil-leg-note { font-size: 11px; opacity: .85; }
}

/* Hofkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 539): das Blatt sieht aus wie die untere Navigation – gleiche Farbe, gerade Kante, Linie oben;
   die Linie über der Navigation verschwindet, so wirkt es, als würde die Leiste höher */
@media (max-width: 719px) {
    .fm.has-sheet .fm-sheet, .fm.fm-soil-in-sheet .fm-sheet.is-empty { left: 0; right: 0; bottom: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line);
        background: var(--card); box-shadow: 0 -2px 10px rgba(0, 0, 0, .06); backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--text); }
    .fm.has-sheet .fm-sheet .fm-acts { background: var(--card); }
    body:has(.fm.has-sheet) .bottombar, body:has(.fm.fm-soil-in-sheet) .bottombar { border-top-color: transparent; box-shadow: none; }
}

/* Wurzelschnitt: Pause außerhalb eines Feldes (ANNAHMEN 540) */
.rc-paused .rc-status { color: #b86a00; }
.rc-paused [data-rc-stop] { opacity: .85; }
@media (max-width: 719px) { .msteps-on .sd-form > .field[data-step]::before { content: none; } }

/* Scan (Nutzer 13.11.2026, ANNAHMEN 541): erst Einzelscan oder Massenscan wählen; Kamera-Vollbild nie von der Seiten-Animation festhalten */
html.scan-fullscreen .main > * { animation: none !important; transform: none !important; }
.scan-choose { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.scan-choose[hidden] { display: none; }
.scan-choose .wizard-question { margin: 4px 0 4px; }
.scan-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--card);
    color: var(--text); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); transition: border-color .15s ease, transform .1s ease; }
.scan-choice:hover { border-color: var(--primary); }
.scan-choice:active { transform: scale(.98); }
.scan-choice-ic { flex: none; width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; }
.scan-choice-ic.is-mass { background: var(--primary-soft); color: var(--primary-dark, var(--primary)); }
.scan-choice-ic .icon { width: 26px; height: 26px; }
.scan-choice-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.scan-choice-tx strong { font-size: 18px; }
.scan-choice-tx span { font-size: 14px; color: var(--muted); line-height: 1.35; }
.scan-choice-go { font-size: 26px; color: var(--muted); }
@media (max-width: 719px) { .scan-choice { min-height: 96px; } }

/* Hofkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 542): unten zur Navigation gerade, oben rund – auch im Stil Minze (der rundete .fm ringsum) */
@media (max-width: 719px) {
    html body .fm, html[data-theme] body .fm { border-radius: 22px 22px 0 0; }
    .fm.has-sheet .fm-sheet, .fm.fm-soil-in-sheet .fm-sheet.is-empty { border-radius: 20px 20px 0 0; }
}

/* Hofkarte am Handy: Blatt mit dem Finger ziehen, drei Rastpunkte (Nutzer 13.11.2026, ANNAHMEN 543) */
@media (max-width: 719px) {
    .fm.has-sheet.sheet-full .fm-sheet { height: calc(100% - 56px); }
    .fm.has-sheet.sheet-full .fm-map { bottom: calc(100% - 56px); }
    .fm.has-sheet .fm-sheet { touch-action: pan-y; }
    .fm.has-sheet .fm-grip { background: var(--card); height: 26px; }
    .fm.has-sheet .fm-grip::after { width: 48px; }
}

/* Hofkarte am Handy (Nutzer 13.11.2026, ANNAHMEN 544): Blatt höchstens so hoch wie beim Antippen, ✕ entfällt (runterwischen klappt ein) */
@media (max-width: 719px) { .fm .fm-sheet .fm-x, .fm.has-sheet.sheet-peek .fm-sheet > .fm-x { display: none !important; } .fm-sheet-head { padding-right: 0; } }

/* Spritz-/Düngetagebuch: Hinweis „vorbelegt / bearbeiten / nach Vorbild“ als Banner (Nutzer 13.11.2026, ANNAHMEN 546) */
.sd-nb { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent); }
.sd-nb-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; }
.sd-nb-ic .icon { width: 20px; height: 20px; }
.sd-nb-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.sd-nb-tx strong { font-size: 15px; }
.sd-nb-tx span { font-size: 13.5px; color: var(--muted); }
.sd-nb-reset { flex: none; white-space: nowrap; text-decoration: none; }
.sd-nb-reset:hover { text-decoration: none; }
@media (max-width: 719px) {
    .sd-nb { flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; border-radius: 18px; }
    .sd-nb-reset { margin-left: 52px; padding-left: 0; min-height: 32px; }
}

/* Schritte am Handy: vergessene Pflichtfelder rot markiert (Nutzer 13.11.2026, ANNAHMEN 548) */
.ms-miss { outline: 2px solid #d64545; outline-offset: 2px; border-radius: 12px; }
input.ms-miss, select.ms-miss, textarea.ms-miss { outline-offset: 0; border-color: #d64545 !important; background-color: #fff5f4 !important; }
.ms-miss-txt { display: block; margin: 6px 0 0; color: #c62f2f; font-size: 13.5px; font-weight: 650; }
.sd-fields > .ms-miss-txt, [data-sd-inventory] > .ms-miss-txt, [data-fd-ferts] > .ms-miss-txt { margin: 10px 14px; flex-basis: 100%; }
.msteps-warn { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-radius: 10px; background: #fdecea; color: #a52222; font-size: 14px; font-weight: 650; }
.msteps-warn[hidden] { display: none; }
/* Vergessene Pflichtfelder rot hinterlegt statt umrandet (Nutzer 13.11.2026, ANNAHMEN 549) */
.ms-miss { outline: 0; background-color: #f2aa9d !important; border-radius: 12px; }
.chip-list.ms-miss, .sd-fields.ms-miss { padding: 8px; }
input.ms-miss, select.ms-miss, textarea.ms-miss { outline: 0; border-color: transparent !important; background-color: #f2aa9d !important; }
.sd-dose-in.ms-miss input, .sd-dose-in.ms-miss select { background-color: #f2aa9d !important; border-color: transparent !important; }
.sd-dose-in.ms-miss { padding: 0; }
.msteps-warn { background: #f2aa9d; color: #7a1408; }
.ms-miss-txt { color: #b3200f; }

/* Handy-Navigation (Nutzer 14.11.2026, ANNAHMEN 551, Variante 2 von 5): unten Startseite, Felder, Plus, Lager, Mehr – das Plus öffnet
   die Schnellwahl (Ernten, Scannen, Spritzen, Suchen) als Blatt von unten; oben bleibt nur Suchen */
.mnv-sheet, .mnv-back { display: none; }
@media (max-width: 959px) {
    html[data-nav="dinge"] .topbar-acts [data-act="harvest"], html[data-nav="dinge"] .topbar-acts [data-act="scan"], html[data-nav="dinge"] .topbar-acts [data-act="spray"] { display: none; }
    .bb-center { position: relative; color: var(--primary); }
    .bb-center-dot { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin-top: -26px; border-radius: 50%;
        background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .22), 0 0 0 5px var(--card); }
    .bb-center .bb-center-dot .icon { width: 28px; height: 28px; }
    .bb-center[aria-expanded="true"] .bb-center-dot { background: var(--primary-dark, var(--primary)); transform: rotate(45deg); }
    .bb-center-dot { transition: transform .2s ease, background-color .2s ease; }
    .mnv-back:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 1600; background: rgba(20, 24, 18, .35); }
    .mnv-sheet:not([hidden]) { display: flex; flex-direction: column; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1601; padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
        background: var(--card); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); animation: mnv-up .22s cubic-bezier(.2, .8, .2, 1); }
    @keyframes mnv-up { from { transform: translateY(40px); opacity: 0; } }
    .mnv-sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .2); margin: 0 auto 4px; }
    .mnv-sheet-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .mnv-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 96px; border: 1px solid var(--line); border-radius: 18px;
        background: var(--primary-soft); color: var(--primary-dark, var(--primary)); font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
    .mnv-tile:hover, .mnv-tile:focus { text-decoration: none; }
    .mnv-tile.is-active { background: var(--primary); color: #fff; }
    .mnv-tile .icon { width: 30px; height: 30px; }
    .mnv-sheet-x { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .mnv-sheet:not([hidden]) { animation: none; } .bb-center-dot { transition: none; } }

/* Handy: Unternavigation aller Seiten wie bei „Felder“ – Symbol über dem Namen, helle Leiste, aktiver Reiter grün (Nutzer 14.11.2026, ANNAHMEN 552) */
@media (max-width: 719px) {
    html .pagebar .tabs:not(.fm-tabs) { display: flex !important; flex-wrap: nowrap; width: 100%; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    html .pagebar .tabs:not(.fm-tabs)::-webkit-scrollbar { display: none; }
    html .pagebar .tabs:not(.fm-tabs) .tab { flex: 1 0 auto; min-width: 60px; max-width: none; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 52px; padding: 4px 6px; border-radius: 12px; font-size: 12px; line-height: 1.1; text-align: center; white-space: normal; }
    html .pagebar .tabs:not(.fm-tabs) .tab .icon { display: block !important; flex: none; width: 20px; height: 20px; margin: 0; }
    html .pagebar .tabs:not(.fm-tabs) .tab > span:not(.nav-badge) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html .pagebar .tabs:not(.fm-tabs) .tab .nav-badge { position: absolute; top: 2px; right: 2px; margin: 0; padding: 0 4px; font-size: 8.5px; line-height: 14px; }
}
/* Handy: untere Leiste (mit dem runden Plus) liegt über Blatt und Karte der Hofkarte (Nutzer 14.11.2026, ANNAHMEN 553) */
@media (max-width: 959px) { .bottombar { z-index: 700; } }
@media (max-width: 719px) { body:has(.bb-center) .fm-sheet .fm-acts { padding-bottom: 32px; } }

/* Handy (Nutzer 14.11.2026, ANNAHMEN 554): obere weiße Leiste (Seitenname, Suchen, Konto) entfällt – Suchen steckt in der Schnellwahl,
   das Konto unter „Mehr“. Platz für die Statusleiste des Handys bleibt; Leisten, die unter der oberen klebten, rücken nach oben */
@media (max-width: 719px) {
    body:has(.bb-center) .topbar { display: none; }
    body:has(.bb-center) .main { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
    body:has(.bb-center) .scan-page .scan-bar { top: calc(8px + env(safe-area-inset-top, 0px)); }
    body:has(.bb-center) .eval-tabs { top: env(safe-area-inset-top, 0px); }
    body:has(.bb-center) .rc-recording .rc-cut { top: calc(8px + env(safe-area-inset-top, 0px)); }
}

/* Handy (Nutzer 14.11.2026, ANNAHMEN 555): Unternavigation bleibt beim Scrollen oben stehen; der Inhalt läuft darunter durch */
@media (max-width: 719px) {
    body:has(.bb-center) .pagebar.has-tabs { position: sticky; top: 0; z-index: 25; margin: calc(-10px - env(safe-area-inset-top, 0px)) -14px 12px;
        padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; background: color-mix(in srgb, var(--bg) 88%, transparent);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    body:has(.bb-center) .pagebar.has-tabs .tabs { margin: 0; }
    /* weitere klebende Leisten unter der Unternavigation */
    body:has(.bb-center):has(.pagebar.has-tabs) .scan-page .scan-bar { top: calc(78px + env(safe-area-inset-top, 0px)); }
    body:has(.bb-center):has(.pagebar.has-tabs) .eval-tabs { top: calc(76px + env(safe-area-inset-top, 0px)); }
    body:has(.bb-center):has(.pagebar.has-tabs) .rc-recording .rc-cut { top: calc(80px + env(safe-area-inset-top, 0px)); }
}

/* Handy-Vergleich (Nutzer 14.11.2026, ANNAHMEN 556): zwei Handys nebeneinander (375 × 812, verkleinert), rechts die Einstellungen */
.cmp-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 12px 16px; margin-bottom: 14px; }
.cmp-bar .field { margin: 0; min-width: 200px; }
.cmp-go { display: none; }
.cmp { display: grid; grid-template-columns: auto auto minmax(300px, 1fr); gap: 18px; align-items: start; }
.cmp-phone { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cmp-phone figcaption { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cmp-screen { width: calc(375px * var(--cmp-k, .8) + 20px); height: calc(812px * var(--cmp-k, .8) + 20px); padding: 10px; border-radius: 34px; background: #1d211b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25); box-sizing: border-box; overflow: hidden; }
.cmp-screen iframe { width: 375px; height: 812px; border: 0; border-radius: 26px; background: var(--bg); transform: scale(var(--cmp-k, .8)); transform-origin: 0 0; }
.cmp-panel { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 8px; }
.cmp-panel .field { margin: 0; }
.cmp-sub { margin: 10px 0 0; }
.cmp-editor { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.cmp-msg:empty { display: none; }
@media (max-width: 1500px) { .cmp { --cmp-k: .7; } }
@media (max-width: 1280px) { .cmp { grid-template-columns: auto auto; } .cmp-panel { grid-column: 1 / -1; position: static; } }
/* Banner in der Ansicht als Mitarbeiter */
.als-banner { position: sticky; top: 0; z-index: 800; display: flex; align-items: center; gap: 6px; margin: -10px -14px 8px; padding: 6px 14px;
    background: #2b6cb0; color: #fff; font-size: 12.5px; font-weight: 650; }
.als-banner .icon { width: 16px; height: 16px; }

/* Handy (Nutzer 14.11.2026, ANNAHMEN 557): Unternavigation liegt über allem im Inhalt (auch Karten/Grafiken mit eigenen Ebenen);
   „Mehr“-Blatt über Karte, Legende und unterer Leiste */
.main .leaflet-container { isolation: isolate; }
@media (max-width: 719px) { body:has(.bb-center) .pagebar.has-tabs { z-index: 60; } }
@media (max-width: 959px) { .sidebar { z-index: 1650; } .sidebar-backdrop { z-index: 1640; } }
/* Regenkarte klein (Startseite) und groß: Schilder wie „Vorhersage …“ bleiben in ihrer Karte, die Unternavigation liegt darüber (Nutzer 14.11.2026, ANNAHMEN 558) */
.rain-mini, html:not(.rain-map-full) .rain-map, html:not(.rain-europe-full) .rain-europe { isolation: isolate; }

/* Kalender (Nutzer 14.11.2026, ANNAHMEN 560): Knöpfe eckig wie die Navigation – helle Leiste mit runden Ecken, Knöpfe 12 px rund, aktiver grün */
@media (max-width: 719px) {   /* nur Handy (Nutzer 14.11.2026) */
    .cal-toolbar .segmented[data-cal-views], .cal-nav { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border: 0; border-radius: 20px; background: var(--card);
        box-shadow: 0 1px 2px rgba(60, 50, 25, .04), 0 10px 28px rgba(60, 50, 25, .07); }
    .cal-toolbar .segmented[data-cal-views] button, .cal-nav > button { min-height: 38px; padding: 6px 14px; border: 0; border-radius: 12px; background: transparent;
        color: var(--muted); font: inherit; font-weight: 600; box-shadow: none; cursor: pointer; }
    .cal-nav > .icon-btn { width: 40px; padding: 0; justify-content: center; }
    .cal-toolbar .segmented[data-cal-views] button:hover, .cal-nav > button:hover { background: var(--primary-soft); color: var(--primary-dark, var(--primary)); }
    .cal-toolbar .segmented[data-cal-views] button.is-active { background: var(--primary); color: #fff; }
    .cal-nav .cal-title { margin: 0 8px 0 6px; }
    .main:has(#cal-app) .page-actions .btn { border-radius: 12px; }
}
@media (max-width: 719px) {
    .cal-toolbar { gap: 8px; }
    .cal-nav, .cal-toolbar .segmented[data-cal-views] { width: 100%; }
    .cal-toolbar .segmented[data-cal-views] button { flex: 1; padding: 6px 4px; }
    .cal-nav .cal-title { flex: 1; font-size: 15px; text-align: center; }
}
/* Aufgaben (Nutzer 14.11.2026, ANNAHMEN 561): Knöpfe im Stil der Navigation – Filter als helle Leiste mit eckigen Knöpfen, aktiver grün; alle Knöpfe 12 px rund */
@media (max-width: 719px) {   /* nur Handy (Nutzer 14.11.2026) */
.page-tasks .main .btn { border-radius: 12px; }
.task-chips { align-items: center; }
.task-filter { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 20px; background: var(--card);
    box-shadow: 0 1px 2px rgba(60, 50, 25, .04), 0 10px 28px rgba(60, 50, 25, .07); }
.task-filter .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px; margin: 0; border: 0; border-radius: 12px;
    background: transparent; color: var(--muted); font-weight: 600; text-decoration: none; box-shadow: none; }
.task-filter .chip:hover { background: var(--primary-soft); color: var(--primary-dark, var(--primary)); text-decoration: none; }
.task-filter .chip.is-active { background: var(--primary); color: #fff; }
.task-filter-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: 12px; line-height: 20px; text-align: center; }
.task-filter .chip.is-active .task-filter-n { background: rgba(255, 255, 255, .22); }
@media (max-width: 719px) { .task-filter { display: flex; width: 100%; } .task-filter .chip { flex: 1; justify-content: center; padding: 6px 4px; } }
@media (max-width: 719px) {
    .task-filter .chip { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; min-height: 48px; padding: 4px 2px; font-size: 12.5px; line-height: 1.1; }
    .task-filter-n { min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 16px; }
}
}
/* PC: Aufgaben-Filter wie bisher (runde Chips mit „· Zahl“) */
@media (min-width: 720px) {
    .task-filter { display: flex; flex-wrap: wrap; gap: 8px; }
    .task-filter-n::before { content: "· "; }
}

/* Kalender am Handy (Nutzer 14.11.2026, ANNAHMEN 563): keine Auswahl Monat/Woche/Tag/Liste – immer Monat; angetippter Tag umrandet, seine Termine darunter */
@media (max-width: 719px) {
    .cal-toolbar [data-cal-views] { display: none !important; }
    .cal-cell.is-picked { box-shadow: inset 0 0 0 2px var(--primary); border-radius: 8px; }
    .cal-pick-day { margin-top: 12px; }
}

/* Handy: Spracheingabe beim Antippen von „Frag den Hof“ (Nutzer 14.11.2026, ANNAHMEN 564) */
.voice-ov { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: flex-end; background: rgba(20, 24, 18, .45); }
.voice-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 20px calc(22px + env(safe-area-inset-bottom));
    background: var(--card); border-radius: 22px 22px 0 0; text-align: center; animation: mnv-up .22s cubic-bezier(.2, .8, .2, 1); }
.voice-card b { font-size: 20px; }
.voice-text { margin: 0; min-height: 44px; font-size: 17px; color: var(--text); }
.voice-pulse { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); animation: voice-pulse 1.3s infinite; }
@keyframes voice-pulse { 70% { box-shadow: 0 0 0 22px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.voice-card .btn { min-width: 160px; min-height: 44px; }
/* Kalender am Handy (Nutzer 14.11.2026, ANNAHMEN 565): „Jetzt abgleichen“ und „Neuer Termin“ nebeneinander, beide grün */
@media (max-width: 719px) {
    .main:has(#cal-app) .page-head { flex-wrap: wrap; }
    .main:has(#cal-app) .page-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
    .main:has(#cal-app) .page-actions .btn { justify-content: center; min-height: 44px; background: var(--primary); border-color: var(--primary); color: #fff; white-space: nowrap; }
    .main:has(#cal-app) .page-actions .btn:only-child { grid-column: 1 / -1; }
}
/* Kalender am Handy (Nutzer 14.11.2026, ANNAHMEN 566): erst „Neuer Termin“ (grün, breit), daneben Abgleichen nur als graues Symbol */
@media (max-width: 719px) {
    .main:has(#cal-app) .page-actions { grid-template-columns: 1fr auto; }
    .main:has(#cal-app) .page-actions [data-cal-new] { order: 1; }
    .main:has(#cal-app) .page-actions [data-cal-sync] { order: 2; width: 48px; padding: 0; background: var(--surface-2, var(--hover)); border-color: var(--line); color: var(--text); }
    .main:has(#cal-app) .page-actions [data-cal-sync] .cal-sync-txt { display: none; }
    .main:has(#cal-app) .page-actions [data-cal-sync]:disabled .icon { animation: cal-spin 1s linear infinite; }
}
@keyframes cal-spin { to { transform: rotate(360deg); } }

/* Aufteilen: Gewichtsdifferenz beim Händler (ANNAHMEN 567) */
.split-diff { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2, var(--hover)); }
.split-diff p { margin: 6px 0 0; }
.chip-good { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); border-color: color-mix(in srgb, var(--success) 45%, transparent); }

/* Untere Leiste: Beschriftung immer einzeilig (polnisch „Strona główna“ brach um, Nutzer 14.11.2026, ANNAHMEN 569) */
.bottombar .bb-item > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Lagerbestand als Kacheln, ein Lagerraum je Kachel (Nutzer 14.11.2026, ANNAHMEN 571): Füllstand von unten
   (Menge im Verhältnis zum vollsten Raum; „% voll“ nach Kapazität nur als Text), größte Räume zuerst, Zahl wächst mit der Menge */
.stock-viewswitch .icon { width: 16px; height: 16px; }
#stock-app.stock-is-tiles [data-group], #stock-app.stock-is-tiles [data-expand], #stock-app.stock-is-tiles [data-sort],
#stock-app.stock-is-tiles [data-location-chips] { display: none; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-flow: row dense; gap: 14px; }
.st-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 6px; min-height: 190px;
    padding: 16px 16px 14px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
    transition: transform .15s ease, box-shadow .15s ease; }
.st-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30, 50, 25, .12); }
.st-tile:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.st-fill { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: var(--lvl);
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 26%, transparent), color-mix(in srgb, var(--primary) 42%, transparent));
    border-top: 2px solid color-mix(in srgb, var(--primary) 60%, transparent); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.st-tile.is-top { border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
.st-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.st-name { font-size: 1.02rem; line-height: 1.25; }
.st-type { flex: none; font-size: .72rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted);
    background: color-mix(in srgb, var(--card) 80%, transparent); padding: 2px 7px; border-radius: 999px; }
.st-climate { font-size: .8rem; font-weight: 600; color: var(--muted); }
.st-climate.sc-line-good { color: #1f6b3a; } .st-climate.sc-line-warn { color: #8a5d00; } .st-climate.sc-line-bad { color: #a12a1b; }
.st-amount { margin-top: auto; display: flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.st-kg { font-weight: 800; letter-spacing: -.02em; line-height: 1; font-size: calc(1.35rem + 1.15rem * var(--rel)); }
.st-unit { font-weight: 700; color: var(--muted); }
.st-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .84rem; color: var(--muted); }
.st-pct { font-weight: 700; color: var(--text); }
.st-pct.is-full { color: #a12a1b; }
.st-bar { display: flex; height: 7px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--card) 70%, transparent); }
.st-bar i { height: 100%; }
.st-vars { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .78rem; }
.st-vars span { display: inline-flex; align-items: center; gap: 4px; }
.st-vars i { width: 8px; height: 8px; border-radius: 50%; }
.st-tile.is-empty { cursor: default; min-height: 120px; background: transparent; border-style: dashed; color: var(--muted); }
.st-tile.is-empty:hover { transform: none; box-shadow: none; }
.st-tile.is-empty .st-kg { font-size: 1.1rem; font-weight: 600; }
@media (max-width: 719px) {
    .st-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
    .st-tile { min-height: 158px; padding: 12px; border-radius: 16px; }
    .st-kg { font-size: calc(1.1rem + .7rem * var(--rel)); }
    .st-top { flex-direction: column; gap: 3px; }
    .st-meta { flex-direction: column; gap: 0; }
    .st-vars { display: none; }
}
/* Aufgeklappter Lagerraum in der Kachel (ganze Breite), Sorten mit fester Farbe (ANNAHMEN 571) */
.st-tile.is-open { grid-column: 1 / -1; cursor: default; border-color: color-mix(in srgb, var(--primary) 55%, transparent);
    box-shadow: 0 10px 30px rgba(30, 50, 25, .14); }
.st-tile.is-open:hover { transform: none; }
.st-tile.is-open > .st-top, .st-tile.is-open > .st-amount, .st-tile.is-open > .st-meta, .st-tile.is-open > .st-bar { cursor: pointer; }
.st-tile.is-open .st-fill { display: none; }
.st-close { margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: .9rem; }
.st-tile.is-open .st-bar { height: 10px; }
.st-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 8px; cursor: auto; }
.st-variety { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.st-variety-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; }
.st-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.st-variety .stock-position { padding-left: 0; padding-right: 0; }
@media (max-width: 719px) {
    .st-detail { grid-template-columns: 1fr; }
    .st-tile.is-open .st-top { flex-direction: row; }
}
/* Sorten mit Großkisten-Zahl über der Linie, auch am Handy (ANNAHMEN 571) */
.st-vars { margin-top: 2px; font-size: .8rem; }
.st-vars b { font-variant-numeric: tabular-nums; }
@media (max-width: 719px) { .st-vars { display: flex; font-size: .74rem; gap: 1px 8px; } }
/* Aufgeklappter Raum: alle Posten bzw. eine Sorte auf einmal wählen (ANNAHMEN 572) */
.st-detail-all { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.st-pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.st-pick input { width: 20px; height: 20px; margin: 0; }
.st-pick-var input { width: 18px; height: 18px; }
.st-meta { flex-wrap: wrap; } .st-meta > span { white-space: nowrap; }
/* Lagerbestand: nur noch der Filter, mit Beschriftung (ANNAHMEN 575) */
.stock-filter { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--text); }
.stock-filter .icon { width: 17px; height: 17px; color: var(--primary); }
/* Lagerbestand: Filterleiste in einer Zeile mit Umschalter „nur unsortiert“ (Nutzer 14.11.2026, ANNAHMEN 576) */
.stock-toolbar.st-filterbar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px 8px 16px; border-radius: 999px; }
.st-filterbar .stock-filter { padding-right: 12px; border-right: 1px solid var(--line); }
.st-filter-field { position: relative; flex: 1 1 220px; min-width: 0; display: flex; align-items: center; }
.st-filter-field > .icon { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.st-filterbar .stock-search { max-width: none; width: 100%; height: 42px; padding-left: 38px; border-radius: 999px; border: 1px solid transparent;
    background: var(--surface-2, var(--hover)); }
.st-filterbar .stock-search:focus { border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: var(--card); outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.st-toggle { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 10px; border-radius: 999px; font: inherit; font-weight: 600;
    font-size: .9rem; color: var(--text); cursor: pointer; background: var(--surface-2, var(--hover)); border: 1px solid transparent; white-space: nowrap; }
.st-toggle-box { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; border: 2px solid var(--line); background: var(--card); }
.st-toggle-box .icon { width: 14px; height: 14px; opacity: 0; color: #fff; }
.st-toggle.is-active { background: color-mix(in srgb, var(--primary) 14%, var(--card)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.st-toggle.is-active .st-toggle-box { background: var(--primary); border-color: var(--primary); }
.st-toggle.is-active .st-toggle-box .icon { opacity: 1; }
@media (max-width: 719px) {
    .stock-toolbar.st-filterbar { border-radius: 20px; padding: 10px; }
    .st-filterbar .stock-filter { border-right: 0; padding: 0 0 0 4px; margin-right: auto; }   /* Handy: „Filter“ + Umschalter oben, Suchfeld darunter */
    .st-filter-field { flex-basis: 100%; order: 3; }
    .st-toggle { height: 38px; }
}

/* Lagerkontrolle im Stil der Lager-Kacheln (Nutzer 14.11.2026, ANNAHMEN 577): Kachel mit Lagerort-Name und Schild „Raum n“,
   Temperatur groß, unterer Teil in der Farbe des Zustands (im Soll grün, zu warm/kalt gelb/rot, alte Werte grau) */
.sc-rooms { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sc-tile { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 8px; padding: 16px;
    background: var(--card); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sc-tile { --sc: #9aa5a0; }
.sc-tile.sc-good { --sc: #2f8f4e; } .sc-tile.sc-warn { --sc: #d99a12; } .sc-tile.sc-bad { --sc: #c0392b; } .sc-tile.sc-stale { --sc: #8f9a95; }
.sc-fill { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 62%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 14%, transparent), color-mix(in srgb, var(--sc) 30%, transparent));
    border-top: 2px solid color-mix(in srgb, var(--sc) 55%, transparent); }
.sc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sc-name { font-size: 1.05rem; line-height: 1.25; }
.sc-amount { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sc-tile .sc-temp { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.sc-unit { font-weight: 700; color: var(--muted); }
.sc-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: .84rem; color: var(--muted); }
.sc-tile .sc-badge { white-space: nowrap; }
.sc-tile .sc-sym { background: color-mix(in srgb, var(--card) 85%, transparent); }
.sc-tile .sc-vals { grid-template-columns: 1fr 1fr; gap: 6px; margin: 2px 0 0; }
.sc-v { background: color-mix(in srgb, var(--card) 88%, transparent); border-radius: 12px; padding: 7px 10px; }
.sc-v dt { font-size: .72rem; color: var(--muted); }
.sc-v dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-v small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); }
.sc-room-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 2px; }
.sc-tile .sc-change { margin: 0; border-radius: 999px; }
.sc-chart-card, .sc-report { border-radius: 18px; }
@media (max-width: 719px) {
    .sc-rooms { grid-template-columns: 1fr; gap: 10px; }
    .sc-tile .sc-temp { font-size: 2.2rem; }
}
.sc-room.sc-tile { border-top: 1px solid var(--line); }
.sc-lower { display: flex; flex-direction: column; gap: 8px; flex: 1; margin: 4px -16px -16px; padding: 12px 16px 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 14%, transparent), color-mix(in srgb, var(--sc) 30%, transparent));
    border-top: 2px solid color-mix(in srgb, var(--sc) 55%, transparent); }
/* Lagerbestand: Schnellwahl Sorten unter der Filterleiste (Nutzer 14.11.2026, ANNAHMEN 578) */
.st-varchips { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; }
.st-vchip { --vc: var(--primary); display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px;
    font: inherit; font-size: .88rem; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap;
    background: var(--card); border: 1px solid var(--line); transition: background .15s ease, border-color .15s ease; }
.st-vchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--vc); flex: none; }
.st-vchip b { font-size: .78rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.st-vchip:hover { border-color: color-mix(in srgb, var(--vc) 55%, transparent); }
.st-vchip.is-active { background: color-mix(in srgb, var(--vc) 16%, var(--card)); border-color: var(--vc); box-shadow: inset 0 0 0 1px var(--vc); }
.st-vchip.is-active b { color: var(--text); }
.st-vchip-all { padding: 0 14px; }
.st-vchip-all.is-active { --vc: var(--primary); }
@media (max-width: 719px) {
    .st-varchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -12px; margin-right: -12px; padding: 0 12px 2px; }
    .st-varchips::-webkit-scrollbar { display: none; }
}

/* Kopfzeile: Knöpfe (Export, Neu …) immer rechts, auch wenn der Einleitungstext umbricht (Nutzer 14.11.2026, ANNAHMEN 579) */
@media (min-width: 720px) { .page-head > .page-actions { margin-left: auto; justify-content: flex-end; } }
/* Sortierung: Filterleiste wie im Lager, Auswahlfelder als runde Knöpfe mit Namen davor (ANNAHMEN 579) */
.sf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; padding: 8px 10px 8px 16px; border-radius: 26px; }
.sf-bar .st-filter-field { flex: 1 1 240px; }
.sf-sel { position: relative; display: inline-flex; align-items: center; height: 42px; border-radius: 999px; cursor: pointer;
    background: var(--surface-2, var(--hover)); border: 1px solid transparent; transition: border-color .15s ease, background .15s ease; }
.sf-sel > span { padding-left: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); white-space: nowrap; pointer-events: none; }
.sf-sel select { appearance: none; -moz-appearance: none; -webkit-appearance: none; height: 40px; min-width: 0; max-width: 220px; margin: 0;
    padding: 0 34px 0 8px; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .92rem; color: var(--text); cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 15px; box-shadow: none; }
.sf-sel select:focus { outline: none; }
.sf-sel:focus-within { border-color: color-mix(in srgb, var(--primary) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.sf-sel:hover { border-color: var(--line); }
.sf-sel.is-set { background: color-mix(in srgb, var(--primary) 14%, var(--card)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.sf-sel.is-set > span { color: var(--primary); }
.sf-reset { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--muted); background: var(--surface-2, var(--hover)); }
.sf-reset:hover { color: var(--text); }
.sf-reset .icon { width: 18px; height: 18px; }
@media (max-width: 719px) {
    .sf-bar { padding: 10px; border-radius: 20px; }
    .sf-bar .stock-filter { border-right: 0; padding: 0 0 0 4px; margin-right: auto; }
    .sf-bar .st-filter-field { order: 3; flex-basis: 100%; }
    .sf-bar .sf-sel { order: 4; flex: 1 1 calc(50% - 6px); }
    .sf-bar .sf-sel select { flex: 1; max-width: none; width: 100%; }
    .sf-bar .sf-reset { order: 2; }
}
/* Design „Minze“ setzt für alle Auswahlfelder einen eigenen Hintergrund – in der Filterleiste gilt der runde Knopf mit Pfeil (ANNAHMEN 579) */
.sf-bar .sf-sel select, .sf-bar .sf-sel select:focus { border: 0; border-radius: 0; box-shadow: none; background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 15px; }
.sf-bar .stock-search, .sf-bar .stock-search:focus { border-radius: 999px; }
.sort-tabs { margin: 0 0 14px; }
/* Sortierung: Reiter oben wie im Lager; am Handy Symbol über kurzem Namen, oben festgehalten (ANNAHMEN 579) */
.sort-tabs .tab-short { display: none; }
@media (max-width: 719px) {
    html .sort-tabs { position: sticky; top: 0; z-index: 60; display: flex !important; flex-wrap: nowrap; width: 100%; gap: 2px; padding: 4px; }
    html .sort-tabs .tab { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 52px; padding: 4px 6px; border-radius: 12px; font-size: 12px; line-height: 1.1; text-align: center; }
    html .sort-tabs .tab .icon { display: block !important; flex: none; width: 20px; height: 20px; margin: 0; }
    html .sort-tabs .tab .tab-long { display: none; }
    html .sort-tabs .tab .tab-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html .sort-tabs .tab .nav-badge { position: absolute; top: 2px; right: 4px; margin: 0; padding: 0 4px; font-size: 8.5px; line-height: 14px; }
    .sf-bar .sf-sel { flex-basis: 100%; }
    .sf-bar .sf-sel.sf-half { flex-basis: calc(50% - 5px); }
    .sf-bar .sf-sel.sf-half > span { display: none; }
    .sf-bar .sf-sel.sf-half select { padding-left: 14px; }
}
@media (max-width: 719px) { .sf-bar .sf-sel.sf-half select { font-size: .86rem; padding-right: 30px; background-position: right 10px center; } }

/* Sortierung: abgeschlossene Vorgänge orange (ANNAHMEN 581) */
.badge-orange { background: #fde6cf; color: #9a4b0b; }
/* Reiter überall in derselben Schrift wie im Lager (Nutzer 14.11.2026, ANNAHMEN 582): Felder-Reiter sind Knöpfe – Knöpfe bringen
   eigene Schriftdicke und Laufweite mit; Sortierungs-Reiter am Handy in derselben Größe wie die übrigen */
.fm-tabs button.tab { font-weight: 600; letter-spacing: inherit; }
@media (max-width: 719px) { html .sort-tabs .tab > span { font-size: inherit; } }
@media (max-width: 719px) { html body .sort-tabs .tab { font-size: 12px; } }

/* Spritztagebuch im Stil des Lagers (Nutzer 14.11.2026, ANNAHMEN 583): Jahr als runder Auswahlknopf, Filterleiste der Liste wie im Lager,
   „nur Kupfer“ als Umschalter, Karten runder */
.sf-bar.sf-inline { display: inline-flex; padding: 0; margin: 0; background: none; border: 0; box-shadow: none; }
.sd-list-filter { margin-bottom: 14px; }
.st-toggle input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.st-toggle:has(input:checked) { background: color-mix(in srgb, var(--primary) 14%, var(--card)); border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.st-toggle:has(input:checked) .st-toggle-box { background: var(--primary); border-color: var(--primary); }
.st-toggle:has(input:checked) .st-toggle-box .icon { opacity: 1; }
.st-toggle:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
body:has(#sd-year) .main .card { border-radius: 18px; }
@media (max-width: 719px) {
    .sd-list-filter .sf-sel { flex-basis: 100%; }
    .sd-list-filter .st-toggle { order: 2; }
}
/* Spritztagebuch: Reiter am Handy nebeneinander, Symbol über kurzem Namen (ANNAHMEN 583) */
.sd-tabs .tab-short { display: none; }
@media (max-width: 719px) {
    html body .sd-tabs { display: flex !important; flex-wrap: nowrap; width: 100%; gap: 2px; padding: 4px; }
    html body .sd-tabs .tab { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
        gap: 3px; min-height: 52px; padding: 4px 6px; border-radius: 12px; font-size: 12px; line-height: 1.1; text-align: center; }
    html body .sd-tabs .tab .icon { display: block !important; flex: none; width: 20px; height: 20px; margin: 0; }
    html body .sd-tabs .tab .tab-long { display: none; }
    html body .sd-tabs .tab .tab-short { display: block; font-size: inherit; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html body .sd-tabs .tab .badge { position: absolute; top: 2px; right: 4px; margin: 0; padding: 0 4px; font-size: 8.5px; line-height: 14px; }
}

/* Spritztagebuch → Eintragen: Felder als kleine Kacheln im Stil des Lagers (Nutzer 14.11.2026, ANNAHMEN 584) */
.sd-field-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-top: 0; background: var(--surface-2, var(--hover)); }
.sd-field-list > .sd-f { border: 1px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.sd-field-list > .sd-f:hover { box-shadow: 0 4px 14px rgba(30, 50, 25, .08); }
.sd-field-list > .sd-f.is-on { border-color: color-mix(in srgb, var(--primary) 50%, transparent); background: color-mix(in srgb, var(--primary) 8%, var(--card)); }
.sd-field-list > .sd-f.is-all { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 50%, transparent); }
.sd-field-list .sd-f-row { align-items: center; gap: 10px; padding: 10px 12px; }
.sd-f-check { position: relative; padding: 12px 4px 12px 12px; margin: -10px 0 -10px -12px; align-items: center; }
.sd-f-check input[type=checkbox], .sd-plot input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sd-box { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 2px solid var(--line); background: var(--card); transition: background .15s ease, border-color .15s ease; }
.sd-box::after { content: ''; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
input:checked + .sd-box { background: var(--primary); border-color: var(--primary); }
input:checked + .sd-box::after { opacity: 1; }
input:indeterminate + .sd-box { background: color-mix(in srgb, var(--primary) 55%, var(--card)); border-color: var(--primary); }
input:indeterminate + .sd-box::after { opacity: 1; width: 10px; height: 0; border-left: 0; transform: none; }
input:focus-visible + .sd-box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.sd-field-list .sd-f-name { gap: 5px; }
.sd-f-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.sd-f-top strong { font-size: .98rem; }
.sd-f-ha { flex: none; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--text); }
.sd-vars { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: .8rem; color: var(--text); }
.sd-v { display: inline-flex; align-items: center; gap: 4px; }
.sd-v i, .sd-plot > i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sd-v b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.sd-v.is-cleared { opacity: .55; text-decoration: line-through; }
.sd-f-bar { display: flex; height: 5px; border-radius: 999px; overflow: hidden; background: var(--hover); }
.sd-f-bar i { height: 100%; }
.sd-f-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: .78rem; color: var(--muted); }
.sd-f-none { color: #8a5d00; font-weight: 600; }
.sd-field-list .sd-f-part { color: var(--primary-dark); font-weight: 700; }
.sd-f-caret { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2, var(--hover)); }
.sd-f-caret::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; }
.sd-f.is-open .sd-f-caret::before { transform: rotate(45deg) translate(-1px, -1px); }
.sd-field-list .sd-f-body { padding: 0 12px 12px 46px; }
.sd-f-fruit-name { display: block; margin: 2px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.sd-f-plots { display: flex; flex-direction: column; gap: 6px; }
.sd-plot { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; cursor: pointer; font-size: .86rem;
    background: var(--surface-2, var(--hover)); border: 1px solid transparent; }
.sd-plot .sd-box { width: 20px; height: 20px; border-radius: 6px; }
.sd-plot:has(input:checked) { background: color-mix(in srgb, var(--primary) 12%, var(--card)); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.sd-quick-row select { border-radius: 999px; }
@media (max-width: 719px) {
    .sd-field-list { padding: 8px; }
    .sd-field-list .sd-f-body { padding-left: 12px; }
}

/* Bildlaufleisten in der Navigation und im Spritztagebuch schmal und zurückhaltend (Nutzer 14.11.2026, ANNAHMEN 585):
   dünner abgerundeter Griff in der Schriftfarbe der Fläche (passt auf heller und dunkler Leiste), ohne Schiene;
   kaum sichtbar, beim Darüberfahren deutlicher. Firefox: scrollbar-width/-color, Chrome/Edge: ::-webkit-scrollbar */
.sidebar-nav, .sd-field-list, .sd-search-results, .sd-job-body .table-wrap {
    scrollbar-width: thin; scrollbar-color: color-mix(in srgb, currentColor 18%, transparent) transparent; }
.sidebar-nav:hover, .sd-field-list:hover, .sd-search-results:hover, .sd-job-body .table-wrap:hover {
    scrollbar-color: color-mix(in srgb, currentColor 38%, transparent) transparent; }
.sidebar-nav::-webkit-scrollbar, .sd-field-list::-webkit-scrollbar, .sd-search-results::-webkit-scrollbar, .sd-job-body .table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.sidebar-nav::-webkit-scrollbar-track, .sd-field-list::-webkit-scrollbar-track, .sd-search-results::-webkit-scrollbar-track, .sd-job-body .table-wrap::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb, .sd-field-list::-webkit-scrollbar-thumb, .sd-search-results::-webkit-scrollbar-thumb, .sd-job-body .table-wrap::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, currentColor 18%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
.sidebar-nav:hover::-webkit-scrollbar-thumb, .sd-field-list:hover::-webkit-scrollbar-thumb, .sd-search-results:hover::-webkit-scrollbar-thumb, .sd-job-body .table-wrap:hover::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, currentColor 38%, transparent); }
/* Knopf „Weiteren Anwender …“ bricht in der schmalen rechten Spalte um, statt über den Rand zu ragen (sonst waagerechte Bildlaufleiste, ANNAHMEN 585) */
.sd-op-add { white-space: normal; text-align: left; max-width: 100%; height: auto; min-height: 32px; }

/* Spurführung im Stil des Lagers (Nutzer 14.11.2026, ANNAHMEN 586): runde Karten, Auswahl als Knöpfe mit rundem Häkchen und
   Sortenfarbe, Fahrweise als Umschalter, offene und beendete Fahrten als Kacheln */
body:has(.sr-head) .main .card, .so-form { border-radius: 18px; }
.so-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.so-chips-fruit { gap: 10px; }
.so-chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 14px 5px 8px; border-radius: 999px; cursor: pointer;
    background: var(--card); border: 1px solid var(--line); transition: background .15s ease, border-color .15s ease; }
.so-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.so-chip .sd-box { width: 20px; height: 20px; border-radius: 50%; }
.so-chip > i { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-left: -2px; }
.so-chip-txt { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; line-height: 1.2; }
.so-chip-txt strong { font-size: .9rem; }
.so-chip-txt small { font-size: .76rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.so-chip:hover { border-color: color-mix(in srgb, var(--primary) 45%, transparent); }
.so-chip:has(input:checked), .so-chip:has(input:indeterminate) { background: color-mix(in srgb, var(--primary) 12%, var(--card)); border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.so-chip:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.so-chip-fruit { min-height: 52px; padding: 8px 18px 8px 10px; border-radius: 16px; }
.so-chip-fruit .sd-box { width: 24px; height: 24px; }
.so-chip-fruit .so-chip-txt { flex-direction: column; align-items: flex-start; }
.so-chip-fruit .so-chip-txt strong { font-size: 1rem; }
.so-vgroup { margin: 4px 0 12px; }
.so-vgroup-name, .so-label { display: block; margin: 2px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.so-label { font-size: .8rem; letter-spacing: .02em; }
.so-detail summary { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--surface-2, var(--hover)); font-weight: 600; list-style: none; }
.so-detail summary::-webkit-details-marker { display: none; }
.so-detail summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; }
.so-detail[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.so-fields { gap: 10px; margin-top: 10px; }
.so-fieldbox { display: flex; flex-direction: column; gap: 6px; border-radius: 14px; padding: 10px; background: var(--card); }
.so-field-head { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 2px 2px 4px; }
.so-field-head input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.so-fieldbox .sd-plot { padding: 6px 10px; }
.so-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2, var(--hover)); border: 1px solid var(--line); }
.so-seg label { position: relative; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s ease, color .15s ease; }
.so-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.so-seg label:has(input:checked) { background: var(--primary); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.so-seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
.so-sum { border-radius: 14px; padding: 10px 14px; }
.so-product select, .so-product input { border-radius: 999px; }
/* offene Fahrten als Kacheln */
.sr-runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sr-runs > h2 { grid-column: 1 / -1; margin: 0; }
.sr-runs .sr-run { margin: 0; padding: 16px; border-radius: 18px; transition: transform .15s ease, box-shadow .15s ease; }
.sr-runs .sr-run:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30, 50, 25, .12); }
.sr-prog-bar { height: 8px; border-radius: 999px; }
.sr-prog-bar > span { border-radius: 999px; background: var(--primary); }
/* beendete Fahrten als Kacheln */
.sr-done { margin-bottom: 16px; }
.sr-done > h2 { margin: 0 0 10px; }
.sr-done-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sr-dtile { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .15s ease, box-shadow .15s ease; }
.sr-dtile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(30, 50, 25, .12); }
.sr-dtile.sr-d-open { border-color: color-mix(in srgb, #d9822b 50%, transparent); }
.sr-dname { color: var(--text); text-decoration: none; min-width: 0; }
.sr-dname:hover { color: var(--primary); }
.sr-dfields { font-size: .8rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.sr-dkg { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.sr-dtile .st-amount { margin-top: auto; padding-top: 4px; }
.sr-dtile .st-bar { background: var(--surface-2, var(--hover)); }
.sr-dtile .st-bar i { background: var(--primary); }
.sr-dfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.sr-dfoot .badge { display: inline-flex; align-items: center; gap: 4px; }
.sr-dfoot .badge .icon { width: 13px; height: 13px; }
.sr-dact { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.sr-dact form { display: inline; margin: 0; }
.trk-card { border-radius: 18px; }
@media (max-width: 719px) {
    .sr-runs, .sr-done-grid { grid-template-columns: 1fr; gap: 10px; }
    .so-chips-fruit .so-chip-fruit { flex: 1 1 calc(50% - 10px); }
    .so-seg { display: flex; }
    .so-seg label { flex: 1; text-align: center; }
}
/* gegen „.field label { display:block }“ (ANNAHMEN 586) */
.field label.so-chip { display: inline-flex; margin: 0; font-size: inherit; font-weight: 500; }
.so-chip > i, .so-fieldbox .sd-plot > i { display: block; }
.field .so-seg label { display: block; margin: 0; font-size: .9rem; }
.so-seg { display: flex; border-radius: 14px; }
.so-seg label, .field .so-seg label { flex: 1 1 auto; text-align: center; border-radius: 11px; padding: 8px 12px; }

/* Düngetagebuch → Eintragen wie das Spritztagebuch (Nutzer 14.11.2026, ANNAHMEN 587): Karten runder */
body:has(#fd-year) .main .card { border-radius: 18px; }

/* Aufgaben: offene Spritzaufträge für alle Pflanzenschutz-Berechtigten, als Kacheln wie im Lager (Nutzer 14.11.2026, ANNAHMEN 590) */
.task-spray { margin-bottom: 18px; }
.task-spray > h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.task-spray > p { margin: 0 0 10px; }
.task-spray-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.task-spray-card { display: flex; flex-direction: column; gap: 7px; padding: 16px; background: var(--card); border-radius: 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.task-spray-fields { display: flex; gap: 6px; align-items: flex-start; font-size: .84rem; color: var(--muted); line-height: 1.35; }
.task-spray-fields .icon { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.task-spray-card .st-amount { margin-top: auto; }
.task-spray-card .st-bar { background: var(--surface-2, var(--hover)); }
.task-spray-card .st-bar i { background: var(--primary); }
.task-spray-card .btn { margin-top: 4px; }
@media (max-width: 719px) { .task-spray-grid { grid-template-columns: 1fr; gap: 10px; } }

/* Spurführung → Einstellungen als Kacheln, Befüllplatz per Kartenfenster (Nutzer 14.11.2026, ANNAHMEN 592) */
.sr-set { border-radius: 18px; }
.sr-set-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.sr-set-head h2 { margin: 0 0 3px; }
.sr-set-head p { margin: 0; max-width: 78ch; line-height: 1.45; }
.sr-set-ico { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.sr-set-ico .icon { width: 21px; height: 21px; }
.sr-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.sr-set-tile { position: relative; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; align-content: start; padding: 14px 14px 12px; border-radius: 16px;
    border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, var(--bg)); }
.sr-set-fill { grid-column: 1 / -1; }
.sr-set .sr-set-label { display: flex; align-items: flex-start; align-self: start; gap: 7px; margin: 0; font-size: .86rem; font-weight: 600; line-height: 1.3; }
.sr-set-label .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--primary); }
.sr-set-grid { row-gap: 0; }
.sr-set-tile { margin-bottom: 12px; }
.sr-set-input { display: flex; align-items: center; gap: 8px; }
.sr-set-input input { flex: 1 1 auto; min-width: 0; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sr-set-input > span { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; min-width: 34px; }
.sr-set-input .btn { flex: none; white-space: nowrap; }
.sr-fill-wrap input { font-size: 1rem; cursor: pointer; }
.sr-set-hint { margin: 0; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.sr-set .form-actions { margin-top: 14px; }
.sr-fill-pop { position: absolute; left: 14px; z-index: 1200; width: min(460px, calc(100% - 28px)); padding: 8px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 36px rgba(0,0,0,.2); isolation: isolate; }
.sr-fill-pop[hidden] { display: none; }
.sr-fill-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 8px 6px; font-size: .88rem; }
.sr-fill-close { border: 0; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; }
.sr-fill-close:hover { background: var(--hover); color: var(--text); }
.sr-fill-map { height: 300px; border-radius: 12px; overflow: hidden; cursor: crosshair; }
.sr-fill-map .leaflet-container, .sr-fill-map.leaflet-container { cursor: crosshair; }
@keyframes sr-fill-flash { from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent); } to { box-shadow: 0 0 0 0 transparent; } }
.sr-fill-done { animation: sr-fill-flash .9s ease-out; }
@media (max-width: 719px) {
    .sr-set-grid { grid-template-columns: 1fr; column-gap: 10px; }
    .sr-set-tile { margin-bottom: 10px; }
    .sr-fill-pop { left: 8px; width: calc(100% - 16px); }
    .sr-fill-map { height: 260px; }
    .sr-fill-wrap .btn span { display: none; }
    .sr-fill-wrap .btn { padding-inline: 12px; }
}

/* Tagebücher → Eintragen: Obst-Schnellwahl als Kacheln (Bild, Name, Felderzahl, ganz/teilweise gewählt; Nutzer 14.11.2026, ANNAHMEN 593) */
.sd-fruit-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 4px; }   /* alle Kacheln gleich breit (ANNAHMEN 594) */
.sd-fruit-tile { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 52px;
    padding: 7px 30px 7px 7px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text);
    font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.sd-fruit-tile:hover { border-color: color-mix(in srgb, var(--fc, var(--primary)) 55%, var(--line)); }
.sd-fruit-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sd-fruit-ico { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--fc, #7cc44e) 15%, transparent); }
.sd-fruit-ico svg { width: 24px; height: 24px; }
.sd-fruit-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sd-fruit-txt strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-fruit-txt small { font-size: .76rem; color: var(--muted); }
.sd-fruit-chk { position: absolute; top: 50%; right: 9px; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent); }
.sd-fruit-tile.is-on { border-color: var(--fc, var(--primary)); background: color-mix(in srgb, var(--fc, var(--primary)) 9%, var(--card));
    box-shadow: 0 0 0 1px var(--fc, var(--primary)) inset; }
.sd-fruit-tile.is-on .sd-fruit-chk { border-color: var(--fc, var(--primary)); background: var(--fc, var(--primary)); }
.sd-fruit-tile.is-on .sd-fruit-chk::after { content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sd-fruit-tile.is-part { border-color: color-mix(in srgb, var(--fc, var(--primary)) 60%, var(--line)); border-style: dashed; }
.sd-fruit-tile.is-part .sd-fruit-chk { border-color: var(--fc, var(--primary)); }
.sd-fruit-tile.is-part .sd-fruit-chk::after { content: ''; position: absolute; left: 3px; right: 3px; top: 50%; height: 2px; margin-top: -1px;
    border-radius: 1px; background: var(--fc, var(--primary)); }
.sd-quick-row { align-items: center; margin-top: 10px; }
.sd-quick-row .btn-ghost { white-space: nowrap; }
@media (max-width: 719px) { .sd-fruit-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); } }

/* Handy-Schritte: Obst-Kacheln auch hier im gleich breiten Raster statt flex (Nutzer 14.11.2026, ANNAHMEN 594) */
.msteps-on [data-sd-quick].sd-fruit-tiles, .msteps-on [data-fd-quick].sd-fruit-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }

/* Tagebücher → Eintragen: Sorten-Auswahl als runder Knopf wie die Filter (.sf-sel), „Auswahl leeren“ passend (Nutzer 14.11.2026, ANNAHMEN 595) */
.sd-quick-row { gap: 8px; container: sdq / inline-size; }
@container sdq (max-width: 480px) {   /* schmale Felder-Spalte: Leeren-Knopf nur mit ×, damit die Auswahl lesbar bleibt */
    .sd-clear-btn { width: 42px; padding: 0; justify-content: center; }
    .sd-clear-btn span { display: none; }
}
.sd-var-sel { flex: 1 1 auto; min-width: 0; }
.sf-sel.sd-var-sel select, .sf-sel.sd-var-sel select:focus { flex: 1 1 auto; width: 100%; max-width: none; min-height: 0; border: 0; border-radius: 0; box-shadow: none; background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 15px; }
.sd-clear-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent;
    background: var(--surface-2, var(--hover)); color: var(--muted); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: border-color .15s ease, color .15s ease; }
.sd-clear-btn:hover { border-color: var(--line); color: var(--text); }
.sd-clear-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sd-clear-btn .icon { width: 15px; height: 15px; }
.msteps-on .sd-quick-row .sd-var-sel select { min-height: 0; }
@media (max-width: 719px) {
    .sd-clear-btn { width: 42px; padding: 0; justify-content: center; }
    .sd-clear-btn span { display: none; }
}

/* ==========================================================================
   Einheitliche Auswahlfelder auf allen Seiten (Nutzer 14.11.2026, ANNAHMEN 596): heller runder Knopf statt Windows-Auswahl –
   eigene Fläche (Kartenfarbe), feiner Rand, leichter Schatten, Pfeil rechts. Farben aus dem Design (hell/dunkel passt sich an).
   „html body …“ steht über den Design-Dateien (Minze/Hof setzen sonst Hintergrund und Rundung); Höhe/Breite bleiben je Seite.
   Die aufgeklappte Liste zeichnet der Browser selbst, sie bekommt nur helle Farben.
   ========================================================================== */
html body select:not([multiple]):not([size]):not(.qs-sigselect) {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-left: 16px; padding-right: 40px; border-radius: var(--field-radius); cursor: pointer; text-overflow: ellipsis;
    background-color: var(--card); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a70' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05); font-weight: 500; color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
html body select:not([multiple]):not([size]):not(.qs-sigselect):hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
html body select:not([multiple]):not([size]):not(.qs-sigselect):focus { outline: none; background-color: var(--card); border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
html body select:not([multiple]):not([size]):not(.qs-sigselect):disabled { background-color: var(--hover); color: var(--muted); cursor: not-allowed; box-shadow: none; }
html body .has-error select:not([multiple]):not([size]) { border-color: var(--danger); }
html body select[multiple], html body select[size] { border-radius: var(--field-radius); background-color: var(--card); color: var(--text); }
html body select option { background-color: var(--card); color: var(--text); font-weight: 400; }
html body select optgroup { background-color: var(--surface-2, var(--card)); color: var(--muted); font-weight: 700; font-style: normal; }
/* Filter-Knöpfe mit Beschriftung (.sf-sel): der Knopf ist die Hülle, das Auswahlfeld darin bleibt durchsichtig */
.sf-sel { border-radius: var(--field-radius); background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sf-sel:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
html body .sf-sel select:not([multiple]):not([size]), html body .sf-sel select:not([multiple]):not([size]):focus,
html body .sf-sel select:not([multiple]):not([size]):hover {
    border: 0; border-radius: 0; box-shadow: none; background-color: transparent; padding-left: 8px; padding-right: 34px; background-position: right 12px center; }
html body .sf-sel.sf-half select:not([multiple]):not([size]) { padding-left: 14px; }

/* ==========================================================================
   Einheitliche Textfelder auf allen Seiten, passend zu den Auswahlfeldern (Nutzer 14.11.2026, ANNAHMEN 597):
   helle Fläche (Kartenfarbe), feiner Rand, leichter Schatten; einzeilige Felder rund wie die Auswahl-Knöpfe, mehrzeilige mit großer Rundung.
   Gleicher Rand beim Überfahren und gleicher Fokus-Ring. Höhe/Breite bleiben je Seite. Ausgenommen: Etikett-Entwurf (.qs-field),
   Suchzeile mit eigener Hülle (.search-in) und Eingabe des Hof-Assistenten (.as-form).
   ========================================================================== */
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *), html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *) {
    background-color: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    transition: border-color .15s ease, box-shadow .15s ease;
}
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *) { border-radius: var(--field-radius); }   /* Innenabstand bleibt je Seite (z. B. Lupe in der Lager-Suche) */
html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *) { border-radius: var(--field-radius); }
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *):hover:not(:focus):not(:disabled):not([readonly]), html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *):hover:not(:focus):not(:disabled):not([readonly]) {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *):focus, html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *):focus { outline: none; background-color: var(--card); border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *):disabled, html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *):disabled { background-color: var(--hover); color: var(--muted); box-shadow: none; cursor: not-allowed; }
html body input:is([type=text],[type=email],[type=password],[type=number],[type=date],[type=tel],[type=search],[type=time],[type=url],[type=datetime-local],[type=month],[type=week],:not([type])):not(.qs-field *):not(.search-in *):not(.as-form *)[readonly], html body textarea:not(.qs-field *):not(.search-in *):not(.as-form *)[readonly] { background-color: var(--surface-2, var(--hover)); box-shadow: none; }
html body input::placeholder, html body textarea::placeholder { color: var(--muted); opacity: .75; }
html body .has-error input, html body .has-error textarea { border-color: var(--danger); }

/* Text- und Auswahlfelder etwas eckiger statt ganz rund (Nutzer 14.11.2026, ANNAHMEN 598) – ein Wert für alle */
:root { --field-radius: 12px; }

/* Tagebücher → Eintragen: Feldliste weiß statt grau, Feld-Kacheln mit feinem Schatten abgesetzt; ×-Knopf weiß und eckig wie die Auswahl daneben (Nutzer 14.11.2026, ANNAHMEN 599) */
.sd-field-list { background: var(--card); }
.sd-field-list > .sd-f { box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sd-field-list > .sd-f:not(.is-on) { border-color: var(--line-strong); }
.sd-clear-btn { border-radius: var(--field-radius); background: var(--card); border: 1px solid var(--line-strong); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.sd-clear-btn:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }

/* Tagebücher → Eintragen → Karte: gleicher Abstand wie die Feldliste (10 px) und runde Ecken (Nutzer 14.11.2026, ANNAHMEN 600) */
.sd-fields .sd-map-wrap { padding: 10px 10px 0; }
.sd-fields .sd-map { border-radius: 14px; overflow: hidden; }

/* Düngetagebuch: sechs Reiter am Handy in einer Zeile – etwas schmaler und kleiner als die drei im Spritztagebuch (ANNAHMEN 602) */
@media (max-width: 719px) {
    html body .fd-tabs .tab { padding: 4px 1px; font-size: 10.5px; gap: 3px; }
    html body .fd-tabs .tab .icon { width: 18px; height: 18px; }
}

/* Düngeplan: günstigster Vorschlag und Kosten je Feld (Nutzer 15.11.2026, ANNAHMEN 603) */
.plan-cheap-note { margin: 6px 0 2px; padding: 6px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.plan-cheap-note.plan-warn { background: color-mix(in srgb, #e0a100 12%, transparent); }
.plan-cost { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.plan-cheap-msg { margin: 6px 0 0; }

/* Kundenportal → Lagermenge als Kacheln, Umschalter je Lagerraum / je Sorte (Nutzer 16.11.2026, ANNAHMEN 606) */
.pt-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; margin: 4px 0 6px; }
.pt-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.pt-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.pt-switch-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: .9rem;
    color: var(--muted); text-decoration: none; white-space: nowrap; }
.pt-switch-btn .icon { width: 16px; height: 16px; }
.pt-switch-btn:hover { color: var(--text); background: var(--hover); }
.pt-switch-btn.is-active { background: var(--primary); color: #fff; }
.pt-sum { margin: 0 0 10px; }
.portal-stock-tiles .st-tile.is-open .st-detail { cursor: auto; }
.pt-classes { margin: 4px 0 0; }
.pt-classes th, .pt-classes td { padding: 4px 6px; }
@media (max-width: 719px) { .pt-switch { width: 100%; } .pt-switch-btn { flex: 1; justify-content: center; } }

/* Lager- und Händler-Kacheln nur weiß: keine grüne Füllung, kein grüner Rand für die größte (Nutzer 16.11.2026, ANNAHMEN 608) */
html body .st-fill { display: none; }
html body .st-tile.is-top:not(.is-open) { border-color: var(--line); }
html body .st-tile:not(.is-empty) { background: var(--card); }

/* Lieferschein: letzter Preis des Händlers neben dem Preisfeld, voraussichtliche Summe (ANNAHMEN 611).
   Neben dem Feld nur, wenn die Tabelle Platz hat – sonst darunter (Containerabfrage, auch Firefox) */
.dn-form .table-wrap { container-type: inline-size; }
.dn-price-cell { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.dn-price-cell .dn-price { flex: 0 0 auto; }
.dn-ref { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.25; white-space: nowrap; }
.dn-items tfoot tr.dn-exp td { border-top: 0; padding-top: 2px; padding-bottom: 2px; color: var(--muted); }
.dn-items tfoot tr.dn-exp td strong { color: var(--text); }
@container (max-width: 900px) {
    .dn-price-cell { flex-direction: column; align-items: flex-end; gap: 2px; }
    .dn-ref { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; column-gap: 6px; align-items: baseline; max-width: 110px; white-space: normal; text-align: right; }
    .dn-ref > span { white-space: nowrap; }
}

/* Verkauf: Monate, deren Lieferscheine alle einen Preis haben, eingeklappt (ANNAHMEN 613) */
.dn-month-head[data-dn-fold] { cursor: pointer; align-items: center; }
.dn-month-head[data-dn-fold]:hover { background: var(--primary-soft); }
.dn-month-head .text-good .icon { width: 14px; height: 14px; vertical-align: -2px; }
.dn-month-arrow { display: inline-flex; color: var(--muted); transition: transform .2s; transform: rotate(180deg); }
.dn-month.is-folded .dn-month-arrow { transform: none; }
.sales-layout:not(.is-filtering) .dn-month.is-folded > [data-dn] { display: none; }
/* Verkauf: vier Kacheln, „Preis offen“ steht in „Geliefert“ (ANNAHMEN 614) */
@media (min-width: 1200px) { .kpi-grid-5.sales-kpis { grid-template-columns: repeat(4, 1fr); } }
/* Verkauf: Sortenfilter (ANNAHMEN 616) */
.dn-toolbar .dn-variety { flex: 0 1 220px; width: auto; min-width: 160px; }
