/* ============================================================
   Mähen v2 — Tab, Sheets, Karte, Tour (eigene Regeln, Präfix mw-)
   Farben/Radien an app.css angelehnt. Mobile first (360–420 px).
   ============================================================ */

/* ---------- Tab-Grundgerüst ---------- */
#mow-body { padding: 10px 10px 24px; }
.mw-root { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; }
.mw-root.mw-reloading { opacity: .65; }

.mw-topbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mw-top-btn {
    min-height: 44px; padding: 6px 12px; border-radius: 22px;
    border: 1px solid #cfd8dc; background: #fff; color: #37474F;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.mw-top-btn.on   { background: #E8F5E9; border-color: #66BB6A; color: #1B5E20; }
.mw-top-btn.warn { background: #FFF3E0; border-color: #FFB74D; color: #E65100; }
.mw-top-btn:active { transform: scale(.97); }
.mw-ro { font-size: 12px; color: #78909C; margin-left: auto; }

.mw-card {
    background: #fff; border-radius: 12px; padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.mw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mw-card-head h3 { font-size: 15px; font-weight: 700; color: var(--text-dark, #2c3e50); margin: 0; }
.mw-src { font-size: 11px; color: #90A4AE; }
.mw-tag {
    font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 10px;
    background: #E3F2FD; color: #1565C0; border: none;
}
.mw-tag-btn { cursor: pointer; background: #FFF3E0; color: #E65100; min-height: 44px; padding: 4px 12px; border-radius: 22px; }

.mw-loading, .mw-updating { color: #78909C; font-size: 13px; padding: 10px 2px; }
.mw-loading::before, .mw-updating::before {
    content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
    border: 2px solid #CFD8DC; border-top-color: var(--primary, #1a5276); border-radius: 50%;
    animation: mw-spin .8s linear infinite;
}
.mw-updating { padding: 0 0 6px; font-size: 12px; }
@keyframes mw-spin { to { transform: rotate(360deg); } }
.mw-muted { color: #78909C; font-size: 13px; line-height: 1.4; }
.mw-muted-sm { color: #78909C; font-size: 11.5px; line-height: 1.4; }
.mw-empty { text-align: center; color: #90A4AE; font-size: 14px; padding: 24px 12px; }
.mw-empty.sm { padding: 12px; font-size: 13px; }
.mw-error { color: #B71C1C; background: #FFEBEE; border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.mw-error .mw-pbtn { margin-top: 8px; }
.mw-note { background: #E3F2FD; color: #0D47A1; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 6px 0; line-height: 1.4; }
.mw-warn { background: #FFF3E0; color: #E65100; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 6px 0; line-height: 1.4; }
.mw-warn ul { margin: 4px 0 0 18px; }
.mw-stale { margin-top: 6px; color: #E65100; }
.mw-h4 { font-size: 13px; font-weight: 700; color: #37474F; margin: 14px 0 6px; }
.mw-block { display: block; width: 100%; margin-top: 10px; }

/* ---------- Wetter & Wachstum ---------- */
.mw-wx-today { display: flex; align-items: center; gap: 10px; }
.mw-wx-ico { font-size: 34px; line-height: 1; flex-shrink: 0; }
.mw-wx-main { flex: 1; min-width: 0; }
.mw-wx-temp { font-size: 15px; color: #37474F; }
.mw-wx-temp b { font-size: 20px; color: #263238; }
.mw-wx-desc { font-size: 12.5px; color: #607D8B; }
.mw-wx-mow { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 10px; flex-shrink: 0; text-align: center; }
.mw-wx-mow.ok { background: #E8F5E9; color: #2E7D32; }
.mw-wx-mow.no { background: #FFEBEE; color: #C62828; }

.mw-growth { margin-top: 10px; }
.mw-growth-label { font-size: 13px; color: #37474F; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mw-trend { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.mw-trend.slow { background: #FFF3E0; color: #E65100; }
.mw-trend.norm { background: #E8F5E9; color: #2E7D32; }
.mw-trend.fast { background: #E0F2F1; color: #00695C; }
.mw-gbar { position: relative; height: 10px; background: #ECEFF1; border-radius: 6px; margin: 6px 0 4px; overflow: hidden; }
.mw-gbar-fill { height: 100%; border-radius: 6px; transition: width .4s; }
.mw-gbar-fill.slow { background: linear-gradient(90deg, #FFB74D, #FB8C00); }
.mw-gbar-fill.norm { background: linear-gradient(90deg, #81C784, #43A047); }
.mw-gbar-fill.fast { background: linear-gradient(90deg, #4DB6AC, #00796B); }
.mw-gbar-tick { position: absolute; top: -2px; bottom: -2px; left: 71.43%; width: 2px; background: #455A64; opacity: .55; }

.mw-advice { margin: 8px 0 0; padding: 0 0 0 18px; font-size: 12.5px; color: #455A64; line-height: 1.45; }
.mw-advice li + li { margin-top: 3px; }

.mw-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.mw-day {
    background: #F5F7FA; border-radius: 8px; padding: 5px 2px 4px; text-align: center;
    font-size: 11px; color: #455A64; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
}
.mw-day.is-today { background: #E3F2FD; box-shadow: inset 0 0 0 1.5px #64B5F6; }
.mw-day-wd { font-weight: 700; font-size: 10.5px; white-space: nowrap; }
.mw-day-ico { font-size: 17px; line-height: 1.2; }
.mw-day-t { font-weight: 700; color: #263238; }
.mw-day-r { font-size: 10px; color: #1E88E5; white-space: nowrap; }
.mw-day-r small { font-size: 9px; }
.mw-day-ok { font-size: 12px; color: #2E7D32; font-weight: 800; height: 14px; line-height: 14px; }
.mw-gdot { width: 9px; height: 9px; border-radius: 50%; margin: 2px 0 1px; }
.g-none { background: #CFD8DC; }
.g-rest { background: #A1887F; }
.g-slow { background: #FB8C00; }
.g-norm { background: #43A047; }
.g-fast { background: #00695C; }
.mw-days-legend { margin-top: 6px; }

/* ---------- Segment-Buttons (Heute/Morgen/Datum, Dauer, Grund) ---------- */
.mw-seg { display: flex; gap: 6px; margin: 4px 0 8px; }
.mw-seg > button, .mw-seg > .mw-date-btn {
    flex: 1 1 0; min-height: 44px; border: 1px solid #CFD8DC; background: #fff; color: #37474F;
    border-radius: 10px; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 8px;
    display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0;
}
.mw-seg > button.active, .mw-seg > .mw-date-btn.active {
    background: var(--primary, #1a5276); border-color: var(--primary, #1a5276); color: #fff;
}
.mw-seg-wrap { flex-wrap: wrap; }
.mw-seg-wrap > button { flex: 1 1 calc(50% - 6px); }
.mw-seg.sm > button { min-height: 44px; font-size: 12.5px; }
.mw-date-btn { position: relative; overflow: hidden; }
.mw-date-btn input[type="date"] {
    border: none; background: transparent; color: inherit; font: inherit; font-size: 12.5px;
    width: 100%; min-width: 0; padding: 0; min-height: 30px;
}
.mw-date-btn.active input[type="date"] { color: #fff; }
.mw-date-btn.active input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* ---------- Tagesplan ---------- */
.mw-plan-sum { font-size: 14px; color: #263238; line-height: 1.4; margin: 4px 0; }
.mw-plan-date { color: #607D8B; font-weight: 600; }
.mw-plan-util { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #607D8B; margin: 4px 0 6px; }
.mw-ubar { flex: 0 0 70px; height: 7px; background: #ECEFF1; border-radius: 4px; overflow: hidden; }
.mw-ubar > div { height: 100%; background: #1E88E5; border-radius: 4px; }
.mw-plan-eq { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 4px 0 8px; }
.mw-eq-chip {
    display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600;
    padding: 3px 8px; border-radius: 12px; color: #263238;
    background: color-mix(in srgb, var(--eqc, #607D8B) 14%, #fff);
    border: 1px solid color-mix(in srgb, var(--eqc, #607D8B) 45%, #fff);
}
.mw-plan-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.mw-pbtn {
    flex: 1 1 96px; min-height: 44px; border-radius: 10px; border: 1px solid #CFD8DC;
    background: #FAFAFA; color: #37474F; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 10px;
}
.mw-pbtn.primary { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.mw-pbtn:active { transform: scale(.97); }

.mw-stops { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid #ECEFF1; }
.mw-stop {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 2px;
    border-bottom: 1px solid #ECEFF1; cursor: pointer;
}
.mw-stop:active { background: #F5F7FA; }
.mw-stop-n {
    flex: 0 0 28px; height: 28px; border-radius: 50%; background: #1565C0; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.mw-stop-n.hi { background: #C62828; }
.mw-stop-n.mid { background: #EF6C00; }
.mw-stop-n.lo { background: #2E7D32; }
.mw-stop-main { flex: 1; min-width: 0; }
.mw-stop-name { font-size: 14px; font-weight: 600; color: #263238; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-stop-sub { font-size: 12px; color: #607D8B; }
.mw-more { margin-top: 8px; font-size: 13px; }
.mw-more summary { cursor: pointer; font-weight: 600; color: #455A64; min-height: 44px; display: flex; align-items: center; }
.mw-more ul { list-style: none; margin: 0; padding: 0; }
.mw-more li { padding: 7px 4px; border-bottom: 1px solid #F0F0F0; cursor: pointer; min-height: 44px; }
.mw-more li small { display: block; color: #78909C; font-size: 11.5px; }
.mw-plan-foot { margin-top: 8px; }

/* ---------- Flächenliste ---------- */
.mw-hint-card {
    background: #FFFDE7; border: 1px solid #FFE082; border-radius: 12px; padding: 12px;
    display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #5D4037; line-height: 1.4;
}
.mw-hint-card b { font-size: 14px; color: #4E342E; }
.mw-hint-card .mw-btn { align-self: flex-start; min-height: 44px; padding: 8px 16px; font-weight: 700; }
.mw-hint-line {
    width: 100%; text-align: left; min-height: 44px; border: 1px solid #FFE082; background: #FFFDE7;
    border-radius: 10px; color: #5D4037; font-size: 13px; font-weight: 600; padding: 8px 12px; cursor: pointer;
}
.mw-list-head { margin: 8px 2px 4px; }
.mw-list-head h3 { font-size: 15px; font-weight: 700; color: var(--text-dark, #2c3e50); margin: 0; }
.mw-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.mw-chips::-webkit-scrollbar { display: none; }
.mw-chip {
    flex: 0 0 auto; min-height: 44px; padding: 6px 12px; border-radius: 22px; border: 1px solid #CFD8DC;
    background: #fff; color: #455A64; font-size: 13px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
}
.mw-chip.active { background: var(--primary, #1a5276); border-color: var(--primary, #1a5276); color: #fff; }
.mw-chip-n { font-size: 11px; background: rgba(0,0,0,.08); padding: 1px 7px; border-radius: 10px; }
.mw-chip.active .mw-chip-n { background: rgba(255,255,255,.25); }
.mw-list-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.mw-list-tools select, .mw-list-tools input {
    min-height: 44px; border: 1px solid #CFD8DC; border-radius: 10px; padding: 6px 10px;
    font-size: 14px; background: #fff; min-width: 0; font-family: inherit;
}
.mw-list-tools select { flex: 0 1 42%; }
.mw-list-tools input { flex: 1 1 auto; }

.mw-cards { display: flex; flex-direction: column; gap: 8px; }
.mw-area {
    display: flex; align-items: stretch; background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); border-left: 5px solid #B0BEC5;
}
.mw-area.st-overdue { border-left-color: #E53935; }
.mw-area.st-due     { border-left-color: #FB8C00; }
.mw-area.st-ok      { border-left-color: #43A047; }
.mw-area.st-snoozed { border-left-color: #1E88E5; }
.mw-area.st-unset   { border-left-color: #B0BEC5; }
.mw-area-main { flex: 1; min-width: 0; padding: 10px 10px 9px 12px; cursor: pointer; }
.mw-area-main:active { background: #F5F7FA; }
.mw-area-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mw-area-name { font-size: 14.5px; font-weight: 700; color: #1a2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mw-area-sub { font-size: 12.5px; color: #37474F; margin-top: 3px; }
.mw-area-sub2 { font-size: 11.5px; color: #78909C; margin-top: 2px; line-height: 1.4; }
.mw-area-actions { display: flex; flex-direction: column; border-left: 1px solid #ECEFF1; }
.mw-area-btn {
    flex: 1; width: 52px; min-height: 44px; border: none; background: #F5F7FA; color: #455A64;
    font-size: 20px; font-weight: 700; cursor: pointer;
}
.mw-area-btn + .mw-area-btn { border-top: 1px solid #ECEFF1; }
.mw-area-btn.ok { background: #2E7D32; color: #fff; }
.mw-area-btn.ok:active { background: #1B5E20; }
.mw-area-btn:active { filter: brightness(.95); }

.mw-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.mw-badge.b-overdue     { background: #FFEBEE; color: #C62828; }
.mw-badge.b-due_soon    { background: #FFF3E0; color: #E65100; }
.mw-badge.b-ok          { background: #E8F5E9; color: #2E7D32; }
.mw-badge.b-snoozed     { background: #E3F2FD; color: #1565C0; }
.mw-badge.b-unscheduled { background: #ECEFF1; color: #607D8B; }
.mw-badge.b-extra       { background: #EDE7F6; color: #5E35B1; font-size: 10.5px; vertical-align: 1px; }
.mw-badge.b-queue       { background: #FFF8E1; color: #F57F17; margin-top: 4px; }
.mw-snz { display: inline-block; margin-top: 4px; font-size: 11.5px; color: #1565C0; background: #E3F2FD; padding: 2px 8px; border-radius: 10px; }

.mw-eq-icons { display: inline-flex; gap: 2px; vertical-align: middle; }
.mw-eq-ico { font-size: 13px; line-height: 1; }

/* Wachstumsbalken (100 % = fällig, Skala bis 150 %) */
.mw-grow { display: flex; align-items: center; gap: 8px; margin: 5px 0 2px; }
.mw-grow-bar { position: relative; flex: 1; height: 8px; background: #ECEFF1; border-radius: 5px; overflow: hidden; }
.mw-grow-fill { height: 100%; border-radius: 5px; }
.mw-grow-fill.lo  { background: #66BB6A; }
.mw-grow-fill.mid { background: #FB8C00; }
.mw-grow-fill.hi  { background: #E53935; }
.mw-grow-tick { position: absolute; top: 0; bottom: 0; left: 66.67%; width: 2px; background: #37474F; opacity: .45; }
.mw-grow-val { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; min-width: 40px; text-align: right; }
.mw-grow-val.lo  { color: #2E7D32; }
.mw-grow-val.mid { color: #E65100; }
.mw-grow-val.hi  { color: #C62828; }
.mw-grow.sm .mw-grow-bar { height: 6px; }

/* ---------- Sheets ---------- */
.mw-overlay { z-index: 2600; }
.mw-sheet { max-height: 88vh; }
.mw-sheet.mw-sheet-tall { height: 92vh; max-height: 92vh; }
.mw-sheet .mw-sheet-body { flex: 1 1 auto; min-height: 0; }
.mw-sheet-foot {
    display: flex; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #ECEFF1; background: #fff; flex-wrap: wrap;
}
.mw-sheet-foot:empty { display: none; }
.mw-btn { min-height: 44px; font-size: 14px; font-weight: 600; border-radius: 10px; }
.mw-btn:disabled { opacity: .55; cursor: default; }
.mw-sheet-sub { font-size: 14px; font-weight: 700; color: #263238; margin: 8px 0 2px; }
.mw-sheet .me-close, #me-overlay .me-close { min-width: 44px; min-height: 44px; }

/* Formular-Elemente in Sheets / Editor (app.css setzt input{width:100%}) */
.mw-sheet .panel-form input[type="checkbox"], .mw-sheet .panel-form input[type="radio"],
.mw-sheet input[type="checkbox"], .mw-sheet input[type="radio"],
.mw-me input[type="checkbox"] {
    width: 20px; height: 20px; min-width: 20px; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--primary, #1a5276);
}
.mw-sheet .panel-form input[type="color"] { height: 44px; padding: 3px; }
.mw-sheet .panel-form input, .mw-sheet .panel-form select { min-height: 44px; }
.mw-check {
    display: flex !important; align-items: center; gap: 10px; min-height: 44px; cursor: pointer;
    font-size: 14px !important; color: #37474F !important; margin-top: 8px !important;
}
.mw-check small { color: #78909C; font-size: 11.5px; }
.mw-radio { display: flex; flex-direction: column; gap: 2px; }
.mw-radio label { display: flex !important; align-items: center; gap: 10px; min-height: 44px; font-size: 14px !important; color: #37474F !important; margin: 0 !important; cursor: pointer; }
.mw-chk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mw-chk-chip {
    display: inline-flex !important; align-items: center; gap: 7px; min-height: 44px; margin: 0 !important;
    padding: 6px 12px; border: 1px solid #CFD8DC; border-radius: 22px; background: #fff; cursor: pointer;
    font-size: 13.5px !important; color: #37474F !important; font-weight: 500 !important;
}
.mw-chk-chip:has(input:checked) { background: #E8F5E9; border-color: #66BB6A; color: #1B5E20 !important; font-weight: 700 !important; }

/* Aktions-Liste / Menü */
.mw-action-head { padding: 8px 2px 4px; }
.mw-action-list { display: flex; flex-direction: column; padding: 4px 0; }
.mw-action {
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 6px; text-align: left;
    border: none; border-bottom: 1px solid #F0F0F0; background: #fff; font-size: 15px; color: #263238; cursor: pointer;
}
.mw-action:active { background: #F5F7FA; }
.mw-action-ico { flex: 0 0 32px; height: 32px; border-radius: 50%; background: #ECEFF1; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.mw-action small { display: block; font-size: 12px; color: #78909C; margin-top: 1px; }
.mw-action-t { font-weight: 600; }

/* Verlauf */
.mw-log { display: flex; flex-direction: column; }
.mw-log-row { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid #F0F0F0; }
.mw-log-main { flex: 1; min-width: 0; font-size: 14px; color: #263238; }
.mw-log-sub { font-size: 12px; color: #607D8B; }
.mw-log-note { font-size: 12.5px; color: #455A64; font-style: italic; white-space: pre-wrap; }
.mw-log-del { flex: 0 0 44px; height: 44px; border: 1px solid #F5C6C6; background: #FDECEA; border-radius: 10px; font-size: 17px; cursor: pointer; }
.mw-log-del:disabled { opacity: .5; }

/* Flächen einrichten */
.mw-su-tools { display: flex; gap: 6px; margin-top: 6px; }
.mw-su-tools input, .mw-su-tools select { flex: 1 1 50%; min-width: 0; }
.mw-su-sel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; font-size: 13px; color: #37474F; }
.mw-su-sel span { font-weight: 700; margin-right: auto; }
.mw-su-sel button {
    min-height: 44px; padding: 4px 10px; border: 1px solid #CFD8DC; background: #fff; border-radius: 8px;
    font-size: 12.5px; font-weight: 600; color: #37474F; cursor: pointer;
}
.mw-su-list { border-top: 1px solid #ECEFF1; }
.mw-su-row {
    display: flex !important; align-items: center; gap: 12px; min-height: 52px; padding: 6px 2px;
    border-bottom: 1px solid #F0F0F0; margin: 0 !important; cursor: pointer;
}
.mw-su-row:has(input:checked) { background: #F1F8E9; }
.mw-su-txt { flex: 1; min-width: 0; }
.mw-su-txt b { display: block; font-size: 14px; color: #263238; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-su-txt small { display: block; font-size: 11.5px; color: #78909C; font-weight: 400; }
.mw-af { border: 1px solid #ECEFF1; border-radius: 10px; padding: 4px 10px 8px; margin-top: 8px; }
.mw-af:has(input[data-f]:checked) { border-color: #66BB6A; background: #F9FBF7; }
.mw-af-toggle {
    display: flex !important; align-items: center; gap: 10px; min-height: 44px; margin: 0 !important;
    font-size: 14px !important; font-weight: 700 !important; color: #263238 !important; cursor: pointer;
}
.mw-af-ctrl { display: flex; flex-direction: column; gap: 6px; }

/* Geräte verwalten */
.mw-eq-list { display: flex; flex-direction: column; }
.mw-eq-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid #F0F0F0; }
.mw-eq-sw { flex: 0 0 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.mw-eq-txt { flex: 1; min-width: 0; }
.mw-eq-txt b { display: block; font-size: 14px; color: #263238; }
.mw-eq-txt small { font-size: 12px; color: #78909C; }
.mw-eq-row .mw-btn { flex: 0 0 auto; min-width: 0; }

/* Statistik */
.mw-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.mw-kpi { background: #F5F7FA; border-radius: 10px; padding: 10px; text-align: center; }
.mw-kpi b { display: block; font-size: 19px; color: #1a5276; }
.mw-kpi span { font-size: 11.5px; color: #607D8B; }
.mw-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; align-items: end; height: 120px; }
.mw-month { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.mw-month-v { font-size: 9.5px; color: #455A64; height: 13px; }
.mw-month-bar { flex: 1; width: 100%; display: flex; align-items: flex-end; background: #F5F7FA; border-radius: 4px 4px 0 0; }
.mw-month-bar > div { width: 100%; background: #43A047; border-radius: 4px 4px 0 0; min-height: 0; }
.mw-month-l { font-size: 9.5px; color: #78909C; margin-top: 2px; }
.mw-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.mw-tbl th { text-align: left; font-size: 11.5px; color: #78909C; font-weight: 600; padding: 4px; border-bottom: 1px solid #ECEFF1; }
.mw-tbl td { padding: 6px 4px; border-bottom: 1px solid #F5F5F5; color: #263238; }
.mw-tbl td:not(:first-child), .mw-tbl th:not(:first-child) { text-align: right; white-space: nowrap; }

/* ---------- Toast ---------- */
.mw-toast {
    position: fixed; left: 50%; top: calc(var(--header-height, 52px) + 10px);
    transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
    z-index: 3000; max-width: calc(100vw - 24px); width: max-content;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,.22); transition: opacity .25s, transform .25s;
    background: rgba(38, 50, 56, .95); color: #fff;
}
.mw-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.mw-toast-success { background: rgba(46, 125, 50, .96); }
.mw-toast-error   { background: rgba(198, 40, 40, .96); }
.mw-toast-warn    { background: rgba(230, 81, 0, .96); }
.mw-toast-msg { line-height: 1.35; }
.mw-toast-btn {
    flex: 0 0 auto; min-height: 44px; padding: 4px 12px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.6); background: transparent; color: #fff; font-weight: 700; cursor: pointer;
}

/* ---------- Karte: Plan, Legende, Zeichnen ---------- */
.mw-stop-num {
    width: 28px; height: 28px; border-radius: 50%; background: #1565C0; color: #fff;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
}
.mw-stop-num.is-extra { background: #5E35B1; }
.mw-start-pin {
    width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid #1565C0;
    display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.mw-legend {
    background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 10px 8px; font-size: 12px; color: #37474F;
    box-shadow: 0 1px 5px rgba(0,0,0,.25); margin-bottom: 12px !important;
}
.mw-legend-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.mw-legend-x { border: none; background: none; font-size: 14px; cursor: pointer; min-width: 44px; min-height: 44px; margin: -8px -10px -8px 0; color: #607D8B; }
.mw-legend-row { display: flex; align-items: center; gap: 6px; line-height: 1.6; }
.mw-legend-row i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; opacity: .85; }

.mw-planbar {
    position: fixed; left: 50%; transform: translateX(-50%);
    top: calc(var(--header-height, 52px) + var(--filter-height, 48px) + 8px);
    z-index: 650; display: flex; gap: 6px; align-items: center;
    background: #fff; border-radius: 14px; padding: 5px; box-shadow: 0 3px 14px rgba(0,0,0,.25);
    max-width: calc(100vw - 24px);
}
.mw-pb-title {
    border: none; background: none; font-size: 13px; font-weight: 700; color: #263238; min-height: 44px;
    padding: 0 8px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.mw-pb-btn { min-height: 44px; min-width: 44px; border-radius: 10px; border: 1px solid #CFD8DC; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; padding: 0 10px; }
.mw-pb-btn.primary { background: #2E7D32; border-color: #2E7D32; color: #fff; }

.mw-drawing { cursor: crosshair !important; }
.mw-drawing .leaflet-marker-icon { pointer-events: none !important; }
.mw-drawbar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--bottomnav-height, 58px) + 10px);
    z-index: 690; width: min(440px, calc(100vw - 20px));
    background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.mw-drawbar-title { font-size: 13px; color: #37474F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-drawbar-count { font-size: 13px; font-weight: 700; color: #00695C; margin: 2px 0 8px; }
.mw-drawbar-btns { display: flex; gap: 6px; }
.mw-drawbar-btns button {
    flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid #CFD8DC; background: #F5F5F5;
    font-size: 13.5px; font-weight: 700; color: #37474F; cursor: pointer;
}
.mw-drawbar-btns .primary { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.mw-drawbar-btns .danger { background: #FDECEA; border-color: #F5C6C6; color: #C62828; }
.mw-drawbar-btns button:disabled { opacity: .5; }

/* ---------- Tour ---------- */
body.mw-tour-active #fab-add,
body.mw-tour-active #location-count { display: none !important; }
.mw-tour {
    position: fixed; left: 0; right: 0; bottom: var(--bottomnav-height, 58px);
    z-index: 650; background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 22px rgba(0,0,0,.22); max-height: 62vh; overflow-y: auto;
    max-width: 560px; margin: 0 auto;
}
.mw-tour-head { display: flex; align-items: stretch; gap: 4px; padding: 6px 6px 0; }
.mw-tour-nav {
    flex: 0 0 44px; min-height: 48px; border: none; background: #F5F7FA; border-radius: 12px;
    font-size: 24px; font-weight: 700; color: #37474F; cursor: pointer;
}
.mw-tour-nav:disabled { opacity: .35; }
.mw-tour-title {
    flex: 1; min-width: 0; border: none; background: none; cursor: pointer; text-align: center;
    display: flex; flex-direction: column; justify-content: center; padding: 2px 4px;
}
.mw-tour-step { font-size: 11.5px; color: #607D8B; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-tour-name1 { font-size: 16px; font-weight: 800; color: #1a2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mw-tour-prog { height: 4px; background: #ECEFF1; margin: 6px 10px 0; border-radius: 3px; overflow: hidden; }
.mw-tour-prog > div { height: 100%; background: #43A047; transition: width .3s; }
.mw-tour-body { padding: 8px 12px 10px; }
.mw-tour.collapsed .mw-tour-body { display: none; }
.mw-tour-meta { font-size: 13px; color: #455A64; }
.mw-tour-eq { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.mw-tour-info { font-size: 12.5px; color: #5E35B1; margin-top: 5px; }
.mw-tour-gps { font-size: 12.5px; color: #1565C0; margin-top: 5px; min-height: 16px; }
.mw-tour-state { margin-top: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: #ECEFF1; color: #455A64; }
.mw-tour-state.st-done, .mw-tour-state.st-queued { background: #E8F5E9; color: #2E7D32; }
.mw-tour-state.st-snoozed { background: #E3F2FD; color: #1565C0; }
.mw-tour-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.mw-tour-snooze { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.mw-tbtn {
    min-height: 48px; border-radius: 12px; border: 1px solid #CFD8DC; background: #FAFAFA; color: #37474F;
    font-size: 14.5px; font-weight: 700; cursor: pointer; padding: 6px 8px;
}
.mw-tbtn:disabled { opacity: .45; cursor: default; }
.mw-tbtn:active:not(:disabled) { transform: scale(.97); }
.mw-tbtn.ok { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.mw-tbtn.nav { background: #1565C0; border-color: #1565C0; color: #fff; }
.mw-tbtn.danger { background: #FDECEA; border-color: #F5C6C6; color: #C62828; }
.mw-tbtn.sm { min-height: 44px; font-size: 13px; padding: 4px 12px; }
.mw-tbtn-wide { width: 100%; margin-top: 6px; }
.mw-tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: #607D8B; }
.mw-tour-sum-lead { font-size: 15px; font-weight: 700; color: #2E7D32; margin: 8px 0 0; }

.mw-tstop {
    width: 100%; height: 100%; border-radius: 50%; background: #1565C0; color: #fff; border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
}
.mw-tstop.st-done, .mw-tstop.st-queued { background: #9E9E9E; }
.mw-tstop.st-skipped { background: #B0BEC5; color: #37474F; }
.mw-tstop.st-snoozed { background: #90CAF9; color: #0D47A1; }
.mw-tstop.is-current {
    background: #E65100; font-size: 16px; border-width: 3px;
    box-shadow: 0 0 0 4px rgba(230, 81, 0, .3), 0 2px 6px rgba(0,0,0,.4);
    animation: mw-pulse 1.6s ease-in-out infinite;
}
@keyframes mw-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(230, 81, 0, .35), 0 2px 6px rgba(0,0,0,.4); }
    50%      { box-shadow: 0 0 0 9px rgba(230, 81, 0, .08), 0 2px 6px rgba(0,0,0,.4); }
}

.mw-tour-banner {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--bottomnav-height, 58px) + 12px);
    z-index: 660; width: min(480px, calc(100vw - 20px));
    background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 20px rgba(0,0,0,.25);
    border-left: 5px solid #E65100;
}
.mw-tour-banner-txt { font-size: 13px; color: #37474F; line-height: 1.4; }
.mw-tour-banner-txt b { display: block; font-size: 14px; color: #263238; }
.mw-tour-banner-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }

/* ---------- Popup (Grünfläche) ---------- */
.popup-mowing.mw-snoozed { background: #E3F2FD; border-left-color: #1E88E5; color: #0D47A1; }
.popup-mowing .mw-grow { margin: 5px 0 3px; }
.popup-mowing .mw-pop-main { min-height: 44px; margin-top: 8px; }
.mw-pop-row { display: flex; gap: 6px; margin-top: 6px; }
.mw-pop-btn {
    flex: 1; min-height: 44px; border-radius: 6px; border: 1px solid rgba(0,0,0,.18); background: #fff;
    color: #37474F; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; line-height: 1.2;
}
.mw-pop-btn:active { background: #F0F0F0; }
.mw-pop-snz { margin-top: 4px; font-size: 11.5px; font-weight: 600; }

/* ---------- MetadataEditor: Grünflächen-Teil ---------- */
.mw-me-sec { margin: 16px 0 2px; padding-top: 10px; border-top: 1px solid #ECEFF1; font-size: 13px; font-weight: 800; color: #2E7D32; }
.me-hint { font-size: 11.5px; color: #78909C; margin-top: 4px; line-height: 1.4; }
.me-hint-inline { font-size: 11px; color: #888; font-weight: 400; }
.me-area-row { display: flex; gap: 6px; align-items: stretch; }
.me-area-row input { flex: 1 1 auto; min-width: 0; }
.me-draw-btn { flex: 0 0 auto; min-height: 44px; min-width: 0; font-weight: 700; border-color: #009688 !important; color: #00695C; background: #E0F2F1 !important; }
.mw-linkbtn { border: none; background: none; color: #C62828; text-decoration: underline; font-size: 12px; cursor: pointer; padding: 4px 0; min-height: 44px; }
.mw-me input[type="number"][hidden] { display: none; }

/* ---------- Schmale Geräte ---------- */
@media (max-width: 380px) {
    #mow-body { padding: 8px 8px 20px; }
    .mw-card { padding: 10px; }
    .mw-seg > button, .mw-seg > .mw-date-btn { font-size: 12.5px; padding: 6px 4px; }
    .mw-pbtn { font-size: 12.5px; padding: 6px 6px; }
    .mw-day { font-size: 10px; }
    .mw-day-ico { font-size: 15px; }
    .mw-tbtn { font-size: 13.5px; }
    .mw-area-btn { width: 48px; }
}
