/* ==========================================================================
   Hof-Design (ANNAHMEN 255): der Look der Hofübersicht für den ganzen Obsthof.
   „hof“ = dunkel wie im Video, „hof-hell“ = hell. Akzent je Insel (html[data-area]), Zahlen in Monospace.
   Wird nach app.css geladen; andere Designs bleiben unberührt.
   ========================================================================== */

html[data-theme="hof"] {
    --bg: #15171b; --card: #1c1f24; --surface: #1c1f24; --surface-2: #22252b; --hover: #2a2e35;
    --text: #eceef1; --muted: #9298a3; --line: #2b2f36; --line-strong: #3a3f47;
    --primary: #7cc44e; --primary-dark: #a2d97c; --primary-soft: #24331d; --on-primary: #10140f;
    --danger: #ff6a55; --danger-soft: #3a211e; --warning: #f2b13c; --warning-soft: #3a3020; --info: #6fa8dc; --info-soft: #1d2a38;
    --shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 4px 16px rgba(0, 0, 0, .22); --shadow-lg: 0 14px 44px rgba(0, 0, 0, .6);
    --side-bg: #101215; --side-text: #e4e7eb; --side-muted: #8a909a; --side-hover: rgba(255, 255, 255, .06);
    --side-active-bg: rgba(124, 196, 78, .18); --side-active-text: #b8e398;
    --kpi-1: #8cc63f; --kpi-2: #f2b13c; --kpi-3: #6fa8dc; --kpi-4: #b7a6e0;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --ptrend-tafel: #e4ebe7; --ptrend-all: #9aa5a0;
    color-scheme: dark;
}
html[data-theme="hof-hell"] {
    --bg: #eef1ec; --card: #ffffff; --surface: #ffffff; --surface-2: #f6f8f4; --hover: #eef2ec;
    --text: #1d2620; --muted: #5d6b61; --line: #dfe5da; --line-strong: #c9d2c4;
    --primary: #4c9a2a; --primary-dark: #3a7a1e; --primary-soft: #e8f2e1; --on-primary: #ffffff;
    --danger: #c23b2f; --danger-soft: #fbe3e0; --warning: #b7700a; --warning-soft: #fdf0d9; --info: #2f6fa8; --info-soft: #e3eef8;
    --shadow: 0 1px 2px rgba(31, 45, 35, .06), 0 4px 14px rgba(31, 45, 35, .06); --shadow-lg: 0 14px 40px rgba(31, 45, 35, .18);
    --side-bg: #1d2620; --side-text: #eef3ef; --side-muted: #9fb0a4; --side-hover: rgba(255, 255, 255, .08);
    --side-active-bg: rgba(140, 198, 63, .22); --side-active-text: #ffffff;
    --kpi-1: #4c9a2a; --kpi-2: #b7700a; --kpi-3: #2f6fa8; --kpi-4: #6a55b3;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    color-scheme: light;
}

/* ---- Akzent je Insel: dunkel helle Inselfarbe, hell kräftige Variante ---------------------------------- */
html[data-theme="hof"][data-area="ernte"]          { --primary: #8cc63f; --primary-dark: #b6df7f; --primary-soft: #26341a; }
html[data-theme="hof"][data-area="lager"]          { --primary: #6fa8dc; --primary-dark: #a9cdee; --primary-soft: #1d2a38; }
html[data-theme="hof"][data-area="sortierung"]     { --primary: #f08a3c; --primary-dark: #f7b27c; --primary-soft: #3a2618; }
html[data-theme="hof"][data-area="verkauf"]        { --primary: #f3c242; --primary-dark: #f8d983; --primary-soft: #3a3118; }
html[data-theme="hof"][data-area="pflanzenschutz"] { --primary: #4fb3a5; --primary-dark: #8fd3c9; --primary-soft: #183330; }
html[data-theme="hof"][data-area="team"]           { --primary: #e3d3ad; --primary-dark: #f0e6cf; --primary-soft: #35301f; }
html[data-theme="hof"][data-area="buero"]          { --primary: #b7a6e0; --primary-dark: #d6cbf0; --primary-soft: #2a2540; }
html[data-theme="hof-hell"][data-area="ernte"]          { --primary: #4c9a2a; --primary-dark: #3a7a1e; --primary-soft: #e8f2e1; }
html[data-theme="hof-hell"][data-area="lager"]          { --primary: #2f6fa8; --primary-dark: #245887; --primary-soft: #e3eef8; }
html[data-theme="hof-hell"][data-area="sortierung"]     { --primary: #c8661c; --primary-dark: #a05015; --primary-soft: #fcebdc; }
html[data-theme="hof-hell"][data-area="verkauf"]        { --primary: #9a7404; --primary-dark: #7a5c03; --primary-soft: #fbf1d3; }
html[data-theme="hof-hell"][data-area="pflanzenschutz"] { --primary: #23867a; --primary-dark: #1b6a60; --primary-soft: #dff2ef; }
html[data-theme="hof-hell"][data-area="team"]           { --primary: #8a6d33; --primary-dark: #6d5627; --primary-soft: #f4ecdb; }
html[data-theme="hof-hell"][data-area="buero"]          { --primary: #6a55b3; --primary-dark: #54428f; --primary-soft: #ece8f8; }

/* ---- Grundformen ------------------------------------------------------------------------------------ */
html[data-theme^="hof"] body { background: var(--bg); }
html[data-theme="hof"] body { background: radial-gradient(120% 70% at 50% 0%, #1e2126 0%, var(--bg) 60%) fixed, var(--bg); }
html[data-theme^="hof"] .card { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
html[data-theme^="hof"] .btn-primary { color: var(--on-primary); }
html[data-theme="hof"] .btn-primary:hover:not(:disabled) { color: var(--on-primary); }
html[data-theme^="hof"] .sidebar { border-right: 1px solid var(--line); }
html[data-theme^="hof"] .sidebar .icon-btn { color: var(--side-text); }
html[data-theme^="hof"] .sidebar-foot, html[data-theme^="hof"] .nav-favs { border-color: rgba(255, 255, 255, .1); }
html[data-theme^="hof"] .nav-acc ul { border-left-color: rgba(255, 255, 255, .14); }
html[data-theme="hof"] .topbar, html[data-theme="hof"] .bottombar { background: #111316; border-color: var(--line); color: var(--text); }
/* Zahlen wie in der Hofübersicht */
html[data-theme^="hof"] .kpi-value, html[data-theme^="hof"] .tile-number, html[data-theme^="hof"] .table .num,
html[data-theme^="hof"] .yield-value, html[data-theme^="hof"] .invoice-totals dd, html[data-theme^="hof"] .stock-group-amount,
html[data-theme^="hof"] .stock-position-amount, html[data-theme^="hof"] .scale-input, html[data-theme^="hof"] .scale-tare {
    font-family: var(--mono); letter-spacing: -.02em;
}
html[data-theme^="hof"] .table th { letter-spacing: .06em; }
html[data-theme^="hof"] .table tbody tr:hover { background: var(--hover); }

/* ---- Eingaben ----------------------------------------------------------------------------------------- */
html[data-theme="hof"] input, html[data-theme="hof"] select, html[data-theme="hof"] textarea { color: var(--text); background-color: var(--surface-2); border-color: var(--line-strong); }
html[data-theme="hof"] input::placeholder, html[data-theme="hof"] textarea::placeholder { color: #6f7680; }
html[data-theme="hof"] .qs-stage, html[data-theme="hof"] .leaflet-container { filter: none; }

/* ---- Bauteile mit festen Farben (dunkle Fassung) ---------------------------------------------------------- */
html[data-theme="hof"] .fert-kind-mineral { background: #22324a; color: #a9c4ef; }
html[data-theme="hof"] .fert-kind-organic { background: #3a2e20; color: #e2c29a; }
html[data-theme="hof"] .fert-kind-lime { background: #333333; color: #cccccc; }
html[data-theme="hof"] .fert-kind-bio { background: #2c3a1a; color: #c4dc8e; }
html[data-theme="hof"] .fd-sum { background: rgba(124, 196, 78, .14); }
/* helle Fassung: die „dunkel wie das Gerät“-Regeln von app.css nicht übernehmen */
html[data-theme="hof-hell"] { --ptrend-tafel: #26302b; --ptrend-all: #8b9590; }
html[data-theme="hof-hell"] .fert-kind-mineral { background: #e6eef9; color: #2c5694; }
html[data-theme="hof-hell"] .fert-kind-organic { background: #f3ece2; color: #7a5122; }
html[data-theme="hof-hell"] .fert-kind-lime { background: #ececec; color: #555555; }
html[data-theme="hof-hell"] .fert-kind-bio { background: #eef5e0; color: #4d6b12; }
html[data-theme="hof-hell"] .fd-sum { background: var(--primary-soft); }

/* ---- Hof dunkel: Bauteile mit festen hellen Farben aus app.css (Durchgang aller Seiten 02.11.2026) ------------- */
html[data-theme^="hof"] .chip.is-active { color: var(--on-primary); }
html[data-theme="hof"] .reset-item:hover, html[data-theme="hof"] .dn-head:hover, html[data-theme="hof"] .sd-export-menu a:hover { background: var(--hover); }
html[data-theme="hof"] .chip-warn { color: #f2c56a; background: rgba(242, 177, 60, .14); border-color: rgba(242, 177, 60, .4); }
html[data-theme="hof"] .table-edit tr.is-cleared td, html[data-theme="hof"] .batch-details td, html[data-theme="hof"] .dn-body,
html[data-theme="hof"] .code-big, html[data-theme="hof"] .he-why, html[data-theme="hof"] .sd-jki-card, html[data-theme="hof"] .pd-code { background: var(--surface-2); }
html[data-theme="hof"] .badge-loc-hof { background: rgba(242, 177, 60, .15); color: #f2c56a; }
html[data-theme="hof"] .badge-loc-ca { background: rgba(183, 166, 224, .16); color: #cfc3ee; }
html[data-theme="hof"] .badge-loc-extern { color: var(--muted); }
html[data-theme="hof"] .wizard-steps li.is-done, html[data-theme="hof"] .rh-marker.is-done span, html[data-theme="hof"] .size-tile.is-selected { background: var(--primary-soft); }
html[data-theme="hof"] .scale-card { background: var(--primary-soft); border-color: var(--line); }
html[data-theme="hof"] .t-tile.t-work { background: rgba(124, 196, 78, .12); border-color: rgba(124, 196, 78, .35); }
html[data-theme="hof"] .t-tile.t-break { background: rgba(111, 168, 220, .12); border-color: rgba(111, 168, 220, .35); }
html[data-theme="hof"] .t-tile.t-done { background: var(--surface-2); }
html[data-theme="hof"] .eval-vbar-col { background: #3c5244; }
html[data-theme="hof"] .sd-cu-tag { background: rgba(242, 177, 60, .18); color: #f2c56a; }
html[data-theme="hof"] .sd-water, html[data-theme="hof"] .sd-alv, html[data-theme="hof"] .sd-alv-rec { background: rgba(111, 168, 220, .12); }
html[data-theme="hof"] .plan-st-open { background: #22324a; color: #a9c4ef; }
html[data-theme="hof"] .cu-mark { background: #c9cdd3; }
html[data-theme="hof"] .map { background: #1d2026; }
html[data-theme="hof"] .sc-badge-good, html[data-theme="hof"] .sc-cmd-done, html[data-theme="hof"] .bk-chip.is-add { background: rgba(124, 196, 78, .16); color: #a2d97c; }
html[data-theme="hof"] .sc-badge-warn, html[data-theme="hof"] .sc-cmd-queued, html[data-theme="hof"] .sc-cmd-running, html[data-theme="hof"] .bk-chip.is-chg { background: rgba(242, 177, 60, .16); color: #f2c56a; }
html[data-theme="hof"] .sc-badge-bad, html[data-theme="hof"] .sc-cmd-failed, html[data-theme="hof"] .sc-cmd-expired, html[data-theme="hof"] .bk-chip.is-del { background: rgba(255, 106, 85, .16); color: #ff9d8f; }
html[data-theme="hof"] .sc-badge-stale { background: #2a2e35; color: #9aa0a8; }
html[data-theme="hof"] .sr-tank.is-low { background: rgba(217, 72, 15, .16); }
html[data-theme="hof"] .qs-signerpick { background: rgba(183, 166, 224, .16); color: #cfc3ee; }

/* ---- Hof dunkel: Prognose-Seiten (prognose.css aus dem Fruitweb-Nachbau) ----------------------------------- */
html[data-theme="hof"] .prog-page { --gruen: #7cc44e; --gruen-dunkel: #a2d97c; --gruen-hell: #24331d; --text: #eceef1; --grau: #9298a3;
    --linie: #3a3f47; --rot: #ff6a55; background: transparent; color: var(--text); }
html[data-theme="hof"] .prog-page .kopf { background: #1c1f24; border-bottom: 1px solid var(--line); }
html[data-theme="hof"] .prog-page .leiste, html[data-theme="hof"] .prog-page .navigation .gruppe, html[data-theme="hof"] .prog-page .navigation button,
html[data-theme="hof"] .prog-page .tabellenrolle, html[data-theme="hof"] .prog-page .feld input, html[data-theme="hof"] .prog-page .schalter,
html[data-theme="hof"] .prog-page .meldung pre, html[data-theme="hof"] .prog-page .anmeldekarte, html[data-theme="hof"] .prog-page dialog,
html[data-theme="hof"] .prog-page .tabelle input[type="date"], html[data-theme="hof"] .prog-page .zuordnung select, html[data-theme="hof"] .prog-page .zuordnung input {
    background-color: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
html[data-theme="hof"] .prog-page .feld select { background-color: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
html[data-theme="hof"] .prog-page .feld label { background: var(--card); }
html[data-theme="hof"] .prog-page .leiste a, html[data-theme="hof"] .prog-page .leiste form.abmelden button { color: var(--muted); }
html[data-theme="hof"] .prog-page .leiste a:hover, html[data-theme="hof"] .prog-page .navigation button:hover, html[data-theme="hof"] .prog-page .schalter:hover,
html[data-theme="hof"] .prog-page .leiste form.abmelden button:hover, html[data-theme="hof"] .prog-page .tabelle tr:hover td { background: var(--hover); }
html[data-theme="hof"] .prog-page .schalter.primaer { color: #10140f; }
html[data-theme="hof"] .prog-page .tipp { background: rgba(28, 31, 36, .97); border-color: var(--line-strong); color: var(--text); }
html[data-theme="hof"] .prog-page .kreuz { background: #c9cdd3; }
html[data-theme="hof"] .prog-page .hinweise p, html[data-theme="hof"] .prog-page .meldung.warnung { background: rgba(242, 177, 60, .12); }
html[data-theme="hof"] .prog-page .meldung.fehler { background: rgba(255, 106, 85, .14); color: #ffb3a8; }
html[data-theme="hof"] .prog-page .karte, html[data-theme="hof"] .prog-page .stationskarte, html[data-theme="hof"] .prog-page .prog-diary { background: var(--card); box-shadow: none; border-color: var(--line); }
html[data-theme="hof"] .prog-page .karte h2 svg, html[data-theme="hof"] .prog-page .spritzzeile .spritz-einheit { color: var(--muted); }
html[data-theme="hof"] .prog-page .karte .zeile, html[data-theme="hof"] .prog-page .vz, html[data-theme="hof"] .prog-page .vz.kopfzeile, html[data-theme="hof"] .prog-page .reiter,
html[data-theme="hof"] .prog-page .tabelle th, html[data-theme="hof"] .prog-page .tabelle td, html[data-theme="hof"] .prog-page .vergleich th,
html[data-theme="hof"] .prog-page .vergleich td, html[data-theme="hof"] .prog-page .einstellung { border-color: var(--line); }
html[data-theme="hof"] .prog-page .vz .rot { color: #ff7a6a; }
html[data-theme="hof"] .prog-page .vz .blau { color: #8db8ff; }
html[data-theme="hof"] .prog-page .modul { background: var(--surface-2); color: var(--primary-dark); box-shadow: none; border: 1px solid var(--line); }
html[data-theme="hof"] .prog-page .modul:hover { background: var(--hover); }
html[data-theme="hof"] .prog-page .tabelle thead th, html[data-theme="hof"] .prog-page .vergleich thead th { background: #22252b; }
html[data-theme="hof"] .prog-page .tabelle tr.vorhersage td { background: #1f2227; color: #a0a6af; }
html[data-theme="hof"] .prog-page .vergleich td.stufe1 { background: rgba(242, 201, 76, .18); }
html[data-theme="hof"] .prog-page .vergleich td.stufe2 { background: rgba(255, 160, 60, .24); }
html[data-theme="hof"] .prog-page .vergleich td.stufe3 { background: rgba(255, 106, 85, .3); }
html[data-theme="hof"] .prog-page .feld input:disabled, html[data-theme="hof"] .prog-page .feld select:disabled { background-color: #1f2227; color: #7d838c; }
html[data-theme="hof"] .prog-page code { background: rgba(255, 255, 255, .08); }
html[data-theme="hof"] .prog-page .plakette { background: #2a2e35; color: var(--text); }
html[data-theme="hof"] .prog-page .plakette.ok { background: rgba(124, 196, 78, .18); color: #a2d97c; }
html[data-theme="hof"] .prog-page .plakette.fehler { background: rgba(255, 106, 85, .18); color: #ff9d8f; }
html[data-theme="hof"] .prog-page .kartenflaeche { background: #1d2026; border-color: var(--line); }

/* ==========================================================================
   Seite im Fenster der Hofübersicht (html.in-farm3d, gesetzt von js/embed.js)
   ========================================================================== */
html.in-farm3d .sidebar, html.in-farm3d .sidebar-backdrop, html.in-farm3d .topbar, html.in-farm3d .bottombar { display: none !important; }
html.in-farm3d .main { margin-left: 0 !important; padding: 14px 16px 32px !important; max-width: none; }
html.in-farm3d body { padding-bottom: 0 !important; }
html.in-farm3d .fav-btn { display: none; }
/* im Beamer des Hofbüros (ANNAHMEN 264): alles etwas kleiner, wie die übrigen Beamer-Ansichten */
html.in-beam body { zoom: .82; }
html.in-beam .main { padding: 10px 12px 24px !important; }
html.in-beam .family-tabs { display: none !important; }
html.in-beam .sc-rooms { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
html.in-beam .sc-room { padding: 12px 14px; border-radius: 12px; border-top-width: 4px; gap: 4px; }
html.in-beam .sc-room-head h2 { font-size: 1rem; white-space: nowrap; }
html.in-beam .sc-room-head { flex-wrap: wrap; justify-content: flex-start; }
html.in-beam .sc-badge { font-size: .68rem; padding: 2px 8px; }
html.in-beam .sc-temp { font-size: 1.8rem; }
html.in-beam .sc-vals { gap: 4px 10px; }
html.in-beam .sc-chart { height: 220px; }

/* ---- Eingabe im Hofbüro-Fenster (html.in-focus, ANNAHMEN 278): ohne Seitenkopf/Reiter, nummerierte Schritte als Karten ---- */
html.in-focus .main > nav.tabs, html.in-focus .cu-pill, html.in-focus .main > p.hide-mobile { display: none !important; }
html.in-focus .page-head > div:first-child { display: none; }
html.in-focus .main:has(.sd-grid) .page-head { display: none; }
html.in-focus .page-head { justify-content: flex-end; margin-bottom: 8px; }
html.in-focus .sd-grid { counter-reset: step; gap: 14px; }
html.in-focus [data-step] { counter-increment: step; }
html.in-focus [data-step][hidden] { counter-increment: none; }
html.in-focus .sd-form > [data-step] { margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
html.in-focus [data-step]::before { content: counter(step) "  " attr(data-step); display: block; grid-column: 1 / -1; margin-bottom: 8px;
    font-weight: 700; font-size: .95rem; color: var(--primary-dark); letter-spacing: .01em; }
html.in-focus .sd-fields[data-step]::before { padding: 12px 14px 0; margin: 0; }
html.in-focus .sd-form > [data-step] > h3:first-child, html.in-focus .sd-form > [data-step] > .fd-block-head > h3 { display: none; }
html.in-focus .sd-form > [data-step] > .fd-block-head { justify-content: flex-end; }
html.in-focus .sd-fields-title h2 { display: none; }
html.in-focus .sd-form > h2 { font-size: 1.15rem; margin-bottom: 10px; }
html.in-focus .sd-form input, html.in-focus .sd-form select, html.in-focus .sd-form textarea { border-radius: 10px; }
html.in-focus .sd-fields, html.in-focus .sd-form { border-radius: 16px; }
html.in-focus .sd-submit { position: sticky; bottom: 0; z-index: 5; margin: 12px -16px -16px; padding: 10px 16px; background: var(--card);
    border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
html.in-focus .sd-submit .btn-primary { border-radius: 999px; padding-left: 20px; padding-right: 20px; }
html.in-focus body { zoom: 1; }
html.in-focus .sd-grid { grid-template-columns: minmax(340px, 520px) 1fr; }
html.in-focus .sd-fields { top: 0; max-height: calc(100vh - 16px); }
html.in-focus .sd-field-list { flex: 1 1 auto; min-height: 0; max-height: none; }
html.in-focus .sd-map-wrap { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
html.in-focus .sd-map-wrap[hidden] { display: none; }
html.in-focus .sd-map { flex: 1 1 auto; height: auto; min-height: 420px; }
/* Obst-Knöpfe (Apfel, Birne, Kirsche …) mit Farbe und Bild statt weiß (ANNAHMEN 283) */
html.in-beam .chip.sd-fruit { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; font-weight: 600;
    background: color-mix(in srgb, var(--fc, #7cc44e) 16%, var(--card, #fff)); border: 1px solid color-mix(in srgb, var(--fc, #7cc44e) 55%, transparent); color: var(--text); }
html.in-beam .chip.sd-fruit:hover { background: color-mix(in srgb, var(--fc, #7cc44e) 28%, var(--card, #fff)); border-color: var(--fc, #7cc44e); }
html.in-beam .chip.sd-fruit svg { width: 22px; height: 22px; flex: none; }
html.in-beam .chip.sd-fruit.is-active { background: var(--fc, #7cc44e); border-color: var(--fc, #7cc44e); color: #fff; }
html:not(.in-beam) .chip.sd-fruit svg { display: none; }
