/* Einsatzkalender und Sprachaufnahme, passend zur bestehenden Industrial-Oberfläche. */
#page-schedule[hidden],#page-voice[hidden],#schedule-editor[hidden],#voice-review[hidden],#voice-player[hidden],#schedule-conflicts[hidden]{display:none!important}
.schedule-summary{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 16px}
.schedule-summary span{background:rgba(84,128,142,.13);border:1px solid rgba(124,156,166,.22);padding:9px 13px;border-radius:11px;font-size:.87rem}
.schedule-summary strong{font-variant-numeric:tabular-nums}
.schedule-toolbar{display:flex;flex-direction:column;gap:15px}
.schedule-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.schedule-controls strong{font-size:1.05rem;margin-left:8px}
.schedule-controls button{min-width:39px}
.schedule-filters{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px}
.schedule-filters label{display:flex;flex-direction:column;gap:5px;font-size:.82rem;font-weight:600}
.schedule-filters :is(input,select){width:100%;min-width:0}
.schedule-columns{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:14px 0}
.schedule-columns.single{display:block;max-width:900px}
.schedule-day{min-width:0;border:1px solid rgba(135,151,160,.28);border-radius:13px;overflow:hidden;background:rgba(92,109,124,.05)}
.schedule-day-title{padding:10px 7px;background:rgba(101,128,145,.13);display:flex;align-items:center;justify-content:space-between;gap:4px;flex-wrap:wrap}
.schedule-day-title strong{font-size:.87rem}
.schedule-day-title button{padding:6px 7px;font-size:.72rem}
.schedule-day-items{padding:6px;display:flex;flex-direction:column;gap:8px;min-height:95px}
.schedule-empty{font-size:.8rem;color:var(--muted,#929ba1);display:block;padding:10px 3px}
.schedule-card{border:1px solid rgba(147,165,178,.27);border-left:4px solid #89929d;background:var(--panel,#1f282f);border-radius:10px;padding:9px;display:flex;flex-direction:column;gap:9px;overflow-wrap:anywhere}
.schedule-proposed{border-left-color:#d29d49}.schedule-active{border-left-color:#4db09f}.schedule-completed{border-left-color:#719b66}.schedule-cancelled{opacity:.65;border-left-color:#ac6666}
.schedule-card-main{display:flex;flex-direction:column;gap:4px}.schedule-card-main strong{font-size:.88rem;line-height:1.25}
.schedule-time,.schedule-meta{font-size:.75rem;color:var(--muted,#b2bdc2);line-height:1.35}
.schedule-time{font-weight:700;color:var(--text,#ddd)}
.schedule-card-actions{display:flex;flex-wrap:wrap;gap:5px}
.schedule-card-actions button{font-size:.72rem;padding:7px 8px;white-space:normal}
.schedule-pill{font-size:.72rem;align-self:start;background:rgba(144,154,172,.16);border-radius:8px;padding:4px 7px;line-height:1.4}
.schedule-warning{background:rgba(190,125,45,.13);border:1px solid rgba(204,140,45,.5);padding:12px;border-radius:10px;color:inherit}
.schedule-month{margin:12px 0}.schedule-weeknames,.schedule-month-cells{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.schedule-weeknames b{text-align:center;padding:9px;font-size:.77rem}
.schedule-month-day{display:flex;flex-direction:column;align-items:flex-start;text-align:left;min-height:98px;padding:8px;border:1px solid rgba(145,167,181,.25);border-radius:8px;overflow:hidden;background:var(--panel,#1d272e);color:inherit;cursor:pointer;gap:4px}
.schedule-month-day>span{font-weight:700;font-size:.84rem}.schedule-month-day small{background:rgba(84,145,136,.22);border-radius:5px;padding:3px 5px;max-width:100%;width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.67rem}
.schedule-month-day.outside{opacity:.36}.schedule-month-day.current{outline:2px solid #4ba0ab;outline-offset:-2px}
.schedule-backlog{margin-top:16px}.schedule-backlog summary{font-weight:700;cursor:pointer}.schedule-backlog-list{display:grid;gap:9px;margin-top:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.voice-panel{max-width:980px}.voice-record-controls{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:14px 0}
.voice-record-controls strong{font-variant-numeric:tabular-nums;font-size:1.24rem}
#voice-player{display:block;width:min(100%,600px);margin-bottom:14px}
.voice-panel label{display:flex;flex-direction:column;gap:7px}.voice-panel textarea{width:100%}
#voice-status.voice-error{border-color:#b66c59;color:#e6b1a9}
@media(max-width:1350px){.schedule-columns{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.schedule-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-columns{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.schedule-columns{grid-template-columns:1fr}.schedule-day-title{padding:11px}.schedule-day-items{min-height:unset;padding:9px}.schedule-card{padding:12px}.schedule-card-actions button{min-height:42px;flex:1}.schedule-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-month-day{padding:4px;min-height:70px}.schedule-month-day small{font-size:.55rem;padding:2px}.schedule-weeknames b{padding:5px 1px}.schedule-controls strong{width:100%;margin:5px 0 0}.voice-record-controls button{flex:1 1 auto;min-height:44px}.schedule-summary span{flex:1 1 130px;font-size:.78rem}}

/* v4.7.3: einheitliche Kundensuche und unverbindliche, antippbare KI-Vorschläge. */
.customer-match-box[hidden]{display:none!important}
.customer-match-box{padding:13px;border:1px solid rgba(211,168,89,.55);background:rgba(178,140,65,.1);border-radius:10px;display:flex;flex-direction:column;gap:9px;min-width:0}
.customer-match-box strong{font-size:.93rem}
.customer-match-box p{margin:0;font-size:.84rem;overflow-wrap:anywhere}
.customer-match-box .customer-match-option{text-align:left;white-space:normal;line-height:1.45;min-height:44px;overflow-wrap:anywhere}
.customer-match-box .customer-match-option[aria-pressed=true]{outline:2px solid #7eb38a;outline-offset:2px}
.customer-match-selected{font-weight:700;color:inherit}
#schedule-form .customer-field{width:100%}
#schedule-form .customer-search{width:100%}
#schedule-form .customer-search input{width:100%}

/* v4.7.4: gemeinsame Ablage für Außendienst und Büro. */
.schedule-inbox{margin:14px 0;border-left:4px solid #69ae8b}
.schedule-inbox .section-head{margin-bottom:10px}
.schedule-inbox-filters{font-size:.85rem;margin-bottom:12px}
.schedule-inbox-filters label{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.schedule-inbox-note{font-size:.78rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.schedule-save-actions{display:flex;flex-wrap:wrap;gap:9px}
.schedule-save-actions button{min-height:42px}
@media(max-width:600px){.schedule-save-actions button{width:100%}.schedule-inbox .schedule-backlog-list{grid-template-columns:1fr}}

/* v4.7.5: configurable conflict hints and compact mobile voice capture */
.schedule-rules{border-top:1px solid rgba(136,165,150,.23);padding-top:12px}
.schedule-rules summary,.voice-more-fields summary,.voice-transcript-details summary{cursor:pointer;font-weight:700;padding:9px 0}
.schedule-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.schedule-rule-grid label{display:flex;flex-direction:column;gap:5px;font-size:.82rem;font-weight:600}
.schedule-rule-grid select{width:100%;min-width:0}
.schedule-conflict-caption{font-size:.84rem;margin:0;color:var(--muted,#a1b1ae)}
.schedule-conflict-summary.has-conflicts{border-color:rgba(235,155,72,.85);background:rgba(210,116,48,.22);font-weight:700}
.schedule-card.schedule-has-conflict{border-left-color:#edab58;background:rgba(186,112,42,.11)}
.voice-main-action{min-height:48px;margin:9px 0}
.voice-transcript-details{padding:9px 0;border-top:1px solid rgba(145,167,181,.2)}
.voice-transcript-details textarea{margin:9px 0}
.voice-more-fields{border:1px solid rgba(145,167,181,.25);border-radius:9px;padding:6px 12px;margin-top:8px}
.voice-more-fields[open]{display:flex;flex-direction:column;gap:12px}
.voice-more-fields summary{display:list-item}
.voice-fast-actions button{min-height:48px}
@media(max-width:700px){.schedule-rule-grid{grid-template-columns:1fr}.voice-main-action{width:100%}.voice-fast-actions{display:flex;flex-direction:column}.voice-fast-actions button{width:100%}}

/* v4.7.6 – lokale Offline-Audioablage */
.voice-local-buttons,.voice-local-storage-actions,.voice-library-heading{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:9px 0 13px}
.voice-library-heading{justify-content:space-between}.voice-library-heading h2{margin:0}
.voice-local-buttons small,#voice-storage-status{font-size:.81rem;opacity:.9}
.voice-library-list{display:grid;gap:11px;margin-top:12px}
.voice-local-card{border:1px solid rgba(151,185,157,.38);background:rgba(15,34,26,.28);border-radius:10px;padding:14px;min-width:0}
.voice-local-title{font-size:.99rem;font-weight:700;overflow-wrap:anywhere}
.voice-local-meta{opacity:.85;font-size:.79rem;margin:6px 0 10px}
.voice-local-actions{display:flex;flex-wrap:wrap;gap:8px}.voice-local-actions button{min-height:39px}
.voice-library-count{font-size:.83rem;opacity:.75}
@media(max-width:600px){.voice-local-buttons button{width:100%;min-height:44px}.voice-local-actions button{flex:1 1 125px}.voice-library-heading button{min-height:44px}}

/* v4.7.7 – WhatsApp-artige Aufnahme per Halten und Wischsperre */
#voice-stop[hidden],#voice-lock-target[hidden]{display:none!important}
.voice-gesture-help{max-width:690px;line-height:1.6}
.voice-record-controls{align-items:center;gap:18px;margin:18px 0}
.voice-gesture-pad{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-width:190px;max-width:320px;position:relative}
.voice-record-button{border-radius:999px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:125px;min-height:106px;max-width:210px;padding:15px 22px!important;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;white-space:normal;text-align:center;line-height:1.2;cursor:pointer}
.voice-record-button .voice-mic-icon{font-size:1.95rem;line-height:1.12;pointer-events:none}
.voice-record-button #voice-record-label{font-size:.84rem;font-weight:700;pointer-events:none}
.voice-record-button:focus-visible{outline:3px solid #b6d7ad;outline-offset:4px}
.voice-gesture-pad.voice-gesture-holding .voice-record-button{box-shadow:0 0 0 7px rgba(108,190,128,.18);transform:scale(1.03)}
.voice-gesture-pad.voice-gesture-locked .voice-record-button{box-shadow:0 0 0 5px rgba(214,163,85,.28)}
.voice-lock-target{border:1px dashed #9ec6a7;border-radius:999px;background:rgba(49,111,82,.3);color:inherit;font-weight:700;padding:8px 11px;font-size:.79rem;text-align:center;pointer-events:none;max-width:100%;animation:voice-appear .14s ease-out}
.voice-lock-target.voice-lock-ready{background:rgba(93,154,96,.36);border-style:solid}
.voice-gesture-state{min-height:2.5em;max-width:260px;font-size:.79rem;opacity:.91;line-height:1.4;text-align:center}
.voice-record-side{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
.voice-record-side button{min-height:43px}
.voice-record-side strong{font-size:1.25rem;font-variant-numeric:tabular-nums}
@keyframes voice-appear{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){
 .voice-record-controls{display:flex;flex-direction:column;align-items:center;gap:14px}
 .voice-gesture-pad{width:100%;max-width:320px;min-width:0}
 .voice-record-controls .voice-record-button{flex:none;width:134px;height:134px;min-height:134px;max-width:134px;padding:13px!important}
 .voice-record-side{width:100%;align-items:center;gap:10px}
 .voice-record-side #voice-stop{width:min(100%,360px);min-height:50px}
 .voice-record-side #voice-discard{width:min(100%,360px)}
 .voice-gesture-state{max-width:100%}
}
@media(prefers-reduced-motion:reduce){.voice-lock-target{animation:none}.voice-gesture-pad .voice-record-button{transform:none!important}}

/* 4.12.1: direct view switching, dated navigation and activity planning. */
.schedule-view-legacy{display:none!important}
.schedule-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.schedule-period-actions,.schedule-view-actions{display:flex;gap:6px;align-items:center}
.schedule-period-actions button{min-width:44px}.schedule-controls strong{flex:1;min-width:160px;margin:0}
.schedule-view-actions button[aria-pressed=true]{background:var(--accent,#cdb28b)!important;color:#17251b!important;border-color:#e1c9a6!important}
.schedule-area{margin-bottom:22px}.schedule-area h2{display:flex;align-items:center;gap:10px}.schedule-area-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:12px}.schedule-area-list .schedule-card{max-width:620px}
@media(max-width:600px){.schedule-controls{display:grid;grid-template-columns:1fr}.schedule-controls strong{grid-row:1;width:100%;margin:0}.schedule-period-actions{justify-content:space-between}.schedule-period-actions button{flex:1}.schedule-view-actions button{flex:1}.schedule-view-actions{width:100%}}

#schedule-filter-options>summary{min-height:44px;cursor:pointer}#schedule-filter-options .schedule-filters{margin:12px 0}.schedule-view-actions button[aria-pressed=true]{box-shadow:inset 0 -3px 0 #e1c9a6}
