*{box-sizing:border-box}:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--bg:#020617;--line:#263449;--line2:#182439;--text:#e5edf7;--muted:#8da0b8}html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--text)}body{min-width:1050px;overflow:hidden;font-size:12px}button,input,select,textarea{font:inherit}.php-shell{width:100vw;height:100vh;height:100dvh;display:grid;grid-template-rows:40px minmax(0,1fr);overflow:hidden}.php-top{height:40px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 5px;background:#050b19}.top-left{display:flex;align-items:center;gap:6px}.top-chip{height:28px;display:flex;align-items:center;gap:5px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#091225;color:var(--text)}.top-chip span,.top-chip i{color:var(--muted);font-style:normal}.top-chip b{font-variant-numeric:tabular-nums}.theme-toggle{cursor:pointer;min-width:42px;justify-content:center}.op-name{font-weight:700;padding-right:12px}.php-body{display:grid;grid-template-columns:220px minmax(0,1fr);min-height:0}.php-sidebar{min-height:0;border-right:1px solid var(--line);padding:7px 4px 4px;display:flex;flex-direction:column;gap:8px;background:#050b19;overflow:hidden}.php-card{border:1px solid var(--line);border-radius:10px;overflow:hidden;background:#07101f}.php-card-title{width:100%;height:34px;border:0;border-bottom:1px solid var(--line);background:#0d1729;padding:0 11px;display:flex;align-items:center;color:var(--text);font-weight:700;text-align:left}.php-area-list button{width:100%;border:0;background:transparent;color:var(--text);display:flex;align-items:center;justify-content:space-between;cursor:pointer}.php-area-list button:hover,.php-area-list button.filter-active{background:#14213a}.area-main{height:38px;padding:0 10px;font-size:12px}.area-main b,.area-sub b{min-width:27px;border:1px solid var(--line);border-radius:4px;padding:2px 4px;background:#040b18;font-size:10px}.area-sub{padding:2px 0 3px}.area-sub button{height:32px;padding:0 10px 0 26px;font-size:11px;color:#c4d0df}.area-total{font-weight:700;border-top:1px solid var(--line)!important}.diary-card{display:flex;flex-direction:column;min-height:0;max-height:174px}.diary-list{overflow:auto;min-height:0}.diary-row{display:grid;grid-template-columns:46px 1fr;gap:5px;padding:7px 9px;border-bottom:1px solid var(--line2);font-size:10px;line-height:1.35}.diary-row time{color:#8fa3bc}.side-empty{padding:18px;color:#718198;text-align:center}.sidebar-footer{margin-top:auto;padding:2px 7px 0;font-size:8px;color:#526078}.php-main{min-width:0;min-height:0;display:grid;grid-template-rows:51px minmax(0,1fr) auto;overflow:hidden;background:#020617}.php-toolbar{height:51px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px;background:#050b19}.tabs{display:flex;align-items:center;gap:7px;min-width:0}.tool-btn{height:36px;padding:0 13px;border:1px solid var(--line);border-radius:7px;background:#091225;color:inherit;cursor:pointer;white-space:nowrap}.tool-btn:hover,.tool-btn.tab-active{background:#f1f5f9;color:#111827}.tool-btn.primary{background:#f1f5f9;color:#111827;font-weight:700}.tool-btn.danger{border-color:#7f1d2d;color:#fecdd3;background:#160812}.tool-btn:disabled{opacity:.35;cursor:not-allowed}.tool-sep{width:1px;height:27px;background:var(--line);margin:0 2px}.toolbar-counts{white-space:nowrap;color:#bac7d7;font-size:11px}.toolbar-counts b{color:#fff}.php-einsatz-pane{min-height:0;padding:7px;overflow:hidden;position:relative}.table-scroll{height:100%;overflow:auto;border:1px solid var(--line);border-radius:9px;background:#030a18}.php-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:10px}.php-table thead{position:sticky;top:0;z-index:3;background:#0f192c}.php-table th{height:34px;padding:0 7px;text-align:left;border-bottom:1px solid var(--line);color:#c5d0dd}.php-table th:nth-child(1){width:52px}.php-table th:nth-child(2){width:118px}.php-table th:nth-child(3){width:115px}.php-table th:nth-child(4){width:140px}.php-table th:nth-child(5){width:30%}.php-table th:nth-child(6){width:20%}.php-table th:nth-child(7){width:145px}.php-table th:nth-child(9){width:62px;text-align:center}.php-table td{padding:7px;border-bottom:1px solid var(--line2);vertical-align:top;line-height:1.3}.php-table td strong{display:block;font-size:11px}.php-table td small{display:block;color:#6f8199;margin-top:2px}.nr strong{font-size:12px}.last-column{color:#a8b8ca}.ended-row{opacity:.56}.ended-row:hover{opacity:.92;background:#081224}.status{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border:1px solid #334155;border-radius:12px;white-space:nowrap}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:#64748b}.status.dispo{border-color:#1d4ed8;color:#bfdbfe}.status.dispo:before{background:#93c5fd}.status.alarmieren:before{background:#f59e0b}.status.s3:before{background:#34d399}.status.s4:before{background:#38bdf8}.status.beendet{color:#94a3b8}.edit-cell{text-align:center}.icon-btn{width:54px;height:32px;border:1px solid var(--line);border-radius:8px;background:#07101f;color:inherit;cursor:pointer}.table-empty,.filter-empty{color:#718198;text-align:center;padding:30px}.filter-empty{position:absolute;inset:45px 7px 7px;display:grid;place-items:center;background:#030a18;border:1px solid var(--line);border-radius:9px}.hidden{display:none!important}.php-vehicles-pane{border-top:1px solid var(--line);padding:7px;max-height:38vh;overflow:auto;background:#020617}.vehicles-grid{display:grid;grid-template-columns:1.12fr 1.12fr 1.12fr 1fr;gap:10px;align-items:start}.vehicle-amt{min-width:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#030a18}.vehicle-amt-title{height:31px;padding:0 8px;display:flex;align-items:center;border-bottom:1px solid var(--line);font-weight:700}.vehicle-fw-stack{display:flex;flex-direction:column}.vehicle-fw{display:grid;grid-template-columns:95px 1fr;gap:7px;min-height:37px;padding:5px 7px;border-bottom:1px solid var(--line2);align-items:start}.vehicle-fw:last-child{border-bottom:0}.vehicle-fw.fw-alarmiert .vehicle-fw-title{color:#86efac;text-decoration:underline;text-decoration-color:#22c55e;text-underline-offset:4px}.vehicle-fw-title{border:0;background:transparent;color:inherit;padding:2px 0;text-align:left;cursor:pointer;font-size:10px;display:flex;flex-direction:column;align-items:flex-start}.fw-badge{font-size:8px}.vehicle-list{display:flex;flex-wrap:wrap;gap:4px}.vehicle{display:inline-block;padding:3px 6px;border:1px solid #26354b;border-radius:4px;background:#07101f;font-size:9px;white-space:nowrap}.vehicle.v-dispo,.vehicle.v-alarmieren{border-color:#2563eb}.vehicle.v-s3{border-color:#10b981}.vehicle.v-s4,.vehicle.v-nachforderung{border-color:#f59e0b}.php-main.vehicles-full{grid-template-rows:51px 0 minmax(0,1fr)}.php-main.vehicles-full .php-vehicles-pane{max-height:none;height:100%;overflow:auto}.php-main.incidents-full{grid-template-rows:51px minmax(0,1fr) 0}.pane-hidden{display:none!important}.modal-root{position:fixed;inset:0;z-index:100;display:grid;place-items:center}.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72)}.modal-card{position:relative;width:min(760px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:auto;border:1px solid #334155;border-radius:12px;background:#0f172a}.modal-head{height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #334155}.modal-head button{border:0;background:transparent;color:inherit;cursor:pointer}.form-grid{padding:15px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid.one{grid-template-columns:1fr}.form-grid label{font-size:10px;color:#a9b7c8}.form-grid input,.form-grid select,.form-grid textarea{width:100%;margin-top:4px;padding:8px;border:1px solid #334155;border-radius:7px;background:#07101f;color:#fff}.form-grid textarea{min-height:84px;resize:vertical}.form-grid .wide{grid-column:1/-1}.form-grid small,.muted{color:#74859c}.modal-card>p{padding:15px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.modal-actions button{padding:8px 12px;border:1px solid #334155;border-radius:7px;background:#07101f;color:inherit;cursor:pointer}.modal-actions button.primary{background:#f1f5f9;color:#111827;font-weight:700}.modal-actions button.danger{border-color:#7f1d2d;color:#fecdd3;background:#160812}html[data-theme="day"]{color-scheme:light;--bg:#eef2f7;--line:#c6d2df;--line2:#dce4ed;--text:#142033;--muted:#607188}html[data-theme="day"] body,html[data-theme="day"] .php-main,html[data-theme="day"] .php-vehicles-pane{background:#eef2f7;color:#142033}html[data-theme="day"] .php-top,html[data-theme="day"] .php-sidebar,html[data-theme="day"] .php-toolbar{background:#f8fafc}html[data-theme="day"] .top-chip,html[data-theme="day"] .php-card,html[data-theme="day"] .tool-btn,html[data-theme="day"] .table-scroll,html[data-theme="day"] .vehicle-amt,html[data-theme="day"] .vehicle,html[data-theme="day"] .icon-btn{background:#f8fafc;color:#142033}html[data-theme="day"] .php-card-title,html[data-theme="day"] .php-table thead{background:#e7edf5;color:#142033}html[data-theme="day"] .area-main b,html[data-theme="day"] .area-sub b{background:#eef2f7;color:#142033}html[data-theme="day"] .php-area-list button:hover,html[data-theme="day"] .php-area-list button.filter-active{background:#dbe5ef}html[data-theme="day"] .toolbar-counts,html[data-theme="day"] .toolbar-counts b{color:#142033}html[data-theme="day"] .tool-btn:hover,html[data-theme="day"] .tool-btn.tab-active,html[data-theme="day"] .tool-btn.primary{background:#111827;color:#fff}html[data-theme="day"] .modal-card{background:#f8fafc;color:#142033}html[data-theme="day"] .form-grid input,html[data-theme="day"] .form-grid select,html[data-theme="day"] .form-grid textarea,html[data-theme="day"] .modal-actions button{background:#fff;color:#142033}@media(max-height:760px){.php-main{grid-template-rows:46px minmax(0,1fr) auto}.php-toolbar{height:46px;padding:5px}.tool-btn{height:34px;padding:0 10px}.php-vehicles-pane{padding:5px}.vehicle-fw{min-height:31px;padding:3px 5px}.vehicle{padding:2px 4px}.diary-card{max-height:150px}}

/* 0.4.1 - optische Annäherung an die PHP-Referenz */
.php-body{
  grid-template-columns: 224px minmax(0,1fr);
}

.php-toolbar{
  padding: 7px 8px;
}
.tool-btn{
  height: 35px;
  padding: 0 14px;
  border-radius: 7px;
}
.tabs{
  gap: 8px;
}
.toolbar-counts{
  font-size: 11px;
  padding-right: 2px;
}

.php-main{
  grid-template-rows: 51px minmax(0,1fr) auto;
}
.php-einsatz-pane{
  padding: 7px 7px 5px;
}
.table-scroll{
  border-radius: 9px;
}
.php-table{
  font-size: 10px;
}
.php-table th{
  height: 33px;
}
.php-table td{
  padding: 7px 7px 6px;
}
.php-table td strong{
  font-size: 10.5px;
}
.php-table td small{
  font-size: 8.5px;
}
.php-table th:nth-child(1){width:50px}
.php-table th:nth-child(2){width:115px}
.php-table th:nth-child(3){width:110px}
.php-table th:nth-child(4){width:140px}
.php-table th:nth-child(5){width:29%}
.php-table th:nth-child(6){width:18%}
.php-table th:nth-child(7){width:150px}
.php-table th:nth-child(8){width:18%}
.php-table th:nth-child(9){width:58px}

/* PHP-like priority highlighting */
.row-blitz{
  background: rgba(126, 24, 47, .64);
  opacity: 1 !important;
}
.row-blitz td{
  border-bottom-color: rgba(148, 47, 72, .55);
}
.row-blitz:hover{
  background: rgba(142, 28, 54, .74);
}
.row-blitz .status{
  border-color:#9f2e49;
  background:#7a2137;
  color:#fff;
}
.row-blitz .status:before{
  background:#fecdd3;
}
.row-blitz td,
.row-blitz td strong,
.row-blitz .last-column{
  color:#fff;
}
.row-blitz td small{
  color:#d6a9b5;
}

.row-dispo:not(.row-blitz){
  background: rgba(7, 29, 61, .20);
}

/* Fahrzeuge wie in PHP kompakter und höher in der Seite */
.php-vehicles-pane{
  padding: 7px 7px 6px;
  max-height: 36.5vh;
}
.vehicles-grid{
  grid-template-columns: 1.02fr 1.02fr 1.02fr 1fr;
  gap: 10px;
}
.vehicle-amt-title{
  height: 29px;
}
.vehicle-fw{
  grid-template-columns: 92px 1fr;
  min-height: 35px;
  padding: 4px 7px;
}
.vehicle-fw-title{
  font-size: 9.5px;
}
.vehicle{
  padding: 3px 6px;
  font-size: 8.8px;
}
.vehicle-list{
  gap: 4px;
}

/* Sidebar näher am PHP-Layout */
.php-sidebar{
  padding: 6px 4px 4px;
  gap: 8px;
}
.php-card{
  border-radius: 9px;
}
.php-card-title{
  height: 33px;
}
.area-main{
  height: 37px;
}
.area-sub button{
  height: 32px;
}
.diary-card{
  max-height: 177px;
}
.diary-row{
  grid-template-columns: 45px 1fr;
  padding: 7px 8px;
}

/* Day mode must preserve the priority colors rather than washing them out */
html[data-theme="day"] .row-blitz{
  background:#7f1d32;
}
html[data-theme="day"] .row-blitz td,
html[data-theme="day"] .row-blitz td strong,
html[data-theme="day"] .row-blitz .last-column{
  color:#fff;
}
html[data-theme="day"] .row-blitz td small{
  color:#f3c2cd;
}
html[data-theme="day"] .row-blitz .status{
  background:#963047;
  border-color:#c15b73;
  color:#fff;
}


/* 0.5.0 - Statusdarstellung und Animationen aus der PHP-Version */
@keyframes blinkRed{
  0%,100%{background:rgba(220,38,38,.12)}
  50%{background:rgba(220,38,38,.35)}
}
.row-blitz{
  animation:blinkRed .9s linear infinite !important;
  animation-delay:var(--blink-delay,0s) !important;
  will-change:background-color;
}
.status-dispo-blitz,
.status.dispo-blitz,
.v-dispo-blitz{
  animation:blinkRed .9s linear infinite !important;
  animation-delay:var(--blink-delay,0s) !important;
  will-change:background-color;
  border-color:rgba(220,38,38,.7)!important;
}
@keyframes elwPulseGreen{0%,100%{opacity:1}50%{opacity:.55}}
@keyframes elwPulsePurple{0%,100%{opacity:1}50%{opacity:.55}}
.status-beendet-blink{
  animation:elwPulseGreen 1.5s ease-in-out infinite!important;
  will-change:opacity;
  background-color:rgba(34,197,94,.22)!important;
  border-color:rgba(34,197,94,.65)!important;
}
.status.s3,.status-s3,.v-s3{
  background-color:rgba(245,158,11,.18)!important;
  border-color:rgba(245,158,11,.55)!important;
}
.status.s4,.status-s4,.v-s4{
  background-color:rgba(239,68,68,.18)!important;
  border-color:rgba(239,68,68,.55)!important;
}
.status.nachforderung,.chip-nachforderung-blink,.v-nachforderung{
  animation:elwPulsePurple 1.5s ease-in-out infinite!important;
  background-color:rgba(139,92,246,.18)!important;
  border-color:rgba(139,92,246,.60)!important;
}
.status.alarmieren,.status-alarmieren,.v-alarmieren{
  background:repeating-linear-gradient(45deg,rgba(13,148,136,.18) 0 6px,rgba(13,148,136,.08) 6px 12px)!important;
  border-color:rgba(13,148,136,.55)!important;
}
.status.dispo,.status-dispo,.v-dispo{
  background-color:rgba(37,99,235,.18)!important;
  border-color:rgba(37,99,235,.65)!important;
}
.status.s6,.status-s6,.v-s6{
  background:repeating-linear-gradient(45deg,rgba(239,68,68,.45) 0 7px,rgba(30,30,30,.85) 7px 14px)!important;
  border-color:rgba(239,68,68,.9)!important;
  color:rgba(254,226,226,1)!important;
}
html[data-theme="day"] .status.s6,
html[data-theme="day"] .status-s6,
html[data-theme="day"] .v-s6{
  background:repeating-linear-gradient(45deg,rgba(239,68,68,.35) 0 7px,rgba(255,255,255,.75) 7px 14px)!important;
  color:#7f1d1d!important;
}
.ended-row{opacity:.55;filter:blur(.35px)}
.ended-row:hover{opacity:.9;filter:none}

/* PHP-style large functional modals */
.modal-root.modal-wide .modal-card{width:min(1100px,96vw);height:min(86vh,900px);display:flex;flex-direction:column}
.modal-root.modal-wide #modal-body{flex:1;min-height:0;overflow:hidden}
.incident-form{height:100%;display:grid;grid-template-columns:360px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:12px;padding:12px}
.incident-left,.incident-right{min-height:0;border:1px solid var(--line);border-radius:12px;background:#07101f}
.incident-left{overflow:auto;padding:12px;display:flex;flex-direction:column;gap:10px}
.incident-left label,.simple-form label,#fz-form label{display:block;font-size:10px;color:#a9b7c8}
.incident-left input,.incident-left select,.simple-form input,#fz-form input{width:100%;margin-top:4px;padding:8px;border:1px solid #334155;border-radius:8px;background:#020817;color:#fff}
.form-row.two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.incident-right{display:flex;flex-direction:column;overflow:hidden}
.picker-head{flex:0 0 auto;padding:9px 11px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:10px;font-size:11px}.picker-head small{color:#718198}
.picker-scroll{flex:1;min-height:0;overflow:auto;padding:10px}
.picker-amt{border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-bottom:10px}.picker-amt-title{padding:7px 9px;background:#0d1729;border-bottom:1px solid var(--line);font-weight:700}
.picker-fw{padding:8px}.picker-fw>b{display:block;font-size:10px;margin-bottom:5px}.picker-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.picker-chip{display:flex;align-items:center;gap:5px;padding:6px;border:1px solid var(--line);border-radius:8px;background:#07101f;font-size:9px;overflow:hidden}.picker-chip span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.picker-chip input{flex:0 0 auto}
.incident-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.incident-actions button,.simple-form button,.funk-form button,#fz-form button,.overview-actions button{padding:8px 13px;border:1px solid #334155;border-radius:8px;background:#07101f;color:inherit;cursor:pointer}.primary{background:#f1f5f9!important;color:#111827!important;font-weight:700}.danger{border-color:#7f1d2d!important;color:#fecdd3!important;background:#160812!important}
.overview-grid,.diary-modal,.vehicle-admin{height:100%;display:grid;grid-template-columns:1fr 1fr;min-height:0}
.overview-main,.overview-log,.diary-modal>section,.diary-modal>form,.vehicle-admin>section,.vehicle-admin>form{min-height:0;overflow:hidden}
.overview-main{padding:12px;border-right:1px solid var(--line);overflow:auto}.overview-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.overview-fields>div{border:1px solid var(--line);border-radius:8px;padding:8px}.overview-fields span{display:block;color:#718198;font-size:9px}.overview-fields b,.overview-fields small{display:block}.funk-form{margin-top:12px;display:grid;grid-template-columns:1fr 150px auto;gap:8px;align-items:end}.funk-form label{font-size:9px;color:#a9b7c8}.funk-form textarea,.funk-form select{width:100%;margin-top:4px;padding:8px;border:1px solid #334155;border-radius:8px;background:#020817;color:#fff}.funk-form textarea{height:70px;resize:vertical}.overview-actions{margin-top:10px}.overview-log{display:flex;flex-direction:column}.overview-log-scroll,.diary-all{flex:1;min-height:0;overflow:auto;padding:10px}.ov-log-row{padding:8px;border-bottom:1px solid var(--line2);font-size:10px}.ov-log-row time{display:block;color:#718198;margin-bottom:3px;white-space:pre-wrap}.diary-modal>section{display:flex;flex-direction:column;border-right:1px solid var(--line)}.diary-modal>form{display:flex;flex-direction:column}.diary-modal textarea{flex:1;margin:12px;padding:10px;border:1px solid #334155;border-radius:10px;background:#020817;color:#fff;resize:none}.diary-modal>form>button{margin:0 12px 12px;padding:10px}
.vehicle-admin{grid-template-columns:420px minmax(0,1fr)}.vehicle-admin>section{border-right:1px solid var(--line);display:flex;flex-direction:column}.admin-search{padding:10px;border-bottom:1px solid var(--line);display:flex;gap:8px;align-items:center}.admin-search input{flex:1;padding:8px;border:1px solid #334155;border-radius:8px;background:#020817;color:#fff}.admin-search span{font-size:9px;color:#718198}.fz-list{flex:1;overflow:auto;padding:8px}.fz-row{width:100%;display:flex;flex-direction:column;text-align:left;margin-bottom:6px;padding:9px;border:1px solid var(--line);border-radius:9px;background:#07101f;color:inherit;cursor:pointer}.fz-row small{color:#718198}.vehicle-admin>form{padding:12px;display:flex;flex-direction:column;gap:10px;overflow:auto}
.simple-form{padding:15px;display:flex;flex-direction:column;gap:12px}
.vehicle{appearance:none;color:inherit;cursor:pointer}

/* Day mode for new modals */
html[data-theme="day"] .incident-left,html[data-theme="day"] .incident-right,html[data-theme="day"] .picker-chip,html[data-theme="day"] .fz-row{background:#f8fafc}
html[data-theme="day"] .picker-amt-title{background:#e7edf5}
html[data-theme="day"] .incident-left input,html[data-theme="day"] .incident-left select,html[data-theme="day"] .simple-form input,html[data-theme="day"] #fz-form input,html[data-theme="day"] .funk-form textarea,html[data-theme="day"] .funk-form select,html[data-theme="day"] .diary-modal textarea,html[data-theme="day"] .admin-search input{background:#fff;color:#142033}


/* 0.6.0 - vollständige PHP-Funktionsoberfläche */
.sound-toggle{cursor:pointer;min-width:42px;justify-content:center}

.modal-root.modal-overview .modal-card{
  width:min(1180px,96vw);
  height:min(86vh,920px);
  display:flex;
  flex-direction:column;
}
.modal-root.modal-overview #modal-body{flex:1;min-height:0;overflow:hidden}

.php-overview{
  height:100%;
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.ov-header{
  flex:0 0 auto;
  min-height:75px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:10px 13px;
  border-bottom:1px solid var(--line);
  background:#07101f;
}
.ov-header h3{font-size:13px;margin:5px 0 2px}
.ov-header p{font-size:9px;color:#8293aa;margin:0}
.ov-chips{display:flex;align-items:center;gap:6px;font-size:9px}
.ov-chips b{padding:3px 7px;border:1px solid var(--line);border-radius:6px;background:#0d1729}
.ov-tools{display:flex;gap:7px;align-items:center}
.ov-tools button,.status-hotkeys button,.edit-from-overview,.ov-tool-pane button{
  padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#0d1729;color:inherit;cursor:pointer
}
.ov-tools button:disabled{opacity:.35;cursor:not-allowed}
.ov-work{
  flex:1;min-height:0;
  display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:10px;padding:10px;
}
.ov-funk,.ov-units{
  min-height:0;border:1px solid var(--line);border-radius:11px;overflow:hidden;background:#07101f
}
.ov-funk{display:flex;flex-direction:column}
.ov-funk-list{flex:1;min-height:0;overflow:auto;padding:8px}
.ov-funk-input{
  flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) 150px auto;gap:7px;align-items:end;
  padding:8px;border-top:1px solid var(--line)
}
.ov-funk-input textarea,.ov-funk-input select{
  width:100%;padding:8px;border:1px solid #334155;border-radius:8px;background:#020817;color:#fff
}
.ov-funk-input textarea{height:58px;resize:none}
.ov-funk-input button{height:36px}
.status-hotkeys{display:flex;gap:6px;padding:0 8px 8px}
.ov-units{display:flex;flex-direction:column}
.ov-unit-list{flex:1;min-height:0;overflow:auto;padding:8px}
.ov-unit{padding:9px;border:1px solid var(--line);border-radius:9px;margin-bottom:6px;background:#030a18;font-weight:700;font-size:10px}
.edit-from-overview{margin:8px}
.ov-tool-pane{
  position:absolute;right:0;top:75px;bottom:0;width:min(54%,650px);
  z-index:5;border-left:1px solid var(--line);background:#07101f;display:flex;flex-direction:column;
  box-shadow:-15px 0 35px rgba(0,0,0,.32)
}
.ov-tool-pane .picker-head button{border:0;padding:2px 6px}
.ov-tool-pane iframe{flex:1;width:100%;border:0;background:#fff}

.start-links{display:flex;gap:7px}
.start-links a{padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:inherit;text-decoration:none}

html[data-theme="day"] .ov-header,
html[data-theme="day"] .ov-funk,
html[data-theme="day"] .ov-units,
html[data-theme="day"] .ov-tool-pane,
html[data-theme="day"] .ov-unit{
  background:#f8fafc;color:#142033
}
html[data-theme="day"] .ov-chips b{background:#e7edf5}
html[data-theme="day"] .ov-funk-input textarea,
html[data-theme="day"] .ov-funk-input select{background:#fff;color:#142033}

/* Keep exact PHP pulse visible in both themes */
@keyframes blinkRedExact{
  0%,100%{background-color:rgba(220,38,38,.12)}
  50%{background-color:rgba(220,38,38,.35)}
}
.row-blitz{
  animation-name:blinkRedExact!important;
  animation-duration:.9s!important;
  animation-timing-function:linear!important;
  animation-iteration-count:infinite!important;
}
.status-dispo-blitz,.status.dispo-blitz,.v-dispo-blitz{
  animation:blinkRedExact .9s linear infinite!important;
  animation-delay:var(--blink-delay,0s)!important;
}

@media(max-width:1280px){
  .ov-work{grid-template-columns:minmax(0,1fr) 300px}
  .picker-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* 0.6.1 - cache-safe UI + no horizontal scrolling */

/* The incident table must always fit into the available width. */
.table-scroll{
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
.php-table{
  width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.php-table th:nth-child(1){width:3.5%!important}
.php-table th:nth-child(2){width:7.5%!important}
.php-table th:nth-child(3){width:7%!important}
.php-table th:nth-child(4){width:10.5%!important}
.php-table th:nth-child(5){width:27.5%!important}
.php-table th:nth-child(6){width:18%!important}
.php-table th:nth-child(7){width:10%!important}
.php-table th:nth-child(8){width:13%!important}
.php-table th:nth-child(9){width:3%!important}

.php-table th,
.php-table td{
  min-width:0;
  overflow:hidden;
  overflow-wrap:anywhere;
}
.php-table td strong,
.php-table td small,
.php-table .last-column{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.php-table .mittel{
  white-space:normal;
}
.edit-cell{
  overflow:visible!important;
}
.icon-btn{
  width:100%;
  min-width:30px;
  padding:0;
}

/* Make it unmistakable that incident rows and firefighter names are interactive. */
.php-table tbody tr[data-row]{cursor:pointer}
.php-table tbody tr[data-row]:focus{
  outline:2px solid rgba(59,130,246,.7);
  outline-offset:-2px;
}
.fw-toggle{
  width:100%;
  border-radius:5px;
  transition:background-color .12s ease,opacity .12s ease;
}
.fw-toggle:hover{
  background:rgba(59,130,246,.10);
}
.fw-toggle:disabled,.fw-busy{opacity:.55}

/* Stronger, coherent light theme instead of the washed-out appearance. */
html[data-theme="day"]{
  --bg:#e9eef5;
  --line:#b9c6d5;
  --line2:#d2dce7;
  --text:#172033;
  --muted:#5d6e83;
}
html[data-theme="day"] body,
html[data-theme="day"] .php-main,
html[data-theme="day"] .php-vehicles-pane{
  background:#e9eef5!important;
}
html[data-theme="day"] .php-top,
html[data-theme="day"] .php-toolbar,
html[data-theme="day"] .php-sidebar{
  background:#f5f7fa!important;
}
html[data-theme="day"] .php-card,
html[data-theme="day"] .table-scroll,
html[data-theme="day"] .vehicle-amt,
html[data-theme="day"] .vehicle-fw,
html[data-theme="day"] .modal-card{
  background:#fff!important;
  color:#172033!important;
}
html[data-theme="day"] .php-card-title,
html[data-theme="day"] .vehicle-amt-title,
html[data-theme="day"] .php-table thead{
  background:#dfe6ef!important;
  color:#172033!important;
}
html[data-theme="day"] .php-table tbody tr:not(.row-blitz){
  background:#f8fafc;
}
html[data-theme="day"] .php-table tbody tr:not(.row-blitz):nth-child(even){
  background:#f2f5f9;
}
html[data-theme="day"] .php-table tbody tr[data-row]:hover:not(.row-blitz){
  background:#e4ebf3!important;
}
html[data-theme="day"] .ended-row{
  opacity:.68;
  filter:none;
}
html[data-theme="day"] .ended-row:hover{
  opacity:1;
}
html[data-theme="day"] .vehicle,
html[data-theme="day"] .icon-btn,
html[data-theme="day"] .top-chip,
html[data-theme="day"] .tool-btn{
  background:#f7f9fc!important;
  color:#172033;
}
html[data-theme="day"] .tool-btn.tab-active,
html[data-theme="day"] .tool-btn.primary{
  background:#111827!important;
  color:#fff!important;
}
html[data-theme="day"] .tool-btn.danger{
  background:#fff3f4!important;
  color:#9f1239!important;
}
html[data-theme="day"] .diary-row,
html[data-theme="day"] .vehicle-fw,
html[data-theme="day"] .php-table td{
  border-color:#d2dce7!important;
}
html[data-theme="day"] .php-table th{
  color:#42556d!important;
}
html[data-theme="day"] .php-table td small,
html[data-theme="day"] .last-column,
html[data-theme="day"] .diary-row time{
  color:#687b91!important;
}

/* Keep alarm/priority colors readable in light mode. */
html[data-theme="day"] .row-blitz{
  color:#651827!important;
}
html[data-theme="day"] .row-blitz td,
html[data-theme="day"] .row-blitz td strong{
  color:#651827!important;
}
html[data-theme="day"] .row-blitz td small,
html[data-theme="day"] .row-blitz .last-column{
  color:#8b394a!important;
}
html[data-theme="day"] .row-blitz .status{
  color:#7f1d1d!important;
  background:rgba(255,255,255,.48)!important;
}

/* Always show the edit control above the row click surface. */
.edit-incident,.fw-toggle,.vehicle[data-einsatz-id]{
  position:relative;
  z-index:2;
  pointer-events:auto!important;
}


/* 0.7.0 - operational parity pass */

/* Desktop layout: incident table never needs horizontal scrolling. */
.php-einsatz-pane,.table-scroll{min-width:0!important;max-width:100%!important}
.table-scroll{overflow-x:hidden!important}
.php-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}
.php-table th,.php-table td{white-space:normal!important;word-break:normal;overflow-wrap:anywhere}
.php-table .last-column{white-space:normal!important}
.php-table .mittel{font-size:10px;line-height:1.25}

/* Interactive affordances */
.php-table tbody tr[data-row]{cursor:pointer}
.php-table tbody tr[data-row]:hover{box-shadow:inset 3px 0 0 #3b82f6}
.edit-incident,.edit-from-overview,.fw-toggle,.vehicle[data-einsatz-id]{cursor:pointer}
.vehicle[data-einsatz-id]:hover{transform:translateY(-1px)}
.fw-toggle:hover{background:rgba(34,197,94,.10)!important}
.fw-alarmiert .vehicle-fw-title{box-shadow:inset 0 -2px 0 rgba(34,197,94,.85)}
.fw-badge{font-size:8px;color:#22c55e;margin-left:auto}
.write-indicator{display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;border:1px solid var(--line);font-size:9px}
.write-on{color:#22c55e}
.write-off{color:#f59e0b}

/* Light theme rebuilt around the PHP reference: pale shell, white working cards,
   dark readable text, restrained borders, status colors retained. */
html[data-theme="day"] body{background:#edf2f7!important;color:#0f172a!important}
html[data-theme="day"] .php-shell,
html[data-theme="day"] .php-body,
html[data-theme="day"] .php-main,
html[data-theme="day"] .php-vehicles-pane{background:#edf2f7!important;color:#0f172a!important}
html[data-theme="day"] .php-top,
html[data-theme="day"] .php-toolbar,
html[data-theme="day"] .php-sidebar{background:#f8fafc!important;color:#0f172a!important}
html[data-theme="day"] .php-card,
html[data-theme="day"] .table-scroll,
html[data-theme="day"] .vehicle-amt,
html[data-theme="day"] .vehicle-fw,
html[data-theme="day"] .modal-card,
html[data-theme="day"] .ov-funk,
html[data-theme="day"] .ov-units{background:#fff!important;color:#0f172a!important}
html[data-theme="day"] .php-card-title,
html[data-theme="day"] .vehicle-amt-title,
html[data-theme="day"] .php-table thead,
html[data-theme="day"] .modal-head,
html[data-theme="day"] .picker-head{background:#e5edf6!important;color:#0f172a!important}
html[data-theme="day"] .php-table tbody tr:not(.row-blitz){background:#f8fafc!important;color:#0f172a!important}
html[data-theme="day"] .php-table tbody tr:not(.row-blitz):nth-child(even){background:#f1f5f9!important}
html[data-theme="day"] .php-table tbody tr[data-row]:hover:not(.row-blitz){background:#e2e8f0!important}
html[data-theme="day"] .php-table td strong,
html[data-theme="day"] .vehicle-fw-title,
html[data-theme="day"] .vehicle-amt-title{color:#0f172a!important}
html[data-theme="day"] .php-table td small,
html[data-theme="day"] .last-column,
html[data-theme="day"] .diary-row time{color:#64748b!important}
html[data-theme="day"] .vehicle,
html[data-theme="day"] .icon-btn,
html[data-theme="day"] .top-chip,
html[data-theme="day"] .tool-btn,
html[data-theme="day"] input,
html[data-theme="day"] select,
html[data-theme="day"] textarea{background:#f8fafc!important;color:#0f172a!important;border-color:#cbd5e1!important}
html[data-theme="day"] .tool-btn.tab-active,
html[data-theme="day"] .tool-btn.primary{background:#0f172a!important;color:#fff!important}
html[data-theme="day"] .row-dispo{background:#cbd5e1!important}
html[data-theme="day"] .row-blitz{background:#fecaca!important}
html[data-theme="day"] .ended-row{opacity:.58!important;filter:none!important}
html[data-theme="day"] .ended-row:hover{opacity:.9!important}

/* Modal workspace should fit on normal ELW desktop screens without sideways page scrolling. */
.modal-root.modal-overview .modal-card,
.modal-root.modal-wide .modal-card{max-width:min(96vw,1500px)!important}
.incident-form{max-width:100%;overflow:hidden}
.picker-scroll{overflow:auto;max-height:min(58vh,560px)}
