/* Immer helles Design – auch wenn das Handy auf Dark Mode steht (kein automatisches Umfärben) */
:root { color-scheme: only light; }

:root {
    --bg: #eef2f7;
    --card: #ffffff;
    --ink: #1f2a36;
    --muted: #64748b;
    --primary: #003064;
    --primary-dark: #001f42;
    --accent: #e8511d;
    --primary-rgb: 0 48 100;   /* für halbtransparente Töne: rgb(var(--primary-rgb) / .3) */
    --accent-rgb: 232 81 29;
    --success: #2f9e44;
    --danger: #d9363e;
    --warn: #e8a317;
    --border: #dbe3ea;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(15, 40, 70, .06);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2em 0 .6em; }
h2 { font-size: 1.15rem; margin: 1.2em 0 .6em; }
.card > h2:first-child, .card > form > h2:first-of-type { margin-top: 0; }
/* Überschrift mit Button oben in einer Box: gleiche Höhe wie andere Box-Titel */
.card > .page-head:first-child { margin-top: 0; }
.card > .page-head:first-child > h2, .card > .page-head:first-child > h3 { margin: 0; }
code { background: #f1f5f9; padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.muted { color: var(--muted); font-size: .92rem; }

/* Topbar */
.topbar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: var(--card); border-bottom: 1px solid var(--border);
    padding: .7rem 1.2rem; box-shadow: var(--shadow);
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; } /* 20 px zwischen den Menüpunkten */
.topbar nav a { color: var(--muted); font-weight: 500; }
.topbar nav a.active { color: var(--accent); }
.nav-soon { color: #b6c0cc; cursor: default; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border);
    border-radius: 8px; font-size: 1.4rem; line-height: 1; padding: .25rem .55rem; cursor: pointer; color: var(--ink); }
/* Burger-Menü: Handy (schmal) und Tablet (Touch ohne Maus – auch quer/breit); Desktop-PC behält die Leiste */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
    .nav-toggle { display: inline-flex; align-items: center; }
    .topbar nav { display: none; margin-left: 0; flex-basis: 100%; flex-direction: column;
        align-items: flex-start; gap: .6rem; margin-top: .7rem; }
    .topbar nav.open { display: flex; }
    .topbar nav a, .topbar nav .btn-link, .topbar nav .nav-soon { font-size: 1.3rem; } /* Handy-Menü: zwei Stufen größer */
}
/* Tablet auch mit Tastatur/Trackpad (meldet dann „Maus“): per Geräte-Erkennung im <head> (html.is-tablet) – gleiches Burger-Menü */
.is-tablet .nav-toggle { display: inline-flex; align-items: center; }
.is-tablet .topbar nav { display: none; margin-left: 0; flex-basis: 100%; flex-direction: column;
    align-items: flex-start; gap: .6rem; margin-top: .7rem; }
.is-tablet .topbar nav.open { display: flex; }
.is-tablet .topbar nav a, .is-tablet .topbar nav .btn-link, .is-tablet .topbar nav .nav-soon { font-size: 1.3rem; }
/* Desktop, Menü passt nicht in eine Zeile (Skript im Layout): erst ohne Icons, dann Burger-Menü wie am Tablet */
.nav-no-icons .topbar nav a.nav-lead .nav-svg, .nav-no-icons .topbar .brand span, .nav-no-icons .topbar .brand-product { display: none; } /* Stufe 2: ohne Icons und ohne „Kunden-Tool“ */
.nav-burger .topbar .brand span { display: inline; } .nav-burger .topbar .brand-product { display: inline-flex; } /* Stufe 3 (Burger): Titel wieder da */
.nav-burger .nav-toggle { display: inline-flex; align-items: center; }
.nav-burger .topbar nav { display: none; margin-left: 0; flex-basis: 100%; flex-direction: column;
    align-items: flex-start; gap: .6rem; margin-top: .7rem; }
.nav-burger .topbar nav.open { display: flex; }
.nav-burger .topbar nav a.nav-lead .nav-svg { display: block; } /* im aufgeklappten Menü wieder mit Icons */
.nav-burger .nav-icon-label { display: inline; }

.container { max-width: 1000px; margin: 1.5rem auto; padding: 0 1rem; }

/* Karten */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.3rem 1.5rem; margin-bottom: 1.2rem;
}
.card.narrow { max-width: 440px; margin: 2rem auto; }

/* Formulare */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel], select, textarea {
    display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem;
    border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgb(var(--primary-rgb) / .2); border-color: var(--primary); }
input:disabled { background: #f5f7fa; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.grid2 > .span-all { grid-column: 1 / -1; }
form.inline { display: inline; }
.bulk-row { margin: 0 0 .6rem; }
.upload-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }

/* Buttons */
.btn {
    display: inline-block; border: 1px solid var(--border); background: #fff; color: var(--ink);
    padding: .55rem 1rem; border-radius: 8px; cursor: pointer; font: inherit; font-size: .95rem;
    font-weight: 600; transition: .15s;
}
.btn:hover { text-decoration: none; border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-success { background: #2f9e44; border-color: #2f9e44; color: #fff; }
.btn-success:hover { background: #27863a; }
.btn-danger-soft { background: #fdeced; border-color: #f3b9bc; } /* rot auf hellrotem Grund (z. B. „Nicht passende Stopps zurück auf die Karte“) */
.btn-link { background: none; border: none; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }

/* Meldungen */
.flash { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-success { background: #ebf8ee; border-color: #b7e4c0; color: #1f6b30; }
.flash-error   { background: #fdeced; border-color: #f5c2c5; color: #9b1c22; }
.flash-info    { background: #e8f2fb; border-color: #b9d7f0; color: #0b4f82; }
.flash-warn    { background: #fff6e0; border-color: #f3d58a; color: #7a5800; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { padding: .25rem 0; }
.checklist li.todo { color: var(--muted); }

.logo-preview { max-width: 260px; max-height: 120px; border: 1px solid var(--border); border-radius: 8px;
    padding: .5rem; background: #fff; }

.field-error { color: var(--danger); font-size: .85rem; font-weight: 500; margin-top: .2rem; display: block; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.checkbox input { margin: 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.page-head h1 { margin: .2em 0; }
.btn-small { padding: .3rem .7rem; font-size: .85rem; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions form { margin-left: .3rem; }
.checkbox { margin: .4rem 0 1.1rem; }
.choice-group { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1.4rem; }
.choice-group legend { font-weight: 600; padding: 0; margin-bottom: .3rem; }
.choice-group .checkbox { margin: .2rem 0; }
.choice-group .muted { flex-basis: 100%; }

/* Kopfzeile in den ProH2O-Farben */
.topbar { background: var(--primary); border-bottom: 3px solid var(--primary); }
.brand { color: #fff; display: inline-flex; align-items: center; gap: .6rem; }
.brand img { height: 34px; width: auto; display: block; }
.brand-group { display: inline-flex; align-items: center; gap: .6rem; flex: none; } /* Firmenlogo + MachTool-Logo (eigener Link zur Website, seit 02.12.2026) */
.brand-group .brand-product, .brand .brand-product { display: inline-flex; align-self: flex-end; margin-bottom: 2.5px; margin-left: 10px; } /* +10 px Abstand zum Firmenlogo (zusätzlich zu .6rem) */ /* MachTool-Logo: unten bündig mit der Schrift des Firmenlogos (das Bild hat unten 2,5 px Rand) */
.brand-product img { height: 16px; } /* knapp 50 % des Firmenlogos (34 px): 20 px − 20 % */
.topbar nav a, .topbar nav .btn-link { color: #c9d6e6; }
.topbar nav a:hover, .topbar nav .btn-link:hover { color: #fff; }
.topbar nav a.active { color: var(--accent); }
.topbar .nav-soon { color: #6f86a3; }
.nav-toggle { color: #fff; border-color: rgba(255, 255, 255, .35); }
/* Einstellungen / Mein Konto: am Desktop nur Icon (Farbe wie der Text), Abmelden steht in „Mein Konto“; im Handy-Menü mit Text */
.topbar nav a.nav-icon { display: inline-flex; align-items: center; gap: .45rem; }
.topbar nav a.nav-lead { display: inline-flex; align-items: center; gap: .3rem; } /* Icon vor dem Text, gleiche Farbe wie der Link */
.topbar nav a.nav-lead .nav-svg { width: 1em; height: 1em; } /* wächst mit der Schrift (Handy-Menü größer) */
.nav-svg { display: block; flex: none; }
.nav-icon-label { display: none; }
@media (max-width: 760px), (hover: none) and (pointer: coarse) { .nav-icon-label { display: inline; } } /* im Burger-Menü mit Text */
.is-tablet .nav-icon-label { display: inline; }

/* Zwei Spalten: Formular | Vorschau */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; margin-bottom: 1.2rem; }
.split > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }
.container { max-width: 1550px; } /* Standardbreite aller Seiten (seit 08.11.2026; vorher 1240 px) */
.container-service { max-width: 1240px; } /* Service behält seine Breite */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1.6fr; gap: 0 1.2rem; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr; } }
.tag { display: inline-block; background: #e6ecf4; color: var(--primary); border-radius: 999px; padding: .05rem .6rem;
    font-size: .85rem; margin: .1rem .2rem .1rem 0; }
.tag:hover { text-decoration: none; background: #d6e0ec; }
select { cursor: pointer; }
.color-row { display: flex; gap: .5rem; align-items: center; margin-top: .3rem; }
.color-row input[type=color] { width: 46px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.color-row input[type=text] { margin-top: 0; font-family: ui-monospace, monospace; }
.module-image { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; }

/* Vorschau */
.preview-card h2 { margin-top: 0; }
.preview-frame { display: block; width: 100%; max-width: 100%; height: 640px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; margin: 0 auto; transition: max-width .2s; }
.preview-large { height: 900px; }
.btn.on { border-color: var(--primary); background: var(--primary); color: #fff; }

/* Editor */
.editor { border: 1px solid var(--border); border-radius: 8px; background: #fff; margin: .3rem 0 .4rem; }
.ed-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; padding: .4rem; border-bottom: 1px solid var(--border);
    background: #f6f8fb; border-radius: 8px 8px 0 0; position: sticky; top: 0; z-index: 1; }
.ed-btn { border: 1px solid transparent; background: none; border-radius: 6px; padding: .25rem .5rem; cursor: pointer;
    font: inherit; font-size: .85rem; color: var(--ink); }
.ed-btn:hover, .ed-btn.on { border-color: var(--border); background: #fff; }
.ed-sep { width: 1px; height: 22px; background: var(--border); margin: 0 .2rem; }
.ed-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); }
.ed-select { width: auto; margin: 0; padding: .25rem .4rem; font-size: .85rem; display: inline-block; }
.ed-area { min-height: 220px; padding: .9rem 1rem; outline: none; font-weight: 400; }
.ed-source { width: 100%; min-height: 260px; border: 0; border-radius: 0 0 8px 8px; font-family: ui-monospace, monospace;
    font-size: .85rem; padding: .8rem; margin: 0; display: block; }
.mail-content h2 { font-size: 1.15rem; color: var(--primary); margin: 0 0 .5rem; }
.mail-content h3 { font-size: 1rem; color: var(--primary); margin: 0 0 .4rem; }
.mail-content p { margin: 0 0 .7rem; }
.mail-content ul, .mail-content ol { margin: 0 0 .7rem; padding-left: 1.4rem; }
.mail-content a { color: var(--accent); }

/* Vorlagen-Baukasten */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.builder > .card { margin-bottom: 0; }
@media (max-width: 900px) { .builder { grid-template-columns: 1fr; } }
.tb-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.tb-target { min-height: 120px; padding: .5rem; border: 2px dashed var(--border); border-radius: 10px; }
.tb-target.over { border-color: var(--accent); background: #fff7f3; }
.tb-lib, .tb-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; background: #fff;
    border: 1px solid var(--border); border-radius: 8px; cursor: grab; }
.tb-item { border-left: 4px solid var(--primary); }
.tb-item.dragging { opacity: .45; }
.tb-name { flex: 1; font-weight: 600; font-size: .92rem; }
.tb-type { font-size: .75rem; color: var(--muted); background: #eef2f7; border-radius: 999px; padding: .05rem .5rem; }
.tb-handle { color: #9aa6b5; cursor: grab; letter-spacing: -2px; }
.tb-btn { border: 1px solid var(--border); background: #fff; border-radius: 6px; width: 28px; height: 28px; cursor: pointer;
    font-size: .9rem; line-height: 1; color: var(--ink); }
.tb-btn:hover { border-color: var(--primary); }
.tb-remove:hover { border-color: var(--danger); color: var(--danger); }
.tb-empty { margin: -.6rem 0 1rem; }

/* hidden-Attribut hat immer Vorrang (z. B. Editor-Quelltextfeld) */
[hidden] { display: none !important; }
.grid3.grid3-even { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .grid3.grid3-even { grid-template-columns: 1fr; } }

/* Gestaltung: Farbe + Schriftgröße je Zeile */
.color-table { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .6rem; }
.color-line { display: grid; grid-template-columns: minmax(0, 1fr) 190px 90px; gap: .4rem 1rem; align-items: center;
    padding: .55rem 0; border-bottom: 1px solid var(--border); }
.color-line:last-child { border-bottom: 0; }
.color-line .field-error { grid-column: 1 / -1; }
.color-label { display: flex; flex-direction: column; font-size: .92rem; }
.color-label .muted { font-size: .82rem; }
.color-line .color-row { margin-top: 0; }
.size-row { display: flex; align-items: center; gap: .3rem; }
.size-row input { margin-top: 0; width: 64px; padding: .45rem .4rem; }
@media (max-width: 640px) { .color-line { grid-template-columns: 1fr 90px; } .color-label { grid-column: 1 / -1; } }

/* Öffentliche Seiten (z. B. Abmelde-Info) */
.public-head { background: var(--primary); border-bottom: 4px solid var(--primary); padding: 1rem; text-align: center; }
.public-head img { height: 72px; width: auto; }
.public-card { max-width: 560px; }
.public-card h1 { font-size: 1.45rem; color: var(--primary); }
.public-card h2 { color: var(--primary); margin-top: 1.6rem; }
.btn-block { display: block; text-align: center; }
.contact { font-style: normal; line-height: 1.7; }
.contact a { color: var(--accent); }

/* Tabellen: Etiketten nicht umbrechen; auf schmalen Bildschirmen Zeilen als Karten */
.tag { white-space: nowrap; }
.table td.actions { white-space: normal; }
.table td.actions .btn, .table td.actions form { margin: .15rem 0 .15rem .3rem; }
@media (max-width: 760px) {
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tr { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem; margin-bottom: .7rem; background: #fff; }
    .table-cards td { border: 0; padding: .3rem 0 .3rem 7.8rem; position: relative; min-height: 1.9rem; word-break: break-word; }
    .table-cards td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: .45rem; width: 7.2rem;
        color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
        word-break: normal; overflow-wrap: normal; hyphens: auto; } /* lange Beschriftungen mit Trennstrich statt mitten im Wort */
    .table-cards td.cell-title { padding-left: 0; font-size: 1.05rem; font-weight: 600; }
    .table-cards td.cell-title::before { display: none; }
    .table-cards td.actions { padding: .6rem 0 0; margin-top: .4rem; border-top: 1px solid var(--border);
        display: flex; flex-wrap: wrap; gap: .4rem; text-align: left; }
    .table-cards td.actions .btn, .table-cards td.actions form { margin: 0; }
    .card:has(> .table-cards) { padding: 0; background: transparent; border: 0; box-shadow: none; }
    .page-head > div { display: flex; flex-wrap: wrap; gap: .4rem; }
}

/* Import */
.table-compact th, .table-compact td { padding: .35rem .5rem; font-size: .88rem; }
.req { color: var(--accent); font-weight: 700; margin-left: .15rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; font-size: .95rem; }
.stat strong { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat-ok { border-left: 5px solid var(--success); }
.stat-skip { border-left: 5px solid var(--warn); }
.stat-error { border-left: 5px solid var(--danger); }
.stat-fixed { border-left: 5px solid var(--accent); }
button.stat { font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.stat:hover { box-shadow: 0 2px 8px rgb(var(--primary-rgb) / .12); }
.stat.is-active { box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .25); border-color: var(--primary); }
button.badge { font-family: inherit; line-height: inherit; cursor: pointer; border: 0; }
.test-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.test-row { display: flex; gap: .5rem; flex: 1 1 320px; max-width: 460px; }
.test-row input { margin: 0; flex: 1; }
.test-box .field-error { flex-basis: 100%; }
.filter-note { margin: .2rem 0 .8rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }
.confirm-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.badge { display: inline-block; border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.badge-ok, .badge-pending { background: #ebf8ee; color: #1f6b30; }
.badge-queued { background: #e8f2fb; color: #0b4f82; }
.badge-sent { background: #e6ecf4; color: var(--primary); }
.badge-skip { background: #fff6e0; color: #7a5800; }
.badge-fixed { background: #fdeee7; color: #a3370f; margin-top: .25rem; }
.badge-error, .badge-failed { background: #fdeced; color: #9b1c22; }
.table-review tr.row-error td { background: #fff8f8; }
.table-review tr.row-skipped td { background: #fffcf3; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6rem 1rem; margin-top: 1rem; }
.pager-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.pager-pages .btn { min-width: 2.4rem; justify-content: center; }
.pager-current { background: var(--primary); border-color: var(--primary); color: #fff; pointer-events: none; }
.pager-gap { align-self: center; color: var(--muted); padding: 0 .15rem; }
.btn.disabled { opacity: .45; pointer-events: none; }
.table-review td:first-child, .table-review td[data-label="Termin"] { white-space: nowrap; }
@media (max-width: 760px) { .table-review td { white-space: normal !important; } }

/* Versand */
.send-status { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; font-size: 1.05rem; margin-bottom: .6rem; }
.progress { height: 14px; background: #e6ecf4; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), #1d5aa5); transition: width .4s; }
.send-counts { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: .8rem 0; }
.send-counts strong { font-size: 1.25rem; }
.send-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.send-hint { margin: .8rem 0 0; }
.log-failed td { background: #fff8f8; }
.log-skipped td { background: #fffcf3; }
.log-note td { font-weight: 600; font-size: .9rem; background: #f6f8fb; color: var(--primary); }
.log-note.note-ok td { background: #ebf8ee; color: #1f6b30; }
.log-note.note-warn td { background: #fff6e0; color: #7a5800; }
.log-note.note-error td { background: #fdeced; color: #9b1c22; }
.log-new { animation: flashrow 1.2s ease-out; }
@keyframes flashrow { from { background: #fff3c4; } to { background: transparent; } }
.log-message { font-size: .85rem; word-break: break-word; max-width: 360px; }
.filter-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 0 1rem; align-items: end; }
.filter-form label { margin-bottom: .6rem; }
.filter-buttons { display: flex; gap: .4rem; margin-bottom: .6rem; }
@media (max-width: 900px) { .filter-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .log-note td { display: block; padding: .3rem 0 !important; } .table-cards tr.log-note { padding: .4rem .8rem; } }
.send-box { display: flex; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; }
.send-box > div { flex: 1 1 260px; }

/* Versand-Übersicht (Startseite) */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.kpi strong { display: block; font-size: 1.7rem; line-height: 1.1; color: var(--primary); }
.kpi span { font-size: .88rem; color: var(--muted); }
.kpi-bad strong { color: var(--danger); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.run { padding: .8rem 0 1rem; border-bottom: 1px solid var(--border); }
.run:last-child { border-bottom: 0; padding-bottom: 0; }
.run-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; margin-bottom: .5rem; }
.run-title { font-weight: 700; font-size: 1.05rem; }
.run-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin-top: .55rem; }
.run-foot .btn { margin-left: auto; }
.bad { color: var(--danger); }
.line-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; padding: .6rem 0;
    border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.line-item:last-of-type { border-bottom: 0; }
.line-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.line-error .log-message { color: #9b1c22; }
.setup-card { border-left: 5px solid var(--warn); }

/* Modul-Darstellung (Auswahl) */
.style-pick { border: 0; padding: 0; margin: 0 0 1rem; }
.style-pick legend { font-weight: 600; font-size: .92rem; margin-bottom: .4rem; }
.style-option { display: inline-flex; flex-direction: column; align-items: center; gap: .3rem; width: 23%; min-width: 130px;
    margin: 0 .4rem .4rem 0; font-weight: 500; font-size: .82rem; text-align: center; cursor: pointer; vertical-align: top; }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-swatch { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; background: var(--bg);
    border: 2px solid transparent; border-radius: 8px; padding: 8px; }
.style-swatch span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-weight: 700; color: var(--ink); }
.style-box span { background: #fff; border: 1px solid var(--accent); }
.style-accent span { background: var(--accent); color: #fff; }
.style-primary span { background: var(--primary); color: #fff; }
.style-option input:checked + .style-swatch { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .15); }
.style-option input:focus-visible + .style-swatch { outline: 2px solid var(--primary); }

/* Modul-Liste: Auswahl der Darstellung */
.style-select-form { display: inline-flex; align-items: center; gap: .45rem; margin: 0; }
.style-select-form select { width: auto; margin: 0; padding: .3rem .5rem; font-size: .88rem; }
.style-dot { width: 18px; height: 14px; flex: 0 0 18px; border: 1px dashed #b6c0cc; background: transparent; }
.style-dot-box { background: #fff; border: 1px solid var(--accent); }
.style-dot-accent { background: var(--accent); border: 1px solid var(--accent); }
.style-dot-primary { background: var(--primary); border: 1px solid var(--primary); }

/* Kundenstamm */
input[type=search] { width: 100%; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; margin-top: .3rem; background: #fff; }
.customer-filter { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; }
.filter-actions { display: flex; gap: .4rem; margin-bottom: .6rem; }
@media (max-width: 900px) { .customer-filter { grid-template-columns: 1fr 1fr; } .customer-filter .span-2 { grid-column: 1 / -1; } }
.facts { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; word-break: break-word; }
.pre, .pre-line { white-space: pre-line; }
.h-sub { font-size: .95rem; font-weight: 500; margin-left: .4rem; }
.site-card h3 { margin: .2em 0; }
.site-card h4 { margin: 1rem 0 .4rem; }
.site-card .badge { margin: 0 .3rem .3rem 0; }
.badge-muted { background: #eef1f5; color: var(--muted); }
/* Auftrag aus einer Tour (🚐 wie Touren im Kalender) */
.badge-tour { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .15rem .55rem; vertical-align: middle; line-height: 1.2;
    background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; } /* Lila: Icon und Text in derselben Farbe */
.badge-tour .icon-tour { display: block; }
.pin { font-family: ui-monospace, monospace; font-weight: 700; margin-right: .4rem; }
.danger-zone { margin: 1.4rem 0 0; text-align: right; }

/* Bereichs-Navigation (z. B. E-Mail-Versand) */
.subnav { background: #fff; border-bottom: 1px solid var(--border); }
.subnav-inner { max-width: 1550px; margin: 0 auto; padding: 0 1rem; display: flex; gap: .2rem; flex-wrap: wrap; }
.subnav a { padding: .65rem .8rem; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .93rem; border-bottom: 3px solid transparent; }
.subnav a:hover { color: var(--primary); }
.subnav a.active { color: var(--primary); border-bottom-color: var(--accent); }

/* Mitarbeiter */
.staff-dot { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1; flex: 0 0 28px; vertical-align: middle;
    box-shadow: 0 0 0 2px #fff; }
.staff-dot-lg { width: 44px; height: 44px; flex-basis: 44px; font-size: 1rem; color: #fff; }
.page-head h1 .staff-dot { width: 40px; height: 40px; font-size: .95rem; margin-right: .3rem; }
.color-pick { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.color-pick input[type=color] { width: 54px; height: 44px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.palette { display: flex; flex-wrap: wrap; gap: .3rem; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); cursor: pointer;
    color: #fff; font-size: .7rem; padding: 0; line-height: 1; }
.dot-mini { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.check-row { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; margin-bottom: .8rem; }
.check-row .checkbox { margin: .3rem 0; }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.row-muted td { opacity: .6; }
.absence-form { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.5fr) auto; gap: 0 .8rem; align-items: end; }
.absence-form .btn { margin-bottom: .9rem; }
@media (max-width: 900px) { .absence-form { grid-template-columns: 1fr 1fr; } }
input[type=date] { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; margin-top: .3rem; background: #fff; }
.holidays { margin-top: 1rem; }
.holidays summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.inline-edit { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0; }
.inline-edit input[type=text] { margin: 0; flex: 1 1 160px; width: auto; }
.inline-edit input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.inline-edit .checkbox { margin: 0; font-size: .85rem; }
/* Tourenplan „Dauer je Stopp“: Button „Übernehmen“ unten bündig und so hoch wie die Auswahl */
.duration-plan { align-items: flex-end; }
.duration-plan label { flex: 1 1 320px; margin: 0; }
.duration-plan select, .duration-plan .btn { height: 2.75rem; box-sizing: border-box; }
.list-edit td { vertical-align: middle; }

/* Kalender */
/* Kalender und Tour-Karte: ganze Bildschirmbreite (großer Monitor) */
.container-wide { max-width: none; padding: 0 1.5rem; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.cal-nav { display: flex; align-items: center; gap: .3rem; }
.cal-title { font-size: 1.25rem; margin: 0; white-space: nowrap; }
.cal-title-pick { display: inline-flex; align-items: center; gap: .4rem; margin-left: .6rem; padding: .2rem .5rem; border: 1px solid transparent;
    border-radius: 8px; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.cal-title-pick:hover { border-color: var(--border); background: #fff; }
.cal-title-ico { width: 20px; height: 20px; color: var(--primary); flex: 0 0 20px; }
.cal-nav { position: relative; }
.cal-date-input { position: absolute; left: 7rem; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.cal-views { display: flex; flex-wrap: wrap; gap: .25rem; }
/* Kalender-Suche neben dem Datum */
.cal-search { position: relative; display: flex; align-items: center; gap: .5rem; margin-left: .6rem; }
.cal-search input.cal-search-q { width: 15rem; max-width: 40vw; height: 2.3rem; padding: .25rem .6rem; font-size: .95rem; margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.cal-search-deleted { margin: 0; display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; color: var(--muted, #666); cursor: pointer; }
.cal-search-results { position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; width: 26rem; max-width: 90vw; max-height: 60vh; overflow-y: auto;
    background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: .25rem; }
.cal-search-hit { display: flex; align-items: center; gap: .4rem; border-radius: 6px; }
.cal-search-hit:hover { background: #f2f5f9; }
.cal-search-go { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; text-align: left;
    background: none; border: 0; padding: .4rem .5rem; cursor: pointer; font: inherit; color: var(--ink); }
.cal-search-go strong { font-weight: 600; }
.cal-search-when { font-size: .8rem; color: var(--primary); font-weight: 600; }
.cal-search-hit.is-deleted .cal-search-when { color: #b42318; }
.cal-search-hit.is-deleted strong { text-decoration: line-through; color: #666; }
.cal-search-open { padding: .3rem .5rem; white-space: nowrap; }
.cal-search-empty { padding: .5rem; color: #666; }
@media (max-width: 900px) { .cal-search { margin-left: 0; flex-basis: 100%; } .cal-search input.cal-search-q { width: 100%; max-width: none; flex: 1; } }
.cal-views .btn.on, .cal-views .btn.on:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cal-legend { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin-bottom: .7rem; }
.cal-legend-item { font-size: .8rem; color: var(--ink); text-decoration: none; padding: .15rem .55rem; border: 1px solid; border-radius: 999px; background: #fff; }
.cal-legend-item:hover { background: #f5f7fa; }
.cal-body { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-scroll { overflow-x: auto; }
.cal-grid { --colw: 120px; min-width: calc(56px + var(--cols) * var(--colw)); }
.cal-row { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(var(--colw), 1fr)); }
.cal-gutter { font-size: .72rem; color: var(--muted); text-align: right; padding: .3rem .4rem 0 0; border-right: 1px solid var(--border); }
.cal-head { border-bottom: 1px solid var(--border); background: #fafbfd; position: sticky; top: 0; z-index: 3; }
.cal-colhead { padding: .45rem .4rem; text-align: center; font-weight: 600; font-size: .88rem; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center; gap: .2rem; min-width: 0; }
.cal-colhead a { color: var(--ink); text-decoration: none; }
.cal-colhead.is-today a { color: #fff; background: var(--accent); border-radius: 999px; padding: .05rem .55rem; }
.cal-colname { font-size: .8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cal-holiday { font-size: .72rem; font-weight: 600; color: #a3370f; }
.cal-allday { border-bottom: 2px solid var(--border); min-height: 52px; }
.cal-alldaycell { border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-height: 50px; padding: 3px; cursor: pointer; min-width: 0; }
.cal-bar { font-size: .72rem; font-weight: 600; border-radius: 4px; padding: .1rem .35rem; border-left: 3px solid; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.cal-bar-holiday { background: #fdeee7; color: #a3370f; border-color: var(--accent); }
.cal-bar-ferien { background: #e7f1fa; color: #1d5d8f; border-color: #5b9bd5; }
.cal-mferien { font-size: .68rem; font-weight: 600; color: #1d5d8f; background: #e7f1fa; border-radius: 3px; padding: 0 .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-main { position: relative; }
.cal-hours .cal-hour { height: var(--hour-px, 48px); box-sizing: border-box; padding-top: 0; transform: translateY(-.45em); }
.cal-hours .cal-hour:first-child { transform: none; }
.cal-col { position: relative; border-right: 1px solid var(--border); cursor: cell;
    background-image: linear-gradient(to bottom, #e4e9f0 1px, transparent 1px), linear-gradient(to bottom, #f1f4f8 1px, transparent 1px);
    background-size: 100% var(--hour-px, 48px), 100% calc(var(--hour-px, 48px) / 2); } /* Stundenhöhe passt sich der Bildschirmhöhe an (calendar.js) */
.cal-col.is-off { background-color: #f6f7f9; }
.cal-col.is-today { background-color: #fffaf5; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.cal-ev { position: absolute; border-radius: 6px; padding: 2px 5px; font-size: .74rem; line-height: 1.25; overflow: hidden;
    cursor: grab; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); touch-action: none; user-select: none; z-index: 1; }
.cal-ev:hover { box-shadow: 0 2px 8px rgb(var(--primary-rgb) / .22); z-index: 4; }
.cal-ev.is-dragging { opacity: .85; box-shadow: 0 6px 18px rgb(var(--primary-rgb) / .3); cursor: grabbing; z-index: 5; }
.cal-ev-allday { position: static; display: block; text-decoration: none; cursor: pointer; }
.cal-ev-top { display: flex; align-items: center; gap: .25rem; font-weight: 600; }
.cal-ev-time { color: var(--muted); font-weight: 600; font-size: .7rem; }
.cal-ev-status { margin-left: auto; font-weight: 700; }
.cal-ev-series { color: var(--muted); }
.cal-ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-sub { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-dots { display: flex; gap: 2px; margin-top: 2px; flex-wrap: wrap; }
.cal-ev-dots .staff-dot { width: 20px; height: 20px; flex-basis: 20px; font-size: .58rem; box-shadow: 0 0 0 1px #fff; }
.cal-ev.is-short .cal-ev-sub, .cal-ev.is-short .cal-ev-dots { display: none; }
.cal-ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.cal-toast { position: fixed; right: 1rem; bottom: 1rem; max-width: 420px; z-index: 50; padding: .8rem 1rem; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: .9rem; cursor: pointer; }
.cal-toast.is-ok { background: #ebf8ee; color: #1f6b30; }
.cal-toast.is-warn { background: #fff6e0; color: #6b4d00; border: 1px solid #e9c46a; }
.cal-toast ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.cal-hint { margin: 0; position: relative; } /* Hilfe oben in der Leiste: Text als Fenster darunter */
.cal-hint > p { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; width: min(34rem, 86vw); padding: .7rem .8rem; background: #fff;
    border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgb(var(--primary-rgb) / .18); }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mhead { padding: .4rem; text-align: center; font-weight: 600; font-size: .85rem; background: #fafbfd; border-bottom: 1px solid var(--border); }
.cal-mcell { min-height: 110px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: .25rem; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: cell; }
.cal-mcell.is-other { background: #f8f9fb; } .cal-mcell.is-other .cal-mnum { color: #a6afbb; }
.cal-mnum { font-weight: 700; font-size: .85rem; color: var(--ink); text-decoration: none; align-self: flex-start; padding: 0 .3rem; border-radius: 999px; }
.cal-mcell.is-today .cal-mnum { background: var(--accent); color: #fff; }
.cal-mev { font-size: .72rem; padding: 1px 4px; background: #fff; border-radius: 3px; color: var(--ink); text-decoration: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mabs { font-size: .7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mmore { font-size: .72rem; color: var(--primary); }
.warn-list { margin: .3rem 0 0; padding-left: 1.2rem; }

/* Terminformular */
.time-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 .9rem; }
@media (max-width: 760px) { .time-grid { grid-template-columns: 1fr 1fr; } }
input[type=time] { width: 100%; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; margin-top: .3rem; background: #fff; }
.pair { display: flex; gap: .4rem; } .pair input { flex: 1; min-width: 0; }
.repeat-box { margin: 0 0 1rem; } .repeat-box summary { cursor: pointer; margin-bottom: .6rem; }
.staff-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.staff-option { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--border); border-radius: 999px; padding: .25rem .7rem .25rem .3rem;
    font-weight: 500; margin: 0; cursor: pointer; background: #fff; }
.staff-option:has(input:checked) { border-color: var(--primary); background: #eef3fa; box-shadow: 0 0 0 2px rgb(var(--primary-rgb) / .15); }
.staff-option input { margin: 0 .1rem 0 .3rem; }
.customer-pick label { position: relative; }
.pick-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12); max-height: 320px; overflow-y: auto; font-weight: 400; }
.pick-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: .5rem .7rem; cursor: pointer; font: inherit; }
.pick-item:hover { background: #f2f6fb; }
.pick-item span { display: block; font-size: .85rem; }
.pick-empty { padding: .6rem .7rem; color: var(--muted); }
.pick-actions { display: flex; gap: .4rem; align-items: end; padding-bottom: .9rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.task-chip { display: inline-block; border: 1px solid; border-radius: 999px; padding: .1rem .6rem; font-size: .85rem; font-weight: 600; white-space: nowrap;
    background: #fff; background: color-mix(in srgb, currentColor 14%, #fff); } /* heller Pastellton der Labelfarbe (Textfarbe = Labelfarbe, inline) */
.input-xs { width: 5rem !important; }
.color-input { width: 64px; height: 42px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: block; margin-top: .3rem; }
.auto-switch { margin-bottom: .6rem; }
.table-sep td { background: #f5f7fa; font-weight: 600; font-size: .85rem; color: var(--muted); }

/* Installierte Web-App: Inhalte nicht unter Statusleiste/Notch (iOS „black-translucent“) */
.topbar { padding-top: calc(.7rem + env(safe-area-inset-top)); padding-left: calc(1.2rem + env(safe-area-inset-left)); padding-right: calc(1.2rem + env(safe-area-inset-right)); }
body { padding-bottom: env(safe-area-inset-bottom); }
.install-app ol { padding-left: 1.3rem; }
.staff-home + .install-app, .card.narrow + .install-app { max-width: 440px; margin-left: auto; margin-right: auto; }

/* Uhrzeit-Auswahl (Stunden + 15-Minuten-Schritte, von Hand jede Minute) */
.tp-wrap { position: relative; display: block; }
.tp-wrap input { padding-right: 2.6rem; }
.tp-btn { position: absolute; right: .35rem; top: calc(50% + .15rem); transform: translateY(-50%); background: none; border: 0; padding: .35rem;
    color: var(--primary); cursor: pointer; border-radius: 6px; line-height: 0; }
.tp-btn:hover { background: #eef3fa; }
.tp-pop { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 272px; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16); padding: .6rem; font-weight: 400; }
.tp-label { font-size: .75rem; color: var(--muted); font-weight: 600; margin: .1rem 0 .3rem; text-transform: uppercase; letter-spacing: .03em; }
.tp-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: .6rem; }
.tp-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tp-pop button { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: .35rem 0; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); }
.tp-pop button:hover { border-color: var(--primary); }
.tp-pop button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tp-mins button { padding: .5rem 0; font-weight: 600; }

/* Geräte am Einsatzort: Überschrift mit Button daneben */
.device-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1rem 0 .4rem; }
.site-card .device-head h4 { margin: 0; }

/* Vergangene Termine 40 % transparenter (Kalender und Kundenseite) */
.cal-ev.is-past, .cal-mev.is-past, tr.is-past > td { opacity: .6; }
.cal-ev.is-past:hover { opacity: 1; }

/* Terminformular: Aufgaben (Mehrfachauswahl) */
h2.form-first { margin-top: 0; }
.task-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(322px, 100%), 1fr)); gap: .4rem; margin-bottom: 1rem; }
.task-option { display: flex; flex-direction: column; gap: .1rem; margin: 0; padding: .5rem .7rem .5rem 2.1rem; border: 1px solid var(--border);
    border-left: 4px solid var(--task); border-radius: 8px; cursor: pointer; position: relative; font-weight: 600; background: #fff; }
.task-option > input[type=checkbox] { position: absolute; left: .7rem; top: .7rem; margin: 0; }
.task-option:has(input:checked) { background: color-mix(in srgb, var(--task) 12%, #fff); border-color: var(--task); }
.task-chip + .task-chip { margin-left: .15rem; }
td .task-chip { margin: .1rem 0; }
.cal-ev-allday { position: relative; }

/* Kalender: Ansicht Standard | Mitarbeiter, Mitarbeiter ein-/ausblenden */
.cal-modes { display: inline-flex; }
.cal-modes .btn { border-radius: 0; margin-left: -1px; }
.cal-modes .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.cal-modes .btn:last-child { border-radius: 0 8px 8px 0; }
.cal-modes .btn.on, .cal-modes .btn.on:hover { background: var(--primary); color: #fff; border-color: var(--primary); position: relative; }
.cal-staff { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; margin-bottom: .6rem; }
.cal-staff[hidden] { display: none; }
.cal-staff-label { font-size: .82rem; }
.cal-staff-chip { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-size: .8rem; padding: .15rem .6rem .15rem .2rem;
    border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.cal-staff-chip:hover { border-color: var(--primary); }
.cal-staff-chip .staff-dot { width: 22px; height: 22px; flex-basis: 22px; font-size: .6rem; box-shadow: none; }
.cal-staff-chip.is-off { opacity: .45; text-decoration: line-through; background: #f3f5f8; }
.cal-staff-all { font: inherit; font-size: .8rem; background: none; border: 0; color: var(--primary); cursor: pointer; text-decoration: underline; }
.cal-empty { padding: 1.5rem; text-align: center; }
.cal-dayhead { position: static; }
.cal-dayhead .cal-colhead { border-bottom: 1px solid var(--border); }
.cal-grid .is-daystart { border-left: 2px solid #b9c4d2; }
.cal-grid.is-compact .cal-colhead { padding: .3rem .2rem; }
.cal-grid.is-compact .cal-colhead .staff-dot { width: 24px; height: 24px; flex-basis: 24px; font-size: .62rem; }
.cal-grid.is-compact .cal-ev { font-size: .68rem; padding: 2px 3px; }
.cal-grid.is-compact .cal-ev-dots { display: none; }
.cal-timeline { display: grid; grid-template-columns: 170px repeat(var(--days), minmax(40px, 1fr)); min-width: calc(170px + var(--days) * 40px); }
.cal-tl-corner, .cal-tl-head { background: #fafbfd; border-bottom: 1px solid var(--border); }
.cal-tl-head { text-align: center; padding: .3rem 0; border-right: 1px solid var(--border); font-size: .75rem; }
.cal-tl-head a { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; align-items: center; }
.cal-tl-wd { color: var(--muted); font-size: .68rem; }
.cal-tl-num { font-weight: 700; padding: 0 .3rem; border-radius: 999px; }
.cal-tl-head.is-today .cal-tl-num { background: var(--accent); color: #fff; }
.cal-tl-head.is-weekend, .cal-tl-head.is-holiday { background: #f1f3f6; }
.cal-tl-head.is-ferien { box-shadow: inset 0 -3px 0 #5b9bd5; }
.cal-tl-head.is-holiday .cal-tl-wd { color: #a3370f; font-weight: 700; }
.cal-tl-name { display: flex; align-items: center; gap: .4rem; padding: .3rem .5rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); min-width: 0; }
.cal-tl-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2px; min-height: 44px;
    display: flex; flex-direction: column; gap: 2px; cursor: cell; min-width: 0; }
.cal-tl-cell.is-off { background: #f6f7f9; }
.cal-tl-cell.is-today { background: #fffaf5; }
.cal-tl-ev { display: block; font-size: .66rem; font-weight: 600; border-radius: 3px; padding: 0 2px; color: var(--ink);
    text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-tl-ev.is-past { opacity: .6; }
.cal-tl-abs { font-size: .66rem; font-weight: 700; text-align: center; border-radius: 3px; cursor: default; }
.cal-switch { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.duration-input { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.duration-input input[type=number] { width: 3.6rem; margin: 0; padding: .4rem .45rem; }
.task-list td { vertical-align: middle; }
.task-list .inline-edit { flex-wrap: nowrap; }
.task-list .task-name { font-weight: 600; }
.duration-input .muted { line-height: 1; }
.flash.is-fading { opacity: 0; transition: opacity .4s; }
.field-help { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); margin-top: .25rem; }
/* Karte im Formular Einsatzort */
.site-map { height: 340px; border: 1px solid var(--border); border-radius: var(--radius); margin: .5rem 0 1.2rem; z-index: 0; }
.site-map-tools { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.badge-warn { background: #fff6e0; color: #7a5800; }
a.badge { text-decoration: none; }

/* Tourenplanung: Karte + Seitenleiste */
.tour-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .tour-layout { grid-template-columns: 1fr; } }
.tour-map-tools { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tour-map { height: calc(100vh - 230px); min-height: 460px; border: 1px solid var(--border); border-radius: var(--radius); z-index: 0; }
.tour-map.is-lasso, .tour-map.is-lasso .leaflet-interactive { cursor: crosshair; }
.tm-legend { margin-left: auto; font-size: .8rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.tm-marker { background: none; border: 0; }
.tm-dot { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; box-sizing: border-box;
    width: 14px; height: 14px; font-size: .68rem; font-weight: 700; color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); flex: 0 0 auto; }
.tm-marker .tm-dot { width: 100%; height: 100%; border-width: 4px; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25); } /* Kontur auf der Karte doppelt so dick */
.tm-open { background: var(--primary); }
.tm-in { background: var(--accent); width: 24px; height: 24px; }
.tm-legend .tm-in { width: 14px; height: 14px; }
.tm-marker.is-hover .tm-dot { box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .35); }
.tm-popup { display: flex; flex-direction: column; gap: .25rem; min-width: 190px; font-size: .85rem; }
.tm-popup .btn { margin-top: .4rem; }
.tm-pop-title { font-weight: 700; }
/* Stopp-Box endet unten bündig mit der Karte (Höhe der Zeile gibt die Karte vor; längere Listen scrollen) */
.tour-layout { align-items: stretch; }
.tour-side { height: 0; min-height: 100%; overflow: auto; margin-bottom: 0; box-sizing: border-box; }
@media (max-width: 1000px) { .tour-side { height: auto; min-height: 0; max-height: none; } }
.tour-side h2 { margin-top: 0; }
.tour-stats { display: grid; gap: .3rem; font-size: .88rem; margin-bottom: .5rem; }
.tour-stats > div { display: flex; justify-content: space-between; gap: .5rem; }
.tour-stats > div > strong { white-space: nowrap; text-align: right; } /* Werte nicht mitten im Wert umbrechen („9 Std. 55 Min.“) */
.tour-stats .is-over { color: #9b1c22; }
.tour-stats .is-in-time { color: #2f9e44; } /* Gesamtzeit passt in Start um – Zurück bis */
.tour-stats .is-over-time { color: #c92a2a; }
.tour-stats .tour-stat-unfit { color: #9b1c22; } /* rote Stopps: außerhalb der Summe */
.tour-stats .tour-stat-total { border-top: 1px solid var(--border); padding-top: .3rem; } /* Arbeitszeit + Fahrzeit = Gesamtzeit */
.tour-list { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.tour-stop { display: flex; align-items: flex-start; gap: .5rem; padding: .45rem .5rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.tour-stop.is-unfit { border-color: #f5c2c5; background: #fdeced; }
/* Kunde hat abgesagt (Stopp übersprungen): rötlich in Liste und Tabelle */
.tour-stop.is-cancelled { border-color: #e7a3a7; background: #fbe3e4; }
.tour-stop.is-cancelled .tour-stop-name { color: #9b1c22; }
.badge-cancelled { background: #c62828; color: #fff; font-weight: 700; margin-right: .35rem; }
.row-cancelled td { background: #fbe3e4; }
.table-cards tr.row-cancelled { background: #fbe3e4; border-color: #e7a3a7; }
.tour-stop-body { flex: 1; min-width: 0; cursor: pointer; }
.tour-stop-name { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-stop-remove { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 .2rem; }
.tour-stop-remove:hover { color: #9b1c22; }
.tour-phone { color: #7a5800; }
.tour-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.tour-actions form { margin: 0; }
.tour-map .marker-cluster-small, .tour-map .marker-cluster-medium, .tour-map .marker-cluster-large { background: rgb(var(--primary-rgb) / .25); }
.tour-map .marker-cluster-small div, .tour-map .marker-cluster-medium div, .tour-map .marker-cluster-large div { background: var(--primary); color: #fff; font-weight: 700; }
#tm-warn { margin-top: .9rem; font-size: .82rem; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .25rem; }
#tm-warn[hidden] { display: none; }
.tm-unfit { background: #c62828 !important; }
.tm-fit { background: #2e7d32 !important; } /* nach „Route optimieren“: empfohlene Stopps grün */
.tm-legend .tm-fit, .tm-legend .tm-unfit { width: 14px; height: 14px; }
#tm-legend-fit { display: inline-flex; align-items: center; gap: .35rem; }
#tm-legend-fit[hidden] { display: none; }
.tour-day { display: flex; gap: .6rem; margin-top: .6rem; }
.tour-day label { flex: 1; font-size: .85rem; }
#tm-remove-unfit { margin: .3rem 0; display: block; width: 100%; }
#tm-optimize, #tm-reverse { flex: 1 1 100%; } /* beide Knöpfe so breit wie die Kästen darüber und darunter */
.tour-below { margin-top: 1rem; align-items: start; }
.tour-steps { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.tour-steps li.on { color: var(--ink); font-weight: 600; }
.stop-result { display: flex; flex-direction: column; gap: .3rem; margin: 0 0 .3rem; }
.stop-result input[type=text], .stop-result select { margin: 0; padding: .35rem .5rem; font-size: .85rem; }
.stop-devices { display: flex; flex-direction: column; gap: .15rem; }
.cal-ev.is-locked { cursor: pointer; }
tr.row-unplanned > td { background: #fffaf2; }
.text-warn { color: #a3370f; }
/* Kalender: Leiste „Ungeplante Touren“ */
.cal-tours { background: #fff; border: 1px dashed #b9c4d2; border-radius: var(--radius); padding: .5rem .7rem; margin-bottom: .7rem; }
.cal-tours[hidden] { display: none; }
.cal-tours-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.cal-tours-plan { width: auto; margin: 0; padding: .25rem .5rem; font-size: .85rem; }
.cal-tours-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-tour-chip { display: inline-flex; flex-direction: column; gap: .05rem; padding: .3rem .6rem; border: 1px solid var(--accent); border-left-width: 4px;
    border-radius: 6px; background: #fff6f2; font-size: .8rem; cursor: grab; user-select: none; touch-action: none; }
.cal-tour-chip.is-ghost { position: fixed; z-index: 100; pointer-events: none; box-shadow: 0 6px 18px rgb(var(--primary-rgb) / .3); opacity: .9; }
.cal-tours-hint { margin: .4rem 0 0; }
.is-drop { outline: 2px solid var(--accent); outline-offset: -2px; background-color: #fff1ea !important; }
.cal-ev.is-tour { border-style: solid; box-shadow: inset 0 0 0 1px rgb(var(--primary-rgb) / .35); }

/* „Mein Tag“ (App-Startseite, fürs Handy optimiert) */
.myday { max-width: 640px; margin: 0 auto; }
.myday-bar { display: flex; align-items: center; gap: .5rem; position: sticky; top: 0; z-index: 5; background: var(--bg, #eef2f7); padding: .4rem 0; }
.myday-date { flex: 1; font: inherit; font-size: 1.15rem; font-weight: 700; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: .5rem; color: var(--ink); }
.myday-bar .btn { font-size: 1.3rem; padding: .35rem .9rem; }
.myday-status { margin: .2rem 0 .6rem; text-align: center; }
.myday-load-day { display: block; margin-top: .35rem; font-weight: 600; }
.myday-list { display: flex; flex-direction: column; gap: .7rem; }
.myday-entry { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .7rem .8rem; }
.myday-entry.is-next { box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .4); }
/* Mein Tag: vergangene Aufträge nicht ausgrauen (gut lesbar bleiben); is-past nur noch für die Logik „als Nächstes“ */
.myday-head { display: flex; align-items: center; gap: .35rem .5rem; flex-wrap: wrap; }
.myday-time { font-weight: 700; color: var(--primary); white-space: nowrap; }
.myday-title { font-size: 1.05rem; margin: .2rem 0 .3rem; }
.myday-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .3rem; }
.myday-desc { font-size: .88rem; margin: .3rem 0; }
.myday-site { margin-top: .3rem; }
.myday-address { font-size: .95rem; margin-bottom: .4rem; }
.myday-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.myday-actions .btn { padding: .55rem .8rem; font-size: .95rem; }
.myday-step { margin-top: .6rem; padding: .6rem; border-radius: 10px; }
.myday-visit { background: #f0f5fb; border: 1px solid #d4e1f0; }
.myday-step[hidden] { display: none; }
.myday-step-label { font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.myday-result { background: #f0f5fb; border: 1px solid #d4e1f0; }
.myday-details .myday-result { margin-top: 1rem; }
.myday-result-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.myday-result-btn { padding: .65rem .3rem; font-size: .95rem; font-weight: 600; background: var(--primary); border-color: var(--primary); color: #fff; white-space: nowrap; }
.myday-result-btn:hover { background: #0a3f7a; border-color: #0a3f7a; color: #fff; }
.myday-result-done[aria-pressed="true"] { background: #1f6b30; border-color: #1f6b30; color: #fff; }
.myday-result-open[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.myday-sign { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0; }
.myday-sign-btn { padding: .65rem .4rem; font-size: .95rem; font-weight: 600; background: var(--accent); border-color: var(--accent); color: #fff; }
.myday-sign-btn:hover { background: #cf4415; border-color: #cf4415; color: #fff; }
.myday-sign-na[aria-pressed="true"] { background: #1f6b30; border-color: #1f6b30; color: #fff; }
.myday-sheet { position: fixed; inset: 0; z-index: 200; background: var(--bg, #eef2f7); overflow-y: auto; padding: .6rem 1rem 2rem; }
.myday-sheet-bar { display: flex; align-items: center; gap: .7rem; margin-bottom: .6rem; }
body.has-sheet { overflow: hidden; }
.myday-head .myday-dots { margin: 0 0 0 auto; }
.myday-site .myday-chips { margin-top: .8rem; }
.myday-site .myday-actions + .myday-step { margin-top: .8rem; }
.myday-sign-btn[aria-pressed="true"]:not(.myday-sign-na) { background: #1f6b30; border-color: #1f6b30; color: #fff; }
/* Arbeitsnachweis: schwarz auf weiß (App-Vollbild und Backend) */
.myday-sheet.protocol { background: #fff; color: #000; color-scheme: only light; forced-color-adjust: none; }
.protocol { color: #000; }
.protocol-head { border-bottom: 2px solid #000; padding-bottom: .4rem; margin-bottom: .6rem; }
.protocol-title { font-size: 1.35rem; margin: .4rem 0 .6rem; color: #000; }
.protocol-list { display: grid; grid-template-columns: minmax(6.5rem, max-content) 1fr; gap: .35rem .8rem; margin: 0 0 1rem; font-size: 1rem; }
.protocol-list dt { font-weight: 700; }
.protocol-list dd { margin: 0; }
.protocol-result { font-weight: 700; }
.protocol-pad canvas { display: block; width: 100%; height: 200px; border: 2px solid #000; border-radius: 8px; background: #fff; touch-action: none; }
.protocol-sign-line { font-size: .85rem; margin-top: .25rem; }
.protocol-name { margin: .8rem 0; color: #000; }
.protocol-name input[type=text] { width: 100%; font-size: 1.05rem; background: #fff; border: 2px solid #000; color: #000; }
.protocol-buttons { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; }
.protocol-buttons .btn { padding: .75rem; font-size: 1.05rem; }
.protocol-nosign { border: 1px solid #000; border-radius: 6px; padding: .5rem .7rem; display: inline-block; }
.protocol-sign img { max-width: 420px; width: 100%; border-bottom: 1px solid #000; }
@media print { .topbar, .subnav, .page-head > div { display: none !important; } .card.protocol { border: 0; box-shadow: none; } }
.myday-hide-btn { display: block; width: 100%; margin-top: .6rem; padding: .6rem; font-weight: 600; background: #fff; }
.myday-hide-btn[hidden] { display: none; }
/* zugeklappter Auftrag (alle außer dem aktuellen bzw. ausgeblendete): nur Uhrzeit/Mitarbeiter und Kunde; Antippen öffnet */
.myday-entry.is-collapsed, .myday-stop.is-collapsed { cursor: pointer; padding-top: .45rem; padding-bottom: .45rem; }
.myday-entry.is-collapsed > :not(.myday-head):not(.myday-title):not(.myday-stripe):not(.myday-tour-head):not(.customer-note-alert) { display: none; }
.myday-stop.is-collapsed > :not(.myday-stop-head):not(.customer-note-alert) { display: none; }
.myday-entry.is-collapsed .myday-title, .myday-stop.is-collapsed .myday-stop-head { margin-bottom: 0; }
.myday-entry.is-collapsed .myday-title::after, .myday-stop.is-collapsed .myday-stop-head::after { content: '▾'; float: right; color: var(--muted, #6b7280); font-weight: 400; }
.myday-stop.is-collapsed .myday-stop-head::after { float: none; margin-left: auto; }
.myday-visit-btn { width: 100%; padding: .65rem .5rem; font-size: 1rem; font-weight: 600; background: var(--primary); border-color: var(--primary); color: #fff; }
.myday-visit-btn:hover { background: #0a3f7a; border-color: #0a3f7a; color: #fff; }
.myday-visit-set { margin: 0; display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; color: #1f6b30; }
.myday-visit-set input[type=time] { font-size: 1.1rem; padding: .4rem .5rem; width: 100%; margin: 0; background: #fff; }
.myday-visit-line { display: flex; gap: .5rem; align-items: stretch; }
.myday-visit-line input { flex: 1; min-width: 0; }
.myday-visit-undo { flex: 0 0 auto; width: 2.8rem; padding: 0; font-size: 1.25rem; font-weight: 700; color: #c0262d; border-color: #e8b4b6; background: #fff; }
.myday-visit-undo:hover { border-color: #c0262d; }
.myday-saved:empty { display: none; }
.myday-staffnote { margin: 1.4rem 0 16px; display: flex; flex-direction: column; gap: .4rem; }
.myday-staffnote label { font-size: .85rem; font-weight: 600; display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.myday-staffnote textarea { width: 100%; font: inherit; font-size: .95rem; }
.myday-staffnote .myday-actions { align-items: center; }
.myday-note-save { background: #fff; color: var(--primary); border-color: var(--border); }
.myday-details { margin-top: .5rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.myday-details summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: .2rem 0; }
.myday-note { font-size: .88rem; background: #fff6e0; border-radius: 6px; padding: .35rem .5rem; margin: .4rem 0; }
.myday-device { border: 1px solid var(--border); border-radius: 8px; padding: .55rem .65rem; margin: .8rem 0; font-size: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.myday-details > .myday-device:first-of-type { margin-top: 1.1rem; }
.myday-pin { align-self: flex-start; font-size: 1rem; font-weight: 700; letter-spacing: .05em; }
.myday-stops { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
/* jeder Stopp einer Tour als eigener Kasten – klare Trennung */
.myday-stop { border: 1px solid #cfd8e3; border-radius: 10px; padding: .65rem .75rem; background: #fbfcfe; box-shadow: 0 1px 2px rgb(var(--primary-rgb) / .06); }
.myday-stop-head { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.myday-nr { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; }
.myday-dots { display: inline-flex; gap: 2px; margin: .2rem 0; }
.myday-dots .staff-dot { width: 22px; height: 22px; flex-basis: 22px; font-size: .6rem; box-shadow: none; }
.myday-more { margin-top: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: .5rem .8rem; }
.myday-more summary { cursor: pointer; font-weight: 600; }
.myday-other { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--border); font-size: .9rem; }
.myday-other > div { flex: 1; min-width: 0; }
.myday-empty { text-align: center; padding: 1.5rem 0; }
/* Kalender auf dem Handy: neuer Termin erst nach 1 Sekunde Festhalten */
.cal-grid, .cal-month, .cal-timeline { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cal-press { position: absolute; left: 2px; right: 2px; border-radius: 6px; pointer-events: none; z-index: 3;
    background: rgb(var(--accent-rgb) / .15); box-shadow: inset 0 0 0 2px var(--accent); transform-origin: top; animation: cal-press 1s linear forwards; }
.cal-press.is-full { top: 2px; bottom: 2px; }
@keyframes cal-press { from { opacity: .3; } to { opacity: 1; background: rgb(var(--accent-rgb) / .35); } }
.cal-alldaycell, .cal-mcell, .cal-tl-cell { position: relative; }
.task-option .muted { white-space: nowrap; font-weight: 400; }
@media (max-width: 640px) {
    .task-pick { grid-template-columns: 1fr; gap: .3rem; }
    .task-option { padding: .4rem .55rem .4rem 1.9rem; font-size: .88rem; font-weight: 500; letter-spacing: -.005em; }
    .task-option > input[type=checkbox] { left: .55rem; top: .55rem; }
}

/* Eingabefelder leicht abgesetzt: Hintergrundfarbe der Website, beim Bearbeiten weiß */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search],
input[type=tel], input[type=date], input[type=time], input:not([type]), select, textarea {
    background-color: var(--bg);
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, input[type=number]:focus, input[type=url]:focus,
input[type=search]:focus, input[type=tel]:focus, input[type=date]:focus, input[type=time]:focus, input:not([type]):focus,
select:focus, textarea:focus {
    background-color: #fff;
}
.editor { background: var(--bg); }
.editor:focus-within { background: #fff; }

/* Checkboxen und Optionsfelder: Hintergrundfarbe der Website, angehakt in Dunkelblau */
input[type=checkbox], input[type=radio] {
    -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 0 .1rem 0 0; vertical-align: -3px;
    border: 1.5px solid #9aa8ba; border-radius: 4px; background: var(--bg) center / 12px 12px no-repeat; cursor: pointer;
    transition: background-color .12s, border-color .12s;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--primary); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .3); outline-offset: 1px; }
input[type=checkbox]:checked { background-color: var(--primary); border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type=radio]:checked { border-color: var(--primary); background-image: radial-gradient(circle, var(--primary) 0 4px, transparent 4.5px); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: not-allowed; }
.order-filter { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; }
.filter-check { align-self: end; margin-bottom: .7rem; }
@media (max-width: 900px) { .order-filter { grid-template-columns: 1fr; } }
#order-form [hidden] { display: none !important; }

/* Kalender: Liste „Noch nicht terminiert“ links (nur Desktop), gleich hoch wie der Kalender */
.cal-with-side { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: .8rem; align-items: stretch; }
.cal-side { position: relative; min-height: 400px; }
.cal-side-inner { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .4rem; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; }
.cal-side-head { display: flex; justify-content: space-between; align-items: baseline; }
.cal-side-q { margin: 0; padding: .4rem .55rem; font-size: .85rem; }
.cal-side-filters { display: grid; grid-template-columns: 1fr; gap: .3rem; }
.cal-side-filters select { margin: 0; padding: .3rem .4rem; font-size: .78rem; }
.cal-side-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .35rem; padding-right: 2px; }
.cal-side-hint { margin: 0; font-size: .72rem; }
.cal-side-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .4rem; } /* ? und „Tour planen“ auf einer Höhe */
.cal-side-foot:has(.cal-side-hint[open]) { align-items: flex-start; }
.cal-side-foot .help-tip.cal-side-hint { margin: 0; }
.cal-side-foot .cal-side-hint[open] { flex: 1; }
.cal-side-tour { margin: 0; }
.cal-item { border: 1px solid var(--border); border-left: 4px solid #8a94a6; border-radius: 6px; padding: .35rem .5rem; font-size: .82rem;
    background: #fff; cursor: grab; user-select: none; touch-action: none; display: flex; flex-direction: column; gap: .1rem; }
.cal-item:hover { box-shadow: 0 2px 8px rgb(var(--primary-rgb) / .15); }
.cal-item.is-locked { cursor: pointer; background: #e6f4e8; border-color: #b9dcbf; touch-action: auto; }
.cal-item.is-locked .cal-item-status { color: #1f6b30; font-weight: 600; }
.cal-item.is-ghost { position: fixed; z-index: 100; pointer-events: none; box-shadow: 0 6px 18px rgb(var(--primary-rgb) / .3); opacity: .92; }
.cal-item-head { display: flex; justify-content: space-between; gap: .4rem; }
.cal-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item-time { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cal-item-tour { border-left-color: var(--accent); background: #fff6f2; }
.cal-item.is-callback { background: #fffaf0; }
.cal-item-status { color: #7a5800; }
.cal-item-status.is-due { color: #9b1c22; font-weight: 600; }
@media (max-width: 1099px) { .cal-with-side { display: block; } .cal-side { display: none; } }
.cal-side.is-drop-back .cal-side-inner { outline: 2px dashed var(--accent); outline-offset: -2px; background: #fff6f2; }
.cal-side.is-drop-back .cal-side-list::before { content: 'Hier loslassen = zurück in „Noch nicht terminiert“'; display: block; padding: .5rem;
    font-size: .8rem; font-weight: 600; color: #a3370f; text-align: center; }
#appt-form [hidden] { display: none !important; }
.subnav-second { background: #f7f9fc; }
.subnav-second a { font-size: .86rem; padding: .5rem .75rem; }
.myday-top { display: block; color: inherit; text-decoration: none; }
a.myday-top:active { opacity: .7; }
.myday-open { margin-left: auto; font-size: 1.6rem; line-height: 1; color: var(--primary); }
.myday-stop-name { font-weight: 700; color: var(--ink); text-decoration: none; }
a.myday-stop-name { color: var(--primary); }
.plain-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.myday-order { border-bottom: 1px solid var(--border); padding: .3rem 0 .5rem; margin-bottom: .3rem; }
/* Statistik */
.stat-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stat-tabs a { padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: .88rem; }
.stat-tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.stat-tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-tile span { font-size: .82rem; color: var(--muted); }
.stat-tile strong { font-size: 1.7rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat-tile em { font-style: normal; font-size: .78rem; color: var(--muted); }
.stat-bar { display: grid; grid-template-columns: 9rem minmax(0, 1fr) 3rem; align-items: center; gap: .5rem; font-size: .85rem; margin: .25rem 0; }
.stat-track { display: block; min-width: 0; }
.stat-bar i { display: block; height: 10px; background: var(--primary); border-radius: 4px; min-width: 2px; }
.stat-bar b { text-align: right; font-variant-numeric: tabular-nums; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-up { color: #9b1c22; font-size: .8rem; margin-left: .2rem; }
.stat-down { color: #1f6b30; font-size: .8rem; margin-left: .2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Hinweis vom Service (aus „Mein Tag“) am Auftrag und am Termin */
.staff-note { background: #fff6e0; border: 1px solid #f0d68a; border-left: 4px solid var(--accent); border-radius: 8px; padding: .6rem .8rem; margin: 0 0 1rem; }
.staff-note p { margin: .3rem 0; }

/* Folgetermin nötig: Auftragsliste und Liste neben dem Kalender (ganz oben) */
.badge-followup { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.text-followup { color: #b23c10; font-weight: 600; }
tr.row-followup > td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.cal-item.is-followup { border-left-color: var(--accent) !important; background: #fff1ea; }
.cal-item-followup { color: #fff; background: var(--accent); border-radius: 4px; padding: .1rem .35rem; font-weight: 700; align-self: flex-start; }

/* Aufgaben-Labels: Lücke als Trenner, Freitext, Symbol-Datenbank */
.task-pick .task-gap { grid-column: 1 / -1; height: .35rem; }
.task-note { margin-top: .5rem; }
.task-gap-row td { padding: 0 !important; height: .6rem; border: 0 !important; background: transparent; }
.task-row-free td { background: transparent; } /* seit 27.11.2026: Farbe nach Gruppe (.task-group-tint) */
.task-look { flex-wrap: wrap; }
.task-look { gap: .4rem; }
.task-look input[type=color] { flex: 0 0 2.6rem; width: 2.6rem !important; height: 2.2rem; padding: 2px; }
.icon-select { width: auto !important; min-width: 4.2rem; max-width: 6rem; font-size: 1.1rem; } /* nur das Symbol (seit 27.11.2026) */
.btn-move { padding: .15rem .45rem; line-height: 1.2; }
.btn-move:disabled { opacity: .3; cursor: default; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .4rem; margin: .6rem 0 1rem; }
.icon-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .3rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-align: center; }
.icon-symbol { font-size: 1.6rem; line-height: 1.2; }
.icon-del { position: absolute; top: 1px; right: 4px; }
.icon-del .btn-link { color: #c0262d; font-size: .8rem; }
.inline-edit .icon-input { flex: 0 0 5.5rem; width: 5.5rem !important; font-size: 1.3rem; text-align: center; }
.icon-field { margin-bottom: .9rem; }
.icon-field .field-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; }
.icon-pick { display: flex; flex-wrap: wrap; gap: .3rem; }
.icon-choice { margin: 0; cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.icon-choice span { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; font-size: 1.35rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.icon-choice input:checked + span { border: 2px solid var(--primary, var(--primary)); background: #e8eef7; }
.icon-choice input:focus-visible + span { outline: 2px solid rgb(var(--primary-rgb) / .3); }
.settings-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.settings-tiles .card { display: flex; flex-direction: column; align-items: flex-start; }
.settings-tiles .card .btn { margin-top: auto; }

/* Kundenliste: weitere Filter – am PC immer sichtbar, am Handy zum Aufklappen (Standard zu) */
.filter-more { display: contents; }
.filter-more-toggle { display: none; }
@media (max-width: 760px) {
    .filter-more-toggle { display: flex; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; grid-column: 1 / -1; margin-bottom: .4rem; }
    .customer-filter .filter-actions { grid-column: 1 / -1; }
    .filter-more:not(.is-open) { display: none; }
    .filter-more-toggle[aria-expanded="true"] span[aria-hidden] { transform: rotate(180deg); }
}

/* Handy (Zeile = Karte): Hintergrund und Folgetermin-Strich an der ganzen Karte statt an einzelnen Zellen */
@media (max-width: 760px) {
    .table-cards tr.row-unplanned { background: #fffaf2; }
    .table-cards tr.row-unplanned > td { background: transparent; }
    .table-cards tr.row-followup { border-left: 5px solid var(--accent); }
    .table-cards tr.row-followup > td:first-child { box-shadow: none; }
}
/* lange Labels umbrechen statt über den Rand zu laufen */
.task-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }

/* Kalender: Fensterchen beim Antippen / Rechtsklick (Öffnen, Duplizieren) */
.cal-quick { position: fixed; z-index: 300; width: min(300px, calc(100vw - 16px)); background: #fff; border: 1px solid var(--border);
    border-top: 4px solid var(--primary); border-radius: 10px; box-shadow: 0 8px 28px rgba(0, 30, 70, .25); padding: .6rem .75rem .7rem;
    display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; }
.cal-quick-close { position: absolute; top: .3rem; right: .35rem; border: 0; background: none; font-size: 1rem; color: #6b7280; cursor: pointer; padding: .2rem .35rem; }
.cal-quick-when { font-weight: 700; color: var(--primary, var(--primary)); padding-right: 1.6rem; }
.cal-quick-title { font-size: 1rem; }
.cal-quick .cal-ev-dots { margin: .2rem 0; }
.cal-quick-actions { display: flex; gap: .5rem; margin-top: .45rem; }
.cal-quick-actions .btn { flex: 1; text-align: center; }
.cal-quick { width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow-y: auto; }
.cal-quick-actions { flex-wrap: wrap; }
.cal-quick-actions .btn { white-space: nowrap; padding-left: .45rem; padding-right: .45rem; }
.cal-quick-actions .cal-quick-delete { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding-left: .6rem; padding-right: .6rem; }
.cal-quick-actions .cal-quick-delete:hover { background: #fdecec; }
.cal-quick-actions .btn[aria-expanded="true"] { background: #e8eef6; border-color: var(--primary); }
/* Kalenderblatt „Verschieben“ (anderer Tag, gleiche Uhrzeit) */
.cal-pick { margin-top: .5rem; border-top: 1px solid var(--border); padding-top: .45rem; }
.cal-pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .25rem; }
.cal-pick-title { font-size: .95rem; }
.cal-pick-nav { border: 0; background: none; font-size: 1.35rem; line-height: 1; color: #6b7280; cursor: pointer; padding: .1rem .55rem; border-radius: 6px; }
.cal-pick-nav:hover { background: #eef2f7; color: var(--primary); }
.cal-pick-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-pick-wd { font-size: .75rem; font-weight: 600; color: #4b5563; padding: .15rem 0; }
.cal-pick-day { border: 0; background: none; font: inherit; padding: .32rem 0; border-radius: 6px; cursor: pointer; color: #1d2733; }
.cal-pick-day:hover { background: #e8eef6; }
.cal-pick-day.is-other { color: #9aa5b4; }
.cal-pick-day.is-holiday { color: #c2410c; }
.cal-pick-day.is-today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--primary); }
.cal-pick-day.is-current { background: var(--primary); color: #fff; }
.cal-pick-today { display: block; width: 100%; margin-top: .3rem; border: 0; border-top: 1px solid var(--border); background: none; font: inherit; font-weight: 700; padding: .45rem 0 .1rem; cursor: pointer; color: #1d2733; }
.cal-pick-today:hover { color: var(--primary); }
.order-dates a.is-past { color: #6b7280; }
.order-add-date { display: inline-block; margin-top: .15rem; font-weight: 600; }

/* Touch: Termine im Kalender nicht verschieben – Wischen scrollt, Antippen öffnet das Fensterchen */
@media (pointer: coarse) {
    .cal-ev { touch-action: manipulation; cursor: pointer; }
    .cal-ev-resize { display: none; }
}
.myday-refresh { font-size: 1.35rem; }
.myday-refresh.is-spinning { animation: myday-spin .8s linear infinite; }
@keyframes myday-spin { to { transform: rotate(360deg); } }

/* Büro: „Mein Tag“ der Mitarbeiter (Kalender → Mein Tag) – links Mitarbeiter, rechts ihr Tag */
.myday-staff { display: grid; grid-template-columns: 220px minmax(0, 640px); gap: 1.2rem; align-items: start; }
.myday-staff-list { display: flex; flex-direction: column; gap: .15rem; padding: .5rem; position: sticky; top: .8rem; }
.myday-staff-list a { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; border-radius: 8px; color: var(--text, inherit); text-decoration: none; }
.myday-staff-list a:hover { background: #f1f4f8; }
.myday-staff-list a.active { background: var(--primary); color: #fff; font-weight: 600; }
.myday-staff .myday { margin: 0; }
@media (max-width: 760px) {
    .myday-staff { grid-template-columns: 1fr; }
    .myday-staff-list { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* Tour-Seite „Stopps und Abschluss“: je Stopp klar getrennt (kräftige Linie, abwechselnder Hintergrund, Nummer im Kreis) */
.tour-stop-table tbody tr > td { border-bottom: 2px solid #cfd8e3; padding-top: .8rem; padding-bottom: .8rem; }
.tour-stop-table tbody tr:nth-child(odd):not(.row-cancelled):not(.row-stop-followup):not(.row-stop-done):not(.row-nodevice) > td { background: #f6f8fb; }
.tour-stop-table td.stop-nr span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
    background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; }
.tour-stop-table tr.row-cancelled td.stop-nr span { background: #c62828; }
@media (max-width: 760px) {
    .table-cards.tour-stop-table tr { border: 1px solid #cfd8e3; border-left: 4px solid var(--accent); margin-bottom: 1rem; }
    .table-cards.tour-stop-table tbody tr > td { border-bottom: 0; background: transparent; padding-top: .3rem; padding-bottom: .3rem; }
    /* Handy: Farbe auf der ganzen Karte (Zeile), nicht nur hinter den Zellen */
    .table-cards.tour-stop-table tbody tr:nth-child(odd):not(.row-cancelled):not(.row-stop-followup):not(.row-stop-done):not(.row-nodevice) { background: #f6f8fb; }
    .table-cards.tour-stop-table tbody tr:nth-child(odd):not(.row-cancelled):not(.row-stop-followup):not(.row-stop-done):not(.row-nodevice) > td,
    .table-cards.tour-stop-table tbody tr.row-nodevice > td { background: transparent; box-shadow: none; }
    .table-cards.tour-stop-table tbody tr.row-nodevice { background: #fdeced; border-left-color: #e53935; }
}

/* Administrator: „Ansicht von …“ über Mein Tag */
.myday-as { margin-bottom: .6rem; }
.myday-as label { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: 0; }
.myday-as select { flex: 1; font-size: 1rem; padding: .45rem .5rem; }
.myday-as-note { margin: .4rem 0 0; padding: .4rem .6rem; border-radius: 8px; background: #fff6e0; color: #7a5800; }

/* Fotos in „Mein Tag“ und Galerie im Büro */
.myday-photos { margin: 1.4rem 0 1.4rem; padding: .7rem .7rem; border: 1px dashed #b9c6d6; border-radius: 10px; background: #eef1f5; display: flex; flex-direction: column; gap: .45rem; }
.myday-photos-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.myday-photo-desc { width: 100%; font: inherit; font-size: .9rem; }
.myday-photos input.myday-photo-desc { background: #fff; }
.myday-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.myday-photo-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 600; cursor: pointer; margin: 0; color: var(--primary); background: #fff; }
.myday-icon { display: inline-flex; color: var(--primary); }
.myday-photos-title { display: inline-flex; align-items: center; gap: .4rem; color: var(--primary); }
.myday-photo-input, .photo-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.myday-photo-grid, .photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .4rem; }
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.myday-photo, .photo-card { position: relative; margin: 0; }
.myday-photo img, .photo-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #eef1f5; }
.myday-photo figcaption { font-size: .7rem; color: var(--muted); line-height: 1.25; margin-top: .15rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.myday-photo.is-pending img { opacity: .55; }
.myday-photo.is-pending figcaption { color: #7a5800; font-weight: 600; }
.myday-photo-grid .is-more { display: none; }
.myday-photo-grid.show-all .is-more { display: block; }
.myday-photo-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(155, 28, 34, .9); color: #fff; font-weight: 700; cursor: pointer; line-height: 1; }
.photo-card figcaption { font-size: .82rem; margin-top: .3rem; display: flex; flex-direction: column; gap: .25rem; }
.photo-card form { display: flex; gap: .3rem; }
.photo-card form input { flex: 1; min-width: 0; font-size: .82rem; padding: 0 .45rem; }
/* Beschreibung und ✓ gleich hoch */
.photo-card form input, .photo-card form .btn { height: 32px; box-sizing: border-box; margin: 0; }
.photo-card form .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 .6rem; }
.photo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.photo-upload .btn { position: relative; overflow: hidden; margin: 0; }
.photo-upload input[name=description] { flex: 1; min-width: 220px; }
.photo-gallery { margin-top: 1.5rem; } /* Abstand z. B. unter „Termin löschen“ */
/* Tour-Stopp „noch offen“ / „nicht angetroffen“: orange (Folgetermin nötig) */
.row-stop-followup td { background: #fff3ea; }
.table-cards tr.row-stop-followup { background: #fff3ea; border-color: #f3c3a6; }
.tour-stop-table tr.row-stop-followup td.stop-nr span { background: var(--accent); }
.photo-filter select { min-width: min(100%, 420px); }
.photo-group h2 a { text-decoration: none; }
/* Tour-Stopp erledigt: grün (Liste neben der Karte und Stopp-Tabelle) */
.tour-stop.is-done { border-color: #a8d5b0; background: #e6f4e8; }
.tour-stop.is-done .tm-dot { background: #2e7d32; }
.row-stop-done td { background: #e6f4e8; }
.table-cards tr.row-stop-done { background: #e6f4e8; border-color: #a8d5b0; }
.tour-stop-table tr.row-stop-done td.stop-nr span { background: #2e7d32; }

/* Lightbox (Bilder groß, blättern) */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 18, 32, .94); display: flex; align-items: center; justify-content: center; padding: 3rem 3.5rem; }
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: 6px; background: #111; }
.lb-figure figcaption { color: #e8edf3; font-size: .9rem; text-align: center; display: flex; flex-wrap: wrap; gap: .3rem 1rem; justify-content: center; }
.lb-count { color: #9fb0c3; }
.lb-original { color: #ffb08f; }
.lb-rotate { border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 6px; padding: .15rem .7rem; font: inherit; cursor: pointer; }
.lb-rotate:hover { background: rgba(255, 255, 255, .25); }
.lb-rotate[hidden] { display: none; }
.lb-close, .lb-prev, .lb-next { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; border-radius: 50%;
    width: 44px; height: 44px; font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: .8rem; right: .8rem; font-size: 1.2rem; }
.lb-prev { left: .6rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lb-next { right: .6rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lb-prev[hidden], .lb-next[hidden] { display: none; }
@media (max-width: 600px) { .lightbox { padding: 3.5rem .4rem 1rem; } .lb-prev, .lb-next { top: auto; bottom: .8rem; transform: none; } }
/* Bilder-Übersicht: ältere Bilder halb so groß */
.photo-grid-small { grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: .5rem; }
.photo-grid-small figcaption, .photo-grid-small figcaption span { font-size: .7rem; line-height: 1.3; }
.photo-older-title { font-size: .95rem; margin: 1.2rem 0 .5rem; color: var(--muted); }
.photo-filter { display: grid; grid-template-columns: 2fr 1fr auto; gap: .8rem; align-items: end; }
@media (max-width: 760px) { .photo-filter { grid-template-columns: 1fr; } }
.myday-hide-btn.is-ready { background: var(--primary); border-color: var(--primary); color: #fff; }
.myday-hide-btn.is-ready:hover { background: #0a3f7a; border-color: #0a3f7a; }
.tour-insert { display: grid; gap: .5rem; }
.tour-insert h3 { margin: 0; font-size: 1rem; }
.tour-insert select { width: 100%; }
.tour-insert .btn { justify-self: start; }
.tour-insert-search { position: relative; }
.tour-insert-search input[type=search] { width: 100%; }
.tour-insert-chosen { font-size: .85rem; background: #eef6ee; border-left: 3px solid #2e9e5b; border-radius: 4px; padding: .3rem .5rem; }

/* Kalender → Status: Tagesstand je Mitarbeiter */
.status-head { align-items: center; }
.status-legend { display: flex; flex-wrap: wrap; gap: .35rem .5rem; align-items: center; margin: 0 0 .7rem; }
.status-chip { padding: .1rem .5rem; border-radius: 999px; font-weight: 600; font-size: .78rem; border: 1px solid transparent; }
.status-board { display: grid; grid-template-columns: 3.2rem repeat(var(--cols), minmax(170px, 1fr)); gap: 0 .5rem; overflow-x: auto; padding-bottom: .5rem; }
.status-times { position: relative; margin-top: 5.2rem; }
.status-times span { position: absolute; right: .3rem; transform: translateY(-50%); font-size: .72rem; color: var(--muted); }
.status-col { min-width: 0; }
.status-col-head { height: 5.2rem; padding: .4rem .5rem; background: #fff; border: 1px solid var(--border); border-radius: 10px 10px 0 0; overflow: hidden; }
.status-col-head strong { font-size: .92rem; }
.status-now { color: #7a5800; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-lane { position: relative; background: #fff; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; }
.status-hour { position: absolute; left: 0; right: 0; border-top: 1px solid #eef1f5; }
.status-nowline { position: absolute; left: 0; right: 0; border-top: 2px solid var(--accent); z-index: 3; }
.status-block { position: absolute; box-sizing: border-box; padding: .15rem .35rem; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12);
    font-size: .74rem; line-height: 1.2; color: var(--ink, #1f2937); text-decoration: none; overflow: hidden; display: flex; flex-direction: column; gap: 1px; z-index: 2; }
.status-block:hover { z-index: 4; box-shadow: 0 2px 8px rgb(var(--primary-rgb) / .2); }
.status-block strong { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-time { font-weight: 700; }
.status-badge { font-weight: 600; font-size: .68rem; }
.status-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-block > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-block > * { flex-shrink: 0; } /* kurze Blöcke: Zeilen abschneiden statt zusammenschieben */

/* Kalender: Hintergrund = Stand (wie „Status“), Linie links = Mitarbeiter (inline) */

/* Tour = Rahmen mit den Stopps als innere Ebene – gleich in Kalender und Status; Linie links = Mitarbeiter (inline) */
.tour-frame { position: absolute; box-sizing: border-box; border: 1px solid rgb(var(--primary-rgb) / .35); border-radius: 6px; overflow: hidden; }
.tour-frame-head { position: relative; z-index: 2; display: block; box-sizing: border-box; height: 16px; line-height: 14px; padding: 1px 4px; font-size: .68rem; font-weight: 700; color: var(--primary);
    background: rgba(255, 255, 255, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.tour-frame .status-block, .tour-frame .cal-stop { z-index: 1; }
.tour-frame .status-block:hover, .tour-frame .cal-stop:hover { z-index: 3; }
.cal-stop { position: absolute; cursor: pointer; box-sizing: border-box; border: 1px solid rgba(0, 0, 0, .12); border-radius: 4px; padding: 0 3px; font-size: .62rem; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); text-decoration: none; }
.cal-ev.tour-frame { padding: 0; }
.tour-frame-head .staff-dot { width: 14px; height: 14px; font-size: .45rem; margin-right: 2px; vertical-align: middle; }
.tour-frame-head .badge-tour { height: 14px; padding: 0 4px; margin-right: 2px; vertical-align: top; border-radius: 7px; }
.tour-frame-head .badge-tour .icon-tour { width: 12px; height: 12px; }

/* Mein Tag: Farbschema wie Kalender/Status – Hintergrund = Stand, Linie links = Mitarbeiter (inline, mehrere: Streifen) */
.myday-entry { position: relative; }
.badge-next { background: var(--primary); color: #fff; }
/* Tour = Rahmen (schraffiert) mit Kopfzeile in der Stand-Farbe, die Stopps darin mit eigenem Stand */
.myday-tour-head { height: auto; margin: -.7rem -.8rem .55rem; padding: .3rem .8rem; border-radius: 11px 11px 0 0; font-size: .82rem; line-height: 1.3;
    border-bottom: 1px solid rgb(var(--primary-rgb) / .15); white-space: normal; }

/*
 * Farbschema (Kalender, Status, Mein Tag): Hintergrund = Mitarbeiter (Pastell, inline; mehrere: senkrecht geteilt;
 * ohne: weiß gestrichelt), kräftige Linie links = Stand mit weißem Spalt, dazu ein Symbol (▶ ✓ ↻ ✕).
 */
.st-planned { --st: #9e9e9e; }
.st-running { --st: #ffd600; }
.st-done { --st: #00c853; }
.st-followup { --st: #ff6d00; }
.st-notmet { --st: #2979ff; }
.st-cancelled { --st: #ff1744; }
.cal-ev, .status-block, .tour-frame, .myday-entry, .myday-stop { border-left: 8px solid var(--st, #9e9e9e); box-shadow: inset 2px 0 0 #fff; }
.cal-mev, .cal-tl-ev, .cal-stop, .status-chip { border-left: 5px solid var(--st, #9e9e9e); box-shadow: inset 2px 0 0 #fff; }
.status-chip { background: #fff; border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-radius: 6px; }
.status-block.st-running, .cal-ev.st-running:not(.tour-frame) { box-shadow: inset 2px 0 0 #fff, 0 0 0 2px var(--st); }
.no-staff { outline: 1px dashed #8a96a3; outline-offset: -1px; }
.st-cancelled > strong, .st-cancelled .cal-ev-title, .cal-stop.st-cancelled { text-decoration: line-through; }
/* Tour: Rahmen überall dezent grau schraffiert; die Stopps darin in der Mitarbeiterfarbe mit eigener Linie */
.tour-frame, .myday-entry.myday-tour { background: #fff; } /* Tour-Rahmen: weiß (statt Streifen) */
.tour-frame-head { background: rgba(255, 255, 255, .85); }
.myday-tour-head { background: rgba(255, 255, 255, .85); }

.row-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.row-form input[type=email], .row-form input[type=tel] { flex: 1 1 18rem; max-width: 26rem; width: auto; margin-top: 0; }
.sms-text { min-height: 6.5em; resize: vertical; } /* SMS-Texte: auf dem Handy ganz lesbar */
.notify-choice { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .8rem .6rem; margin: .4rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; align-items: center; }
.notify-choice legend { font-weight: 600; padding: 0 .3rem; }
.notify-choice .field-help { flex-basis: 100%; }
.rule-sms { flex: 1 1 22rem; min-width: 14rem; margin-top: 0; }

/* Einstellungen → SMS: Matrix Spalten Touren / Termine, Zeilen Varianten (Handy: untereinander) */
.sms-matrix { display: grid; grid-template-columns: 10rem 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.sms-matrix > * { padding: .55rem .75rem; border-top: 1px solid var(--border); min-width: 0; }
.sms-matrix > .sms-mx-head { border-top: 0; background: #f6f8fb; }
.sms-mx-row { font-weight: 600; background: #f6f8fb; }
.sms-mx-cell { display: flex; flex-direction: column; gap: .3rem; margin: 0; }
.sms-mx-cell + .sms-mx-cell, .sms-mx-head + .sms-mx-head { border-left: 1px solid var(--border); }
.sms-mx-span { grid-column: span 2; }
.sms-mx-col { display: none; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sms-mx-when { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.sms-mx-when input { display: inline-block; width: auto; margin-top: 0; }
.sms-mx-when .input-xs { width: 4.2rem; }
.sms-mx-when .input-time { width: 7.6rem; }
.sms-matrix-texts textarea { margin-top: 0; }
@media (max-width: 760px) {
    .sms-matrix { grid-template-columns: 1fr; }
    .sms-matrix > .sms-mx-head:first-child { display: none; }
    .sms-mx-cell + .sms-mx-cell, .sms-mx-head + .sms-mx-head { border-left: 0; }
    .sms-mx-span { grid-column: auto; }
    .sms-mx-col { display: block; }
    .sms-matrix-texts > .sms-mx-head { display: none; }
}

/* Hilfe-Icon: Text erst beim Antippen (details/summary, ohne JS) */
.help-tip { margin: .4rem 0; }
.help-tip > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
    border: 1.5px solid var(--primary); color: var(--primary); font-weight: 700; font-size: .85rem; cursor: pointer; user-select: none; background: #fff; }
.help-tip > summary::-webkit-details-marker { display: none; }
.help-tip[open] > summary { background: var(--primary); color: #fff; }
.help-tip > p { margin: .4rem 0 0; }
.sms-mx-cell select { margin-top: 0; }
.time-actions { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin: 0 .4rem 0 0; }
.time-month tr.is-off td { background: #f8f9fb; color: var(--muted); }
.time-month tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.time-month tr.is-flagged td:first-child { box-shadow: inset 4px 0 0 #c62828; }
/* Zeiterfassung: Datum oben und Korrekturzeilen nebeneinander */
.time-date { display: flex; align-items: center; gap: .35rem; margin: 0; }
.time-date input[type=date] { width: auto; margin-top: 0; background: #fff; height: 2.4rem; padding: 0 .6rem; box-sizing: border-box; }
.time-date .btn { height: 2.4rem; min-width: 2.4rem; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; margin: 0; }
.time-edit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .2rem 0; }
.time-edit select, .time-edit input[type=time] { width: auto; margin-top: 0; }
.time-edit input[type=text] { flex: 1 1 14rem; width: auto; margin-top: 0; }

/* Terminierter Auftrag: Datum + Uhrzeit */
.order-when { font-size: .85rem; font-weight: 600; margin-top: .2rem; }
@media (max-width: 760px) { .order-when-via { display: block; } .order-when-sep { display: none; } }
.order-when-box { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; background: #eef6ee; border-left: 3px solid #2e9e5b;
    border-radius: 4px; padding: .4rem .6rem; margin-bottom: .8rem; }
.order-when-box .order-when { margin: 0; font-size: .95rem; }


/* Papierkorb: versteckter Link unter Kundendaten */
.trash-link { text-align: right; margin-top: 2rem; }
.trash-link a { color: var(--muted); }

/* Tour: Dauer je Stopp */
.stop-duration { display: flex; gap: .3rem; align-items: center; margin-top: .3rem; }
.stop-duration input { width: 4.5rem; padding: .15rem .3rem; }

/* Einstellungen → Log: links E-Mail, rechts SMS */
.log-filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.log-filter label { margin-bottom: 0; } /* sonst sitzen „Filtern“/„Zurücksetzen“ tiefer als die Felder */
.log-filter input[type=search] { padding: .55rem .7rem; }
.log-filter input[type=date] { display: block; width: 11rem; } /* „ab“ und „bis“ gleich breit, unabhängig von der Beschriftung */
.log-filter .btn { line-height: 1.25; min-height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; } /* so hoch wie das Suchfeld */
.log-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .log-columns { grid-template-columns: 1fr; } }
.log-column h2 { margin-top: 0; }
.log-entry { border: 1px solid var(--border); border-left: 4px solid #2e9e5b; border-radius: 6px; padding: .45rem .6rem; margin-bottom: .45rem; }
.log-entry.is-failed { border-left-color: #c62828; background: #fdf3f3; }
.log-entry.is-skipped { border-left-color: #e0a100; }
.log-head { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.log-time { font-size: .85rem; font-weight: 600; }
.log-to { margin: .2rem 0; overflow-wrap: anywhere; }
.log-message { color: var(--muted); overflow-wrap: anywhere; }
.log-message.text-error { color: #9b1c22; }
.log-text { white-space: pre-wrap; background: #f6f7f9; border-radius: 4px; padding: .3rem .45rem; margin-top: .2rem; }
.log-area { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .05rem .5rem; background: #eef0f3; color: #4a5361; }
.log-area-tour { background: #e3eefb; color: #1d4f8f; }
.log-area-termin { background: #f1e8fb; color: #5e2f94; }
.customer-filter-search { position: relative; }
.log-search { min-width: 18rem; flex: 1; }
.log-search input[type=search] { width: 100%; }

/* Tour: Stopp ohne Gerät (weder Mähroboter noch Beregnung) */
.tour-stop.is-nodevice { border-color: #e53935; background: #fdeced; }
.tour-stop-table tr.row-nodevice td { background: #fdeced; }
.tour-stop-table tr.row-nodevice td:first-child { box-shadow: inset 4px 0 0 #e53935; }
.tour-nodevice { color: #b71c1c; font-weight: 600; }
.pick-item .pick-warn { color: #b71c1c; font-weight: 600; }
.tour-insert-chosen.is-warn { background: #fdeced; border-left-color: #e53935; color: #b71c1c; }
.order-devices { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .7rem; margin-bottom: .9rem; display: grid; gap: .2rem; }
.tour-insert-orders { display: grid; gap: .3rem; }
.tour-insert-orders .pick-item { border: 1px solid var(--border); border-radius: 6px; }
.tour-insert-orders .pick-item.is-active { border-color: #2e9e5b; background: #eef6ee; }
.pick-item.is-muted { opacity: .6; }
.tour-insert-list { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.tour-insert-list .pick-item.is-active { background: #eef6ee; box-shadow: inset 4px 0 0 #2e9e5b; }

/* To-do */
.todo-new { border: 2px solid var(--primary); background: #fff; }
.todo-new summary { cursor: pointer; color: var(--primary); font-size: 1.1rem; }
.todo-new summary::marker { color: var(--primary); }
.todo-new[open] { background: #fff; }
.todo-form { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; margin-top: .8rem; }
.todo-form .todo-title { grid-column: 1 / 2; }
.todo-form .todo-desc { grid-column: 1 / -1; }
@media (max-width: 700px) { .todo-form { grid-template-columns: 1fr; } .todo-form .todo-title { grid-column: auto; } }
.todo-list { display: grid; gap: .6rem; }
.todo { border-left: 5px solid #8fa3bf; padding: .8rem 1rem; margin: 0; }
.todo.is-auto { border-left-color: #1d4f8f; }
.todo.is-overdue { border-left-color: #c62828; background: #fdf3f3; }
.todo.is-done { border-left-color: #2e9e5b; opacity: .85; }
.todo-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: baseline; }
.todo-head h2 { margin: 0; font-size: 1.05rem; }
.todo-meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.todo-customer { margin: .35rem 0; }
.todo-phone { font-weight: 700; white-space: nowrap; }
.todo-text { white-space: pre-line; color: #3b4452; font-size: .92rem; margin: .3rem 0; }
.todo-links { display: block; margin-top: .3rem; line-height: 1.5; }
.todo-sep { color: var(--muted); }
.todo-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; margin-top: .6rem; }
.todo-actions form { margin: 0; }
.todo-actions form[method=post]:last-child { order: 6; } /* Löschen zuletzt */
.todo-edit[open] { flex-basis: 100%; order: 7; }
.todo-edit summary { list-style: none; display: inline-block; }
.todo-customer-field { grid-column: 1 / -1; border: 1px solid var(--border); border-radius: 8px; padding: .4rem .8rem .2rem; margin: 0 0 .9rem; }
.todo-customer-field legend { font-weight: 600; font-size: .92rem; padding: 0 .3rem; }
.todo-customer-field .tcf-existing { position: relative; }
.pick-item .pick-intour { color: #1d4f8f; font-weight: 600; }
.badge-dup { background: #fff1d6; color: #8a4b00; border: 1px solid #f0b54a; margin-left: .3rem; }
.todo-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; } /* eigene · mit Kunde · automatisch (Tour/Termin) */
@media (max-width: 1100px) { .todo-columns { grid-template-columns: 1fr 1fr; } .todo-columns > :nth-child(3) { grid-column: 1 / -1; } }
.todo-columns.todo-columns-2 { grid-template-columns: 1fr 1fr; }
.todo-columns.todo-columns-1 { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
@media (max-width: 760px) { .todo-columns { grid-template-columns: 1fr; } }
.todo-col-head { margin: 0 0 .2rem; font-size: 1.05rem; }

/* Tabellen mit fester Überschrift beim Scrollen (Statistik → Touren) */
@media (min-width: 761px) {
    .table-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
    .table-sticky thead th { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: inset 0 -2px 0 var(--border); }
}
/* Statistik → Touren: Abstände Filter ↔ Tabelle, Checkbox auf Höhe der Felder, gleichmäßige Zeilen */
.card .log-filter + .table-scroll, .card .log-filter + .table { margin-top: 1rem; }
.log-filter .checkbox { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.6rem; margin: 0; }
.table-sticky th, .table-sticky td { padding: .5rem .7rem; vertical-align: top; line-height: 1.35; }
.table-sticky thead th { vertical-align: bottom; }
@media (max-width: 640px) {
    .cal-nav { flex-wrap: wrap; }
    .cal-title-pick { margin-left: 0; flex-basis: 100%; justify-content: flex-start; padding-left: 0; }
    .cal-title { font-size: 1.05rem; white-space: normal; }
}
.cal-jump-form { position: relative; margin: 0; display: inline-flex; }
.cal-jump-form .cal-date-input { left: 2rem; }
.cal-ev-dots-right { margin: 0 0 0 auto; flex-wrap: nowrap; }
.cal-ev-allday .cal-ev-top { display: flex; align-items: center; gap: .25rem; }

.cal-grid.is-compact .cal-ev-dots-right { display: flex; }

/* Kalender: Zeile 1 Navigation + Legende, Zeile 2 Ansicht/Zeitraum/Aktionen (Neuer Auftrag, Neuer Termin rechts) */
.cal-toolbar-top { margin-bottom: .45rem; }
.cal-states-top { margin: 0; justify-content: flex-end; }
.cal-toolbar-actions { justify-content: flex-start; gap: .35rem; }
.cal-toolbar-actions .cal-switch { gap: .35rem; }
.cal-toolbar-actions .cal-views { gap: .2rem; }
.cal-new { display: inline-flex; gap: .35rem; margin-left: auto; white-space: nowrap; }
@media (max-width: 1250px) { .cal-toolbar-actions .btn-small { padding: .3rem .55rem; font-size: .85rem; } }
@media (max-width: 640px) { .cal-states-top { justify-content: flex-start; } .cal-new { margin-left: 0; } }
/* Handy: Tag-Umschalter und Datum in einer Zeile, keine Legende, nur 1T./2T./3T./Monat */
@media (max-width: 760px) {
    .cal-toolbar-top { flex-wrap: nowrap; }
    .cal-toolbar-top .cal-nav { flex-wrap: nowrap; min-width: 0; }
    .cal-toolbar-top .cal-states-top { display: none; }
    .cal-title-pick { margin-left: .25rem; padding: .2rem .3rem; min-width: 0; gap: .3rem; }
    .cal-title { font-size: 1rem; }
    .cal-title-ico { width: 18px; height: 18px; flex-basis: 18px; }
    .cal-views [data-view="sieben"], .cal-views [data-view="modo"], .cal-views [data-view="mofr"], .cal-views [data-view="woche"] { display: none; }
}
.flash { transition: opacity .4s; }
.flash.is-fading { opacity: 0; }

/* To-do: Bilder und Links */
.todo-flag { font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.todo-text a { word-break: break-all; }
.todo-images { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.todo-images img { width: 92px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.todo-images-field { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: -.3rem 0 .9rem; padding: 0; border-radius: 8px; }
.todo-form-actions { display: flex; gap: .5rem; grid-column: 1 / -1; }
.todo-images-field.is-drop, .todo-form textarea.is-drop { outline: 2px dashed var(--primary); outline-offset: 2px; }
.todo-images-edit { display: flex; flex-wrap: wrap; gap: .4rem; }
.todo-img-edit { position: relative; display: inline-block; }
.todo-img-edit img { width: 80px; height: 62px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.todo-img-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #c62828; color: #fff;
    font-size: .8rem; line-height: 20px; padding: 0; cursor: pointer; }
.todo-img-add { cursor: pointer; margin: 0; }

.trash-table tr.is-restored td { color: var(--muted); }
.todo-images-edit:empty { display: none; }

/* Kasten „Protokoll“ (überall gleich, unten auf der Seite) */
.activity-box { margin-top: 1.5rem; } /* Abstand zum Button/Kasten darüber (z. B. „Kunden löschen“) */
.activity-box summary { cursor: pointer; }
.activity-box[open] summary { margin-bottom: .6rem; }
.activity-changes div { margin: .1rem 0; overflow-wrap: anywhere; }
.activity-changes del { color: #9b1c22; }

/* Kasten „Winterservice“ (Mähroboter, Beregnung): zusammengehörige Angaben */
.service-box { border: 1px solid #b9cce3; border-left: 4px solid var(--primary); border-radius: 8px; background: #f7fafd; padding: .5rem 1rem .7rem; margin: .3rem 0 1rem; }
.service-box legend { padding: 0 .4rem; }
.service-box legend .checkbox { margin: 0; font-weight: 700; color: var(--primary); }
.service-box-body > label:last-child, .service-box-body .grid2 > * > label:last-child { margin-bottom: .3rem; }
.service-box h3 { font-size: .95rem; margin: .6rem 0 .4rem; }
.service-box .grid2 { gap: 0 1rem; }
.service-box p { margin: .3rem 0 0; }
.service-box [hidden] { display: none !important; }

.order-origin { margin-top: .3rem; }
.bug-case { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.bug-case h3 { margin: 0 0 .3rem; }
.bug-case p { margin: 0 0 .4rem; }
.held-orders { border-left: 4px solid #a3370f; }
/* Tour-Seite: Mitarbeiter der Einplanung als abgehobener Unterpunkt mit „Ändern“ */
.tour-staff-box { margin: .8rem 0 1rem; padding: .7rem .9rem; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 8px; background: #f6f8fb; }
.tour-staff-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tour-staff-names { font-weight: 600; }
.tour-staff-change { margin-top: .5rem; }
.tour-staff-change > summary { list-style: none; display: inline-block; }
.tour-staff-change > summary::-webkit-details-marker { display: none; }
.tour-staff-change[open] > summary { display: none; }
.tour-staff-change .staff-pick { margin: .2rem 0 .6rem; }
.tour-staff-force { margin-top: .5rem; }
.tour-below-main > .card:last-child, .tour-below-side > .card:last-child { margin-bottom: 0; }
fieldset.appt-box { min-width: 0; margin: 0 0 1.2rem; }
/* Termin/Auftrag: „Kunde entfernen“ direkt hinter dem Suchfeld, gleiche Höhe */
.customer-search-row { display: flex; gap: .5rem; align-items: stretch; margin-top: .3rem; }
.customer-search-row input { margin-top: 0; flex: 1 1 auto; min-width: 0; }
.customer-search-row .btn { flex: 0 0 auto; white-space: nowrap; font-weight: 600; }
.pick-actions:empty { display: none; }
input[type=date], input[type=time] { font-weight: 400; } /* wie die Uhrzeit-/Textfelder (nicht fett vom Label geerbt) */
/* Backup-Warnung ganz oben (fehlgeschlagen / seit 26 Std. keins / nicht eingerichtet) */
.backup-alert { background: #c62828; color: #fff; font-weight: 700; font-size: 1.05rem; padding: .8rem 1.2rem; text-align: center; }
.backup-alert a { color: #fff; text-decoration: underline; margin-left: .6rem; white-space: nowrap; }
.backup-facts { margin: .4rem 0 .8rem; padding-left: 1.2rem; }
.backup-facts li { margin: .2rem 0; }
.code-block { background: #f3f5f8; border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; font-size: .85rem; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.tour-start-form { margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.stop-comment.has-note { border: 3px solid #d32f2f; } /* Kommentar zum Stopp vorhanden – nicht übersehen */
/* Auftrag: Kommentare zum Stopp aus den Touren (je Besuch) */
.stop-comments { background: #f6f8fb; border: 1px solid var(--border); border-left: 4px solid #6b21a8; border-radius: 8px; padding: .6rem .8rem; margin: 0 0 1rem; }
.stop-comment-row { margin-top: .35rem; }
.stop-saved { color: #1f6b30; font-weight: 600; margin-top: .3rem; }
.row-highlight td { background: #fff8e1 !important; transition: background 2s; }
/* Auftrag: Tour (letzte, auch abgesagt) mit „Wieder aktivieren“; Hinweis vom Service als Feld */
.order-tour { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; background: #faf5ff; border: 1px solid #e9d5ff; border-radius: 8px; padding: .5rem .7rem; margin: 0 0 1rem; }
.order-tour form { margin-left: auto; }
.staff-note-field textarea.has-note { background: #fff6e0; border-color: #f0d68a; } /* nur eingefärbt, wenn ein Hinweis da ist */
.order-tour-line { margin-top: .2rem; white-space: normal; }
.myday-stopcomment { border: 3px solid #d32f2f; border-radius: 8px; background: #fff; padding: .5rem .7rem; margin: .6rem 0; }
.myday-stopcomment strong { display: block; font-size: .85rem; color: #b71c1c; }
.live-search { position: relative; display: block; }
.live-search .pick-item { color: var(--ink); text-decoration: none; }
.live-search .pick-item.is-active { background: #e6ecf4; }
.live-search .pick-results { min-width: min(420px, 90vw); right: auto; }
.travel-line { margin-top: .2rem; color: var(--muted); }
.travel-line strong { color: var(--ink); }
.travel-sum { margin-top: .4rem; }
/* Auftrag erledigt: oben groß und grün */
.order-done-banner { background: #e6f6ea; border: 2px solid #2e9e5b; color: #1f6b30; border-radius: var(--radius); padding: .9rem 1.2rem; margin: 0 0 1.2rem; font-size: 1.35rem; font-weight: 700; }
.order-done-sub { font-size: 1rem; font-weight: 600; }
/* Material */
.material-filter { grid-template-columns: 2fr 2fr auto auto; align-items: end; }
@media (max-width: 900px) { .material-filter { grid-template-columns: 1fr; } }
.material-table .num { text-align: right; white-space: nowrap; }
.material-thumb { width: 64px; }
.material-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.material-nophoto { display: block; width: 56px; height: 56px; border-radius: 6px; background: #eef1f5; }
.row-reorder td { background: #fff8e1; }
.btn-reorder-on { border-color: var(--accent); color: #a3370f; }
.material-images { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem; }
.material-image { margin: 0; border: 1px solid var(--border); border-radius: 8px; padding: .4rem; background: #fff; }
.material-image.is-main { border: 2px solid #2e9e5b; }
.material-image img { width: 140px; height: 140px; object-fit: cover; border-radius: 6px; display: block; }
.material-image figcaption { display: flex; gap: .3rem; align-items: center; justify-content: space-between; margin-top: .35rem; }
.category-tree { list-style: none; margin: 0; padding: 0; }
.category-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .45rem 0 .45rem calc(var(--level) * 1.6rem);
    border-bottom: 1px solid var(--border); }
.category-row .inline-edit input[type=text] { flex: 0 1 220px; }
.category-actions { display: inline-flex; gap: .3rem; align-items: center; }
/* Neue Kategorie: Felder und „Anlegen“ auf einer Linie, gleich hoch */
.category-new { align-items: flex-end; }
.category-new label { margin: 0; flex: 1 1 220px; }
.category-new.inline-edit label input[type=text], .category-new label select { height: 2.6rem; margin: .3rem 0 0; width: 100%; }
.category-new .span-all { flex-basis: 100%; }
.category-new > .btn { height: 2.6rem; display: inline-flex; align-items: center; }
/* Dateiauswahl („Dateien auswählen“) im Stil der übrigen Buttons */
input[type=file]:not([hidden]) { display: block; margin-top: .4rem; font: inherit; font-weight: 400; font-size: .9rem; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button {
    border: 1px solid var(--border); background: #fff; color: var(--ink); padding: .55rem 1rem; border-radius: 8px;
    cursor: pointer; font: inherit; font-size: .95rem; font-weight: 600; margin-right: .8rem; transition: .15s;
}
input[type=file]::file-selector-button:hover { border-color: var(--primary); }
/* Material-Formular: Nachbestellen neben dem Lagerbestand, auf Höhe des Feldes */
.material-reorder { display: flex; align-items: flex-end; padding-bottom: .9rem; }
.material-reorder .checkbox { margin: 0; padding-bottom: .6rem; }
.log-columns.log-single { grid-template-columns: 1fr; }
/* Sicherheitsupdate nötig (bekannte Lücke in einem Paket): orange Leiste ganz oben */
.security-alert { background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem; padding: .8rem 1.2rem; text-align: center; }
/* Einstellungen → Sicherheit: grün = erledigt, orange = offen, rot = kritisch */
.sec-counts { display: flex; flex-wrap: wrap; gap: .5rem; }
.sec-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; }
.sec-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-items: start; }
@media (max-width: 900px) { .sec-areas { grid-template-columns: 1fr; } }
.sec-area { border-top: 4px solid #2e7d32; }
.sec-area.sec-area-open { border-top-color: var(--accent); }
.sec-area.sec-area-critical { border-top-color: #c62828; background: #fff8f7; }
.sec-area-head { display: flex; align-items: center; gap: .5rem; }
.sec-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px; color: #fff; }
.sec-icon.sec-ok, .sec-pill.sec-ok { background: #2e7d32; color: #fff; }
.sec-icon.sec-open, .sec-pill.sec-open { background: var(--accent); color: #fff; }
.sec-icon.sec-critical, .sec-pill.sec-critical { background: #c62828; color: #fff; }
.sec-measure { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--border); scroll-margin-top: 1rem; }
.sec-measure .sec-icon { width: 22px; height: 22px; flex-basis: 22px; margin-top: .1rem; }
.sec-measure .sec-icon svg { width: 14px; height: 14px; }
.sec-body { flex: 1; min-width: 0; }
.sec-title { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; margin-bottom: .15rem; }
.sec-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.sec-badge.sec-ok { background: #e8f5e9; color: #1b5e20; }
.sec-badge.sec-open { background: #fdeee8; color: #b4410f; }
.sec-badge.sec-critical { background: #fdecea; color: #b71c1c; }
.sec-detail { margin-top: .2rem; color: var(--muted); }
.sec-detail.text-error { color: #c62828; font-weight: 600; }
.sec-edit { margin-top: .4rem; }
.sec-edit summary { cursor: pointer; color: var(--primary); }
.sec-edit-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; margin-top: .4rem; }
.csp-reports { margin: .4rem 0; }
.csp-reports td.break { overflow-wrap: anywhere; }
.sec-edit-form label { margin: 0; flex: 1 1 200px; }
.sec-edit-form label:first-child { flex: 0 0 auto; }
.sec-new { margin: .6rem 0 1rem; }
.sec-new summary { cursor: pointer; }
.sec-new form { margin-top: .8rem; }
.sec-log .pre-line { white-space: pre-line; }
.badge-no-service { text-decoration: line-through; text-decoration-thickness: 2px; }
/* Update einspielen: Befehl zum Kopieren */
.copy-block { display: flex; gap: .6rem; align-items: center; margin: .4rem 0 .8rem; }
.copy-block pre { flex: 1; min-width: 0; margin: 0; padding: .7rem .9rem; background: #0f1e33; color: #e6edf5; border-radius: 8px; overflow-x: auto; font-size: .88rem; }
@media (max-width: 640px) { .copy-block { flex-direction: column; align-items: stretch; } }
.update-steps li { margin-bottom: .4rem; }
.security-alert a { color: #fff; text-decoration: underline; margin-left: .6rem; white-space: nowrap; }
.copy-block pre code { background: none; color: inherit; padding: 0; border: 0; font-size: inherit; }
.log-area-service { background: #fdeee8; color: #b4410f; }
/* Einstellungen: Übersicht mit Kategorien und Kacheln (einfarbige Symbole weiß auf Dunkelblau) */
.settings-home-head { flex-wrap: wrap; gap: .8rem; }
.settings-search { margin: 0; flex: 0 1 360px; }
.settings-search input[type=search] { margin-top: 0; background: #fff; border: 2px solid var(--border); }
.settings-search input[type=search]:focus { border-color: var(--primary); }
.settings-cat { margin-bottom: 1.6rem; }
.settings-cat-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .6rem; }
.settings-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
@media (max-width: 980px) { .settings-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .settings-tiles { grid-template-columns: 1fr; } }
.settings-tile { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.settings-tile:hover { border-color: var(--primary); text-decoration: none; box-shadow: 0 4px 14px rgb(var(--primary-rgb) / .12); }
.settings-tile[hidden], .settings-cat[hidden] { display: none; }
.settings-tile-icon { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; background: var(--primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; }
.settings-tile:hover .settings-tile-icon { background: var(--accent); }
.settings-tile-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.settings-tile-title { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.settings-tile-desc { font-size: .86rem; color: var(--muted); line-height: 1.35; }
.settings-status { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; }
.settings-status-ok { color: var(--primary); background: #e9eef5; }
.settings-status-neutral { color: #4b5563; background: #eef0f3; }
.settings-status-warn { color: #fff; background: var(--accent); }
.settings-status-critical { color: #fff; background: #c62828; }
/* Unterseite: zurück zur Übersicht + Reiter der eigenen Kategorie */
.subnav-settings .subnav-inner { align-items: center; }
.subnav-settings a.subnav-back { color: var(--primary); font-weight: 700; }
.subnav-cat { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: 0 .6rem 0 .2rem; border-left: 1px solid var(--border); margin-left: .2rem; }
/* Kundenliste: E-Mail-Adresse per Klick kopieren */
.copy-email { display: block; background: none; border: 0; padding: 0; margin: .1rem 0 0; font: inherit; color: var(--primary); cursor: copy; text-align: left; overflow-wrap: anywhere; }
.copy-email:hover { text-decoration: underline; }
.copy-email.is-copied { color: #2e7d32; font-weight: 600; }
/* Auftragsliste: Inhalte oben ausrichten (Test 03.11.2026 – zum Zurücknehmen diese Zeile löschen) */
.orders-table td { vertical-align: top; }
/* Auftragsliste – Filter: Felder, Checkbox und Buttons auf einer Höhe (unten bündig, gleich hoch) */
.order-filter { align-items: end; }
.order-filter label { margin-bottom: 0; }
.order-filter input[type=search], .order-filter select { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.order-filter .filter-check { display: flex; align-items: center; gap: .5rem; height: 2.6rem; margin: 0; line-height: 1.25; font-size: .9rem; }
.order-filter .filter-check input[type=checkbox] { flex: 0 0 auto; margin: 0; }
.order-filter .filter-actions { display: flex; gap: .5rem; align-items: center; margin-bottom: 0; }
.order-filter .filter-actions .btn { height: 2.6rem; display: inline-flex; align-items: center; }
@media (max-width: 900px) { .order-filter { row-gap: .8rem; } .order-filter .filter-check { height: auto; } }
/* Foto-Galerie: Beschreibungsfeld und „Fotos hochladen“ gleich hoch und auf einer Linie */
.photo-upload input[name=description] { margin: 0; height: 2.6rem; box-sizing: border-box; }
.photo-upload .btn { height: 2.6rem; display: inline-flex; align-items: center; box-sizing: border-box; }
/* Tabellen mit Inhalt oben ausgerichtet (z. B. Arbeitsnachweise im Auftrag) */
.table-top td { vertical-align: top; }
/* Bereiche im Formular mit Überschrift im Rahmen (wie „Kunden-Benachrichtigung“) – Auftrag: Was ist zu tun?, Status */
fieldset.form-box { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .8rem .3rem; margin: .4rem 0 .8rem; min-width: 0; }
fieldset.form-box > legend { font-weight: 600; padding: 0 .3rem; }
fieldset.form-box > :last-child { margin-bottom: .4rem; }
fieldset.form-box .grid2 > label { margin-bottom: .5rem; }
textarea { color: var(--ink); }
/* Auftrag: aufgelockert – Kunde und Einsatzort eng zusammen, danach mehr Luft; Abstand zwischen den Rahmen und vor „Speichern“ */
#order-form .order-customer { margin: 0 0 .25rem; }
#order-form .order-site { margin-top: 0; margin-bottom: 1.6rem; }
#order-form .order-tour { margin-top: -.6rem; margin-bottom: 1.6rem; }
#order-form fieldset.form-box, #order-form fieldset.notify-choice { margin: 0 0 1.8rem; }
#order-form fieldset.notify-choice:has(+ .notify-log) { margin-bottom: .8rem; }
#order-form .order-save { margin-top: .4rem; }
/* To-do mit Kunde: Titel und Beschreibung abgesetzt (das Wichtigste), Beschreibung so groß wie der Titel, nicht fett */
.todo-main { margin: .8rem 0 .9rem; }
.todo-main h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
.todo-main .todo-text { font-size: 1.05rem; color: var(--ink); margin: 0; }
.todo > .todo-meta { margin: .2rem 0 0; }
.todo-links > a, .todo-links > span.muted { white-space: nowrap; }
/* Protokoll (Einstellungen → System): Quelle als Label */
.proto-src { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: #e9eef5; color: var(--primary); white-space: nowrap; }
.proto-src-mail, .proto-src-sms { background: #e3eefb; color: #1d4f8f; }
.proto-src-security { background: #fdeee8; color: #b4410f; }
.proto-src-trash { background: #fdecea; color: #b71c1c; }
.protocol-table .badge { margin-right: .3rem; }
.protocol-filter input[type=date] { margin-top: .3rem; display: block; }
.protocol-filter input[type=date] { width: 150px; }
.protocol-filter .log-search { flex: 1 1 200px; }
.protocol-filter select { min-width: 120px; }
/* Protokoll: feste Spaltenbreiten, langer Text bricht um – die Tabelle bleibt innerhalb der Seite */
.protocol-table { table-layout: fixed; width: 100%; }
.protocol-table th:nth-child(1) { width: 4.6rem; }
.protocol-table th:nth-child(2) { width: 8rem; }
.protocol-table th:nth-child(4) { width: 9rem; }
.protocol-table th:nth-child(5) { width: 10rem; }
.protocol-table th:nth-child(6) { width: 9.5rem; }
.protocol-table td { overflow-wrap: anywhere; }
.protocol-table td.actions { white-space: normal; }
.protocol-table td.actions .btn, .protocol-table td.actions form { margin: 0 0 .3rem; }
/* Kundenliste – Filter: Zeile 1 Suche + „Filter“ + Suchen (ganze Breite); die Filter klappen auf Klick darunter auf */
.customer-filter { grid-template-columns: 1fr; gap: .8rem 0; align-items: start; }
.customer-filter .cf-search { display: flex; gap: .6rem; align-items: flex-end; }
.customer-filter .cf-search-field { flex: 1 1 auto; margin: 0; min-width: 0; }
.customer-filter .cf-search input[type=search] { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.customer-filter .cf-search .filter-actions { margin: 0; display: flex; gap: .5rem; }
.customer-filter .cf-search .btn { height: 2.6rem; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.customer-filter .filter-more-toggle { display: inline-flex; width: auto; margin: 0; grid-column: auto; }
.customer-filter .filter-more-toggle.is-active { border-color: var(--primary); color: var(--primary); }
.customer-filter .filter-more-toggle[aria-expanded="true"] .fmt-arrow { transform: rotate(180deg); }
.customer-filter .filter-more { display: none; }
.customer-filter .filter-more.is-open { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 .8rem; }
.customer-filter .filter-more label { margin-bottom: 0; }
@media (max-width: 900px) {
    .customer-filter .cf-search { flex-wrap: wrap; }
    .customer-filter .cf-search-field { flex-basis: 100%; }
    .customer-filter .filter-more.is-open { grid-template-columns: 1fr 1fr; gap: .4rem .8rem; }
}
}
.customer-filter .fmt-arrow { display: inline-block; transition: transform .15s; }
/* Tour „Route und Uhrzeiten“: Zeitfeld und Button auf einer Höhe */
.time-form { align-items: flex-end; }
.time-form label { margin: 0; }
.time-form input[type=text] { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.time-form > .btn { height: 2.6rem; display: inline-flex; align-items: center; }
/* Stopp-Liste: einheitliche Höhe für Kommentar, Speichern, Dauer und ✓ */
.tour-stop-table { --ctl-h: 2.1rem; }
.stop-comment-box { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.stop-comment-box input.stop-comment { width: 100%; margin: 0; height: var(--ctl-h); padding: .3rem .55rem; font-size: .88rem; box-sizing: border-box; }
.stop-comment-box .btn { align-self: flex-start; height: var(--ctl-h); display: inline-flex; align-items: center; }
.stop-duration { display: block; margin-top: .5rem; }
.stop-duration label { display: block; margin: 0 0 .2rem; font-weight: 600; }
.stop-duration-row { display: flex; gap: .35rem; align-items: center; }
.stop-duration-row input { width: 5rem; height: var(--ctl-h); margin: 0; padding: .3rem .45rem; box-sizing: border-box; }
.stop-duration-row .btn { height: var(--ctl-h); width: var(--ctl-h); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
/* Stopp-Liste: Mails schmal, Labels untereinander; Geräte ohne großen Abstand; Kommentar + ✓ in einer Zeile */
.tour-stop-table th.col-mails { width: 11.25rem; }
.tour-stop-table td.stop-mails { display: table-cell; }
.tour-stop-table td.stop-mails .badge { display: block; width: fit-content; max-width: 100%; margin: 0 0 .25rem; white-space: normal; border-radius: 6px; line-height: 1.3; }
.tour-stop-table tr.row-stop-done .stop-mails .badge, .tour-stop-table tr.row-stop-followup .stop-mails .badge, .tour-stop-table tr.row-nodevice .stop-mails .badge { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.stop-devices label, .stop-devices .checkbox { margin: 0; }
.stop-comment-row-inline { display: flex; gap: .35rem; align-items: center; }
.stop-comment-row-inline input.stop-comment { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; height: var(--ctl-h); padding: .3rem .55rem; font-size: .88rem; box-sizing: border-box; }
.stop-comment-box .btn-check { height: var(--ctl-h); width: var(--ctl-h); padding: 0; justify-content: center; flex: 0 0 auto; align-self: auto; }
/* farbige bzw. graue Zeilen: Eingabefelder weiß wie die Buttons (Checkboxen bleiben, wie sie sind) */
.tour-stop-table tr.row-stop-done input[type=text], .tour-stop-table tr.row-stop-done input[type=number], .tour-stop-table tr.row-stop-done select,
.tour-stop-table tr.row-stop-followup input[type=text], .tour-stop-table tr.row-stop-followup input[type=number], .tour-stop-table tr.row-stop-followup select,
.tour-stop-table tr.row-nodevice input[type=text], .tour-stop-table tr.row-nodevice input[type=number], .tour-stop-table tr.row-nodevice select,
.tour-stop-table tr.row-cancelled input[type=text], .tour-stop-table tr.row-cancelled input[type=number], .tour-stop-table tr.row-cancelled select,
.tour-stop-table tbody tr:nth-child(odd) input[type=text], .tour-stop-table tbody tr:nth-child(odd) input[type=number], .tour-stop-table tbody tr:nth-child(odd) select { background-color: #fff; }
.stop-devices input.is-saved { box-shadow: 0 0 0 2px #2e7d32; }
/* SMS: Guthaben-Warnung – zwei Felder und Speichern auf einer Linie */
.sms-warning-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .4rem 0 .3rem; }
.sms-warning-form label { margin: 0; }
.sms-warning-form label:first-of-type { flex: 1 1 240px; }
.sms-warning-form label:nth-of-type(2) { flex: 0 1 230px; white-space: nowrap; }
.sms-warning-form input[name=sms_balance_warn_amount] { width: 8rem; }
.sms-warning-form input { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.sms-warning-form .btn { height: 2.6rem; display: inline-flex; align-items: center; }
/* Zwei-Faktor-Anmeldung */
.badge-2fa { background: var(--primary); color: #fff; font-weight: 700; letter-spacing: .03em; }
.two-factor-qr { margin: .6rem 0; }
.two-factor-qr svg { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 6px; }
.two-factor-steps li { margin-bottom: .9rem; }
.two-factor-code { font-size: 1.3rem; letter-spacing: .2em; max-width: 12rem; }
.two-factor-confirm { margin-top: .5rem; align-items: center; }
.two-factor-codes { background: #fff6e0; border: 1px solid #f0d68a; border-left: 4px solid var(--accent); border-radius: 8px; padding: .7rem 1rem; margin-bottom: 1rem; }
.two-factor-codes ul { display: grid; grid-template-columns: repeat(4, max-content); gap: .3rem 1.5rem; padding-left: 1.2rem; margin: .4rem 0 0; }
.two-factor-actions { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; }
.two-factor-actions input[type=password] { width: 12rem; margin: 0; }
@media (max-width: 620px) { .two-factor-codes ul { grid-template-columns: repeat(2, max-content); } }

/* ---------- Service (Werkstatt): große Schrift, große Buttons ---------- */
.svc { font-size: 1.15rem; }
.svc .page-head h1, .svc-h1 { font-size: 1.7rem; }
.svc-h1 { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; }
.svc-h2 { font-size: 1.3rem; margin: 1.2rem 0 .5rem; }
.svc-desc { color: var(--muted); margin: .2rem 0 .8rem; }
.svc-back { display: inline-block; margin: .2rem 0 .4rem; font-size: 1.05rem; }
.svc-nr { display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; border-radius: 999px;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 1.2rem; }
.svc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.svc-tile { display: flex; flex-direction: column; gap: .4rem; padding: 1.2rem; background: var(--card); border: 2px solid var(--border);
    border-radius: var(--radius); color: var(--ink); text-decoration: none; min-height: 7rem; }
.svc-tile:hover { border-color: var(--primary); }
.svc-tile-title { font-size: 1.3rem; font-weight: 700; }
.svc-tile-sub { color: var(--muted); font-size: 1rem; }
.svc-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.svc-step-tabs { display: flex; gap: .4rem; }
.svc-step-tab { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 10px;
    border: 2px solid var(--border); background: var(--card); color: var(--ink); font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.svc-step-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.svc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 3.4rem; padding: .6rem 1.2rem; border-radius: 12px;
    border: 2px solid var(--primary); background: var(--primary); color: #fff; font-size: 1.15rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.svc-btn:disabled { opacity: .45; cursor: not-allowed; }
.svc-btn-light { background: #fff; color: var(--primary); }
.svc-btn-big { width: 100%; min-height: 4.4rem; font-size: 1.35rem; }
.svc-btn-go { background: var(--success); border-color: var(--success); }
.svc-btn-finish { background: var(--success); border-color: var(--success); }
.svc-btn-pause { background: #fff; color: #9a5b00; border-color: var(--warn); }
.svc-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .8rem 0; }
.svc-search { display: flex; gap: .5rem; margin-bottom: .8rem; }
.svc-search input { flex: 1; min-height: 3.4rem; font-size: 1.15rem; }
.svc-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: .9rem; }
.svc-empty { color: var(--muted); }
.svc-sheet-done { display: flex; flex-wrap: wrap; gap: .5rem; }
.svc-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.svc-item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; padding: 1rem 1.1rem; text-align: left;
    background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); color: var(--ink); font-size: 1.1rem; cursor: pointer; text-decoration: none; }
.svc-item:hover { border-color: var(--primary); }
.svc-item.is-paused { border-color: var(--warn); }
.svc-item-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.svc-item-main strong { font-size: 1.25rem; }
.svc-item-sub { display: block; color: var(--muted); font-size: .98rem; }
.svc-boxnr { flex: none; background: #000; color: #fff; font-weight: 700; padding: .4rem .7rem; border-radius: 8px; font-size: 1.15rem; }
.svc-mower-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.svc-customer { font-size: 1.5rem; font-weight: 700; }
.svc-boxbig { background: #000; color: #fff; text-align: center; padding: .5rem 1rem; border-radius: 10px; font-size: 1rem; line-height: 1.1; }
.svc-boxbig strong { font-size: 2.6rem; }
.svc-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 1rem 0 0; }
.svc-facts dt { color: var(--muted); }
.svc-facts dd { margin: 0; }
.svc-inline { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .4rem; }
.svc-history { display: flex; gap: .4rem; margin-top: .9rem; flex-wrap: wrap; }
.svc-hist { padding: .25rem .6rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-weight: 700; }
.svc-hist.is-done { background: #e7f6ea; border-color: var(--success); color: var(--success); }
.svc-hist.is-open { background: #fff4e0; border-color: var(--warn); color: #9a5b00; }
.svc-time { font-size: 1.2rem; display: grid; gap: .6rem; margin-bottom: .8rem; }
.svc-timer { font-weight: 700; font-variant-numeric: tabular-nums; }
.svc-time-edit summary { cursor: pointer; color: var(--primary); font-size: 1rem; }
.svc-time-edit input[type=time] { min-height: 3.2rem; font-size: 1.2rem; }
.svc-done { font-size: 1.25rem; color: var(--success); font-weight: 700; }
.svc-tasks { display: grid; gap: .6rem; margin: .6rem 0; }
.svc-tasks form { margin: 0; }
.svc-task { display: flex; align-items: center; gap: .9rem; width: 100%; min-height: 4.2rem; padding: .8rem 1rem; text-align: left; font-size: 1.2rem;
    background: #fff; border: 2px solid var(--border); border-radius: 12px; color: var(--ink); cursor: pointer; }
.svc-task:disabled { cursor: default; opacity: .7; }
.svc-task-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 8px;
    border: 3px solid var(--border); font-size: 1.5rem; font-weight: 700; }
.svc-task.is-done { background: #e7f6ea; border-color: var(--success); }
.svc-task.is-done .svc-task-mark { background: var(--success); border-color: var(--success); color: #fff; }
.svc-material { margin-top: 1rem; }
.svc-mat-line { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.svc-mat-line form { margin: 0; }
.svc-mat-line > span { min-width: 0; overflow-wrap: anywhere; }
.svc-mat-line .svc-btn { min-height: 2.8rem; padding: .3rem .9rem; }
.svc-material > .svc-btn { margin-top: .6rem; }
.svc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.2rem; }
.svc-actions form { margin: 0; }
/* Ziffernblock */
.numpad-modal { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .55); display: flex; align-items: flex-start; justify-content: center;
    padding: 1rem; overflow-y: auto; }
.numpad-modal[hidden] { display: none; }
.numpad-box { background: #fff; border-radius: 16px; padding: 1.1rem; width: 100%; max-width: 420px; display: grid; gap: .8rem; margin: 0 auto; }
.numpad-inline .numpad-box { border: 1px solid var(--border); }
.numpad-title { font-size: 1.35rem; font-weight: 700; text-align: center; }
.numpad-error { background: #fdecec; color: var(--danger); border-radius: 10px; padding: .6rem .8rem; font-weight: 700; }
.numpad-display { width: 100%; text-align: center; font-size: 3rem; font-weight: 700; letter-spacing: .3rem; min-height: 5rem;
    border: 3px solid var(--primary); border-radius: 12px; background: #f8fafc; font-variant-numeric: tabular-nums; }
.numpad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.numpad-key { min-height: 4.6rem; border-radius: 14px; border: 2px solid var(--border); background: #f1f5f9; font-size: 2rem; font-weight: 700;
    color: var(--ink); cursor: pointer; touch-action: manipulation; }
.numpad-key:active { background: #dbe3ea; }
.numpad-del { font-size: 1.6rem; }
.numpad-ok { background: var(--success); border-color: var(--success); color: #fff; font-size: 1.6rem; }
.numpad-ok:disabled { opacity: .4; }
.numpad-cancel { width: 100%; }
/* Material-Auswahl */
.svc-mat-box { max-width: 560px; }
.svc-mat-search { min-height: 3.2rem; font-size: 1.15rem; }
.svc-mat-list { max-height: 40vh; overflow-y: auto; display: grid; gap: .4rem; }
.svc-mat-option { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 2px solid var(--border); border-radius: 10px; font-size: 1.1rem; cursor: pointer; margin: 0; }
.svc-mat-option[hidden] { display: none; }
.svc-mat-option input { width: 1.4rem; height: 1.4rem; }
.svc-mat-option.is-suggested { border-color: var(--primary); }
.svc-mat-option:has(input:checked) { background: #e8f0fb; border-color: var(--primary); }
.svc-qty { display: grid; grid-template-columns: 4.6rem 1fr 4.6rem; gap: .6rem; }
.svc-qty input { text-align: center; font-size: 2rem; font-weight: 700; min-height: 4.6rem; }
@media (max-width: 640px) {
    .svc-actions { grid-template-columns: 1fr; }
    .svc-mower-head { flex-direction: column-reverse; }
    .svc-boxbig { align-self: flex-start; }
}
.svc-edit-task { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.svc-edit-task form { margin: 0; }
.svc-report .badge { font-size: .8rem; }
.svc-tile .svc-nr { align-self: flex-start; }
.numpad input.numpad-display { font-size: 3rem; padding: .3rem; height: auto; }
.svc-qty input[type=number] { font-size: 2rem; }
.svc-return-list { margin-top: .7rem; }
.svc-return-list form { margin: 0; }
.svc-btn.svc-back { min-height: 3rem; margin: .2rem 0 .6rem; }
/* Kundenliste: Telefonnummer antippen = anrufen; am Smartphone nur die Suche (keine Filter) */
.tel-link { display: block; white-space: nowrap; }
@media (max-width: 640px) {
    .customer-filter .filter-more-toggle, .customer-filter .filter-more { display: none !important; }
    .tel-link { padding: .25rem 0; font-size: 1.05rem; }
}
.tour-search-results { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .4rem; }
.tour-search-results a { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; color: var(--ink); }
.tour-search-results a:hover { border-color: var(--primary); }
tr[id^="stopp-"]:target > td { background: #fff4d6; box-shadow: inset 0 0 0 9999px rgb(var(--accent-rgb) / .08); }
tr[id^="stopp-"] { scroll-margin-top: 5rem; }
/* Navigation starten (Kundenseite): nur am Smartphone, dunkelblau wie in „Mein Tag“ */
.mobile-only { display: none !important; }
@media (max-width: 640px) {
    .btn-nav.mobile-only { display: flex !important; justify-content: center; width: 100%; margin-top: .5rem; min-height: 2.9rem; font-size: 1.05rem; }
}
/* Kundenseite: je Einsatzort eine Box, darin Mähroboter und Beregnung als Rahmen mit Beschriftung auf der Linie */
.site-card { border: 2px solid var(--border); }
.site-card > .page-head:first-child { border-bottom: 1px solid var(--border); padding-bottom: .5rem; margin-bottom: .6rem; }
.device-box { border: 1px solid var(--border); border-radius: 8px; padding: .5rem .8rem .7rem; margin: 1rem 0 0; min-width: 0; background: var(--bg); } /* gleicher Farbton wie der Seitenhintergrund */
.device-box legend { font-weight: 600; padding: 0 .4rem; }
.device-box-actions { display: flex; justify-content: flex-end; margin-bottom: .4rem; }
.device-box .table { margin-bottom: 0; }
.device-box > p { margin: .2rem 0; }
@media (max-width: 640px) { .device-box { padding: .4rem .5rem .6rem; } .device-box-actions { justify-content: flex-start; } }
.device-box legend { background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 6px; padding: .1rem .6rem; }
.device-box .table { background: #fff; border-radius: 6px; }
@media (max-width: 640px) { .desktop-only { display: none !important; } }
/* Schritt-Titel: Nummer oben, mittig zur ersten Zeile (bei mehrzeiligen Titeln) */
.svc-h1 { align-items: flex-start; line-height: 1.3; }
.svc-h1 .svc-nr { flex: none; margin-top: calc((1.3em - 2.4rem) / 2 + .12rem); }
.svc-search input { background: #fff; border: 2px solid var(--border); }
.svc-search input:focus { border-color: var(--primary); }
.svc-confirm { text-align: center; }
.svc-confirm-box .svc-boxnr { font-size: 2rem; padding: .5rem 1.2rem; }
.svc-confirm-text { display: grid; gap: .2rem; font-size: 1.3rem; }
/* Arbeitsblatt ansehen: obere Hälfte A4 (210 × 148 mm) als Vorschau, passt sich der Breite an */
.svc-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .8rem 0; }
.svc-sheet-actions form { margin: 0; }
.svc-sheet-preview { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; aspect-ratio: 210 / 148; position: relative; }
.svc-sheet-preview iframe { position: absolute; top: 0; left: 0; width: 794px; height: 560px; border: 0; transform-origin: 0 0; }
@media (max-width: 640px) { .svc-sheet-actions { grid-template-columns: 1fr; } }
.numpad-sheet { display: grid; gap: .4rem; text-align: center; }
.numpad-sheet[hidden] { display: none; }
.svc-sheet-link { margin-top: .8rem; }
.login-extra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.login-qr-hint { margin: .6rem 0 0; }
.new-password-box { border: 2px solid var(--success); }
.new-password-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .05em; padding: .5rem .8rem; background: #f4f6f9; border-radius: 8px; display: inline-block; user-select: all; }
.new-password-qr svg { width: 220px; height: 220px; }
.new-password-grid { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
/* Service-Suche: Feld und Button gleich hoch */
.svc-search { align-items: stretch; }
.svc-search input[type=search] { height: 3.4rem; min-height: 0; margin: 0; box-sizing: border-box; }
.svc-search .svc-btn { height: 3.4rem; min-height: 0; box-sizing: border-box; }
/* Schritte 2 ff.: Ziffernblock + Liste der offenen Mäher nebeneinander (gleich hoch), am Smartphone untereinander */
.svc-pick { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: .9rem; align-items: stretch; }
.svc-pick .numpad-inline { display: flex; }
.svc-pick .numpad-inline .numpad-box { max-width: none; margin: 0; height: 100%; box-sizing: border-box; }
.svc-pick-list { background: var(--card); border: 1px solid var(--border); border-radius: 16px; display: flex; flex-direction: column;
    height: 0; min-height: 100%; overflow: hidden; } /* Höhe = Ziffernblock, Inhalt scrollt */
.svc-pick-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); font-size: 1.15rem; }
.svc-pick-filter { display: flex; gap: .4rem; }
.svc-chip { padding: .45rem .9rem; border-radius: 999px; border: 2px solid var(--border); text-decoration: none; color: var(--ink); font-size: 1rem; font-weight: 600; }
.svc-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.svc-pick-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* regulärer Betrieb: kein Ziffernblock, von dem die Liste ihre Höhe nimmt → volle Breite, eigene Höhe */
.svc-pick.svc-pick-only { grid-template-columns: 1fr; }
.svc-pick.svc-pick-only .svc-pick-list { height: auto; min-height: 0; max-height: 75vh; }
.svc-pick-item { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.svc-pick-item:hover { background: #f4f6f9; }
.svc-pick-item.is-paused { background: #fff8eb; }
.svc-pick-item.is-running { background: #eef7f0; }
.svc-pick-item.is-done { background: #f3f4f6; }
.svc-pick-item.is-done .svc-item-sub { color: #2e7d32; }
.svc-pick-item .svc-boxnr { min-width: 3.6rem; text-align: center; }
.svc-pick-empty { padding: 1rem; }
@media (max-width: 760px) {
    .svc-pick { grid-template-columns: 1fr; }
    .svc-pick-list { height: auto; min-height: 0; max-height: 70vh; }
}
.svc-pick-item:hover, .svc-pick-item:hover strong { text-decoration: none; }
/* Tourenplan: Sortierung über den Touren, Trennung „Vergangene“ */
.tour-sort { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .4rem; margin-top: 1.2rem; padding-bottom: .35rem;
    border-bottom: 1px solid var(--primary); color: var(--primary); }
.tour-sort a { color: var(--primary); text-decoration: none; }
.tour-sort a:hover { text-decoration: underline; }
.tour-sort a.active { font-weight: 700; text-decoration: underline; }
.tour-sort-sep { color: var(--primary); }
.tour-past-sep td { border-bottom: 2px solid var(--primary) !important; border-top: 0 !important; color: var(--primary); font-weight: 700; padding-top: 1rem !important; background: transparent; }
@media (max-width: 640px) {
    .tour-sort { justify-content: flex-start; }
    .table-cards tr.tour-past-sep { border: 0; background: transparent; box-shadow: none; padding: .8rem 0 0; }
    .table-cards tr.tour-past-sep td { display: block; border: 0 !important; border-bottom: 2px solid var(--primary) !important; padding: 0 0 .3rem !important; }
    .table-cards tr.tour-past-sep td::before { content: none; }
}
/* Ziffernblock-Fenster: am Smartphone unten am Bildschirmrand; Hintergrund scrollt nicht mit */
html.modal-open, html.modal-open body { overflow: hidden; }
.numpad-remove { max-width: 420px; width: 100%; margin: .6rem auto 0; }
.numpad-remove[hidden] { display: none; }
.svc-btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.svc-btn-danger-text { color: var(--danger); border-color: var(--danger); }
@media (max-width: 640px) {
    .numpad-modal { align-items: flex-end; flex-direction: column; justify-content: flex-end; padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom)); }
    .numpad-modal .numpad-box { margin: 0 auto; }
}
.numpad-modal { flex-direction: column; align-items: center; justify-content: flex-start; }
@media (max-width: 640px) { .numpad-modal { justify-content: flex-end; } }
.numpad-key { -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) {
    .numpad-modal { justify-content: flex-start; }
    .numpad-modal > :first-child { margin-top: auto; } /* unten am Rand, aber nie oben abgeschnitten (scrollbar) */
    .numpad-modal .numpad-box { gap: .55rem; padding: .9rem; }
    .numpad-modal .numpad-key { min-height: 3.9rem; font-size: 1.8rem; }
    .numpad-modal input.numpad-display { font-size: 2.4rem; min-height: 0; height: 4rem; }
    .numpad-modal .numpad-sheet .svc-btn-big { min-height: 3.2rem; font-size: 1.1rem; }
    .numpad-modal .numpad-cancel { min-height: 3rem; }
    .numpad-remove .svc-btn-big { min-height: 3.2rem; font-size: 1.1rem; }
}
.numpad-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.numpad-sheet .svc-desc { margin: 0; font-size: .95rem; }
.perm-table { max-width: 560px; } .perm-table td, .perm-table th { text-align: center; } .perm-table td:first-child, .perm-table th:first-child { text-align: left; } .perm-table input[type=checkbox] { width: 1.3rem; height: 1.3rem; }
/* Mein Tag: „Kein Winterservice“ je Mähroboter */
.myday-ws { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.myday-ws.is-busy { opacity: .5; pointer-events: none; }
.myday-ws-btn { width: 100%; min-height: 3rem; font-weight: 600; background: #fff; } /* normaler weißer Button */
.myday-ws-btn.is-armed { font-weight: 700; color: var(--ink); border-color: var(--ink); }
.myday-ws-off { font-weight: 700; color: var(--danger); } /* übersprungen: rot, gut sichtbar */
/* Mein Tag: Serienbilder (eigene Kamera) */
.myday-burst-btn { font-weight: 700; }
.burst { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; flex-direction: column; }
.burst-video { flex: 1; width: 100%; min-height: 0; object-fit: cover; background: #000; }
.burst-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.burst-flash.on { animation: burst-flash .25s ease-out; }
@keyframes burst-flash { from { opacity: .8; } to { opacity: 0; } }
.burst-thumbs { position: absolute; top: calc(.6rem + env(safe-area-inset-top)); left: .6rem; right: .6rem; display: flex; gap: .4rem; overflow-x: auto; }
.burst-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid #fff; flex: none; }
.burst-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); background: #000; }
.burst-count { color: #fff; font-weight: 700; font-size: 1rem; }
.burst-shot { width: 78px; height: 78px; border-radius: 50%; border: 6px solid #fff; background: #e8eef5; box-shadow: 0 0 0 3px #000 inset; cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.burst-shot:active { background: #fff; transform: scale(.94); }
.burst-done { justify-self: end; min-height: 3rem; font-size: 1.1rem; font-weight: 700; background: #fff; }
/* Auftrag → Arbeitsnachweise: Spalte „Vor Ort“ schmaler (bricht um), Buttons bleiben in einer Zeile */
@media (min-width: 641px) {
    #arbeitsnachweise .col-onsite { width: 34%; }
    #arbeitsnachweise td.actions { white-space: nowrap; width: 1%; }
}
/* Mein Tag: Auftragsdetails immer offen (nicht zuklappbar) */
.myday-details summary { list-style: none; cursor: default; }
.myday-details summary::-webkit-details-marker { display: none; }
/* Box zuweisen: Prüfung Seriennummer / PIN / Hersteller vor dem Ziffernblock */
.numpad-check { display: grid; gap: .7rem; }
.numpad-check[hidden], .numpad-main[hidden] { display: none; }
.numpad-main { display: grid; gap: .8rem; }
.numpad-check-label { display: grid; gap: .5rem; font-weight: 700; font-size: 1.15rem; margin: 0; }
.numpad-check-alert { color: #c62828; font-size: 1.35rem; text-align: center; } /* „… fehlt“ deutlich, damit man nicht die Boxnummer eintippt */
.numpad-check-label input { min-height: 3.6rem; font-size: 1.6rem; text-align: center; letter-spacing: .05em; }
.numpad-brands { display: grid; gap: .6rem; }
.mower-missing { border: 2px solid var(--warn); background: #fff8eb; }
.mower-missing-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.mower-missing-actions form { margin: 0; }
/* Mitarbeiter: Kundenfilter (Rolle „Extern“) */
.customer-filter-box { border: 2px solid var(--primary); margin: .8rem 0 1.2rem; }
.customer-filter-box[hidden] { display: none; }
.customer-filter-box .live-search { position: relative; display: block; }
.customer-filter-list { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .3rem; }
.customer-filter-list li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; }

/* Kunde gesperrt */
.badge-locked { background: #b3261e; color: #fff; }
.customer-locked { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; border: 2px solid #b3261e; background: #fdecea; }
.customer-locked-text { flex: 1 1 20rem; font-size: 1.05rem; }
.customer-locked form { margin: 0; }
.customer-danger { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; align-items: flex-start; }
.customer-danger > form { margin: 0; }
.customer-lock { position: relative; text-align: left; }
.customer-lock > summary { list-style: none; cursor: pointer; }
.customer-lock > summary::-webkit-details-marker { display: none; }
.customer-lock-form { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 30; width: min(28rem, 90vw); margin: 0;
    box-shadow: 0 8px 24px rgb(var(--primary-rgb) / .18); }
.customer-lock-form textarea { width: 100%; }
.pick-locked { display: block; margin-top: .4rem; padding: .5rem .7rem; border: 2px solid #b3261e; background: #fdecea; color: #7a1610; border-radius: 6px; font-weight: 600; }

/* Spezielle Hinweise zum Kunden (immer sichtbar) */
.customer-note-card h2 label { font: inherit; color: inherit; margin: 0; display: inline; } /* Kasten wie die anderen Karten; nur das Eingabefeld – und nur mit Text – orange */
.customer-note-card h2 .muted { font-weight: 400; font-size: .9rem; }
.customer-note-card input[type=text] { width: 100%; }
.customer-note-card input[type=text]:not(:placeholder-shown) { background: #fff4e8; border-color: #f0b98f; } /* orange nur mit Text (seit 28.11.2026), leer = Standardfarbe */
.customer-note-card form { margin: 0; }
.customer-note-actions { display: flex; justify-content: flex-end; margin-top: .5rem; }
.customer-note-alert { margin: .6rem 0; padding: .7rem .9rem; background: #fff1e0; border: 3px solid var(--accent); border-radius: 8px; color: #4a2300; animation: customer-note-pop .35s ease-out; }
.customer-note-alert strong { color: #c2410c; display: block; margin-bottom: .2rem; }
@keyframes customer-note-pop { 0% { transform: scale(.96); opacity: 0; } 70% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }

/* Mein Tag: grüne (erledigte) Buttons bekommen einen Haken – erst wenn sie wirklich grün sind */
.myday-result-done[aria-pressed="true"]::before,
.myday-sign-btn[aria-pressed="true"]::before { content: '✓'; display: inline-block; margin-right: .4em; font-weight: 800; font-size: 1.15em; line-height: 1; }

/* Mein Tag: Hintergrund je Stand nur bei Tour-Stopps; Termine ohne Tour weiß (Stand am Streifen links) */
.myday-stop.st-planned { background: #eef4fb; }
.myday-stop.st-running { background: #fff3c4; }
.myday-stop.st-done { background: #e6f4e8; }
.myday-stop.st-followup { background: #fff3ea; }
.myday-stop.st-notmet { background: #e8f0fe; }
.myday-stop.st-cancelled { background: #fbe3e4; }

/* Mein Tag: Angaben eines Termins ohne Kunde */
.myday-info { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .6rem 0 0; font-size: .9rem; }
.myday-info dt { color: var(--muted, #6b7280); }
.myday-info dd { margin: 0; }
.badge-onlyappt { background: #e3e8ef; color: #334155; border: 1px solid #c5ced9; }
/* Mein Tag: Termine ohne Tour weiß (Grundregel .myday-entry) */

/* „Anmelden als“: roter Zurück-Button neben dem Logo */
.impersonate-back { margin: 0 .6rem; display: flex; align-items: center; }
.impersonate-back .btn { background: #c62828; border-color: #c62828; color: #fff; font-weight: 700; white-space: nowrap; }
.impersonate-back .btn:hover { background: #a91f1f; border-color: #a91f1f; color: #fff; }
td.actions .inline-form { display: inline; margin: 0; }

/* Mein Tag: Mähroboter, Beregnung und Fotos einheitlich – helles Grau, dünne Linie in Logo-Blau */
.myday-device, .myday-photos { background: #eef1f5; border: 1px solid var(--primary); }

/* Mein Tag: „Auftrag starten“ ohne Rahmen, volle Breite, etwas mehr Luft; Status/Abfahrt unten mit Rahmen in Logo-Blau */
.myday-visit.myday-visit-arrived { background: none; border: 0; padding: 1rem 0; }
.myday-result, .myday-visit.myday-visit-departed { border-color: var(--primary); }

/* Mein Tag: keine Linie über „Auftragsdetails“ (Abstand bleibt, etwas größer); Rahmen jedes Auftrags/Stopps in Logo-Blau */
.myday-details { border-top: 0; margin-top: .9rem; padding-top: 0; }
.myday-entry:is(.st-planned, .st-running), .myday-stop:is(.st-planned, .st-running) { border-top-color: var(--primary); border-right-color: var(--primary); border-bottom-color: var(--primary); } /* nur solange in Arbeit; abgeschlossen = grau; links bleibt der Stand-Streifen */
/* Mein Tag: „Hinweis vom Service“ als Kasten wie Mähroboter/Fotos – hellgrau, Linie in Logo-Blau, Eingabefeld weiß */
.myday-staffnote { background: #eef1f5; border: 1px solid var(--primary); border-radius: 10px; padding: .7rem; }
.myday-staffnote textarea { background: #fff; }
/* Mein Tag: Startzeit, Abfahrt und Status als Kasten wie alle Bereiche – hellgrau, dünne Linie in Logo-Blau */
.myday-visit.is-set, .myday-visit.myday-visit-arrived.is-set, .myday-result { background: #eef1f5; border: 1px solid var(--primary); padding: .6rem; }
.myday-visit.myday-visit-arrived.is-set { margin: 1rem 0; }

/* Mein Tag: EIN Abstand zwischen allen Bereichen und Button-Zeilen eines Auftrags (zum Anpassen nur diese Zahl ändern) */
.myday { --myday-gap: 14px; }
.myday .myday-entry :is(.customer-note-alert, .myday-actions, .myday-step, .myday-details, .myday-device, .myday-photos, .myday-staffnote, .myday-hide-btn, .myday-site) { margin-top: var(--myday-gap); margin-bottom: 0; }
.myday .myday-entry .myday-address { margin-bottom: 0; }
.myday .myday-entry .myday-site > .myday-address:first-child, .myday .myday-entry .myday-site { margin-top: var(--myday-gap); }
.myday .myday-entry .myday-details > summary { padding: 0; }
.myday .myday-entry .myday-visit-arrived:not(.is-set) { padding: 0; }

/* Mein Tag: ist einer von zwei Buttons gedrückt (grün + Haken), wird der andere mittelgrau */
.myday-result-row:has([aria-pressed="true"]) .myday-result-btn:not([aria-pressed="true"]),
.myday-sign:has([aria-pressed="true"]) .myday-sign-btn:not([aria-pressed="true"]) { background: #9aa3ad; border-color: #9aa3ad; color: #fff; }
.myday-result-open[aria-pressed="true"] { background: #1f6b30; border-color: #1f6b30; color: #fff; }
.myday-result-open[aria-pressed="true"]::before { content: '✓'; display: inline-block; margin-right: .4em; font-weight: 800; font-size: 1.15em; line-height: 1; }
/* Mein Tag: „Hinweis speichern“ näher am Eingabefeld (10 px statt 20 px) */
.myday .myday-entry .myday-staffnote > .myday-actions { margin-top: calc(10px - .4rem); }

/* Rechnung & Bank: Einstellungen, Fragen-Seiten */
.bill-save { position: sticky; bottom: 0; padding: .7rem 0; background: var(--bg, #eef2f7); z-index: 3; }
.bill-field .muted { display: block; font-weight: 400; margin-top: .2rem; }
.bq-summary p { margin: .2rem 0 .5rem; }
.bq-filter { display: flex; gap: .4rem; flex-wrap: wrap; }
.bq-filter .btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.bq-item { border: 1px solid var(--border); border-radius: 10px; padding: .8rem .9rem; margin: .8rem 0; background: #fff; }
.bq-item.is-open { border-left: 5px solid var(--accent); }
.bq-item.is-closed { border-left: 5px solid #2e9e5b; }
.bq-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.bq-head strong { font-size: 1.02rem; }
.bq-state { margin-left: auto; font-size: .85rem; color: var(--muted, #6b7280); }
.bq-why { margin: .5rem 0; line-height: 1.5; }
.bq-options { display: flex; flex-direction: column; gap: .3rem; margin: .4rem 0 .6rem; }
.bq-options .checkbox { font-weight: 400; }
.bq-fields { margin-top: .5rem; }
.bq-note { margin: .5rem 0 .3rem; font-size: .88rem; }
.badge.bq-setting { background: #e3eefb; color: var(--primary); }
.badge.bq-decide { background: #fff1e0; color: #a23b0a; }
.badge.bq-discuss { background: #fdecea; color: #b3261e; }
.badge.bq-info { background: #eef1f5; color: #475569; }
.badge.bq-who { background: #fff; border: 1px solid var(--border); color: #475569; }
.badge.bq-rec { background: #e6f4e8; color: #1f6b30; margin-left: .3rem; }

/* Angebote & Rechnungen */
.bill-filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.bill-filter input[type=search] { flex: 1 1 14rem; margin: 0; background: #fff; }
.bill-filter select { width: auto; margin: 0; }
.bill-filter input[type=search], .bill-filter select, .bill-filter .btn { height: 2.6rem; box-sizing: border-box; } /* eine Höhe */
.bill-filter .btn { display: inline-flex; align-items: center; }
.bill-kpis { display: flex; gap: 2rem; }
.bill-kpis div { display: flex; flex-direction: column; }
.bill-kpis strong { font-size: 1.4rem; color: var(--primary); }
.badge.bill-st-draft { background: #eef1f5; color: #334155; }
.badge.bill-st-sent, .badge.bill-st-final { background: #e3eefb; color: var(--primary); }
.badge.bill-st-accepted { background: #e6f4e8; color: #1f6b30; }
.badge.bill-st-declined, .badge.bill-st-cancelled, .badge.bill-st-expired, .badge.bill-st-replaced { background: #fbe3e4; color: #9b1c22; }
.badge.bill-overdue { background: #fdecea; color: #b3261e; }
.bill-items { display: flex; flex-direction: column; gap: .4rem; }
.bill-item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 5rem 4.5rem 6.5rem 4rem 6.5rem 2.2rem; gap: .4rem; align-items: start; }
.bill-item input, .bill-item select, .bill-item textarea { margin: 0; }
.bill-item-head { font-size: .78rem; color: var(--muted, #6b7280); font-weight: 600; }
.bill-item-text { display: flex; flex-direction: column; gap: .25rem; }
.bill-item-text textarea { font-size: .88rem; min-height: 2.1rem; }
.bill-item-total { text-align: right; padding-top: .55rem; font-weight: 600; white-space: nowrap; }
.bill-item[data-kind="text"] [data-bill-qty], .bill-item[data-kind="text"] [name$="[unit]"], .bill-item[data-kind="text"] [data-bill-price], .bill-item[data-kind="text"] [data-bill-tax] { visibility: hidden; }
.bill-item[data-kind="labor"] { background: #f6f9fd; border-radius: 8px; }
.bill-items-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .8rem; }
.bill-sum { margin-left: auto; }
.bill-action { display: block; margin: 0 0 1rem; }
.bill-action label { margin-bottom: .4rem; }
.bill-action > summary { list-style: none; display: inline-block; cursor: pointer; }
.bill-action > summary::-webkit-details-marker { display: none; }
.bill-action[open] > summary { margin-bottom: .5rem; }
.bill-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .6rem; }
.bill-pay .btn { grid-column: 1 / -1; justify-self: start; }
.bill-remind .checkbox { font-weight: 400; }
.bill-lines td.num { white-space: nowrap; }
.bill-lines tr.is-text td { font-style: italic; color: var(--muted, #6b7280); }
.bill-ref { padding: .6rem 1rem; }
.bill-order { font-weight: 400; margin-bottom: .5rem; }
.bill-log td { vertical-align: top; }
.bank-guide li { margin-bottom: .7rem; line-height: 1.5; }
.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
@media (max-width: 900px) {
    .bill-item { grid-template-columns: 1fr 1fr 1fr; }
    .bill-item-head { display: none; }
    .bill-item-text { grid-column: 1 / -1; }
}

/* Kundenseite: Winterservice per Klick umschalten (Farben wie die Labels ja/nein) */
.ws-toggle-form { display: inline; margin: 0; }
.ws-toggle { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .12rem .6rem .12rem .45rem; font: inherit; font-size: .8rem; font-weight: 600; line-height: 1.4; cursor: pointer; border: 1px solid transparent; }
.ws-toggle.is-on { background: #ebf8ee; color: #1f6b30; border-color: #b7e4c0; }
.ws-toggle.is-off { background: #fdeced; color: #9b1c22; border-color: #f0b8bc; }
.ws-toggle svg { transition: transform .35s ease; }
.ws-toggle:hover svg, .ws-toggle:focus-visible svg { transform: rotate(180deg); }
.ws-toggle.is-on:hover { border-color: #1f6b30; }
.ws-toggle.is-off:hover { border-color: #9b1c22; }
/* Mähroboter: Hersteller – Auswahl und bei „Andere“ das Namensfeld daneben */
.brand-pick { display: flex; gap: .5rem; }
.brand-pick select { flex: 0 0 11rem; }
.brand-pick input { flex: 1 1 auto; }

/* Bildschirmtastatur (PIN): Ziffernblock wie die Box-Eingabe, „ABC“ → Buchstaben; Smartphone volle Breite, Tablet/Desktop breites Fenster */
.osk-input { font-size: 1.8rem; text-align: center; letter-spacing: .15rem; font-weight: 700; }
.osk { display: grid; gap: .45rem; user-select: none; -webkit-user-select: none; }
.osk-row { display: flex; gap: .45rem; justify-content: center; }
.osk-key { flex: 1 1 0; min-width: 0; min-height: 4.2rem; border-radius: 12px; border: 2px solid var(--border); background: #f1f5f9; font: inherit; font-size: 1.8rem; font-weight: 700; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; padding: 0; }
.osk-key:active { background: #dbe3ea; }
.osk-fn { background: #e3e8ef; font-size: 1.2rem; }
.osk-abc, .osk-123 { color: var(--primary); }
.osk-shift.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
/* Buchstaben: 10 Tasten je Reihe; mittlere Reihe eingerückt, unten breite „123“ */
.osk-abc .osk-key { min-height: 3.6rem; font-size: 1.45rem; }
.osk-abc .osk-row:nth-child(3) { padding: 0 5%; }
.osk-abc .osk-shift, .osk-abc .osk-del { flex: 1.5 1 0; }
.osk-abc .osk-123 { flex: 0 0 40%; }
.numpad-modal.osk-wide .numpad-box { max-width: min(920px, 96vw); }
@media (max-width: 640px) {
    .osk, .osk-row { gap: .25rem; }
    .osk-abc .osk-key { min-height: 2.9rem; font-size: 1.1rem; border-radius: 8px; border-width: 1px; }
    .numpad-modal.osk-wide { padding-left: .25rem; padding-right: .25rem; }
    .numpad-modal.osk-wide .numpad-box { padding: .7rem .4rem; }
}
@media (min-width: 768px) {
    .osk-abc .osk-key { min-height: 4.4rem; font-size: 1.6rem; }
}
.svc-no-service { margin-left: .4rem; vertical-align: middle; }
/* Einstellungen → Mähroboter & Beregnung */
.devices-brands { max-width: 24rem; }
.devices-assign { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.devices-assign form { margin: 0; display: flex; gap: .3rem; align-items: center; }
.devices-other input { width: 9rem; margin: 0; padding: .3rem .5rem; }
.devices-row { scroll-margin-top: 30vh; } /* nach dem Zuordnen: nächste Zeile mittig statt ganz oben unter der Kopfzeile */
.devices-row:target td { animation: devices-flash 1.6s ease-out; }
@keyframes devices-flash { 0% { background: #fff1e0; } 100% { background: transparent; } }
/* Winterservice Schritte 2–5: großer Hinweis für Mäher ohne Service */
.svc-noservice-alert { display: flex; gap: 1.2rem; align-items: flex-start; margin: 0 0 1.4rem; padding: 1.4rem 1.5rem; border: 4px solid #c62828; border-radius: 14px; background: #fdecea; color: #7f1d1d; }
.svc-noservice-icon { flex: none; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: #c62828; color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 3.6rem; text-align: center; }
.svc-noservice-title { font-size: 2.2rem; font-weight: 800; letter-spacing: .04em; line-height: 1.1; color: #c62828; }
.svc-noservice-who { margin: .6rem 0 .5rem; font-size: 1.2rem; font-weight: 600; overflow-wrap: anywhere; }
.svc-noservice-who .svc-boxnr { margin-right: .4rem; }
.svc-noservice-alert p { margin: 0; font-size: 1.1rem; line-height: 1.45; }
@media (max-width: 600px) { .svc-noservice-alert { flex-direction: column; gap: .8rem; padding: 1.1rem; } .svc-noservice-title { font-size: 1.8rem; } }
/* Büro „Boxen“: Boxnummer ändern / löschen */
.svc-box-edit > summary { list-style: none; cursor: pointer; }
.svc-box-edit > summary::-webkit-details-marker { display: none; }
.svc-box-edit[open] { flex-basis: 100%; }
.svc-box-edit[open] > summary { background: var(--bg); }
.svc-box-edit-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem 1rem; margin-top: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.svc-box-edit-form { display: flex; align-items: flex-end; gap: .5rem; margin: 0; }
.svc-box-edit-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; color: var(--muted); }
.svc-box-edit-form input { width: 7rem; font-size: 1.1rem; }
.svc-box-edit-body .field-error { flex-basis: 100%; margin: 0; }
/* Neuer Tourenplan: Box „Inhalt des Tourenplans“ (optisch eigener Bereich, Schritt für Schritt) */
.plan-compose { margin: .4rem 0 .6rem; padding: 1.1rem 1.2rem 1.2rem; border: 2px solid var(--primary); border-left-width: 6px; border-radius: 12px; background: #f2f6fb; }
.plan-orders-head { display: flex; align-items: center; gap: .6rem; }
.plan-orders-head h2 { margin: 0; font-size: 1.15rem; color: var(--primary); }
.plan-orders-live { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.plan-orders-live::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: #fff; }
.plan-compose > .muted { margin: .5rem 0 .4rem; }
.plan-orders-all { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.plan-orders-all input { margin-top: .2rem; width: 1.15rem; height: 1.15rem; }
.plan-orders-all:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.plan-orders-search { display: block; }
.plan-orders-results { display: grid; gap: .4rem; margin-top: .5rem; max-height: 22rem; overflow: auto; }
.plan-orders-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.plan-orders-row.is-pending { background: #fff8ec; }
.plan-orders-text { min-width: 0; overflow-wrap: anywhere; }
.plan-orders-row .btn { flex: none; }
.plan-orders-warn { color: #a5560e; font-size: .9rem; }
.plan-orders-picked { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.plan-orders-picked ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.plan-orders-picked li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .5rem .7rem; border-radius: 8px; background: #fff; border: 1px solid var(--border); overflow-wrap: anywhere; }
@media (max-width: 600px) {
    .plan-compose { padding: .9rem .8rem 1rem; }
    .plan-step { padding-left: 0; }
    .plan-orders-row { flex-direction: column; align-items: stretch; }
    .plan-orders-row .btn { align-self: flex-start; }
}

.plan-compose-error { margin: .4rem 0; }
.plan-step { position: relative; margin-top: 1rem; padding: .9rem 0 0 0; border-top: 1px solid #d6e0ec; }
.plan-step-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.plan-step-nr { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: .95rem; flex: none; }
.plan-kinds { display: flex; flex-wrap: wrap; gap: .5rem; }
.plan-kind { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.plan-kind.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.plan-rests { display: grid; gap: .4rem; }
.plan-rest { display: flex; align-items: flex-start; gap: .6rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; overflow-wrap: anywhere; }
.plan-rest input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; flex: none; }
.plan-rest.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.plan-step-off { margin: 0; }
.plan-summary { margin-top: 1.1rem; padding: .8rem 1rem; border-radius: 8px; background: var(--primary); color: #fff; }
.plan-summary ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.plan-summary .plan-summary-empty { list-style: none; margin-left: -1.2rem; opacity: .8; }
.plan-compose [data-plan-orders-input] { background: #fff; }
/* Kalender: runde Buttons links/rechts halbtransparent über dem Kalender (PC) = Zeitraum zurück/vor; Handy: wischen */
.cal-stage { position: relative; }
.cal-flip { position: absolute; top: 50%; z-index: 6; width: 2.8rem; height: 2.8rem; margin-top: -1.4rem; border: 1px solid var(--border); border-radius: 50%;
    background: #fff; color: var(--primary); font-size: 1.7rem; line-height: 1; padding: 0 0 .2rem; cursor: pointer;
    box-shadow: 0 2px 8px rgb(var(--primary-rgb) / .25); opacity: .35; transition: opacity .15s, background .15s, color .15s; }
.cal-flip-prev { left: 3.6rem; } /* rechts neben der Uhrzeit-Spalte */
.cal-flip-next { right: .6rem; }
.cal-flip:hover, .cal-flip:focus-visible { opacity: 1; background: var(--primary); border-color: var(--primary); color: #fff; }
.cal-flip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 760px) {
    .cal-stage { display: block; }
    .cal-flip { display: none; }
    .cal-body { touch-action: pan-y pinch-zoom; }
    .cal-body.is-swipe-next { animation: cal-swipe-next .25s ease-out; }
    .cal-body.is-swipe-prev { animation: cal-swipe-prev .25s ease-out; }
    .cal-mcell.is-tap-day { cursor: pointer; }
    .cal-mcell.is-tap-day .cal-mev { pointer-events: none; }
}
@keyframes cal-swipe-next { from { transform: translateX(24px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes cal-swipe-prev { from { transform: translateX(-24px); opacity: .5; } to { transform: none; opacity: 1; } }
.cal-item-customer { color: inherit; text-decoration: none; }
.cal-item-customer:hover { color: var(--primary); text-decoration: underline; }
.page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.page-actions form { margin: 0; }
/* Neuer Tourenplan geführt: 1. Auswahlkarten, bei „Reste und andere Aufträge“ die Plus-Bausteine */
.plan-choices { display: grid; gap: .6rem; margin-top: .8rem; }
.plan-choice { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.plan-choice input { margin-top: .25rem; width: 1.2rem; height: 1.2rem; flex: none; }
.plan-choice-text { display: flex; flex-direction: column; gap: .2rem; }
.plan-choice-text strong { font-size: 1.05rem; color: var(--primary); }
.plan-choice-text span { color: var(--muted); font-size: .92rem; }
.plan-choice.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.plan-choice.active .plan-choice-text span { color: var(--text, #1f2937); }
.plan-extras { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #d6e0ec; display: grid; gap: .6rem; }
.plan-extras-intro { margin: 0; font-weight: 600; }
.plan-plus { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.plan-plus > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; cursor: pointer; font-weight: 600; color: var(--primary); }
.plan-plus > summary::-webkit-details-marker { display: none; }
.plan-plus-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.1rem; line-height: 1; flex: none; transition: transform .15s; }
.plan-plus[open] .plan-plus-ico { transform: rotate(45deg); }
.plan-plus-count { color: var(--accent); font-weight: 600; }
.plan-plus-body { padding: 0 1rem 1rem; }
.plan-plus .plan-orders-all { background: #f7f9fc; }
.plan-plus .plan-rest { background: #f7f9fc; }
.plan-plus .plan-orders-row, .plan-plus .plan-orders-picked li { background: #f7f9fc; }
/* Tour: „(alle erledigt · alle abgesagt)“ in der Spalte Ergebnis; Handy (Tabellenkopf aus) darüber */
.stop-bulk { font-weight: 400; font-size: .85rem; white-space: nowrap; }
.stop-bulk form { margin: 0; }
.stop-bulk-mobile { display: none; margin: .4rem 0 .6rem; font-weight: 600; }
@media (max-width: 760px) { .stop-bulk-mobile { display: block; } }
/* Auftrag löschen: Folgen anzeigen */
.delete-warnings { margin: 1rem 0; padding: .9rem 1.1rem; border: 2px solid var(--danger, #c62828); border-radius: 10px; background: #fdecea; color: #7f1d1d; }
.delete-warnings ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.delete-ok { padding: .7rem 1rem; border-radius: 8px; background: #eaf6ee; color: #1b5e20; }
.delete-infos { padding-left: 1.2rem; }
.delete-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.btn-solid-danger { background: var(--danger, #c62828); border-color: var(--danger, #c62828); color: #fff; }
.btn-solid-danger:hover { filter: brightness(.92); color: #fff; }

/* Seitenkopf: Löschen/Sperren oben rechts, gleich groß wie „Zur Liste“/„Bearbeiten“ */
.page-actions .btn-danger { background: #fff; }
.page-actions > form.inline, .page-actions > details { display: inline-block; margin: 0; }
/* Kundenseite: Preis direkt ändern (Lieferpreis, Preis Winterservice Beregnung) */
.price-edit { position: relative; display: inline-block; }
.price-edit > summary { list-style: none; cursor: pointer; }
.price-edit > summary::-webkit-details-marker { display: none; }
.price-edit > summary:hover { filter: brightness(.95); text-decoration: underline; }
.price-edit-form { position: absolute; left: 0; top: calc(100% + .35rem); z-index: 30; display: flex; flex-direction: column; gap: .5rem; width: 15rem;
    padding: .8rem; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgb(var(--primary-rgb) / .18); }
.price-edit-row { display: flex; align-items: center; gap: .4rem; margin-top: .25rem; white-space: nowrap; }
.price-edit-row input { width: 7rem; margin: 0; }
.ws-toggle { white-space: nowrap; }
/* Kundenseite: Geo-Hinweis direkt hinter der Adresse; Lieferpreis in der Box Mähroboter */
.site-title .site-geo { font-size: .75rem; font-weight: 600; vertical-align: middle; margin-left: .4rem; }
.device-box-bar { justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.device-box-info { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price-chip { cursor: pointer; }
span.price-chip { cursor: default; }
.price-edit > summary.price-chip:hover { filter: none; text-decoration: none; border-color: #1f6b30; }
/* Aufträge-Liste und „zur Rechnung vorbereiten“: 25 % breiter (1240 → 1550 px) */
.btn-billing { background: #fff; color: #1f6b30; border-color: #1f6b30; }
.btn-billing:hover { background: #1f6b30; color: #fff; }
.billing-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem 1rem; align-items: end; }
.billing-filter label { margin: 0; }
.billing-filter-actions { display: flex; gap: .5rem; }
.billing-card { padding: .4rem .8rem; }
.billing-table td { vertical-align: top; }
.billing-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.billing-lines > li { min-height: 1.9rem; display: flex; align-items: center; }
.billing-lines form { margin: 0; }
.billing-ready { white-space: nowrap; }
.billing-ready.is-ready { background: #ebf8ee; color: #1f6b30; border-color: #1f6b30; font-weight: 600; }
.billing-ready.is-ready:hover { background: #fdeced; color: #9b1c22; border-color: #9b1c22; }
.billing-table .price-edit-form { left: auto; right: 0; }
/* Tourenplan: Umschalter Touren | Tourenaufträge */
.plan-tabs { display: inline-flex; border: 1px solid var(--primary); border-radius: 8px; overflow: hidden; margin-bottom: 1rem; }
.plan-tab { padding: .45rem 1rem; font-weight: 600; color: var(--primary); text-decoration: none; background: #fff; }
.plan-tab + .plan-tab { border-left: 1px solid var(--primary); }
.plan-tab.active { background: var(--primary); color: #fff; }
.plan-new-sites { margin-bottom: 1.2rem; padding: .9rem 1rem; border: 2px solid var(--accent); border-radius: 10px; background: #fff7ef; }
.plan-new-sites h3 { margin: 0; color: #c2410c; }
.plan-new-sites .table { background: #fff; }
.plan-compose-add { margin-bottom: 1.2rem; }
.plan-compose-add > .btn-primary { margin-top: .9rem; }
.plan-orders-title { margin-top: .4rem; }
/* Tourenplan-Titel: Hinweis „in der SMS sichtbar“ und Ändern */
.sms-visible { color: #c62828; font-weight: 600; font-size: .85rem; }
.plan-title-edit { display: inline-block; position: relative; font-size: .9rem; font-weight: 400; vertical-align: middle; margin-left: .4rem; }
.plan-title-edit > summary { list-style: none; cursor: pointer; }
.plan-title-edit > summary::-webkit-details-marker { display: none; }
.plan-title-form { position: absolute; left: 0; top: calc(100% + .4rem); z-index: 30; width: min(30rem, 90vw); margin: 0; display: grid; gap: .6rem;
    box-shadow: 0 8px 24px rgb(var(--primary-rgb) / .18); }
.plan-title-form input { width: 100%; }
.dup-stop + .dup-stop { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--border); }
/* Einstellungen Mähroboter/Beregnung: Abstand Herstellerliste ↔ Speichern; Standardpreise */
.devices-brands-actions { margin-top: .8rem; }
.device-prices { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; align-items: flex-start; }
.device-prices > label { width: 12rem; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.device-price-label { min-height: 2.7em; line-height: 1.35; } /* immer zwei Zeilen → Felder auf einer Linie */
.device-prices .price-edit-row { margin-top: 0; }
.device-prices .price-edit-row input { width: 8rem; }
.device-prices-actions { flex-basis: 100%; }
/* Rechnung vorbereiten: je Aufgabe eine Unterzeile, Auftragsdaten links über alle Unterzeilen */
.billing-table .col-order { white-space: nowrap; }
.billing-table .col-when { min-width: 13.5rem; }
.billing-table .col-customer { max-width: 11rem; }
.billing-table .col-task { min-width: 15rem; }
.billing-table .col-dur { white-space: nowrap; }
.billing-table td { vertical-align: top; }
.billing-order { border-bottom: 2px solid var(--border); }
.billing-task:not(.is-first) td { border-top: 1px dashed var(--border); }
.billing-task td[rowspan] { border-right: 0; }
.billing-times { display: flex; gap: .5rem; }
.billing-times span { display: inline-flex; align-items: center; gap: .1rem; }
.billing-times svg { width: .85rem; height: .85rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) {
    .billing-table .col-customer, .billing-table .col-when, .billing-table .col-task { max-width: none; min-width: 0; }
    .billing-table tbody.billing-order { display: block; border: 1px solid var(--border); border-radius: 10px; margin-bottom: .8rem; background: #fff; }
    .billing-table tbody.billing-order tr { border: 0; margin: 0; border-radius: 0; }
    .billing-task:not(.is-first) { border-top: 1px dashed var(--border) !important; }
}
/* Listen: 1., 3., 5. … Zeile mit ganz leichtem blaugrauem Schleier (3 %) – als Hintergrund-Überlagerung, damit auch farbige
   Zeilen abgetönt werden und Markierungen per Schatten (z. B. roter Strich „Folgetermin nötig“) erhalten bleiben */
.table-zebra { --zebra: linear-gradient(rgb(var(--primary-rgb) / .03), rgb(var(--primary-rgb) / .03)); }
.table-zebra > tbody > tr:nth-child(odd) > td { background-image: var(--zebra); }
/* Rechnung vorbereiten: ein tbody je Auftrag → ganzer Auftrag gestreift */
.table-zebra.billing-table > tbody > tr > td { background-image: none; }
.table-zebra.billing-table > tbody.billing-order:nth-of-type(odd) > tr > td { background-image: var(--zebra); }
@media (max-width: 760px) {
    .table-zebra > tbody > tr:nth-child(odd) > td { background-image: none; }
    .table-zebra > tbody > tr:nth-child(odd) { background-image: var(--zebra); }
    .table-zebra.billing-table > tbody.billing-order:nth-of-type(odd) > tr > td { background-image: none; }
    .table-zebra.billing-table > tbody.billing-order:nth-of-type(odd) { background-image: var(--zebra); }
}
}
.site-transfer-info { margin: 1rem 0; padding: .9rem 1.1rem; border: 1px solid #b9cde4; border-left: 5px solid var(--primary); border-radius: 10px; background: #f2f6fb; }
.site-transfer-info ul { margin: .4rem 0; padding-left: 1.2rem; }
.cal-item-tourplan { margin-top: .25rem; color: #6b3fa0; font-weight: 600; }
.cal-item-tourplan .muted { font-weight: 400; }
.appointment-order-note { margin: 0 0 1rem; padding: .7rem 1rem; border: 1px solid #b9cde4; border-left: 5px solid var(--primary); border-radius: 8px; background: #f2f6fb; }
/* Auftrag → Termine: Zeit und Mitarbeiter direkt im Auftrag */
.order-appts { display: grid; gap: .6rem; margin-bottom: .8rem; }
.order-appt { padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; scroll-margin-top: 30vh; }
.order-appt:target { box-shadow: 0 0 0 2px var(--primary); }
.order-appt.is-past { background: #f7f9fc; }
.order-appt-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.order-appt-staff { display: inline-flex; gap: .2rem; }
.order-appt-edit { margin-top: .5rem; }
.order-appt-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
.order-appt-edit > summary::-webkit-details-marker { display: none; }
.order-appt-form { margin-top: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: 8px; background: #f7f9fc; display: grid; gap: .7rem; }
.order-appt-grid { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; }
.order-appt-grid label { margin: 0; }
.order-appt-users { display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.order-appt-users .staff-choice { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-weight: 400; }
.order-appt-delete { margin-top: .5rem; }
.order-appt-status select { width: auto; min-width: 11rem; padding-top: .3rem; padding-bottom: .3rem; }
.order-appt-form > .btn { justify-self: start; }
/* Neuer Termin/Auftrag: Speichern unter allen Boxen (gilt fürs ganze Formular) */
.appt-form-actions { margin: .4rem 0 1.5rem; padding: 1rem 0 0; border-top: 2px solid var(--border); }
.appt-form-actions .btn-primary { padding: .7rem 1.6rem; font-size: 1.05rem; }
.order-appt.is-current { box-shadow: 0 0 0 2px var(--primary); }
/* Aufgabe ohne Dauer: prognostizierte Dauer je Auftrag/Termin */
.task-minutes { display: flex; align-items: center; gap: .3rem; margin-top: .3rem; font-size: .85rem; font-weight: 400; color: var(--muted); }
.task-minutes[hidden] { display: none; }
.task-minutes input, .task-minutes select { width: 3.6rem; margin: 0; padding: .2rem .35rem; font-size: .9rem; color: var(--ink); background: #fff; }
.task-minutes select { width: auto; }

/* Auftrag: Textfelder so hoch wie der Inhalt (JS order-form.js) */
textarea.auto-grow { resize: none; overflow: hidden; min-height: 0; }

/* Mähroboter/Beregnung: „Hinweise / Standort / Position“ rot (Mein Tag, Service) */
.device-note { color: #c62828; font-weight: 600; }

/* Tourenplan: Stand der Stopps hinter der Anzahl */
.stop-states { color: var(--muted); white-space: normal; }
.stop-state-erledigt { color: #2f7d32; font-weight: 600; }
.stop-state-abgesagt { color: #c62828; font-weight: 600; }
.stop-state-nicht-angetroffen, .stop-state-noch-offen-folgetermin { color: #b45309; font-weight: 600; }

/* Einstellungen → Mähroboter: Zurückbringen nach Entfernung */
.return-zones .zone-km { display: inline-block; width: 3.6rem; margin: 0 .2rem; padding: .2rem .35rem; }
.return-distances { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border); }
.return-distances form { margin: .4rem 0; }

/* Tourenplan: „offen“ wie mit Neon-Textmarker angestrichen */
.stop-state-offen { background: #faff00; color: #1f2a36; font-weight: 700; padding: 0 .25em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.return-zones-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.return-zones-right h3 { margin-top: 0; }
.return-zones-list { max-height: 26rem; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.return-zones-list table { margin: 0; }
.return-zones-list thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
@media (max-width: 900px) { .return-zones-cols { grid-template-columns: 1fr; } }
.return-zones .device-prices { gap: .8rem 1rem; }
.return-zones .device-prices > label { width: 10.5rem; }
.return-zones-left h2, .return-zones-right h3 { margin-top: 0; }
.return-zones .device-price-label { white-space: nowrap; }
.return-zones .zone-km { width: 3rem; }
.return-zones .device-prices .price-edit-row input { width: 7rem; }

/* Mein Tag: „automatisch gestartet“ (GPS) im Kasten der Startzeit */
.myday-auto-note { display: block; color: var(--muted); font-weight: 500; margin-top: -.15rem; }

/* Mein Konto → Standort */
.badge-danger { background: #fde8e8; color: #b42318; }
.account-location h2 .badge { vertical-align: middle; margin-left: .4rem; }
.account-location-help { margin-top: 1rem; padding: .8rem 1rem; background: #fff6e0; border-radius: 8px; }
.account-location-help ol { margin: .4rem 0 .6rem 1.2rem; padding: 0; }
.account-location-help summary { font-weight: 700; cursor: pointer; }

/* Mein Tag: roter Balken „GPS freigeben“ ganz oben */
.myday-gps-bar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 0 0 .8rem; padding: .7rem .9rem;
    background: #c62828; color: #fff; border-radius: 10px; font-weight: 700; }
.myday-gps-bar span { flex: 1 1 14rem; }
.myday-gps-bar .btn { background: #fff; color: #c62828; border-color: #fff; font-weight: 800; }

/* ── Winterservice-Seite für Kunden (öffentlich, Handy + PC) ── */
.ws-page { max-width: 860px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.ws-card { margin: 0 0 1rem; }
.ws-status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 0 0 1rem; font-size: 1.05rem; }
.ws-badge { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .88rem; font-weight: 600; background: #eef2f7; }
.ws-badge-ok { background: #e6f4e8; color: #1e6b2e; }
.ws-badge-warn { background: #fff4e0; color: #7a4b00; }
.ws-badge-closed { background: #fde8e8; color: #b42318; }
.ws-mod { margin: 0 0 1rem; padding: 1.1rem 1.3rem; border-radius: 12px; line-height: 1.55; }
.ws-mod-box { background: #fff; border: 1px solid var(--border); }
.ws-mod-transparent { padding-left: .2rem; padding-right: .2rem; }
.ws-mod-accent { background: var(--accent); color: #fff; }
.ws-mod-primary { background: var(--primary); color: #fff; }
.ws-mod-accent :is(h1, h2, h3, a, strong), .ws-mod-primary :is(h1, h2, h3, a, strong) { color: #fff; }
.ws-mod h2 { margin-top: 0; font-size: 1.25rem; }
.ws-mod ul { padding-left: 1.2rem; }
.ws-mod img { max-width: 100%; height: auto; border-radius: 8px; }
.ws-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ws-site { font-size: 1.1rem; margin: 0 0 .6rem; }
.ws-device { border: 1px solid var(--border); border-radius: 10px; padding: .8rem .9rem; margin: 0 0 .7rem; background: #fbfcfe; }
.ws-switch, .ws-check { display: flex; gap: .6rem; align-items: flex-start; margin: 0; cursor: pointer; }
.ws-switch input[type=checkbox], .ws-check input { width: 1.4rem; height: 1.4rem; flex: 0 0 auto; margin-top: .1rem; }
.ws-device:has(.ws-on:not(:checked)) .ws-sub { display: none; }
.ws-sub { margin: .7rem 0 0 2rem; display: grid; gap: .7rem; }
.ws-choice { display: grid; gap: .3rem; }
.ws-choice label { display: flex; gap: .55rem; align-items: flex-start; margin: 0; font-weight: 500; }
.ws-choice label > span { flex: 1; display: flex; flex-wrap: wrap; gap: 0 .6rem; }
.ws-choice input { width: 1.2rem; height: 1.2rem; margin: .15rem 0 0; flex: 0 0 auto; }
.ws-q { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.ws-price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.ws-switch > span { flex: 1; }
.ws-note { display: block; font-weight: 600; margin: 0; }
.ws-note textarea { margin-top: .3rem; }
.ws-insurance { margin-top: .8rem; padding: .7rem .8rem; background: rgba(255, 255, 255, .15); border-radius: 8px; }
.ws-mod-box .ws-insurance { background: #f2f6fb; }
.ws-cost-table { width: 100%; border-collapse: collapse; }
.ws-cost-table td { padding: .45rem .2rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.ws-cost-table .num { text-align: right; white-space: nowrap; padding-left: 1rem; }
.ws-cost-sum td { font-weight: 700; border-top: 2px solid var(--ink); }
.ws-cost-total td { font-weight: 800; font-size: 1.1rem; border-bottom: 0; }
.ws-submit { display: grid; gap: .8rem; }
.ws-submit .btn { justify-self: start; font-size: 1.05rem; padding: .8rem 1.4rem; }
.ws-footer { text-align: center; font-size: .9rem; margin-top: 1.5rem; line-height: 1.8; }
.ws-text h2 { font-size: 1.15rem; margin-top: 1.4rem; }
@media (max-width: 600px) {
    .ws-page { padding: .6rem .6rem 2rem; }
    .ws-sub { margin-left: 0; }
    .ws-price { margin-left: 0; flex-basis: 100%; }
    .ws-submit .btn { justify-self: stretch; }
}

/* Winterservice-Seite: Vorschau */
.ws-preview-bar { margin: 0 0 1rem; padding: .7rem .9rem; background: #fff4e0; border: 2px dashed #e8a317; border-radius: 10px; color: #4a3200; }
.ws-preview-bar a { margin-left: .4rem; }
.ws-preview-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem 1rem; align-items: end; }
.ws-preview-form label { margin: 0; }
.ws-preview-actions { grid-column: 1 / -1; }

/* WhatsApp-Erinnerungen */
.badge-wa { background: #dcf8c6; color: #075e54; }

/* Mein Konto: weiteres Gerät per QR-Code */
.device-qr { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.device-qr svg { width: 220px; height: 220px; flex: 0 0 auto; background: #fff; padding: 6px; border-radius: 8px; }
.device-qr > div { flex: 1 1 14rem; }
/* Passwort und „Weiteres Gerät anmelden“ gleich hoch (Mein Konto, Mitarbeiter-Seite) */
.account-access { align-items: stretch; }
.account-access > .card { margin-bottom: 0; }
.account-access > div:not(.card) { display: flex; flex-direction: column; gap: 1.2rem; }
.account-access > div:not(.card) > .card { margin-bottom: 0; }
.account-access > div:not(.card) > .card:last-child { flex: 1; }
.myday-gps-bar .myday-gps-more { flex-basis: 100%; color: #fff; font-weight: 500; font-size: .9rem; text-decoration: underline; }
.account-location-iphone { margin-top: 1rem; padding: .7rem .9rem; background: #f2f6fb; border-radius: 8px; }
.account-location-iphone summary { cursor: pointer; }
.account-location-iphone ol { margin: .4rem 0 .6rem 1.2rem; padding: 0; }

/* Service: Beenden groß oben, Abbruch bei falscher Box */
.svc-actions-top { margin: .8rem 0; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: .6rem; }
.svc-actions-top form, .svc-actions-top .svc-btn { width: 100%; }
.svc-btn-end { font-size: 1.35rem; min-height: 4.2rem; }
.svc-btn-cancel { background: #fff; color: #c62828; border: 2px solid #c62828; }
@media (max-width: 700px) { .svc-actions-top { grid-template-columns: 1fr 1fr; } .svc-actions-top form:first-child { grid-column: 1 / -1; } }

/* Service-Schritt: Nummer + Titel links, Zurück-Button rechts in derselben Zeile */
.svc-step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.svc-step-head .svc-h1 { flex: 1 1 auto; min-width: 0; }
.svc-head-actions { flex: none; display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.svc-step-head .svc-btn.svc-back { flex: none; margin: .2rem 0 0; }
@media (max-width: 640px) { .svc-step-head { flex-wrap: wrap-reverse; } .svc-head-actions { margin-left: auto; } }
.tour-below + .tour-layout { margin-top: 1rem; margin-bottom: 1rem; } /* Karte unten (ab „gesetzt“) */
/* Service-Schritt mit Box: ab Tablet Kunde/Mäher und Arbeitslauf nebeneinander (je ca. 50 %) */
@media (min-width: 761px) {
    .svc-box-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; align-items: start; }
    .svc-box-split > .svc-card { margin-bottom: 0; }
    .svc-box-split .svc-actions-top { grid-template-columns: 1fr 1fr; }
    .svc-box-split .svc-actions-top > :first-child { grid-column: 1 / -1; }
}
/* Bestätigung als Overlay (Service): oben mittig über dem Inhalt, verschwindet nach 4 Sek. */
.flash.flash-toast { position: fixed; top: 5rem; left: 50%; transform: translateX(-50%); z-index: 1200; margin: 0; width: max-content;
    max-width: min(92vw, 640px); box-shadow: 0 8px 28px rgba(0, 0, 0, .22); font-size: 1.15rem; font-weight: 600; cursor: pointer;
    transition: opacity .4s ease; }
.flash.flash-toast.is-hiding { opacity: 0; }
.flash-toast-lead { display: block; margin-bottom: .2rem; }
.flash-toast-note { display: block; font-size: .92rem; font-weight: 500; margin-top: .25rem; }
/* Boxen: Filter */
.svc-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 .8rem; }
.svc-check { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.svc-check input { width: 1.4rem; height: 1.4rem; }
#box-search { flex-wrap: wrap; align-items: center; }
#box-search input[type="search"] { flex: 1 1 0; min-width: 0; } /* Suchfeld und „Suchen“ immer in einer Zeile */
@media (max-width: 760px) { #box-search .svc-check { flex-basis: 100%; } } /* Handy: Checkbox darunter */
#box-search .svc-check input[type="checkbox"] { flex: none; width: 1.4rem; height: 1.4rem; min-height: 0; padding: 0; margin: 0; }
#box-search .svc-check { align-self: center; }
.svc-box-empty .svc-customer { color: var(--muted); }
.svc-actions-top + .svc-material { margin-top: 0; } .svc-actions-top + .svc-material + .svc-task-list { margin-top: 30px; } /* Abstand zum Material-Button */
.svc-task-list { list-style: decimal; margin: 30px 0 0; padding-left: 1.4em; font-size: 1.45rem; line-height: 1.35; } /* drei Stufen größer als der Text (1,15 rem) */
/* Material-Auswahl: breites Fenster, drei Spalten (2 : 2 : 1) */
.svc-mat-box { max-width: min(1240px, 96vw); width: 100%; }
.svc-mat-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.svc-mat-col { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.svc-mat-col-title { font-weight: 700; color: var(--muted); font-size: 1rem; }
.svc-mat-cols .svc-mat-list { max-height: 55vh; }
.svc-mat-path { display: flex; align-items: center; gap: .5rem; font-weight: 600; min-height: 3.2rem; }
.svc-mat-path .svc-mat-up { min-height: 3rem; padding: .3rem .9rem; }
.svc-mat-folder { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .7rem .8rem; border: 2px solid var(--border); border-radius: 10px;
    background: #f4f7fb; font-size: 1.1rem; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); }
.svc-mat-folder:hover { border-color: var(--primary); }
.svc-mat-chosen { padding: .7rem .8rem; border: 2px dashed var(--border); border-radius: 10px; color: var(--muted); }
.svc-mat-chosen.is-set { border-style: solid; border-color: var(--primary); color: var(--ink); font-weight: 700; background: #e8f0fb; }
.svc-mat-side .svc-btn { width: 100%; }
@media (max-width: 760px) { .svc-mat-cols { grid-template-columns: 1fr; } .svc-mat-cols .svc-mat-list { max-height: 30vh; } }
.svc-mat-side .svc-qty { display: grid; grid-template-columns: calc(3.2rem + 10px) minmax(0, 1fr) calc(3.2rem + 10px); gap: .4rem; align-items: stretch; }
/* − / Menge / + exakt gleich hoch */
.svc-mat-side .svc-qty .numpad-key, .svc-mat-side .svc-qty input { height: 3.6rem; min-height: 0; margin: 0; box-sizing: border-box; }
.svc-mat-side .svc-qty .numpad-key { padding: 0; }
.svc-mat-side .svc-qty input { width: 100%; min-width: 0; text-align: center; font-size: 1.5rem; font-weight: 700; padding: .2rem; }
/* Material-Fenster: 100 px weiter unten, ca. 30 % höher (feste Listenhöhe); Häufigkeit, Vorschaubild */
.svc-mat-modal { padding-top: calc(1rem + 100px); }
.svc-mat-cols .svc-mat-list { height: clamp(14rem, 52vh, 42rem); max-height: none; align-content: start; }
.svc-mat-option .svc-mat-name { flex: 1; min-width: 0; }
.svc-mat-thumb { flex: none; margin-left: auto; line-height: 0; }
.svc-mat-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
@media (max-width: 760px) { .svc-mat-modal { padding-top: 1rem; } .svc-mat-cols .svc-mat-list { height: auto; max-height: 30vh; } }
/* Material-Fenster: Suchfeld und Ebenenanzeige gleich hoch, gleicher Abstand zum ersten Material (Spalten 1 und 2) */
.svc-mat-cols .svc-mat-search, .svc-mat-cols .svc-mat-path { height: 3.4rem; min-height: 0; box-sizing: border-box; margin: 0; }
.svc-mat-level { display: flex; flex-direction: column; gap: .6rem; }
.svc-mat-level[hidden] { display: none; }
.svc-mat-path .svc-mat-up { height: 3.4rem; min-height: 0; }
.svc-mat-path > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.svc-mat-where { display: block; color: var(--muted); font-size: .9rem; font-weight: 400; margin-top: .1rem; } /* Ebene als 2. Zeile (Suche) */
.svc-mat-have { display: inline-flex; align-items: center; border-radius: 999px; padding: .12rem .6rem; font-size: .85rem; font-weight: 700; line-height: 1.4;
    background: #ebf8ee; color: #1f6b30; border: 1px solid #b7e4c0; margin-right: .4rem; white-space: nowrap; vertical-align: middle; } /* schon zugeordnet – Stil wie Winterservice „ja“ */
/* Winterservice: farbiges Bild je Schritt rechts in der Kachel (doppelt so groß wie die runde Nummer: 4,8 rem) */
.svc-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.svc-step-icon { flex: none; width: 4.8rem; height: 4.8rem; margin: -10px -10px 0 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; } /* 10 px höher und weiter rechts */
.svc-step-icon svg { width: 3.8rem; height: 3.8rem; display: block; }
.svc-step-icon-1 { background: #fff4e6; } .svc-step-icon-2 { background: #e8f0fe; } .svc-step-icon-3 { background: #e6fbf7; } .svc-step-icon-4 { background: #e7f9fd; }
.svc-step-icon-5 { background: #f3effe; } .svc-step-icon-6 { background: #eafbf0; } .svc-step-icon-7 { background: #fdeee7; } .svc-step-icon-8 { background: #e8eef7; }
.svc-page-head { align-items: center; flex-wrap: wrap; gap: .8rem; }
.svc-page-head .svc-head-actions { flex: 0 1 auto; min-width: 0; } /* darf schrumpfen → Buttons brechen um (Smartphone) */
.svc-page-head .svc-head-actions .svc-btn { margin: 0; }

/* Zeiterfassung im Header: grün „Einstempeln“, Beginn + laufende Zeit, orange „Ausstempeln“ (Logo-Orange) */
.tc { margin: 0 auto; display: flex; align-items: center; gap: .6rem; } /* mittig zwischen Logo und Menü */
.tc ~ nav, .tc ~ .nav-toggle { margin-left: 0; }
.tc form { margin: 0; }
.tc-btn { border: 0; border-radius: 8px; padding: .45rem .9rem; font: inherit; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap; }
.tc-in { background: #2e9e5b; }
.tc-in:hover { background: #258a4e; }
.tc-out { background: var(--accent); }
.tc-out:hover { background: #cf4515; }
.tc-btn:disabled { opacity: .75; cursor: wait; }
.tc-time { color: #fff; white-space: nowrap; display: inline-flex; gap: .35rem; align-items: baseline; }
.tc-time:hover { color: #fff; text-decoration: none; }
.tc-since { color: #c9d6e6; font-size: .9rem; }
.tc-notice { border: 0; border-radius: 12px; padding: 1.2rem 1.4rem; max-width: 420px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.tc-notice::backdrop { background: rgba(0, 20, 50, .45); }
.tc-notice p { margin: 0 0 .6rem; }
.tc-notice-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
@media (max-width: 760px) {
    .time-week tr.is-off td:not(.cell-title):not([data-label="Ein – Aus"]) { display: none; } /* freie Tage: nur Tag und „–“ */
    .table-cards.time-week tr.is-flagged, .table-cards.time-month tr.is-flagged { border-left: 4px solid #c62828; }
    .table-cards.time-month tr.is-today { border-left: 4px solid var(--primary); }
    .table-cards td.is-blank { display: none; } /* Handy: leere Zeilen (z. B. kein Soll, kein Hinweis) ausblenden */
    .table-cards.time-week tr td:first-child, .table-cards.time-month tr td:first-child,
    .table-cards.time-week tr.is-flagged td:first-child, .table-cards.time-month tr.is-flagged td:first-child,
    .table-cards.time-month tr.is-today td:first-child { box-shadow: none; } /* Handy: Rand an der Karte statt Strich durch den Text */
    .time-month tr.is-off td:not(.cell-title):not([data-label="Ein – Aus"]) { display: none; } /* freie Tage: nur Tag und „–“ */
    .topbar:has(.tc) { gap: .5rem; }
    .tc-time { font-size: .95rem; }
    .tc-btn { font-size: .95rem; }
    .tc { gap: .4rem; }
    .tc-since { display: none; }
    .tc-btn { padding: .4rem .6rem; }
    .tc-unit { display: none; }
}

/* Zeiterfassung: Woche, Summen, Standorte, Karte */
.time-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.time-sums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.time-sums > div { display: flex; flex-direction: column; gap: .15rem; background: #f4f7fb; border-radius: 10px; padding: .7rem .9rem; }
.time-sums strong { font-size: 1.5rem; }
@media (max-width: 760px) { .time-sums { grid-template-columns: 1fr 1fr; } }
.time-block { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .35rem; }
.time-block:last-child { margin-bottom: 0; }
.time-geo { font-size: .82rem; color: var(--muted); }
.time-geo.is-flag { color: #c62828; font-weight: 600; }
.time-week tr.is-flagged td:first-child { box-shadow: inset 4px 0 0 #c62828; }
.time-info { background: #fff7e6; border-left: 4px solid var(--accent); padding: .6rem .8rem; border-radius: 6px; }
.time-map { height: 380px; border-radius: 10px; margin: .6rem 0; }
.time-legend { display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; }
.tl-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; margin-right: .2rem; border: 2px solid #fff; box-shadow: 0 0 0 1px #ccd; }
.tl-in { background: #2e9e5b; } .tl-out { background: var(--accent); } .tl-depot { background: var(--primary); }
.tl-far { background: #fff; border-color: #c62828; box-shadow: none; border-width: 3px; }

/* Zeiterfassung (Einstellungen): Reiter Heute · Monatsübersicht · Wer stempelt */
.time-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin: 0 0 1rem; border-bottom: 2px solid var(--border); }
.time-tabs a { padding: .5rem .9rem; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.time-tabs a.active { color: var(--primary); border-bottom-color: var(--accent); }
.time-tabs a:hover { text-decoration: none; color: var(--primary); }
.time-who-actions { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.time-who-actions form { margin: 0 !important; }

/* Zeiterfassung: Ein-/Ausstempel-Zeit mit Standortnadel (grün innerhalb, rot außerhalb des Umkreises, grau ohne Standort) */
.tstamp { display: inline-flex; align-items: center; gap: .15rem; white-space: nowrap; }
.tstamp-pin { flex: none; fill: #94a3b8; }
.tstamp-ok .tstamp-pin { fill: #2e9e5b; }
.tstamp-far .tstamp-pin { fill: #c62828; }
.tstamp a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.tstamp-far a { color: #c62828; }
.time-howto { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 4px solid var(--primary); }
.time-howto p { margin: .2rem 0 0; max-width: 820px; }
.company-map { height: 380px; border-radius: 10px; margin: .6rem 0; }

/* Material-Auswahl: Hinweis am Material, Explosionszeichnung (Baugruppe) mit anklickbaren Positionen */
.svc-mat-note { display: block; font-size: .85rem; color: #8a5a00; }
.svc-mat-drawing-btn { display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left; padding: .5rem .7rem; margin-bottom: .4rem;
    border: 2px solid var(--accent); border-radius: 10px; background: #fff7f2; cursor: pointer; font: inherit; color: var(--ink); }
.svc-mat-drawing-btn img { width: 64px; height: 48px; object-fit: contain; background: #fff; border-radius: 6px; flex: none; }
.svc-mat-drawing-btn span { display: flex; flex-direction: column; }
.svc-draw { position: fixed; inset: 0; z-index: 1300; background: #fff; display: flex; flex-direction: column; }
.svc-draw[hidden] { display: none; }
.svc-draw-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-bottom: 1px solid var(--border); }
.svc-draw-head strong { flex: 1; font-size: 1.15rem; }
.svc-draw-zoom { display: flex; gap: .3rem; }
.svc-draw-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
/* Zeichnung zunächst ganz auf dem Bildschirm (Breite UND Höhe, auch hochkant – Kress), „+“ vergrößert (--zoom); --ratio = Breite/Höhe */
.svc-draw-canvas { position: relative; margin: 0 auto; width: calc(min(100%, calc(var(--avail-h, calc(100vh - 6rem)) * var(--ratio, 100))) * var(--zoom, 1)); }
.svc-draw-canvas img { display: block; width: 100%; height: auto; user-select: none; }
.svc-draw-spot { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; padding: 0; cursor: pointer;
    border: 3px solid rgb(var(--accent-rgb) / .85); background: transparent; } /* nur Ring – die Positionsnummer bleibt lesbar */
.svc-draw-spot:hover, .svc-draw-spot:focus { background: rgb(var(--accent-rgb) / .35); outline: none; }
.svc-draw-choice { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); width: min(560px, 92vw); background: #fff;
    border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); padding: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.svc-draw-choice[hidden] { display: none; }
.svc-draw-choice-title { font-weight: 700; }
.svc-draw-variant { text-align: left; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; padding: .55rem .7rem; cursor: pointer;
    display: flex; flex-direction: column; gap: .15rem; font: inherit; }
.svc-draw-variant span { font-size: .88rem; color: var(--muted); }

/* Material-Übersicht: Ebene wählen (Pfad, Unterordner, Explosionszeichnung) wie in der Werkstatt */
.material-path { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 1.05rem; margin-bottom: .7rem; }
.material-path a.is-current { font-weight: 700; color: var(--ink); }
.material-folders { display: flex; flex-direction: column; gap: .4rem; } /* je Ordner eine Zeile */
.material-folder-end { display: inline-flex; align-items: center; gap: .6rem; }
.material-folder { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem .9rem; border: 1px solid var(--border);
    border-radius: 10px; background: #f8fafc; color: var(--ink); font-weight: 600; }
.material-folder:hover { text-decoration: none; border-color: var(--primary); background: #eef3f9; }
.material-drawing-btn { margin-bottom: 0; grid-column: 1 / -1; }
a.svc-draw-variant { color: var(--ink); text-decoration: none; }
a.svc-draw-variant:hover { border-color: var(--primary); }
.svc-mat-line-text { display: flex; flex-direction: column; gap: .1rem; }
.parts-brand { margin: 1.4rem 0 .5rem; color: var(--primary); }
.material-drawings { display: flex; flex-direction: column; gap: .4rem; margin-top: .4rem; }
.svc-draw-spot.is-mine { background: rgba(46, 158, 91, .35); border-color: #2e9e5b; box-shadow: 0 0 0 4px rgba(46, 158, 91, .35); animation: spot-pulse 1.4s ease-in-out 3; }
@keyframes spot-pulse { 50% { box-shadow: 0 0 0 10px rgba(46, 158, 91, .15); } }

/* Tour: Kunden-Erinnerungen an/aus (Schalter) */
.tour-notify-form { margin: 0 0 .5rem; }
.notify-switch { display: inline-flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .25rem 0; font: inherit; font-weight: 600; color: #7a5800; cursor: pointer; }
.notify-switch.is-on { color: #1b6e3a; }
.notify-switch-track { position: relative; width: 46px; height: 26px; border-radius: 13px; background: #c9ced6; transition: background .15s; flex: none; }
.notify-switch.is-on .notify-switch-track { background: #2e9d57; }
.notify-switch-knob { 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: left .15s; }
.notify-switch.is-on .notify-switch-knob { left: 23px; }
.notify-switch:focus-visible .notify-switch-track { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Auftragsliste: Löschen unter „Öffnen“, leicht rötlich; nach dem ersten Klick „Wirklich löschen?“ (kräftig rot) */
.orders-table tr[id] { scroll-margin-top: 90px; } /* Sprung nach dem Löschen: nicht unter der Kopfzeile */
.table td.order-actions form.order-delete { display: block; margin: .35rem 0 0; }
.btn-soft-danger { white-space: nowrap; background: #fdf0ee; color: #b4372a; border-color: #f2c9c3; }
.btn-soft-danger:hover { background: #fbe3df; border-color: #e7a59b; }
.btn-soft-danger.is-armed { background: var(--danger); color: #fff; border-color: var(--danger); }

.text-ok { color: #1f6b30; font-weight: 600; } /* z. B. Tour-Stopp: Auftrag bereits erledigt */

/* Mein Konto → GPS testen: Ergebnis */
.gps-result { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: .4rem 0 1rem; padding: .7rem .9rem;
    background: #ebf8ee; border-radius: 8px; }
.gps-result dt { font-weight: 600; color: var(--muted); }
.gps-result dd { margin: 0; }
.gps-result[hidden] { display: none; }

/* Kundenseite: Service-Zeile unter Mähroboter/Beregnung (volle Breite, kleinere Schrift) */
.table tr:has(+ .device-service-row) > td { border-bottom: 0; }
.table .device-service-row > td { padding-top: 0; font-size: .85rem; }
.device-service { display: flex; flex-direction: column; gap: .25rem; padding: .35rem .6rem; border-left: 3px solid var(--border);
    background: #f7f9fc; border-radius: 0 6px 6px 0; }
.device-service-line { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; }
.device-service-line .badge { font-size: .75rem; }
.device-service-date { font-weight: 600; }
.svc-progress { display: inline-flex; gap: .2rem; }
.svc-progress-step { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 50%;
    font-size: .72rem; font-weight: 700; background: #eef1f5; color: var(--muted); border: 1px solid #d5dbe3; }
.svc-progress-step.is-done { background: #2e9d57; border-color: #2e9d57; color: #fff; }
.svc-progress-step.is-running { background: #fff6e0; border-color: #e8a317; color: #7a5800; }
@media (max-width: 760px) {
    .table-cards tr:has(+ .device-service-row) { margin-bottom: 0; border-bottom: 0; border-radius: 10px 10px 0 0; }
    .table-cards tr.device-service-row { border-top: 0; border-radius: 0 0 10px 10px; padding-top: 0; }
    .table-cards td.device-service-row-cell, .table-cards .device-service-row > td { padding-left: 0; }
    .table-cards .device-service-row > td::before { display: none; }
}
/* Gerät (Bearbeiten) → Box „Service“: Historie */
.service-history-season { margin: .8rem 0 0; padding-top: .7rem; border-top: 1px solid var(--border); }
.service-history-season:first-of-type { border-top: 0; padding-top: 0; }
.service-history-season h3 { margin: 0 0 .4rem; font-size: 1rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* Rechnungen → Reiter, Erledigte Aufträge, Entwürfe */
.bill-tab-count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; margin-left: .2rem; border-radius: 9px; background: #eef1f5;
    color: var(--muted); font-size: .78rem; text-align: center; }
.work-filter { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; }
.work-filter-actions { display: flex; gap: .4rem; }
/* gleiche Höhe für Suchfelder und Dropdowns (wie die Auftragsliste), Knöpfe bündig */
.work-filter input[type=search], .work-filter select { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.work-filter-actions .btn { height: 2.6rem; display: inline-flex; align-items: center; box-sizing: border-box; }
@media (max-width: 900px) { .work-filter { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .work-filter { grid-template-columns: 1fr; } }
.work-card { padding: 0; overflow-x: auto; }
.work-table { margin: 0; }
.work-table th, .work-table td { vertical-align: top; }
/* abwechselnd: grau – weiß – grau …; bearbeitete Zeile hellgelb */
.work-table .work-row:nth-of-type(odd) > tr > td { background: #eef1f4; }
.work-table .work-row:nth-of-type(even) > tr > td { background: #fff; }
.work-table .work-row.is-saved > tr > td { background: #fff7c7; transition: background .3s; }
.work-table .work-row > tr:first-child > td { border-bottom: 0; }
.work-table .work-detail-row > td { padding-top: 0; }
.work-details summary { cursor: pointer; color: var(--primary); font-size: .85rem; font-weight: 600; }
.work-detail { padding: .4rem 0 .2rem; }
.work-detail ul { margin: .2rem 0 .5rem 1.1rem; padding: 0; }
.work-detail-block { margin-bottom: .4rem; }
.work-materials { color: var(--muted); }
.work-times { display: flex; flex-wrap: wrap; gap: .2rem .55rem; font-size: .85rem; white-space: nowrap; }
.work-times span { display: inline-flex; align-items: center; gap: .12rem; }
.work-times svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.work-times-total { font-weight: 700; }
.work-amount { margin: 0 0 .25rem; }
.work-amount label { display: block; }
.work-amount span { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.work-amount input { width: 6rem; padding: .3rem .45rem; text-align: right; }
.work-amount.is-busy input { opacity: .6; }
.work-amount.is-ok input { border-color: #2e9d57; box-shadow: 0 0 0 2px rgba(46, 157, 87, .2); }
.work-amount.is-error input { border-color: var(--danger); }
.work-queue { white-space: nowrap; }
.work-queue.is-on { background: #e8f2fb; border-color: #9cc3e6; color: #0b4f82; }
/* „Rechnung geschrieben“: runder Haken, grau → grün */
.work-check { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid #c9ced6; background: #fff; color: #c9ced6;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.work-check svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.work-check:hover { border-color: #2e9d57; color: #2e9d57; }
.work-check.is-on { background: #2e9d57; border-color: #2e9d57; color: #fff; }
.work-check-cell { text-align: center; }
.queue-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.queue-head h2 { margin: 0; }
.queue-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.queue-group tr.is-saved > td { background: #fff7c7; }
@media (max-width: 760px) {
    .work-table .work-row > tr:first-child { margin-bottom: 0; border-bottom: 0; border-radius: 10px 10px 0 0; }
    .work-table .work-row > tr.work-detail-row { border-top: 0; border-radius: 0 0 10px 10px; margin-bottom: .7rem; }
    .work-table .work-row:nth-of-type(odd) > tr { background: #eef1f4; }
    .work-table .work-row.is-saved > tr { background: #fff7c7; }
    .work-table .work-detail-row > td { padding-left: 0; }
    .work-table .work-detail-row > td::before { display: none; }
}

/* Werkstatt: Knopf „Zusätzlicher Service nötig“ (orange = vorgemerkt), Beschreibung mit Mikrofon */
.svc-extra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .8rem; }
.svc-extra-btn { display: inline-flex; align-items: center; gap: .55rem; background: #fff; color: #a3370f; border: 2px solid var(--accent); }
.svc-extra-btn .svc-extra-box { display: inline-flex; align-items: center; justify-content: center; width: 1.3em; height: 1.3em; border: 2px solid currentColor;
    border-radius: 5px; font-weight: 800; line-height: 1; }
.svc-extra-btn.is-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.svc-note { margin-top: 1rem; }
.svc-note textarea { width: 100%; font-size: 1.05rem; min-height: 8rem; }
.svc-note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .5rem; }
.svc-dictate.is-listening { background: #c62828; border-color: #c62828; color: #fff; animation: svc-rec 1.2s ease-in-out infinite; }
@keyframes svc-rec { 50% { box-shadow: 0 0 0 8px rgba(198, 40, 40, .2); } }
.svc-progress-step.is-skip { background: #fff; border-style: dashed; color: #b6c0cc; }

/* Winterservice → Bericht: Knopf mit Dokument-Symbol, Filter (Schritte als Mehrfachauswahl), Stand je Schritt grün/rot */
.svc-report-btn { display: inline-flex; align-items: center; justify-content: center; padding-left: .8rem; padding-right: .8rem; }
.svc-report-btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.report-filter { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; align-items: end; }
.report-filter input[type=search] { height: 2.6rem; margin-top: .3rem; box-sizing: border-box; }
.report-filter fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.report-filter legend { font-weight: 600; margin-bottom: .35rem; padding: 0; }
.report-step-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; cursor: pointer; font-weight: 400; font-size: .9rem; }
.report-step-chip input { margin: 0; }
.report-step-chip:has(input:checked) { border-color: var(--primary); background: #e6ecf4; color: var(--primary); }
.report-actions { grid-column: 1 / -1; display: flex; gap: .4rem; }
.report-actions .btn { height: 2.6rem; display: inline-flex; align-items: center; box-sizing: border-box; }
.report-progress { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.report-dot { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 6px; font-weight: 700;
    font-size: .85rem; color: #fff; background: #c62828; }
.report-dot.is-done { background: #2e9d57; }
.report-dot.is-running { background: #c62828; box-shadow: inset 0 0 0 3px #f6b8b8; } /* offen, aber in Arbeit */
.report-dot.is-skip { background: #fff; color: #b6c0cc; border: 1px dashed #c9ced6; }
@media (max-width: 640px) { .report-filter { grid-template-columns: 1fr; } }
.report-table .svc-boxnr { font-size: .8rem; padding: .1rem .45rem; margin-top: .2rem; display: inline-block; }
/* Bericht: je Mäher Zeile + Details (abwechselnd grau/weiß), Detailtabelle schlank */
.report-table .report-row:nth-of-type(odd) > tr > td { background: #eef1f4; }
.report-table .report-row > tr:first-child > td { border-bottom: 0; }
.report-table .report-detail-row > td { padding-top: 0; }
.report-runs { margin: .4rem 0 .2rem; font-size: .88rem; background: #fff; }
.report-runs th, .report-runs td { padding: .35rem .5rem; }
@media (max-width: 760px) {
    .report-table .report-row > tr:first-child { margin-bottom: 0; border-bottom: 0; border-radius: 10px 10px 0 0; }
    .report-table .report-row > tr.report-detail-row { border-top: 0; border-radius: 0 0 10px 10px; margin-bottom: .7rem; }
    .report-table .report-row:nth-of-type(odd) > tr { background: #eef1f4; }
    .report-table .report-detail-row > td { padding-left: 0; }
    .report-table .report-detail-row > td::before { display: none; }
    .table-cards .report-runs thead { display: none; }
    .table-cards .report-runs tr { display: block; margin: 0; padding: .45rem .6rem; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: #fff; }
    .table-cards .report-runs td { display: block; padding: .05rem 0; min-height: 0; border: 0; position: static; }
    .table-cards .report-runs td[data-label]::before { content: attr(data-label) ": "; position: static; display: inline; width: auto;
        color: var(--muted); font-size: .78rem; text-transform: none; letter-spacing: 0; }
    .table-cards .report-runs td[data-label="Schritt"] { font-weight: 600; }
    .table-cards .report-runs td[data-label="Schritt"]::before { display: none; }
    .table-cards .report-runs tfoot td { display: inline-block; padding: .45rem .6rem; }
}

/* Hallen-PC: Ziffernblock (Code) und eigener Stand – groß, gut zu treffen */
.terminal-clock { font-size: 1.4rem; font-weight: 600; }
.terminal-pad { max-width: 26rem; margin: 0 auto; text-align: center; }
.terminal-pad-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 .8rem; }
.terminal-dots { display: flex; justify-content: center; gap: 1rem; margin: 0 0 1.2rem; }
.terminal-dots span { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2px solid var(--primary); }
.terminal-dots span.is-on { background: var(--primary); }
.terminal-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.terminal-keys button { font: inherit; font-size: 1.8rem; font-weight: 700; padding: .9rem 0; border-radius: 12px; border: 1px solid var(--border);
    background: #fff; color: var(--ink); cursor: pointer; }
.terminal-keys button:active { background: #e6ecf4; }
.terminal-person { max-width: 36rem; margin: 0 auto; }
.terminal-person.is-in { border-left: 6px solid #2e9e5b; }
.terminal-who { display: flex; align-items: center; gap: .7rem; }
.terminal-name { font-size: 1.6rem; font-weight: 700; }
.terminal-state { font-size: 1.05rem; }
.terminal-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: 1rem 0 .5rem; }
.terminal-actions form { margin: 0; }
.terminal-btn { font-size: 1.3rem; padding: 1rem 2rem; min-width: 13rem; }
.terminal-cancel { font-size: 1.05rem; padding: .9rem 1.4rem; }

/* Versandprotokoll unter „Kunden-Benachrichtigung“ (Auftrag, Termin) */
.notify-log { align-items: flex-start; gap: .5rem 1.6rem; }
.notify-log-col { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.notify-log-row { overflow-wrap: anywhere; }
.notify-log-card { display: flex; flex-wrap: wrap; }
.notify-log-card .notify-log-row { padding: .2rem 0; border-bottom: 1px solid #eef1f5; }

/* Tourenplan → „Noch unerledigt“: Filter nach Grund, Grund-Etikett je Zeile */
.plan-open-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0; }
.plan-open-reason { white-space: normal; }
.plan-open-reason.reason-ohne_tour { background: #eef1f5; color: #374151; }
.plan-open-reason.reason-folgetermin, .plan-open-reason.reason-nicht_angetroffen { background: #fdeee8; color: #b33a10; }
.plan-open-reason.reason-abgesagt { background: #fdecec; color: #b91c1c; }
.plan-open-reason.reason-ohne_ergebnis { background: #fff4d6; color: #8a5a00; }
.plan-open-reason.reason-eingeplant { background: #e8f0fb; color: var(--primary); }
.plan-open-sum { align-self: center; margin-left: .3rem; }
.tour-plan-hint { font-size: .85rem; padding: .55rem .75rem; margin: .4rem 0 .6rem; }

/* Tour-Karte: Auswahl über der Karte (Ohne Tour / Folgetermin nötig / nicht angetroffen) */
.tm-filter { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.tm-chip { border: 1.5px solid var(--border); background: #fff; color: var(--ink); border-radius: 999px; padding: .25rem .7rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.tm-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tm-chip-folgetermin.is-on, .tm-chip-nicht_angetroffen.is-on { background: #7b3fb5; border-color: #7b3fb5; }
.tm-open.tm-follow { background: #7b3fb5; } /* offen mit „Folgetermin nötig“ bzw. „nicht angetroffen“ */
.tm-pop-follow { color: #7b3fb5; font-weight: 600; margin-top: .2rem; }

/* Tourenplan: „Kunden-Benachrichtigung“ und „Dauer je Stopp“ als Boxen nebeneinander (gleich hoch); schmal untereinander */
.plan-settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.plan-settings-row > .card { margin: 0; }
.plan-settings-row .notify-choice { margin: 0 0 .7rem; }
.plan-settings-row .duration-plan { flex-wrap: wrap; }
@media (max-width: 900px) { .plan-settings-row { grid-template-columns: 1fr; } }
.duration-box { display: block; }
.duration-box .duration-plan { width: 100%; margin-bottom: .4rem; }
.duration-box .field-help { display: block; }
.plan-settings-row.is-single { grid-template-columns: 1fr; }

/* „Ohne Gerät“ (weder Mähroboter noch Beregnung im Plan): rot – Filter-Schalter, Grund-Etikett, Kartenpunkt */
.svc-chip.reason-ohne_geraet { border-color: #c62828; color: #b91c1c; }
.svc-chip.reason-ohne_geraet.active { background: #c62828; border-color: #c62828; color: #fff; }
.plan-open-reason.reason-ohne_geraet { background: #c62828; color: #fff; }
.plan-open-table tr.is-nodevice td { background: #fdecec; }
.tm-chip-ohne_geraet { border-color: #c62828; color: #b91c1c; }
.tm-chip-ohne_geraet.is-on { background: #c62828; border-color: #c62828; color: #fff; }
.tm-open.tm-nodev { border-color: #c62828 !important; } /* ohne Gerät: roter Rand (kein eigener Status) */
.tm-pop-nodev { color: #b91c1c; font-weight: 600; margin-top: .2rem; }
.plan-open-table .text-error { color: #b91c1c; font-weight: 600; }
.tour-insert-mode { display: flex; flex-wrap: wrap; gap: .4rem; margin: .2rem 0 .5rem; }
.tour-insert-mode .svc-chip { font-size: .85rem; padding: .3rem .8rem; cursor: pointer; background: #fff; }
.tour-insert-mode .svc-chip.active { background: var(--primary); color: #fff; }

/* Auswertung Winterservice: Mitarbeiter × Schritt */
.table-scroll { overflow-x: auto; }
.winter-stats { min-width: 760px; }
.winter-stats th, .winter-stats td { vertical-align: top; white-space: nowrap; }
.winter-stats tbody th, .winter-stats tfoot th { text-align: left; font-weight: 600; }
.winter-stats td { font-size: .85rem; line-height: 1.35; }
.winter-stats .ws-avg { color: var(--ink); }
.winter-stats .ws-sum { color: #4b5563; }
.winter-stats .ws-total { background: #f4f6f9; }
.winter-stats tfoot tr.ws-grand td, .winter-stats tfoot tr.ws-grand th { border-top: 2px solid var(--primary); background: #eef3f9; }
.winter-stats .ws-count { font-size: .9rem; }
.winter-stats thead th { white-space: normal; min-width: 110px; vertical-align: bottom; }
.winter-stats tbody th, .winter-stats tfoot th { text-transform: none; letter-spacing: normal; font-size: .9rem; color: var(--ink); }

/* Mein Tag → Termine der Kollegen: Touren vollständig, Stand je Kunde, antippen = Navigation */
.myday-other { align-items: flex-start; }
.myday-other-progress { font-size: .82rem; color: #374151; margin-top: .15rem; }
.myday-other-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin: .25rem 0 .35rem; }
.myday-other-bar span { display: block; height: 100%; background: #2e7d32; }
.myday-other-stops { list-style: none; margin: 0; padding: 0; }
.myday-other-stop { border-top: 1px dashed #e5e7eb; }
.myday-other-stops .myday-other-stop:first-child { border-top: 0; }
.myday-other-name { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .6rem; width: 100%; background: none; border: 0;
    padding: .4rem 0; font: inherit; font-size: .88rem; text-align: left; color: var(--primary, var(--primary)); cursor: pointer; }
.myday-other-state { font-size: .8rem; font-weight: 600; color: #6b7280; }
.myday-other-stop.is-done .myday-other-state { color: #2e7d32; }
.myday-other-stop.is-here .myday-other-state { color: var(--accent); }
.myday-other-stop.is-open .myday-other-state { color: #7b3fb5; }
.myday-other-stop.is-done .myday-other-name > span:first-child { color: #6b7280; }
.myday-other-more { padding: 0 0 .5rem; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }

/* Winterservice: Funnel „Stand der Mähroboter“ – Breite der Ebene = Anzahl im Schritt, mittig wie ein Trichter */
.svc-funnel { margin-top: 1.2rem; }
.funnel { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.funnel-level { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2fr minmax(150px, 1fr); align-items: center; gap: .6rem; font-size: .9rem; }
.funnel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-bar-wrap { position: relative; display: flex; justify-content: center; align-items: center; height: 2rem; background: #f3f5f8; border-radius: 6px; }
.funnel-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #1d4f8c); border-radius: 6px; transition: width .3s; }
.funnel-count { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; color: #fff; text-shadow: 0 0 3px rgba(0, 0, 0, .45); }
.funnel-level.is-empty .funnel-count { color: #6b7280; text-shadow: none; }
.funnel-level.is-extra .funnel-bar { background: linear-gradient(90deg, #7b3fb5, #9b6bd0); }
.funnel-level.is-finished .funnel-bar { background: linear-gradient(90deg, #2e7d32, #43a047); }
.funnel-meta { font-size: .82rem; }
@media (max-width: 640px) {
    .funnel-level { grid-template-columns: 1fr; gap: .15rem; }
    .funnel-label { white-space: normal; }
}
/* Funnel: Box zugewiesen und Rückgabe geteilt – mit Service dunkelblau, ohne Service orange */
.funnel-bar.funnel-split { display: flex; background: none; overflow: hidden; }
.funnel-seg { display: block; height: 100%; flex-grow: 0; flex-shrink: 0; }
.funnel-seg.is-service, .funnel-key.is-service { background: var(--primary); }
.funnel-seg.is-noservice, .funnel-key.is-noservice { background: var(--accent); }
.funnel-legend { display: inline-flex; align-items: center; gap: .3rem; margin-left: .4rem; color: #4b5563; white-space: nowrap; }
.funnel-key { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; }

/* Service-Startseite: Hauptkacheln doppelt so breit, mit Icon */
.svc-tiles.svc-tiles-wide { grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); }
@media (max-width: 600px) { .svc-tiles.svc-tiles-wide { grid-template-columns: 1fr; } }
.svc-tile-main .svc-tile-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.svc-tile-main .svc-tile-title { font-size: 1.25rem; }
.svc-main-icon svg { width: 64px; height: 64px; display: block; }

/* Archiv-Ansicht Winterservice: oranger Balken (volle Breite), Formulare zum Ändern ausgeblendet */
.archive-bar { background: var(--accent); color: #fff; font-weight: 700; text-align: center; padding: .6rem 1rem; }
.archive-bar a { color: #fff; margin-left: .8rem; text-decoration: underline; font-weight: 600; }
main.is-archive form[method="post"], main.is-archive form[method="POST"], main.is-archive [data-terminal-pad] { display: none !important; }
.history-list { margin: .3rem 0 .6rem; padding-left: 1.1rem; }
.history-list li { padding: .2rem 0; }
.boxes-warning { display: none; margin-top: .6rem; }
.plan-compose:has(input[name="kind"][value="autumn"]:checked) .boxes-warning { display: block; }
/* Werkstatt-Auftrag: Mähroboter des Kunden wählen */
.workshop-mower { border-color: #ef6c00; }
.workshop-mower-list { display: flex; flex-direction: column; gap: .35rem; }
.workshop-mower-item.is-busy { color: #9ca3af; }
.svc-step-icon-reg-open { background: #fff1e6; } .svc-step-icon-reg-close { background: #eafbf0; }
/* Tour-Stopp: Gerät abgehakt → grün mit „(erledigt)“ */
.stop-devices .device-done { color: #2e7d32; font-weight: 600; }
.stop-devices .device-done input { accent-color: #2e7d32; }
.stop-devices .device-done-note { font-weight: 400; }
/* Karte einer Entwurfs-Tour: Kunden noch nicht im Tourenplan */
/* Karte: Status der Aufträge (seit 24.11.2026) – Ohne Termin dunkelblau, Rückruf gelb-orange, Folgetermin nötig lila;
   aus anderen Plänen (Schalter „alle Aufträge“) heller */
.tm-open.tm-st-rueckruf { background: #d97706; }
.tm-open.tm-st-folgetermin { background: #7b3fb5; }
.tm-open.tm-extra { opacity: .7; }
.tm-chip-rueckruf.is-on { background: #d97706; border-color: #d97706; }
/* Umschalter „nur dieser Tourenplan | alle Aufträge“: graue Pille, die gewählte Hälfte weiß hinterlegt */
.tm-scope { display: inline-flex; margin-right: .6rem; background: #475569; border-radius: 999px; padding: 3px; gap: 2px; }
.tm-scope-opt { border: 0; background: transparent; color: #fff; border-radius: 999px; padding: .22rem .75rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.tm-scope-opt.is-on { background: #fff; color: #334155; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); cursor: default; }
.tm-scope-opt:not(.is-on):hover { background: rgba(255, 255, 255, .15); }
.tm-pop-status { font-weight: 600; margin-top: .25rem; }
.tm-pop-rueckruf { color: #b45309; }
.tm-pop-folgetermin { color: #7b3fb5; }
.tm-pop-extra { color: #01579b; font-weight: 600; margin-top: .25rem; }
/* Auftragsliste als Karten (Handy): „Öffnen“ und „Löschen“ gleich hoch nebeneinander */
@media (max-width: 760px) {
    .table-cards td.order-actions { align-items: center; }
    .table-cards td.order-actions form.order-delete { display: flex; margin: 0; }
    .table-cards td.order-actions .btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
        min-height: 2.6rem; line-height: 1.2; padding-top: .45rem; padding-bottom: .45rem; }
}
.tm-extra-info { flex-basis: 100%; margin-top: .2rem; }
.stop-cancel { display: flex; gap: .3rem; align-items: center; margin-top: .3rem; } .stop-cancel select { width: auto; font-size: .8rem; padding: .2rem .3rem; }
/* Tourenplan → Aufträge: Mehrfachauswahl */
.plan-bulk { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: .8rem; padding: .7rem .9rem; background: #f4f6fa; border-radius: 8px; }
.plan-bulk-group { display: inline-flex; gap: .35rem; align-items: center; }
.plan-bulk select { width: auto; }
/* Auswahlfelder und Buttons gleich hoch */
.plan-bulk select, .plan-bulk .btn { height: 2.5rem; box-sizing: border-box; margin: 0; font-size: .9rem; }
.plan-bulk select { padding-top: 0; padding-bottom: 0; }
.plan-bulk .btn { display: inline-flex; align-items: center; padding: 0 .9rem; line-height: 1; }
.plan-close-link { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
.btn.plan-close-link { background: var(--accent); border-color: var(--accent); color: #fff; } /* Orange (Akzentfarbe) */
.btn.plan-close-link:hover { background: #c9430f; border-color: #c9430f; }
.plan-close-counts .badge { margin: 0 .3rem .3rem 0; }
.contact-person-box { margin-top: .8rem; } /* Ansprechpartner: eigener Punkt im Kasten „Kontakt“, ohne Hintergrund */
/* Werkstatt-Auftrag: je Mähroboter Box und Schritte */
.workshop-mower { margin: .5rem 0; }
.workshop-mower-head { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin-bottom: .4rem; }
.workshop-runs { margin: 0; }
/* Geräte zuordnen: offene rot markiert */
.parts-devices tr.is-open td { background: #fdf0ee; }
.parts-devices-filter { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: end; }
.parts-devices-sum { margin-left: auto; }
/* Geräte zuordnen: Hersteller, Typ, Bezeichnung und „Speichern“ gleich hoch, ohne Abstand nach oben */
.parts-devices td { vertical-align: middle; }
.parts-devices .mower-type-field { display: block; margin: 0; }
.parts-devices select, .parts-devices input[type=text], .parts-devices .btn { box-sizing: border-box; height: 2.5rem; margin: 0; }
.parts-devices select, .parts-devices input[type=text] { width: 100%; padding-top: 0; padding-bottom: 0; }
.parts-devices .btn { display: inline-flex; align-items: center; }
.parts-devices .device-actions { display: flex; gap: .4rem; justify-content: flex-end; }
.parts-devices .device-actions form { margin: 0; }
.parts-devices tr[id] { scroll-margin-top: 90px; }
.plan-bulk input[type=text] { width: auto; height: 2.5rem; box-sizing: border-box; margin: 0; }
/* Auftragsliste: Absagen mit Grund unter „Öffnen“ */
/* Auftragsliste: Grund + „Absagen“ als ein zusammenhängendes Element auf einer Zeile, gleich hoch, rechtsbündig */
.table td.order-actions form.order-cancel { display: flex; justify-content: flex-end; align-items: stretch; margin: .4rem 0 0; }
.order-cancel select, .order-cancel .btn { box-sizing: border-box; height: 2rem; margin: 0; font-size: .85rem; line-height: 1; }
.order-cancel select { width: auto; padding: 0 1.6rem 0 .55rem; border: 1px solid #f2c9c3; border-right: 0;
    border-radius: 8px 0 0 8px; background-color: #fff; color: var(--text, #1f2937); }
.table td.order-actions .order-cancel .btn, .order-cancel .btn { display: inline-flex; align-items: center; margin: 0; padding: 0 .75rem; border-radius: 0 8px 8px 0; }
.order-cancel select:focus { position: relative; z-index: 1; }
@media (max-width: 760px) { .table-cards td.order-actions form.order-cancel { margin: 0; }
    .order-cancel select, .order-cancel .btn { height: 2.6rem; } }
/* Kalender: einziger Termin eines Auftrags → nur Termin löschen / Auftrag absagen */
.cal-del-choice { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .4rem; }
.cal-del-choice-text { font-size: .85rem; color: #4b5563; }
.cal-del-choice-row { display: flex; gap: .4rem; }
.cal-del-choice-row select { flex: 1; min-width: 0; }
/* Zeiterfassung (Heute, Monatsübersicht): Abwesenheiten je Mitarbeiter in der Zeile aufklappen */
.absence-toggle { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; padding: .15rem .45rem; border: 1px solid var(--border);
    border-radius: 6px; background: #fff; color: var(--primary); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.absence-toggle:hover { background: #f6f8fb; }
.absence-toggle-arrow { display: inline-block; transition: transform .15s; }
.absence-toggle.is-open .absence-toggle-arrow { transform: rotate(90deg); }
.absence-row > td { background: #f8fafc; }
.absence-row-body { padding: .4rem .2rem .6rem; }
.absence-row-body .absence-form { margin-top: .5rem; }
.absence-row-body .table { background: #fff; }
.table tr.absence-row[hidden] { display: none; }
.kress-drawing-log { margin: .8rem 0 0; padding-left: 1.2rem; } .kress-drawing-log li { margin: .2rem 0; } .kress-drawing-log .strong { font-weight: 700; list-style: none; }
.kress-drawing-log .text-error { color: #b91c1c; font-weight: 600; }
/* Material-Kategorie: Suche + Auswahl Ebene für Ebene (category-picker.js) – Suche kompakt links, Ebenen daneben in einer Zeile */
.cat-picker { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: .4rem .6rem; margin-top: .3rem; font-weight: 400; }
.cat-picker input.cat-picker-search { width: 10rem; flex: 0 0 10rem; margin: 0; box-sizing: border-box; height: 2.5rem; }
.cat-picker input.cat-picker-search { padding-left: 2rem; background-repeat: no-repeat; background-position: .65rem center; background-size: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23858b94' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21'/%3E%3C/svg%3E"); }
.cat-picker input.cat-picker-search::placeholder { color: #858b94; }
.cat-picker-hits { position: absolute; z-index: 50; top: calc(100% + .2rem); left: 0; width: min(40rem, 100%); margin: 0; padding: .3rem; list-style: none; background: #fff;
    border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); max-height: 18rem; overflow-y: auto; }
.cat-picker-hit { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .4rem .5rem; border-radius: 6px; font: inherit; cursor: pointer; }
.cat-picker-hit:hover, .cat-picker-hit:focus { background: #eef3fa; }
.cat-picker-levels { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .4rem; flex: 1 1 0; min-width: 16rem; }
.cat-picker-levels select { max-width: 100%; margin: 0; box-sizing: border-box; height: 2.5rem; }
.cat-picker-sep { color: var(--primary); font-weight: 700; }
.cat-picker-step { display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; }
@media (max-width: 600px) { .cat-picker input.cat-picker-search { flex-basis: 100%; width: 100%; } }
.kress-drawing-progress { font-weight: 600; margin: .6rem 0 0; }
.kress-drawing-log { max-height: 26rem; overflow-y: auto; }
.material-folder-subs { font-weight: 400; color: var(--muted); font-size: .9rem; }
.material-folder-subs .has-drawing { color: #1f7a3a; font-weight: 600; }
.svc-mat-col-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
/* Zeiterfassung → Monatsübersicht: „Ausgezahlt“ (Eingabe + Speichern in der Zeile) */
.time-payout { display: flex; gap: .3rem; align-items: center; margin: 0; }
.time-payout input { width: 5.5rem; margin: 0; padding: .3rem .45rem; box-sizing: border-box; height: 2.1rem; }
.time-payout .btn { height: 2.1rem; display: inline-flex; align-items: center; }
.time-pdf-form { display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.time-pdf-form input[type=month] { width: auto; margin: 0; padding: .3rem .45rem; height: 2.1rem; box-sizing: border-box; }
/* Meine Zeiten → „Zeiten selbst eintragen“ */
.time-self-row { display: flex; gap: .3rem; align-items: center; margin-bottom: .3rem; }
.time-self { display: inline-flex; gap: .3rem; align-items: center; margin: 0; flex-wrap: wrap; }
.time-self input[type=time] { width: auto; margin: 0; padding: .25rem .4rem; height: 2.1rem; box-sizing: border-box; }
.time-self .btn { height: 2.1rem; display: inline-flex; align-items: center; }
.time-self-new { margin-top: .1rem; }
/* Hallen-PC: „Zeiten selbst eintragen“ */
.terminal-self { display: flex; flex-wrap: wrap; gap: .8rem; align-items: end; margin: .6rem 0; }
.terminal-self label { font-weight: 600; display: flex; flex-direction: column; gap: .3rem; }
.terminal-self input[type=time] { font-size: 1.5rem; padding: .5rem .7rem; width: 10rem; margin: 0; }
.terminal-self-save { font-size: 1.15rem; padding: .7rem 1.4rem; }
.terminal-self-hint { background: #eef3fa; border-radius: 8px; padding: .7rem .9rem; margin: .8rem 0 .3rem; }
/* Nach dem Verschieben: „Kunden über den neuen Termin informieren?“ (Leiste oben bzw. Kalender-Dialog, partials/move-notice-form) */
.move-notice { background: #fff7e6; border: 1px solid #f3c77a; border-left: 4px solid var(--accent, var(--accent)); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.move-title { margin: 0 0 .3rem; font-size: 1.1rem; }
.move-form { margin: 0; }
.move-label { margin: 0 0 .2rem; }
.move-state { margin: 0 0 .6rem; }
.move-box { border: 1px solid var(--border); border-radius: 10px; padding: .5rem .8rem .6rem; margin: 0 0 .6rem; background: #fff; }
.move-box legend { font-weight: 700; padding: 0 .3rem; }
.move-auto { margin: .2rem 0 .4rem; }
.move-schedule { margin: .1rem 0 0 1.6rem; padding-left: 1rem; font-size: .9rem; }
.move-schedule .is-missed { color: #b91c1c; font-weight: 600; }
.move-auto:has(input[type=checkbox]:not(:checked)) .move-schedule { opacity: .55; } /* aus: nur zur Info */
.move-channels { display: inline-flex; gap: .8rem; margin: 0 1.4rem 0 .3rem; }
.move-form:not(:has(input[name=inform][value=yes]:checked)) .move-channels { opacity: .45; pointer-events: none; }
.move-actions { display: flex; gap: .5rem; }
.move-dialog { position: fixed; inset: 0; z-index: 1400; background: rgba(8, 18, 32, .45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.move-dialog-box { background: #fff; border-radius: 14px; padding: 1.1rem 1.2rem; width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.move-dialog-box .move-box { background: #fafbfc; }

/* Kundenliste: Etiketten (Geschäftlich/Verein, gesperrt, Position prüfen) in der zweiten Zeile */
.cust-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
/* Symbole: im Einsatz = Schloss statt ✕; „Symbol hinzufügen“: Emoji, Name und Knopf gleich hoch */
.icon-used { position: absolute; top: 2px; right: 4px; font-size: .7rem; opacity: .6; cursor: help; }
.icon-new input[type=text], .icon-new .btn { height: 2.6rem; margin: 0; box-sizing: border-box; }
.icon-new input.icon-input { flex: 0 0 5.5rem; width: 5.5rem !important; font-size: 1.15rem; line-height: 1; padding-top: 0; padding-bottom: 0; }
/* Einstellungen → Aufgaben (seit 27.11.2026): alle Felder einer Zeile gleich hoch und vertikal zentriert; „Neue Aufgabe“ abgesetzt */
.task-list td { vertical-align: middle; }
.task-look, .task-dur { align-items: center; }
.task-dur { flex-wrap: nowrap; gap: .6rem; }
.task-look input[type=color] { flex: 0 0 2.6rem; width: 2.6rem !important; height: 2.4rem; padding: 2px; margin: 0; box-sizing: border-box; }
.task-look .icon-select, .task-dur .duration-input input[type=number],
.task-dur .btn { height: 2.4rem; margin: 0; box-sizing: border-box; }
.task-look .icon-select { padding-top: 0; padding-bottom: 0; }
.task-dur .btn { display: inline-flex; align-items: center; }
.task-list td.task-save { text-align: right; white-space: nowrap; width: 1%; }
.task-save .btn { height: 2.4rem; display: inline-flex; align-items: center; box-sizing: border-box; }
.task-save .btn + .btn { margin-left: .4rem; }
/* Aufgaben-Liste: Gruppen bis zum nächsten „Absatz davor“ gleich hinterlegt (erste Gruppe getönt, dann im Wechsel) */
.task-list { --zebra: linear-gradient(rgb(var(--primary-rgb) / .05), rgb(var(--primary-rgb) / .05)); }
.task-list > tbody > tr.task-group-tint > td { background-image: var(--zebra); }
@media (max-width: 760px) {
    .task-list > tbody > tr.task-group-tint > td { background-image: none; }
    .task-list > tbody > tr.task-group-tint { background-image: var(--zebra); }
}
/* Einstellungen → Kalender, Tagesbeginn/-ende: Felder und „Speichern“ gleich hoch, unten bündig */
.day-times { align-items: flex-end; }
.day-times label { margin: 0; }
.day-times .tp-wrap { margin: 0; }
.day-times input[type=text], .day-times .btn { height: 2.6rem; margin: 0; box-sizing: border-box; }
.day-times .btn { display: inline-flex; align-items: center; }
/* To-do-Spalten: „Keine offenen To-dos.“ beginnt auf derselben Höhe wie eine To-do-Karte */
.todo-list > .todo-empty { margin-top: 0; }
/* Einstellungen: Wunsch an die Entwicklung (aufklappbar, ganz oben) */
.dev-wish { margin-bottom: 1.2rem; }
.dev-wish > summary { cursor: pointer; list-style: none; }
.dev-wish > summary::-webkit-details-marker { display: none; }
.dev-wish > summary::after { content: ' ▾'; color: var(--muted); }
.dev-wish[open] > summary::after { content: ' ▴'; }
.dev-wish-form { margin-top: .8rem; display: grid; gap: .6rem; max-width: 52rem; }
.dev-wish-form select { max-width: 20rem; }
.dev-wish-form textarea { width: 100%; }
.dev-wish-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: nowrap; }
.dev-wish-actions .btn { white-space: nowrap; }
.dev-wish-status:empty { display: none; }
.dev-wish-form .dev-wish-status { color: var(--primary); font-weight: 600; }
.dev-wish-actions .btn-primary { margin-left: auto; }
.dev-wish-mic.is-recording { background: #fdeced; border-color: #d9363e; color: #9b1c22; }
.dev-wish-form .muted.small { margin: 0; }
.dev-wish-form label:has(textarea) { margin-bottom: .15rem; } /* Abstand Textfeld → Knöpfe halbiert (24 → 12 px) */
/* Zurück-Knopf überall gleich (seit 28.11.2026): rund, weiß, blauer Pfeil, so hoch wie die Knöpfe daneben, ganz rechts als letzter */
.btn-back { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; width: 2.625rem; height: 2.625rem;
    padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--primary); vertical-align: middle; transition: .15s; }
.btn-back:hover { border-color: var(--primary); text-decoration: none; }
.btn-back svg { display: block; }
.page-head .btn-back, .page-actions .btn-back { margin-left: .1rem; }
/* Werkstatt: so groß wie die großen Werkstatt-Knöpfe daneben */
.btn-back.btn-back-svc { width: 3.4rem; height: 3.4rem; min-height: 0; padding: 0; border: 2px solid var(--primary); border-radius: 50%; gap: 0; align-self: center; margin: 0; } /* Rahmen wie die Werkstatt-Knöpfe */
.svc-step-head .btn-back.btn-back-svc { width: 3rem; height: 3rem; margin: .2rem 0 0; } /* neben „‹ Andere Box“ (3 rem) */
.btn-back.btn-back-svc svg { width: 24px; height: 24px; }
.dev-wish-actions .dev-wish-mic { width: 9.5rem; display: inline-flex; align-items: center; justify-content: center; flex: none; } /* feste Breite: „🎤 Einsprechen“ und „⏹ Beenden“ gleich groß */
/* Wunsch an die Entwicklung: Desktop zweispaltig – links Eingabe, rechts die letzten Wünsche (3 sichtbar, „Mehr anzeigen“) */
.dev-wish-grid { display: grid; gap: 1.2rem 2rem; margin-top: .8rem; }
.dev-wish-grid .dev-wish-form { margin-top: 0; max-width: none; }
@media (min-width: 960px) { .dev-wish-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.dev-wish-list h3 { margin: 0 0 .5rem; font-size: 1rem; }
.dev-wish-item { border: 1px solid var(--border); border-radius: 8px; padding: .55rem .7rem; margin-bottom: .5rem; background: #fff; }
.dev-wish-item.is-done { background: #f6fbf7; border-color: #cfe9d6; }
.dev-wish-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .25rem; }
.dev-wish-text { white-space: pre-line; overflow-wrap: anywhere; }
.dev-wish-note { margin-top: .25rem; white-space: pre-line; }
.wish-text { white-space: pre-line; background: #f4f6f9; border: 1px solid var(--border); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0 1rem; }
.wish-state-done { color: #1f6b30; font-weight: 700; }
.dev-wish-del { margin-left: auto; } .dev-wish-del .btn-link { color: #c0262d; font-size: .8rem; }
/* Wunsch: Nachtrag zu einem bestehenden Wunsch (seit 28.11.2026) */
.dev-wish-ref { background: #fff6e0; border: 1px solid #f0d58a; border-radius: 8px; padding: .5rem .7rem; overflow-wrap: anywhere; }
.dev-wish-ref-cancel { margin-left: .4rem; font-size: .85rem; white-space: nowrap; }
.dev-wish-parent { margin-bottom: .2rem; }
.dev-wish-item-actions { display: flex; justify-content: flex-end; margin-top: .35rem; }
/* Garantie je Hersteller (Einstellungen → Mähroboter) */
.warranty-form { display: grid; gap: .4rem; max-width: 26rem; }
.warranty-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 0; font-weight: 600; }
.warranty-input { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; }
.warranty-input input { width: 5.5rem; margin: 0; }
/* Mähroboter: Labels Garantie / Versicherung (grün = gut, rot = Garantie abgelaufen) */
.mower-badges { display: inline-flex; flex-wrap: wrap; gap: .3rem; vertical-align: middle; }
.mower-badge-ok { background: #e3f6e8; color: #1f6b30; border: 1px solid #a9dcb6; }
.mower-badge-expired { background: #fdeced; color: #9b1c22; border: 1px solid #f2b8bc; }
.mower-badges.is-big .badge { font-size: 1rem; padding: .3rem .7rem; }
.svc-mower > .mower-badges { margin: .5rem 0 .2rem; }
.workshop-mower-info { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.workshop-mower-info .mower-badges { display: flex; flex-wrap: wrap; align-self: stretch; }
.price-check-table { max-width: 34rem; }
.price-check-table td.num { text-align: right; white-space: nowrap; }
.supplier-hit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .3rem; padding: .35rem .55rem; background: #eef6ff; border: 1px solid #c7dcf3; border-radius: 6px; font-weight: 400; }
/* Wissen (Wissensdatenbank mit KI) */
.kb-warn { border-left: 4px solid #e8a317; }
.kb-warn-inline { border-left: 4px solid #e8a317; background: #fff8e6; padding: .55rem .8rem; border-radius: 6px; margin: 0 0 .8rem; }
.kb-warn-inline .inline-form { display: inline; margin-left: .5rem; }
.time-calc { background: #f4f6f9; border-radius: 6px; padding: .6rem .8rem; margin: 0 0 .9rem; line-height: 1.6; }
.kb-ask textarea { width: 100%; }
.kb-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
.kb-actions .btn { white-space: nowrap; }
.kb-mic { width: 9.5rem; display: inline-flex; align-items: center; justify-content: center; }
.kb-mic.is-recording { background: #fdeced; border-color: #d9363e; color: #9b1c22; }
.kb-status:empty { display: none; }
.kb-status { color: var(--primary); font-weight: 600; margin: .4rem 0 0; }
.kb-answer .kb-q { margin-top: 0; }
.kb-a { font-size: 1.02rem; line-height: 1.55; }
.kb-a ol, .kb-a ul { padding-left: 1.4rem; }
.kb-cite { display: inline-block; min-width: 1.2rem; padding: 0 .3rem; margin-left: .1rem; border-radius: 6px; background: #e8f0fb; color: var(--primary); font-size: .75rem; font-weight: 700; text-align: center; vertical-align: super; text-decoration: none; }
.kb-sources li { margin-bottom: .35rem; }
.kb-sources li:target { background: #fff6e0; }
.kb-history { margin: 0; padding-left: 1.1rem; }
.kb-history li { margin-bottom: .25rem; }
.kb-upload { display: grid; gap: .8rem; margin-bottom: 1rem; }
.kb-upload-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.kb-upload-form label { flex: 1 1 15rem; margin: 0; }
.kb-text summary { cursor: pointer; }
.kb-text form { display: grid; gap: .5rem; margin-top: .5rem; }
.kb-summary { margin-top: .2rem; color: var(--ink); }
.kb-topic { background: #f3eefc; color: #5b3b9c; }
.kb-docs td .badge { margin: 0 .2rem .2rem 0; }
.kb-limit label { flex: 0 1 14rem; }
.kb-flash { animation: kb-flash 1.6s ease-out; }
@keyframes kb-flash { 0% { background: #e3f6e8; } 100% { background: transparent; } }
/* Wissen: Seitenvorschau der Quellen (pdf.js) und Großansicht */
.kb-page { display: block; margin: .4rem 0 .6rem; padding: 4px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: zoom-in; max-width: 330px; }
.kb-page canvas { display: block; max-width: 100%; height: auto; }
.kb-page:not(.is-ready) canvas { display: none; }
.kb-page.is-ready [data-kb-page-msg] { display: none; }
.kb-page.is-failed { cursor: default; }
.kb-zoom { position: fixed; inset: 0; z-index: 300; background: rgba(15, 25, 40, .75); display: flex; flex-direction: column; }
.kb-zoom-bar { display: flex; align-items: center; gap: .8rem; padding: .6rem .9rem; background: #fff; }
.kb-zoom-bar span { font-weight: 700; flex: 1; }
.kb-zoom-body { flex: 1; overflow: auto; padding: 12px; text-align: center; color: #fff; }
.kb-zoom-body canvas { background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.35); max-width: 100%; height: auto; }
/* Seitenleiste der Tour: gleiche Abstände zwischen Zeitfeldern, Hinweis, Knöpfen, Warnungen und Stopp-Liste (seit 01.12.2026) */
.tour-side .tour-plan-hint, .tour-side #tm-saved-note, .tour-side #tm-remove-unfit, .tour-side .tour-actions, .tour-side #tm-warn { margin-top: .75rem; margin-bottom: 0; }
.tour-side .tour-list { margin-top: .75rem; }
.tm-saved-note { font-size: .85rem; padding: .7rem .75rem; display: flex; flex-direction: column; gap: .5rem; }
.tm-saved-note .btn { width: 100%; margin: 0 !important; }
.tm-saved-or { text-align: center; font-size: .8rem; color: #8a6d1a; margin: -.2rem 0; }
.tm-saved-hint { font-size: .8rem; }
.tm-saved-note[hidden] { display: none; }
.cal-tour-stops { margin: .3rem 0 0; padding-left: 1.2rem; font-size: .78rem; color: var(--muted); }
.cal-tour-stops li { margin: .05rem 0; }
.cal-tour-stops li.is-unfit { color: #c92a2a; }
.cal-tour-stop-time { font-variant-numeric: tabular-nums; color: var(--ink); }
.tour-notify-mini { margin: .4rem 0 0; padding: .45rem .7rem .55rem; font-size: .88rem; }
.tour-notify-mini legend { font-size: .85rem; }
.tour-notify-mini .checkbox { display: inline-flex; margin-right: 1rem; }
.tour-notify-switches { display: flex; flex-wrap: wrap; gap: .4rem 2rem; }
.tm-depot-icon { background: none; border: 0; }
.tm-depot { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #2f9e44; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.tm-depot svg { margin-left: 2px; } /* Pfeil optisch mittig */
/* Einstellungen ganz unten: MachTool mit Slogan und Link zur Website */
.settings-product { margin: 2.5rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.settings-product-logo { height: 22px; width: auto; display: inline-block; }
.settings-product-slogan { margin: 0; font-size: .9rem; }
.settings-product-slogan { font-weight: 700; color: var(--ink); }
.settings-product-accent { color: var(--accent); }
/* Tour-Stopp im Kalender: Kunde · Dauer, Ort · Auftrag, Aufgaben (seit 01.12.2026) – jede Zeile einzeln gekürzt */
.cal-stop { padding: 1px 4px; font-size: .68rem; line-height: 1.25; }
.cal-stop > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-stop-head { display: flex; gap: .3rem; justify-content: space-between; }
.cal-stop-head strong { overflow: hidden; text-overflow: ellipsis; }
.cal-stop-dur { color: var(--muted); flex: none; }
.cal-stop-meta { color: var(--muted); }
/* Neuigkeiten (seit 01.12.2026): Seite und Morgen-Infobox */
.news-day { margin: 1.2rem 0 0; padding-top: .8rem; border-top: 1px solid var(--border); }
.news-day:first-of-type { border-top: 0; padding-top: 0; }
.news-day-date { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--primary); }
.news-area { margin: .7rem 0 .25rem; font-size: .92rem; }
.news-points { margin: 0; padding-left: 1.2rem; }
.news-points li { margin: .15rem 0; }
.news-overlay { position: fixed; inset: 0; background: rgba(0, 20, 50, .45); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.news-overlay[hidden] { display: none; }
.news-box { background: #fff; border-radius: 14px; width: min(680px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.news-box-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem 0; }
.news-box-head h2 { margin: 0; }
.news-box > .muted { padding: 0 1.2rem; margin: .3rem 0 0; }
.news-box-body { overflow-y: auto; padding: .4rem 1.2rem 1rem; }
.news-box-actions { padding: .8rem 1.2rem; border-top: 1px solid var(--border); text-align: right; }
.news-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
/* Zeiterfassung: Prüfbericht des Monats (seit 02.12.2026) */
.time-report > summary { cursor: pointer; display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; }
.time-report-user h3 { margin: .9rem 0 .3rem; font-size: 1rem; }
.time-report ul { margin: .3rem 0 0; padding-left: 0; list-style: none; }
.time-report li { margin: .3rem 0; }
.time-report li .badge { margin-right: .4rem; }
/* Prüfbericht mit Auffälligkeiten: Farben der gelben Hinweis-Boxen (.flash-warn) */
.time-report.has-items { background: #fff6e0; border: 1px solid #f3d58a; }
.time-report.has-items > summary strong { color: #7a5800; }
.time-report.has-items .badge-muted, .time-report.has-items .badge-warn { background: #fff; } /* Labels auf gelbem Grund lesbar */
.time-report.has-items .badge-warn { border: 1px solid #f3d58a; }
/* Handy: Kalender-Suche in eigener Zeile unter Tag-Umschalter und Datum */
@media (max-width: 760px) {
    .cal-toolbar-top .cal-nav { flex-wrap: wrap; }
    .cal-toolbar-top .cal-title-pick { flex-basis: auto; }
    .cal-toolbar-top .cal-search { flex-basis: 100%; margin: .3rem 0 0; }
    .cal-search-results { width: 100%; }
}
/* Auftrag ohne Einsatzort (Liste neben dem Kalender) */
.cal-item-nosite { color: #b42318; font-weight: 600; margin-top: .15rem; }
.cal-item.is-nosite { border-left-color: #d92d20 !important; }
/* eingeplante Tour: Route/Uhrzeiten in der Seitenleiste (seit 02.12.2026) – Knöpfe untereinander, volle Breite */
.tour-replan .tour-actions { flex-direction: column; }
.tour-replan .tour-actions .btn { width: 100%; }
.tour-replan > p { margin: .6rem 0 0; }
/* Großansicht Foto: Einsatzort über dem Bild (seit 02.12.2026) */
.lightbox .lb-site { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0; color: #fff; font-size: .9rem; }
.lightbox .lb-site label { display: flex; align-items: center; gap: .5rem; margin: 0; color: #fff; font-weight: 600; }
.lightbox .lb-site select { max-width: min(60vw, 520px); padding: .3rem .5rem; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; margin: 0; }
.lightbox .lb-site-status.is-ok { color: #7ee2a8; }
.lightbox .lb-site-status.is-error { color: #ffb4a9; }
.lb-site:not([hidden]) + img { max-height: calc(100vh - 11rem); }
.photo-site-title { font-size: 1rem; margin: 1.1rem 0 .5rem; padding-top: .7rem; border-top: 1px solid var(--border); }
.photo-site-title:first-of-type { border-top: 0; padding-top: 0; margin-top: .3rem; }
.photo-card { scroll-margin-top: 90px; }
.photo-card.is-jumped img { outline: 3px solid var(--accent, var(--accent)); outline-offset: 2px; transition: outline-color .4s; }
.news-top-title { margin: .3rem 0 .4rem; font-size: 1rem; color: var(--primary); }
.news-top { list-style: none; margin: .2rem 0 .6rem; padding: 0; display: grid; gap: .45rem; }
.news-top li { background: #f4f7fb; border-left: 4px solid var(--accent); border-radius: 8px; padding: .55rem .8rem; line-height: 1.4; }
.news-top li strong { display: block; color: var(--primary); }
.news-details > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; padding: .2rem 0; }
.news-details-date { margin: .8rem 0 0; font-size: .95rem; color: var(--primary); }

/* Tour-Seite, Spalte „Ergebnis“ (seit 03.12.2026): Auswahl und Knöpfe einheitlich hoch, untereinander bündig */
.stop-outcome select, .stop-outcome .btn { height: 2.1rem; margin: 0; padding: 0 .65rem; font-size: .85rem; line-height: 1; box-sizing: border-box; }
.stop-outcome .btn { display: inline-flex; align-items: center; justify-content: center; }
.stop-outcome .stop-result select { width: 100%; }
.stop-outcome form + form { margin-top: .4rem; }
.stop-outcome > form:not(.stop-result):not(.stop-cancel) .btn { width: 100%; }
.stop-outcome .stop-cancel { display: flex; gap: 0; align-items: stretch; margin-top: .4rem; } /* wie bei Aufträgen (.order-cancel): Grund + Knopf aneinander */
.stop-outcome .stop-cancel select { flex: 1; min-width: 0; width: auto; padding: 0 1.6rem 0 .55rem; }
.stop-outcome .stop-cancel .btn { flex: none; padding: 0 .75rem; }
@media (max-width: 760px) {
    .stop-outcome select, .stop-outcome .btn { height: 2.6rem; } /* Handy: wie die Absage bei den Aufträgen */
    .table-cards.tour-stop-table td.stop-mails { display: block; min-height: 3rem; } /* Beschriftung „Benachrichtigung“ braucht zwei Zeilen */
    .table-cards.tour-stop-table td.stop-outcome { padding-left: 0; padding-top: 1.6rem; } /* Beschriftung oben, Felder in voller Breite */
    .table-cards.tour-stop-table td.stop-outcome::before { top: .3rem; width: auto; }
} /* Beschriftung „Benachrichtigung“ braucht zwei Zeilen */
