/* Service-Plantafel (16.10.2026) — Monteur × Tag mit Service-Fenstern. Siehe service-plantafel.js */
.svc-ansicht button + button { border-left: none; }
.svc-ansicht .svc-plantafel-btn { flex: 1.2 1 0; color: #1d4ed8; }

.spt { position: fixed; inset: 0; z-index: 9000; background: #f8fafc; display: flex; flex-direction: column; font-size: 12px; color: #1f2937; }
.spt[hidden] { display: none; }
body.spt-offen { overflow: hidden; }

.spt-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; background: #fff; border-bottom: 1px solid var(--border, #e5e7eb); }
.spt-kopf h2 { font-size: 15px; margin: 0; color: var(--blue-900, #002855); }
.spt-kopf select { padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; font-size: 12px; }
.spt-nav { display: flex; align-items: center; gap: 6px; }
.spt-nav button, .spt-seg button { padding: 4px 10px; border: 1px solid #cbd5e1; background: #fff; border-radius: 7px; cursor: pointer; font-size: 12px; }
.spt-nav [data-ref="titel"] { font-weight: 700; min-width: 190px; text-align: center; }
.spt-seg { display: flex; }
.spt-seg button:first-child { border-radius: 7px 0 0 7px; }
.spt-seg button:last-child { border-radius: 0 7px 7px 0; border-left: none; }
.spt-seg button.aktiv, .spt-listen-tabs button.aktiv { background: var(--service-color, #3b82f6); border-color: var(--service-color, #3b82f6); color: #fff; }
.spt-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.spt-legende { display: inline-flex; align-items: center; gap: 4px; color: #475569; font-size: 11px; }
.spt-legende .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 6px; border: 1px solid #cbd5e1; }
.spt-legende .lg.frei { background: #f0fdf4; border-color: #86efac; }
.spt-legende .lg.fenster { background: #dbeafe; border: 2px solid #3b82f6; }
.spt-legende .lg.teil { background: #fff7ed; border-color: #fdba74; }
.spt-legende .lg.abw { background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 3px, #fecaca 3px, #fecaca 5px); }
.spt-status-kopf { color: var(--muted, #6b7280); margin-left: auto; }

.spt-ablauf { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 14px; background: #eff6ff; border-bottom: 1px solid #dbeafe; color: #1e3a8a; font-size: 11.5px; }
.spt-ablauf b { display: inline-flex; width: 17px; height: 17px; border-radius: 50%; background: #3b82f6; color: #fff; align-items: center; justify-content: center; font-size: 10px; margin-right: 4px; }

.spt-body { flex: 1; display: flex; min-height: 0; }
.spt-liste { width: 290px; flex: 0 0 290px; display: flex; flex-direction: column; border-right: 1px solid var(--border, #e5e7eb); background: #fff; min-height: 0; }
.spt-listen-tabs { display: flex; padding: 8px 8px 0; }
.spt-listen-tabs button { flex: 1; padding: 6px; border: 1px solid #cbd5e1; background: #fff; font-weight: 600; font-size: 12px; cursor: pointer; }
.spt-listen-tabs button:first-child { border-radius: 8px 0 0 8px; }
.spt-listen-tabs button:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.spt-listen-tabs span { font-size: 10px; opacity: .85; }
.spt-filter { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border, #e5e7eb); }
.spt-filter input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 12px; }
.spt-filter select { width: 118px; padding: 5px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 11.5px; }
.spt-filter select[hidden] { display: none; }
/* Gemeinsamer Listen-Kopf (liste-kopf.js) über der Kartenliste; Filterzeile nur, wenn ein Filter sichtbar ist */
.spt-listenkopf { padding: 8px 8px 0; }
.spt-filter:not(:has(> :not([hidden]))) { display: none; }
.spt-karten { flex: 1; overflow: auto; padding: 8px; }
.spt-karte { background: #fff; border: 1px solid var(--border, #e5e7eb); border-left: 4px solid #94a3b8; border-radius: 8px; padding: 7px 9px; margin-bottom: 6px; cursor: grab; }
.spt-karte:hover { border-color: #93c5fd; }
.spt-karte.zieht { opacity: .5; }
.spt-k1 { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; color: var(--blue-900, #002855); }
.spt-k2 { font-weight: 600; margin-top: 2px; }
.spt-k3 { color: #64748b; font-size: 11px; margin-top: 2px; }
.spt-hinweis { color: #1d4ed8; }
.spt-warn { color: #b45309; }
.spt-badge { background: #e0f2fe; color: #075985; border-radius: 8px; padding: 0 6px; font-size: 10px; font-weight: 700; }
.spt-badge.rot { background: #fee2e2; color: #b91c1c; }
.spt-badge.gruen { background: #dcfce7; color: #166534; }
.spt-badge.gelb { background: #fef3c7; color: #92400e; }
.spt-badge.blau { background: #dbeafe; color: #1d4ed8; }
.spt-reg { color: #fff; border-radius: 8px; padding: 0 6px; font-size: 10px; font-weight: 700; }
.spt-reg-leer { background: #f59e0b; }
.spt-mon { background: #e2e8f0; color: #475569; border-radius: 8px; padding: 0 6px; font-size: 10px; }
.spt-leer { padding: 24px 10px; text-align: center; color: var(--muted, #6b7280); }

.spt-raster-wrap { flex: 1; overflow: auto; min-width: 0; }
.spt-raster { display: grid; min-width: max-content; }
.spt-raster.laedt { opacity: .55; pointer-events: none; }
.spt-ecke, .spt-tag { position: sticky; top: 0; z-index: 3; background: #002855; color: #fff; padding: 6px 8px; font-weight: 700; border-right: 1px solid #1e3a8a; }
.spt-ecke { left: 0; z-index: 4; }
.spt-tag small { display: block; font-weight: 400; font-size: 10px; opacity: .85; }
.spt-tag.heute { background: #1d4ed8; }
.spt-tag.vergangen { background: #475569; }
.spt-ma { position: sticky; left: 0; z-index: 2; background: #fff; padding: 6px 8px; border-bottom: 1px solid var(--border, #e5e7eb); border-right: 2px solid #cbd5e1; font-weight: 700; display: flex; flex-direction: column; justify-content: center; }
.spt-ma small { font-weight: 400; color: #64748b; font-size: 10.5px; }

.spt-zelle { position: relative; min-height: 78px; padding: 4px 5px 22px; border-bottom: 1px solid var(--border, #e5e7eb); border-right: 1px solid var(--border, #e5e7eb); background: #fff; display: flex; flex-direction: column; gap: 3px; }
.spt-zelle.st-frei { background: #f0fdf4; }
.spt-zelle.st-teil { background: #fff7ed; }
.spt-zelle.st-voll { background: #ffedd5; }
.spt-zelle.st-abw { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 6px, #fee2e2 6px, #fee2e2 9px); }
.spt-zelle.st-fenster { background: color-mix(in srgb, var(--rf, #3b82f6) 12%, #fff); box-shadow: inset 0 0 0 2px var(--rf, #3b82f6); }
.spt-zelle.fremd .spt-fenster { opacity: .55; }
.spt-zelle.vergangen { opacity: .55; }
.spt-zelle.drag-over { outline: 3px dashed #1d4ed8; outline-offset: -3px; }
.spt-zelle.passt { box-shadow: inset 0 0 0 3px var(--rf, #16a34a), 0 0 0 2px #fde047; }
.spt-fenster { position: relative; background: var(--rf, #3b82f6); color: #fff; border-radius: 6px; padding: 3px 18px 3px 6px; font-size: 10.5px; line-height: 1.35; }
.spt-fenster .spt-gruen { color: #dcfce7; font-weight: 700; }
.spt-fenster .spt-rot { color: #fee2e2; font-weight: 700; text-decoration: underline; }
.spt-x { position: absolute; top: 1px; right: 2px; background: transparent; border: none; color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0 3px; }
.spt-x:hover { color: #fecaca; }
.spt-abw { color: #991b1b; font-weight: 700; font-size: 10.5px; }
.spt-job { background: #fff; border: 1px solid #e2e8f0; border-left: 3px solid var(--tf, #64748b); border-radius: 5px; padding: 2px 5px; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.spt-job:hover { border-color: #93c5fd; }
.spt-last { height: 4px; background: #e2e8f0; border-radius: 2px; overflow: hidden; }
.spt-last i { display: block; height: 100%; background: #f59e0b; }
.spt-frei { color: #15803d; font-weight: 700; font-size: 10.5px; }
.spt-plus { position: absolute; left: 4px; right: 4px; bottom: 3px; padding: 1px 4px; font-size: 10px; border: 1px dashed #93c5fd; background: rgba(255, 255, 255, .8); color: #1d4ed8; border-radius: 5px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.spt-zelle:hover .spt-plus, .spt-plus:focus { opacity: 1; }

.spt-dialog { border: none; border-radius: 12px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 16px 40px rgba(0, 0, 0, .25); font-size: 13px; }
.spt-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.spt-dlg-kopf { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; }
.spt-dlg-kopf h3 { margin: 0; font-size: 15px; color: var(--blue-900, #002855); }
.spt-dlg-x { background: none; border: none; font-size: 22px; cursor: pointer; color: #64748b; line-height: 1; }
.spt-dlg-inhalt { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.spt-fakten { display: grid; grid-template-columns: 80px 1fr; gap: 4px 10px; margin: 0; }
.spt-fakten dt { color: #64748b; }
.spt-fakten dd { margin: 0; }
.spt-zeile { display: flex; gap: 12px; flex-wrap: wrap; }
.spt-zeile label, .spt-feld { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #475569; }
.spt-zeile input, .spt-feld select { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: 13px; }
.spt-hinweise { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.spt-hinweise li { padding: 5px 8px; border-radius: 6px; font-size: 12px; }
.spt-hinweise li.gelb { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.spt-hinweise li.rot { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-weight: 600; }
.spt-schritte { margin: 0; padding-left: 20px; color: #475569; font-size: 12px; }
.spt-klein { margin: 0; color: #64748b; font-size: 11.5px; }
.spt-status { margin: 0; min-height: 1em; color: #334155; font-size: 12px; }
.spt-status.fehler { color: #b91c1c; font-weight: 600; }
.spt-dlg-fuss { display: flex; justify-content: flex-end; gap: 8px; }

.spt-zurueck-schwebend { position: fixed; left: 16px; bottom: 16px; z-index: 9500; padding: 8px 14px; border-radius: 20px; border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }

@media (max-width: 820px) {
    .spt-body { flex-direction: column; }
    .spt-liste { width: auto; flex: 0 0 auto; max-height: 34vh; border-right: none; border-bottom: 1px solid var(--border, #e5e7eb); }
    .spt-legende, .spt-ablauf { display: none; }
    .spt-plus { opacity: 1; }
}
