:root{
  --bg:#0b1220;--panel:#111827;--panel2:#172033;--line:#2a3548;--text:#e5e7eb;
  --muted:#94a3b8;--accent:#22c55e;--accent2:#38bdf8;--danger:#ef4444;--shadow:0 10px 30px #0006;
  --top-h:66px;--data-w:318px;--tools-w:156px;--right-w:310px;
}
*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);overflow:hidden}
button,input,select,textarea{font:inherit}.hidden{display:none!important}button{border:1px solid var(--line);background:#172033;color:var(--text);border-radius:9px;cursor:pointer}button:hover{background:#22304a}button:active{transform:translateY(1px)}
.topbar{height:var(--top-h);display:grid;grid-template-columns:285px minmax(320px,1fr) auto;align-items:center;gap:12px;padding:8px 12px;background:#0d1525;border-bottom:1px solid var(--line);position:relative;z-index:1500}
.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand img{width:44px;height:44px;object-fit:contain}.brand strong{display:block;font-size:16px}.brand span{display:block;font-size:11px;color:var(--muted);letter-spacing:.12em}
.incident-summary{display:flex;justify-content:center;align-items:center;gap:8px;min-width:0}.incident-chip{width:min(660px,100%);display:flex;align-items:center;gap:10px;padding:7px 12px;text-align:left;border-color:#475569}.incident-main-data{min-width:0;display:block}.incident-chip b,.incident-chip small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.incident-chip b{font-size:17px;color:#fff;letter-spacing:.01em}.incident-chip small{color:#cbd5e1;margin-top:3px;font-size:11px}.pulse-dot{flex:none;width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 5px #22c55e22}.priority-badge{font-weight:900;padding:9px 10px;border-radius:9px}.priority-badge.p1{background:#7f1d1d;color:#fecaca}.priority-badge.p2{background:#78350f;color:#fde68a}.priority-badge.p3{background:#164e63;color:#a5f3fc}.priority-badge.p4{background:#1f2937;color:#d1d5db}
.top-actions{display:flex;gap:5px}.top-actions button{width:40px;height:40px;display:grid;place-items:center;font-size:21px}.top-actions img{width:21px;height:21px;object-fit:contain;filter:brightness(0) invert(1)}.top-actions .text-action{width:auto;min-width:92px;display:flex;gap:6px;padding:0 9px;font-size:16px}.top-actions .text-action span{font-size:11px;font-weight:700}
.workspace{height:calc(100% - var(--top-h));display:grid;grid-template-columns:var(--data-w) minmax(0,1fr) var(--data-w);min-width:0;transition:grid-template-columns .18s ease}.board-hidden .workspace{grid-template-columns:0 minmax(0,1fr) 0}.board-hidden .magnet-panel{opacity:0;pointer-events:none;overflow:hidden;border:0}
.magnet-panel{background:#f3f4f6;color:#111827;min-width:0;overflow:hidden;border-color:#9ca3af;transition:opacity .15s ease}.magnet-left{border-right:1px solid #9ca3af}.magnet-right{border-left:1px solid #9ca3af}.magnet-title{height:48px;background:#d1d5db;padding:6px 8px;border-bottom:1px solid #9ca3af}.magnet-title b,.magnet-title small{display:block}.magnet-title b{font-size:12px}.magnet-title small{font-size:10px;color:#4b5563;margin-top:2px}.magnet-list{height:calc(100% - 48px);overflow:auto;padding:0 0 14px}
.magnet-field{border-bottom:1px solid #d1d5db;background:#fff}.magnet-field select{display:block;width:100%;height:31px;border:0;border-radius:0;background:#ff6666;color:#fff;font-size:12px;font-weight:900;padding:3px 26px 3px 6px;outline:none}.magnet-field select:focus{background:#ff4d4d}.magnet-field input{display:block;width:100%;height:31px;border:0;border-radius:0;padding:5px 7px;background:#fff;color:#111827;font-size:12px;font-weight:600;outline:none}.magnet-field input:focus{box-shadow:inset 3px 0 #ef4444;background:#fff7f7}.magnet-field input::placeholder{font-weight:500;color:#6b7280}
.editor-shell,.map-shell{position:relative;min-width:0;min-height:0;height:100%}.map-shell{background:#cbd5e1}.map-shell #map{position:absolute;inset:0;z-index:1}
.map-top-controls{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:650;display:flex;gap:7px;pointer-events:none;max-width:calc(100% - 300px)}.search-box,.map-mode{pointer-events:auto;display:flex;background:#111827ee;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:10px;overflow:hidden}.search-box input{width:min(30vw,420px);border:0;outline:0;background:transparent;color:var(--text);padding:9px 11px}.search-box button{border:0;border-left:1px solid var(--line);border-radius:0;width:40px}.map-mode button{border:0;border-right:1px solid var(--line);border-radius:0;padding:0 8px;font-size:11px;min-width:48px}.map-mode button:last-child{border-right:0}.zoom-presets button.active{background:#075985;color:#fff;font-weight:900}
.panel{background:var(--panel);border-color:var(--line)}.floating-dock{position:absolute;z-index:620;top:58px;bottom:40px;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.left-dock{left:10px;width:var(--tools-w);display:flex;flex-direction:column}.right-dock{right:10px;width:var(--right-w);display:grid;grid-template-rows:minmax(245px,48%) 1fr;background:var(--panel)}
.panel-title{height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 9px;font-weight:700;border-bottom:1px solid var(--line);background:#0f172a}.panel-title button{width:27px;height:27px;padding:0;font-size:17px}.tools-list{padding:7px;overflow:auto;display:grid;gap:5px}.tool{height:44px;display:flex;align-items:center;gap:7px;padding:5px 7px;text-align:left}.tool img{width:27px;height:27px;object-fit:contain;filter:brightness(0) invert(1)}.tool-glyph{display:grid;place-items:center;width:27px;font-size:21px;font-weight:700}.tool b{font-size:11px}.tool.active{border-color:#38bdf8;background:#0c4a6e;box-shadow:inset 3px 0 #38bdf8}.tools-bottom{margin-top:auto;padding:7px;display:grid;gap:5px;border-top:1px solid var(--line)}.tools-bottom button{height:35px;display:flex;align-items:center;justify-content:center;gap:5px}.tools-bottom img{width:17px;filter:brightness(0) invert(1)}.danger{border-color:#7f1d1d!important;color:#fecaca!important}
.layers-panel,.properties-panel{min-height:0;overflow:hidden}.layers-list{height:calc(100% - 40px);overflow:auto;padding:6px}.layer-row{display:grid;grid-template-columns:22px 1fr 26px 26px 22px 22px;gap:3px;align-items:center;min-height:35px;padding:3px;border-bottom:1px solid #202c40}.layer-row.active{background:#0c4a6e55;border-radius:7px}.layer-radio,.layer-icon-btn,.layer-move{width:23px;height:23px;padding:0;border:0;background:transparent}.layer-name{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layer-count{font-size:9px;color:var(--muted)}
.properties-empty{padding:18px;color:var(--muted);font-size:12px}.properties-form{padding:9px;overflow:auto;height:calc(100% - 40px)}.properties-form label{display:grid;gap:4px;font-size:10px;color:#cbd5e1;margin-bottom:8px}.properties-form input,.properties-form select,.properties-form textarea,.incident-grid input,.incident-grid select,.incident-grid textarea{width:100%;background:#0b1220;border:1px solid #334155;color:var(--text);border-radius:7px;padding:7px;outline:none}.properties-form input:focus,.properties-form select:focus,.incident-grid input:focus,.incident-grid textarea:focus{border-color:#38bdf8}.properties-form .check{display:flex;grid-template-columns:auto 1fr;align-items:center;gap:7px}.properties-form .check input{width:auto}.prop-row{display:grid;grid-template-columns:1fr auto;gap:7px;align-items:end}.prop-row output{font-size:10px;color:var(--muted);min-width:40px}.color-row{grid-template-columns:1fr 1fr}.secondary,.primary{padding:8px 11px}.primary{background:#166534;border-color:#22c55e}.leaflet-control-attribution{font-size:9px!important}
.tool-hint{position:absolute;left:50%;bottom:40px;transform:translateX(-50%);z-index:610;background:#0f172add;border:1px solid #334155;color:#f8fafc;padding:7px 11px;border-radius:9px;box-shadow:var(--shadow);font-size:11px;pointer-events:none}.map-status{position:absolute;z-index:610;left:7px;right:7px;bottom:6px;height:26px;display:flex;gap:14px;align-items:center;padding:0 9px;background:#0f172adc;border:1px solid var(--line);border-radius:7px;color:#cbd5e1;font-size:10px;pointer-events:none}.map-status span:last-child{margin-left:auto}.grid-overlay{position:absolute;inset:0;z-index:400;pointer-events:none;background-image:linear-gradient(#0f172a26 1px,transparent 1px),linear-gradient(90deg,#0f172a26 1px,transparent 1px);background-size:50px 50px}
.ci-div-icon{background:transparent!important;border:0!important}.ci-anchor{position:absolute;left:0;top:0;width:0;height:0;display:flex;align-items:center;justify-content:center;overflow:visible}.ci-marker{position:absolute;left:0;top:0;user-select:none}.ci-marker .symbol-visual{display:flex;flex-direction:column;align-items:center;justify-content:center;transform-origin:center center;filter:drop-shadow(0 2px 2px #0008);will-change:transform}.ci-marker img{display:block;object-fit:contain;pointer-events:none}.ci-marker .marker-label{margin-top:1px;padding:1px 4px;border-radius:4px;background:#fffdd9;color:#111827;font-weight:800;font-size:11px;white-space:nowrap;line-height:1.2;border:1px solid #111827aa}.ci-marker.selected .symbol-visual{outline:2px dashed #38bdf8;outline-offset:4px}.ci-text{position:absolute;left:0;top:0;transform-origin:center center;background:#fffde8;border:1px solid #111827aa;border-radius:5px;padding:3px 5px;font-weight:800;white-space:nowrap;box-shadow:0 2px 6px #0005}.ci-text.selected{outline:2px dashed #38bdf8;outline-offset:3px}.manual-hydrant-badge{position:absolute;right:-7px;top:-7px;background:#f59e0b;color:#111827;border-radius:50%;font-size:10px;width:16px;height:16px;display:grid;place-items:center;font-weight:900;border:1px solid white}.official-hydrant{filter:drop-shadow(0 1px 2px #0008)}
.drawer{position:fixed;inset:var(--top-h) 0 0 0;z-index:2500;background:#020617aa;display:grid;place-items:start center;padding:40px 14px}.drawer-card{width:min(760px,96vw);background:#111827;border:1px solid #334155;border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.drawer-head{display:flex;justify-content:space-between;align-items:start;padding:14px 16px;border-bottom:1px solid var(--line);background:#0f172a}.drawer-head b,.drawer-head small{display:block}.drawer-head small{color:var(--muted);margin-top:3px}.drawer-head button{width:31px;height:31px}.incident-grid{padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.incident-grid label{display:grid;gap:5px;font-size:12px;color:#cbd5e1}.incident-grid .span2{grid-column:span 2}.incident-grid .important-field{color:#fff;font-weight:800}.incident-grid .important-field input{border-color:#ef4444;background:#261014;font-size:15px;font-weight:800}.drawer-actions{padding:0 16px 16px;display:flex;justify-content:flex-end;gap:8px}.data-source-grid{padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.data-source-grid article{padding:12px;border:1px solid #334155;border-radius:10px;background:#0b1220}.data-source-grid .wide{grid-column:span 2}.data-source-grid p{color:var(--muted);font-size:12px;line-height:1.45}.switch-line{display:flex;gap:7px;align-items:center;font-size:12px}
body.tools-collapsed .left-dock{width:54px}body.tools-collapsed .left-dock .panel-title span,body.tools-collapsed .tool b,body.tools-collapsed .tools-bottom span{display:none}body.tools-collapsed .left-dock .panel-title{justify-content:center;padding:0}body.tools-collapsed .tool{justify-content:center;padding:4px;gap:0}body.tools-collapsed .tool img,body.tools-collapsed .tool-glyph{width:30px;height:30px}body.tools-collapsed .tools-list{padding:4px}body.tools-collapsed .tools-bottom{padding:4px}body.tools-collapsed .tool.continuous::after{display:none}
@media(max-width:1450px){:root{--data-w:275px;--right-w:285px}.topbar{grid-template-columns:245px minmax(280px,1fr) auto}.brand strong{font-size:14px}.top-actions .text-action span{display:none}.top-actions .text-action{min-width:40px;width:40px;padding:0;justify-content:center}.map-top-controls{max-width:calc(100% - 260px)}.zoom-presets button{min-width:40px;padding:0 5px}}
@media(max-width:1180px){body{--data-w:0px}.magnet-panel{position:absolute;top:var(--top-h);bottom:0;width:300px;z-index:1700;box-shadow:var(--shadow);transition:transform .18s ease,opacity .18s ease}.magnet-left{left:0}.magnet-right{right:0}.board-hidden .magnet-left{transform:translateX(-102%)}.board-hidden .magnet-right{transform:translateX(102%)}.board-open .workspace{grid-template-columns:0 minmax(0,1fr) 0}.topbar{grid-template-columns:210px 1fr auto}.incident-chip b{font-size:14px}.right-dock{width:270px}.map-top-controls{max-width:calc(100% - 210px)}.zoom-presets{display:none}}
@media(max-width:800px){:root{--top-h:58px}.topbar{grid-template-columns:1fr auto;height:var(--top-h)}.incident-summary{display:none}.brand span{display:none}.brand img{width:37px;height:37px}.top-actions button:nth-of-type(n+6){display:none}.right-dock{display:none}.left-dock{top:54px;bottom:37px;width:52px}.left-dock .panel-title span,.left-dock .tool b,.left-dock .tools-bottom span{display:none}.left-dock .panel-title{justify-content:center;padding:0}.tool{justify-content:center;padding:4px}.tools-list{padding:3px}.tools-bottom{padding:3px}.map-top-controls{left:68px;right:8px;transform:none;max-width:none}.search-box{width:100%}.search-box input{width:100%}.map-mode{display:none}.tool-hint{max-width:70%;text-align:center}.magnet-panel{width:min(88vw,340px)}.incident-grid,.data-source-grid{grid-template-columns:1fr}.incident-grid .span2,.data-source-grid .wide{grid-column:auto}}
@media print{.topbar,.magnet-panel,.floating-dock,.map-top-controls,.tool-hint,.map-status{display:none!important}.workspace{display:block;height:100vh}.editor-shell,.map-shell{height:100vh}.leaflet-control-container{display:none}.grid-overlay{z-index:10}}

/* === M03 · edición directa y paletas operativas === */
.tool.continuous{border-color:#f59e0b;background:#713f12;box-shadow:inset 3px 0 #f59e0b}.tool.continuous::after{content:'∞';margin-left:auto;font-size:15px;font-weight:900;color:#fde68a}.layer-row{cursor:pointer}.layer-row:hover{background:#172a43}.layer-row.active{outline:1px solid #38bdf866}.layer-row button{position:relative;z-index:2}.palette-block{display:grid;gap:7px;margin:3px 0 9px;padding:8px;border:1px solid #334155;border-radius:8px;background:#0b1220}.palette-head{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:10px;color:#cbd5e1}.palette-target{display:flex;gap:3px}.palette-target button{font-size:9px;padding:4px 6px;border-radius:5px}.palette-target button.active{background:#075985;border-color:#38bdf8}.palette-swatches{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.palette-swatch{width:27px;height:27px;border:2px solid #e5e7eb;border-radius:5px;padding:0;box-shadow:0 0 0 1px #111827;position:relative}.palette-swatch.active{outline:2px solid #38bdf8;outline-offset:2px}.palette-custom{width:31px;height:31px;border-radius:5px;overflow:hidden;border:2px solid #e5e7eb;background:#fff;padding:0;position:relative}.palette-custom input{position:absolute;inset:-7px;width:46px!important;height:46px!important;padding:0!important;border:0!important;cursor:pointer}.palette-custom::after{content:'Color';position:absolute;inset:0;display:grid;place-items:center;font-size:7px;font-weight:900;color:#fff;text-shadow:0 1px 2px #000;pointer-events:none}.fill-controls{display:grid;gap:4px;border-top:1px solid #273449;padding-top:7px}.fill-controls label{margin-bottom:0!important}.selection-overlay{position:absolute;z-index:605;left:0;top:0;border:2px dashed #38bdf8;pointer-events:none;transform-origin:center center;box-shadow:0 0 0 1px #0f172a66}.selection-overlay .selection-handle{position:absolute;width:13px;height:13px;border:2px solid #475569;background:#f8fafc;pointer-events:auto;cursor:pointer;box-shadow:0 1px 3px #0008}.selection-overlay .scale-handle{right:-8px;bottom:-8px;cursor:nwse-resize}.selection-overlay .rotate-handle{left:50%;top:-30px;transform:translateX(-50%);border-radius:50%;cursor:grab;background:#e0f2fe}.selection-overlay .rotate-handle::after{content:'';position:absolute;left:50%;top:11px;width:1px;height:16px;background:#38bdf8}.ci-marker .symbol-visual{position:relative;display:block}.ci-marker .symbol-box{position:relative;transform-origin:center center}.ci-marker .symbol-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.ci-marker .marker-center-label{position:absolute;transform:translate(-50%,-50%);z-index:3;color:#111827;font-weight:900;line-height:1;white-space:nowrap;text-align:center;text-shadow:0 1px 0 #fff8;pointer-events:none}.ci-marker.selected .symbol-box{filter:drop-shadow(0 0 2px #38bdf8)}.ci-text.selected{outline:none}.ci-shape-selected{stroke-dasharray:8 6}.ci-shape-handle{width:10px!important;height:10px!important;margin-left:-5px!important;margin-top:-5px!important;border:1px solid #666!important;background:#f3f4f6!important;border-radius:1px!important;box-shadow:0 1px 3px #0006}.ci-shape-rotate{width:14px!important;height:14px!important;margin-left:-7px!important;margin-top:-7px!important;border-radius:50%!important;border:2px solid #64748b!important;background:#e0f2fe!important}.leaflet-editing-icon{width:6px!important;height:6px!important;margin-left:-3px!important;margin-top:-3px!important;border-radius:1px!important;background:#f3f4f6!important;border:1px solid #777!important}.leaflet-editing-icon.ci-line-last-handle{width:16px!important;height:16px!important;margin-left:-8px!important;margin-top:-8px!important;border:2px solid #475569!important;background:#fff!important;cursor:pointer!important;box-shadow:0 0 0 2px #ffffff88}.leaflet-editing-icon.ci-line-first-handle{width:7px!important;height:7px!important;margin-left:-3.5px!important;margin-top:-3.5px!important}.tool-hint strong{color:#fde68a}.properties-form input[type=color]{height:34px;padding:3px}.properties-form input[type=range]{padding:0;height:24px}

/* M06 · selección separada de edición + menú contextual */
.object-context-menu{position:fixed;z-index:5200;min-width:150px;padding:6px;background:#0f172a;border:1px solid #475569;border-radius:9px;box-shadow:0 10px 30px #0008;display:grid;gap:4px}.object-context-menu button{width:100%;text-align:left;padding:9px 11px;border-radius:6px;background:#172033;border:1px solid transparent;color:#f8fafc;font-weight:700}.object-context-menu button:hover{background:#24334d;border-color:#475569}.object-context-menu button.danger{color:#fecaca}.object-context-menu.hidden{display:none}.tools-bottom button:disabled{opacity:.38;cursor:not-allowed}.leaflet-interactive.ci-shape-hit{cursor:pointer}

/* === M07 · reorganización de interfaz / Intervención como eje operativo === */
:root{--top-h:66px}
.topbar{grid-template-columns:190px minmax(170px,1fr) auto auto;gap:7px;padding:7px 9px;z-index:3000}
.brand{gap:7px}.brand img{width:40px;height:40px}.brand strong{font-size:13px;white-space:nowrap}.brand span{font-size:9px}
.incident-chip{width:100%;min-width:0;height:42px;padding:6px 9px;border-color:#334155;background:#101a2c}
.incident-chip b{font-size:14px}.incident-chip small{font-size:9px}.pulse-dot{width:8px;height:8px;box-shadow:0 0 0 4px #22c55e22}
.top-menus{display:flex;align-items:center;gap:4px;min-width:0}
.top-menu-trigger{height:36px;min-width:68px;padding:0 8px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;font-weight:800;white-space:nowrap}
.top-menu-trigger.primary-menu{min-width:88px;border-color:#0ea5e9;background:#0c4a6e}.top-menu-trigger>b{font-size:10px;color:#cbd5e1}
.top-actions{gap:3px}.top-actions button{width:34px;height:34px;font-size:17px;border-radius:8px}.top-actions img{width:18px;height:18px}
.top-actions .text-action{min-width:36px;width:36px;padding:0;justify-content:center}.top-actions .text-action span{display:none}

.top-menu-panel{position:fixed;top:calc(var(--top-h) - 1px);z-index:4900;background:#111827;border:1px solid #475569;border-radius:0 0 12px 12px;box-shadow:0 16px 40px #0009;color:var(--text)}
.intervention-panel{left:50%;transform:translateX(-50%);width:min(1120px,calc(100vw - 20px));max-height:calc(100vh - var(--top-h) - 12px);overflow:hidden}
.menu-panel-head{height:52px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-bottom:1px solid #334155;background:#0f172a}
.menu-panel-head b,.menu-panel-head small{display:block}.menu-panel-head small{margin-top:2px;color:#94a3b8;font-size:10px}.menu-panel-head>button{width:30px;height:30px;flex:none}
.intervention-layout{display:grid;grid-template-columns:260px minmax(0,1fr);max-height:calc(100vh - var(--top-h) - 64px)}
.incoming-interventions{min-width:0;border-right:1px solid #334155;background:#0b1220;display:flex;flex-direction:column;padding:10px;gap:8px;overflow:hidden}
.incoming-head{display:flex;align-items:start;justify-content:space-between;gap:7px}.incoming-head b,.incoming-head small{display:block}.incoming-head b{font-size:11px}.incoming-head small{font-size:9px;color:#94a3b8;margin-top:3px}.incoming-head button{width:29px;height:29px;flex:none}
.interventions-list{flex:1;min-height:120px;overflow:auto;display:grid;align-content:start;gap:6px}
.empty-interventions{padding:15px 10px;border:1px dashed #334155;border-radius:8px;color:#94a3b8;font-size:10px;line-height:1.45;text-align:center}.empty-interventions small{display:block;margin-top:5px}
.incoming-item{display:grid;grid-template-columns:34px 1fr;gap:7px;align-items:center;text-align:left;padding:7px;background:#101a2c;border-color:#273449}.incoming-item b,.incoming-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.incoming-item b{font-size:10px}.incoming-item small{font-size:9px;color:#94a3b8;margin-top:2px}
.incoming-priority{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;font-size:9px;font-weight:900}.incoming-priority.p1{background:#7f1d1d;color:#fecaca}.incoming-priority.p2{background:#78350f;color:#fde68a}.incoming-priority.p3{background:#164e63;color:#a5f3fc}.incoming-priority.p4{background:#1f2937;color:#d1d5db}
.manual-intervention-btn{height:36px;font-size:10px;font-weight:800;border-color:#0ea5e9}
.intervention-editor{min-width:0;overflow:auto;background:#111827}
.incident-source-line{display:flex;align-items:center;gap:8px;padding:8px 12px 0}.incident-source-line small{color:#94a3b8;font-size:10px}.source-badge{padding:4px 7px;border-radius:6px;font-size:9px;font-weight:900;letter-spacing:.08em}.source-badge.manual{background:#334155;color:#e2e8f0}.source-badge.alarm{background:#7f1d1d;color:#fecaca}
.incident-location-block{margin:8px 12px 0;padding:9px;border:1px solid #334155;border-radius:9px;background:#0b1220}.section-caption b,.section-caption small{display:block}.section-caption b{font-size:11px}.section-caption small{font-size:9px;color:#94a3b8;margin-top:2px}
.incident-search-row{display:grid;grid-template-columns:minmax(180px,1fr) auto auto auto;gap:5px;margin-top:7px}.incident-search-row input{min-width:0;background:#111827;border:1px solid #334155;color:#fff;border-radius:7px;padding:7px 9px;outline:none}.incident-search-row input:focus{border-color:#38bdf8}.incident-search-row button{padding:0 10px;font-size:10px}
.search-results{margin-top:6px;display:grid;gap:4px;max-height:180px;overflow:auto}.search-result-item{display:block;text-align:left;padding:7px 9px;border-radius:7px}.search-result-item b,.search-result-item small{display:block}.search-result-item b{font-size:10px;color:#fff}.search-result-item small{font-size:9px;color:#94a3b8;margin-top:2px;white-space:normal}.search-result-empty{padding:8px;color:#94a3b8;font-size:10px}
.intervention-fields{padding:10px 12px 6px;gap:8px}.intervention-fields label{font-size:10px}.intervention-fields input,.intervention-fields select,.intervention-fields textarea{padding:6px 7px;font-size:11px}.intervention-fields textarea{resize:vertical}.field-help{color:#94a3b8;font-size:8px;font-weight:400;line-height:1.25}
.field-with-confirm{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:5px;align-items:stretch}.confirm-check{display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;border:1px solid #334155;border-radius:7px;background:#0b1220;color:#94a3b8!important;font-size:13px!important;cursor:pointer}.confirm-check input{width:auto!important;margin:0!important;accent-color:#22c55e}.confirm-check:has(input:checked){border-color:#22c55e;background:#052e16;color:#86efac!important}
.confirmation-status{display:flex;align-items:center;min-height:31px;padding:6px 8px;border:1px solid #475569;border-radius:7px;background:#0b1220;color:#fbbf24;font-weight:800}.confirmation-status.complete{border-color:#22c55e;background:#052e16;color:#86efac}
.intervention-actions{padding:4px 12px 12px}.intervention-actions .primary{min-width:180px}

.compact-menu-panel{right:245px;width:310px;max-height:calc(100vh - var(--top-h) - 12px);overflow:auto}.compact-menu-body{padding:10px;display:grid;gap:9px}.compact-menu-body select{width:100%;background:#0b1220;border:1px solid #334155;color:#fff;border-radius:7px;padding:7px}.confirm-quick{padding:7px;border:1px solid #334155;border-radius:7px;background:#0b1220}.quick-stat{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px;border:1px solid #334155;border-radius:7px;background:#0b1220;font-size:10px}.quick-stat b{font-size:15px;color:#38bdf8}
.zoom-menu-panel{width:360px}.top-zoom-presets{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:10px}.top-zoom-presets button{height:68px;border:1px solid #334155;border-radius:9px;background:#0b1220;color:#e5e7eb;display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;align-content:center;justify-content:center;gap:1px 5px}.top-zoom-presets button b{font-size:15px}.top-zoom-presets button span{font-size:12px;color:#94a3b8}.top-zoom-presets button small{grid-column:1/-1;font-size:8px;color:#94a3b8}.top-zoom-presets button.active{background:#075985;border-color:#38bdf8;color:#fff}.top-zoom-presets button.active span,.top-zoom-presets button.active small{color:#dbeafe}
.data-live-status{margin-top:8px;padding:7px;border:1px solid #334155;border-radius:6px;color:#94a3b8;font-size:10px}

/* El mapa queda limpio: los controles movidos a la barra superior ya no ocupan el lienzo. */
.map-top-controls{display:none!important}

@media(max-width:1260px){
  .topbar{grid-template-columns:175px minmax(140px,1fr) auto auto;gap:5px}
  .brand strong{font-size:12px}.top-menu-trigger{min-width:58px;padding:0 6px}.top-menu-trigger.primary-menu{min-width:78px}
  .top-actions button{width:31px;height:31px}.top-actions{gap:2px}
  .incident-chip b{font-size:12px}
  .compact-menu-panel{right:215px}
}
@media(max-width:1050px){
  .topbar{grid-template-columns:52px minmax(145px,1fr) auto auto}.brand>div{display:none}.brand img{width:38px;height:38px}
  .top-menu-trigger span{display:none}.top-menu-trigger,.top-menu-trigger.primary-menu{min-width:39px;width:39px;padding:0}.top-menu-trigger b{font-size:10px}
  #interventionMenuBtn::before{content:'I';font-weight:900}#incidentTypeMenuBtn::before{content:'T';font-weight:900}#hydrantsMenuBtn::before{content:'H';font-weight:900}#zoomMenuBtn::before{content:'Z';font-weight:900}
  .top-actions button{width:30px;height:30px}.compact-menu-panel{right:170px}
  .intervention-panel{width:calc(100vw - 12px)}
}
@media(max-width:820px){
  :root{--top-h:58px}.topbar{height:var(--top-h);grid-template-columns:44px minmax(120px,1fr) auto;padding:5px}.top-menus{grid-column:3}.top-actions{display:none}.incident-chip{height:39px}.incident-chip small{display:none}
  .intervention-panel{top:var(--top-h);width:100vw;max-height:calc(100vh - var(--top-h));border-radius:0}.intervention-layout{grid-template-columns:1fr;overflow:auto;max-height:calc(100vh - var(--top-h) - 52px)}.incoming-interventions{border-right:0;border-bottom:1px solid #334155;max-height:220px}.intervention-editor{overflow:visible}.incident-search-row{grid-template-columns:1fr auto}.incident-search-row .secondary{grid-column:auto}.compact-menu-panel{top:var(--top-h);right:4px;width:min(360px,calc(100vw - 8px))}
}

/* === M08 · limpieza visual, validación grande y paneles cíclicos === */
/* Confirmaciones: el propio cuadro es el control. Pendiente rojo / confirmado verde. */
.field-with-confirm{grid-template-columns:minmax(0,1fr) 42px;gap:6px;align-items:stretch}
.confirm-check{display:block!important;width:42px;min-height:34px;margin:0!important;padding:0!important;border:1px solid #ef4444!important;border-radius:7px!important;background:#450a0a!important;overflow:hidden;cursor:pointer}
.confirm-check input{appearance:none;-webkit-appearance:none;display:block;width:100%!important;height:100%!important;min-height:34px;margin:0!important;padding:0!important;border:0!important;border-radius:6px;background:#b91c1c;cursor:pointer;outline:0}
.confirm-check input:hover{background:#dc2626}.confirm-check input:focus-visible{box-shadow:inset 0 0 0 3px #fca5a5}
.confirm-check:has(input:checked){border-color:#22c55e!important;background:#052e16!important}
.confirm-check input:checked{background:#16a34a}.confirm-check input:checked:hover{background:#22c55e}.confirm-check input:checked:focus-visible{box-shadow:inset 0 0 0 3px #86efac}
.confirm-quick{display:grid;grid-template-columns:1fr 42px;align-items:center;gap:8px;padding:7px;border:1px solid #334155;border-radius:7px;background:#0b1220;font-size:11px}.quick-confirm-box{width:42px;height:32px;border:1px solid #ef4444;border-radius:7px;overflow:hidden;background:#450a0a}.quick-confirm-box input{appearance:none;-webkit-appearance:none;width:100%;height:100%;margin:0;background:#b91c1c;cursor:pointer}.quick-confirm-box:has(input:checked){border-color:#22c55e;background:#052e16}.quick-confirm-box input:checked{background:#16a34a}
.compact-menu-body input[type=text],.compact-menu-body input[list]{width:100%;background:#0b1220;border:1px solid #334155;color:#fff;border-radius:7px;padding:8px;outline:none}.compact-menu-body input[list]:focus{border-color:#38bdf8}

/* Los docks aprovechan desde arriba casi todo el alto útil del mapa. */
.floating-dock{top:6px;bottom:35px;transition:width .18s ease,transform .18s ease,opacity .18s ease}
.left-dock{min-width:0}.tools-list{flex:1;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;align-content:start}.tools-bottom{min-width:0;overflow-x:hidden}.tool{width:100%;min-width:0;overflow:hidden;flex:none}.tool img,.tool-glyph{flex:none}
body.tools-hidden .left-dock{opacity:0;pointer-events:none;transform:translateX(-115%)}

/* Modo compacto real: sólo iconos, centrados y sin scroll horizontal. */
body.tools-collapsed .left-dock{width:60px}
body.tools-collapsed .left-dock .panel-title{justify-content:center;padding:0 4px}
body.tools-collapsed .left-dock .panel-title button{margin:0 auto}
body.tools-collapsed .tools-list{padding:5px 6px;gap:4px;overflow-x:hidden}
body.tools-collapsed .tool{height:42px;width:100%;padding:4px 0;justify-content:center;gap:0;overflow:hidden}
body.tools-collapsed .tool img,body.tools-collapsed .tool-glyph{width:31px;height:31px;max-width:31px;display:grid;place-items:center;margin:0 auto}
body.tools-collapsed .tools-bottom{padding:5px 6px;gap:4px;overflow:hidden}
body.tools-collapsed .tools-bottom button{width:100%;min-width:0;height:36px;padding:0;overflow:hidden}
body.tools-collapsed .tools-bottom img{width:19px;height:19px;margin:0 auto}

/* Cabecera operativa: Dirección = título; Tipo de incidente = subtítulo. */
.brand{grid-column:1}.incident-chip{grid-column:2;justify-content:center;text-align:center;position:relative}.top-menus{grid-column:3}.top-actions{grid-column:4}
.incident-main-data{width:100%;min-width:0;text-align:center;padding:0 18px}.incident-chip b{font-size:18px;line-height:1.05;letter-spacing:.025em}.incident-chip small{font-size:11px;line-height:1.1;margin-top:5px;color:#cbd5e1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.incident-chip .pulse-dot{position:absolute;left:10px;top:50%;transform:translateY(-50%)}
@media(min-width:1501px){
  .incident-chip{position:absolute;left:50%;top:7px;transform:translateX(-50%);width:min(620px,36vw);height:52px;z-index:2}
  .incident-chip b{font-size:19px}.incident-chip small{font-size:12px}
}
@media(max-width:1260px){.incident-chip b{font-size:15px}.incident-chip small{font-size:10px}.incident-main-data{padding:0 12px}}
@media(max-width:820px){.floating-dock{top:5px;bottom:34px}.incident-chip b{font-size:13px}.incident-main-data{padding:0 6px}.incident-chip .pulse-dot{display:none}}


/* === M08.1 · centrado de cabecera, checks con tilde y ciclo visual completo === */
/* Cabecera: el bloque central queda realmente centrado y el subtítulo no supera el ancho del título. */
.topbar{position:relative;grid-template-columns:260px 1fr auto auto;gap:10px;padding:8px 12px 8px 10px}
.incident-chip{position:absolute!important;left:50%!important;top:8px!important;transform:translateX(-50%)!important;width:min(760px,46vw)!important;height:50px;z-index:1;justify-content:center;text-align:center}
.incident-main-data{display:block;width:100%;max-width:100%;padding:0 24px;text-align:center}
.incident-chip b,.incident-chip small{max-width:100%;margin-left:auto;margin-right:auto;text-align:center}
.incident-chip b{font-size:18px;line-height:1.05}
.incident-chip small{display:block!important;font-size:11px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.incident-chip .pulse-dot{position:absolute;left:12px;top:50%;transform:translateY(-50%)}
.top-menus,.top-actions{position:relative;z-index:2}
@media(max-width:1260px){.incident-chip{width:min(600px,42vw)!important}.incident-chip b{font-size:15px}.incident-chip small{font-size:10px}}
@media(max-width:1050px){.incident-chip{width:min(420px,38vw)!important;height:44px;top:10px!important}.incident-chip b{font-size:13px}.incident-chip small{font-size:9px}}
@media(max-width:820px){.incident-chip{position:static!important;transform:none!important;width:100%!important;height:39px;top:auto!important}}

/* Checks: agregamos una tilde visible dentro del cuadro. Pendiente rojo, confirmado verde. */
.confirm-check,.quick-confirm-box{position:relative}
.confirm-check::after,.quick-confirm-box::after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;font-size:20px;font-weight:900;color:#fff;opacity:.38;pointer-events:none;text-shadow:0 1px 1px #0006}
.confirm-check:has(input:checked)::after,.quick-confirm-box:has(input:checked)::after{opacity:1;color:#fff}
.confirm-check input,.quick-confirm-box input{position:relative;z-index:1;opacity:.999}

/* Al ocultar herramientas en el ciclo también se oculta la columna derecha flotante. */
body.tools-hidden .right-dock{opacity:0;pointer-events:none;transform:translateX(115%)}
body.tools-hidden .left-dock,body.tools-hidden .right-dock{transition:transform .18s ease,opacity .18s ease}

/* Docks mejor asentados en altura. */
.left-dock .panel-title,.right-dock .panel-title{flex:none}
.left-dock{display:flex;flex-direction:column}
.left-dock .tools-list{flex:1 1 auto}

/* Modo compacto: que no aparezca scroll horizontal ni recortes raros. */
body.tools-collapsed .left-dock{width:58px}
body.tools-collapsed .left-dock .panel-title span{display:none}
body.tools-collapsed .left-dock .panel-title button{width:24px;height:24px}
body.tools-collapsed .tool b,body.tools-collapsed .tools-bottom span{display:none!important}
body.tools-collapsed .tool{padding-left:0;padding-right:0}



/* === M08.2 · ciclo 4 estados, checks con gráfico visible y cabecera centrada === */
/* El botón/título central queda realmente centrado visualmente. */
.topbar{position:relative;display:grid;grid-template-columns:260px 1fr auto auto;align-items:center;gap:10px;padding:8px 12px}
.brand,.top-menus,.top-actions{position:relative;z-index:2}
.incident-chip{position:absolute!important;left:50%!important;top:8px!important;transform:translateX(-50%)!important;width:min(760px,48vw)!important;max-width:760px;height:50px;z-index:1;display:flex;align-items:center;justify-content:center;text-align:center}
.incident-main-data{display:block;width:100%;padding:0 38px;text-align:center}
.incident-chip b,.incident-chip small{display:block;width:100%;text-align:center;margin:0 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.incident-chip b{font-size:18px;line-height:1.05}
.incident-chip small{font-size:11px;line-height:1.1;margin-top:4px}
.incident-chip .pulse-dot{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
@media(max-width:1260px){.incident-chip{width:min(620px,42vw)!important}.incident-chip b{font-size:15px}.incident-chip small{font-size:10px}}
@media(max-width:1050px){.incident-chip{width:min(430px,36vw)!important;height:44px}.incident-chip b{font-size:13px}.incident-chip small{font-size:9px}}
@media(max-width:820px){.incident-chip{position:static!important;transform:none!important;width:100%!important;max-width:none;height:39px;top:auto!important}.incident-main-data{padding:0 8px}.incident-chip .pulse-dot{display:none}}

/* Checks con gráfico interno visible. */
.confirm-check,.quick-confirm-box{position:relative;overflow:hidden}
.confirm-check input,.quick-confirm-box input{appearance:none;-webkit-appearance:none;width:100%;height:100%;margin:0;cursor:pointer;border:0;border-radius:6px;background-color:#b91c1c;background-repeat:no-repeat;background-position:center;background-size:18px 18px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='rgba(255,255,255,0.68)' d='M7.6 13.2 4.8 10.4l-1.4 1.4 4.2 4.2L16.7 6.9l-1.4-1.4z'/%3E%3C/svg%3E")}
.confirm-check input:hover,.quick-confirm-box input:hover{background-color:#dc2626}
.confirm-check:has(input:checked),.quick-confirm-box:has(input:checked){border-color:#22c55e!important;background:#052e16!important}
.confirm-check input:checked,.quick-confirm-box input:checked{background-color:#16a34a;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M7.6 13.2 4.8 10.4l-1.4 1.4 4.2 4.2L16.7 6.9l-1.4-1.4z'/%3E%3C/svg%3E")}
.confirm-check input:checked:hover,.quick-confirm-box input:checked:hover{background-color:#22c55e}

/* El ciclo también afecta la columna derecha; 4 estados. */
body.tools-hidden .left-dock,body.tools-hidden .right-dock{opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
body.tools-hidden .left-dock{transform:translateX(-115%)}
body.tools-hidden .right-dock{transform:translateX(115%)}



/* === M08.3 · centrado óptico, ciclo pedido y checks con cuadrado vacío === */
/* Título: centrado real con balance óptico del punto verde. */
.topbar{position:relative;display:grid;grid-template-columns:260px 1fr auto auto;align-items:center;gap:10px;padding:8px 12px}
.incident-chip{position:absolute!important;left:50%!important;top:8px!important;transform:translateX(-50%)!important;width:min(760px,48vw)!important;max-width:760px;height:50px;z-index:1;display:flex;align-items:center;justify-content:center;text-align:center}
.incident-chip::after{content:'';position:absolute;right:14px;top:50%;transform:translateY(-50%);width:10px;height:10px;border-radius:50%;opacity:0}
.incident-main-data{display:block;width:100%;padding:0 44px;text-align:center}
.incident-chip b,.incident-chip small{display:block;width:100%;text-align:center;margin:0 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.incident-chip b{font-size:18px;line-height:1.05}
.incident-chip small{font-size:11px;line-height:1.1;margin-top:4px}
.incident-chip .pulse-dot{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
@media(max-width:1260px){.incident-chip{width:min(620px,42vw)!important}.incident-chip b{font-size:15px}.incident-chip small{font-size:10px}}
@media(max-width:1050px){.incident-chip{width:min(430px,36vw)!important;height:44px}.incident-chip b{font-size:13px}.incident-chip small{font-size:9px}}
@media(max-width:820px){.incident-chip{position:static!important;transform:none!important;width:100%!important;max-width:none;height:39px;top:auto!important}.incident-main-data{padding:0 8px}.incident-chip .pulse-dot,.incident-chip::after{display:none}}

/* Pending rojo = cuadrado vacío; confirmado verde = tilde blanca. */
.confirm-check,.quick-confirm-box{position:relative;overflow:hidden}
.confirm-check input,.quick-confirm-box input{appearance:none;-webkit-appearance:none;width:100%;height:100%;margin:0;cursor:pointer;border:0;border-radius:6px;background-color:#b91c1c;background-repeat:no-repeat;background-position:center;background-size:18px 18px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='4' y='4' width='12' height='12' rx='1.5' fill='none' stroke='rgba(255,255,255,0.88)' stroke-width='2'/%3E%3C/svg%3E")}
.confirm-check input:hover,.quick-confirm-box input:hover{background-color:#dc2626}
.confirm-check:has(input:checked),.quick-confirm-box:has(input:checked){border-color:#22c55e!important;background:#052e16!important}
.confirm-check input:checked,.quick-confirm-box input:checked{background-color:#16a34a;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M7.6 13.2 4.8 10.4l-1.4 1.4 4.2 4.2L16.7 6.9l-1.4-1.4z'/%3E%3C/svg%3E")}
.confirm-check input:checked:hover,.quick-confirm-box input:checked:hover{background-color:#22c55e}

/* Estados visuales del ciclo ya pedidos: sólo herramientas / sólo imanes / vista limpia. */
body.tools-hidden .left-dock,body.tools-hidden .right-dock{opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
body.tools-hidden .left-dock{transform:translateX(-115%)}
body.tools-hidden .right-dock{transform:translateX(115%)}


/* === M08.4 · título perfectamente centrado y ciclo pedido === */
/* Centrado real: el texto ocupa una capa absoluta completa dentro del chip. */
.topbar{position:relative;display:block;padding:8px 12px;height:var(--top-h)}
.brand{position:absolute;left:12px;top:50%;transform:translateY(-50%);z-index:3}
.top-menus{position:absolute;right:190px;top:50%;transform:translateY(-50%);z-index:3;display:flex;align-items:center;gap:4px}
.top-actions{position:absolute;right:12px;top:50%;transform:translateY(-50%);z-index:3;display:flex;gap:5px}
.incident-chip{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(760px,48vw)!important;max-width:760px;height:50px;z-index:1;display:block;padding:0!important}
.incident-main-data{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 46px;text-align:center}
.incident-chip b,.incident-chip small{display:block;width:100%;max-width:100%;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 auto}
.incident-chip b{font-size:18px;line-height:1.05}
.incident-chip small{font-size:11px;line-height:1.1;margin-top:4px}
.incident-chip .pulse-dot{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
.incident-chip::after{content:'';position:absolute;right:14px;top:50%;transform:translateY(-50%);width:10px;height:10px;border-radius:50%;opacity:0}
@media(max-width:1380px){.top-menus{right:160px}.incident-chip{width:min(640px,42vw)!important}.incident-chip b{font-size:15px}.incident-chip small{font-size:10px}}
@media(max-width:1150px){.brand{left:8px}.top-menus{right:138px}.incident-chip{width:min(460px,34vw)!important;height:44px}.incident-chip b{font-size:13px}.incident-chip small{font-size:9px}}
@media(max-width:820px){.topbar{display:grid;grid-template-columns:44px minmax(120px,1fr) auto;padding:5px}.brand,.top-menus,.top-actions{position:static;transform:none}.top-menus{grid-column:3}.top-actions{display:none}.incident-chip{position:static!important;transform:none!important;width:100%!important;max-width:none;height:39px;top:auto!important;left:auto!important}.incident-main-data{position:absolute;inset:0;padding:0 8px}.incident-chip .pulse-dot,.incident-chip::after{display:none}}

/* Pendiente = X blanca; confirmado = tilde blanca. */
.confirm-check input,.quick-confirm-box input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' stroke='rgba(255,255,255,0.92)' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")}
.confirm-check input:checked,.quick-confirm-box input:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M7.6 13.2 4.8 10.4l-1.4 1.4 4.2 4.2L16.7 6.9l-1.4-1.4z'/%3E%3C/svg%3E")}


/* === M08.5 · header balance, ciclo final y acciones visibles === */
:root{--header-actions-w:338px;--header-menus-w:352px}
.topbar{position:relative;display:block;padding:8px 12px;height:var(--top-h)}
.brand{position:absolute;left:12px;top:50%;transform:translateY(-50%);z-index:3}
.top-actions{position:absolute;right:12px;top:50%;transform:translateY(-50%);z-index:4;display:flex;gap:6px;min-width:var(--header-actions-w);justify-content:flex-end}
.top-menus{position:absolute;right:calc(var(--header-actions-w) + 22px);top:50%;transform:translateY(-50%);z-index:4;display:flex;align-items:center;gap:5px;min-width:var(--header-menus-w);justify-content:flex-end}
.top-actions button{width:38px;height:38px;display:grid;place-items:center;padding:0;flex:none}
.top-actions .text-action{width:38px;min-width:38px;padding:0}.top-actions .text-action span{display:none}
.top-actions img{display:block;width:19px;height:19px;object-fit:contain;filter:brightness(0) invert(1) contrast(1.25);opacity:1}
.top-menu-trigger{height:36px;min-width:74px;padding:0 10px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:10px;font-weight:800;white-space:nowrap;flex:none}
.incident-chip{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(680px,39vw)!important;max-width:680px;height:50px;z-index:1;display:block;padding:0!important}
.incident-main-data{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 54px;text-align:center}
.incident-chip .pulse-dot{position:absolute;left:14px;top:50%;transform:translateY(-50%)}
.incident-chip::after{content:'';position:absolute;right:14px;top:50%;transform:translateY(-50%);width:10px;height:10px;border-radius:50%;opacity:0}
.incident-chip b,.incident-chip small{display:block;width:100%;max-width:100%;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 auto}
.incident-chip b{font-size:18px;line-height:1.05}
.incident-chip small{font-size:11px;line-height:1.1;margin-top:4px}
@media(max-width:1450px){:root{--header-actions-w:320px;--header-menus-w:332px}.incident-chip{width:min(600px,34vw)!important}.incident-chip b{font-size:16px}}
@media(max-width:1220px){:root{--header-actions-w:282px;--header-menus-w:270px}.top-menu-trigger{min-width:62px;padding:0 8px}.incident-chip{width:min(460px,28vw)!important;height:44px}.incident-chip b{font-size:13px}.incident-chip small{font-size:9px}}
@media(max-width:820px){.topbar{display:grid;grid-template-columns:44px minmax(120px,1fr) auto;padding:5px}.brand,.top-menus,.top-actions{position:static;transform:none;min-width:0}.top-menus{grid-column:3}.top-actions{display:none}.incident-chip{position:static!important;transform:none!important;width:100%!important;max-width:none;height:39px;top:auto!important;left:auto!important}.incident-main-data{position:absolute;inset:0;padding:0 8px}.incident-chip .pulse-dot,.incident-chip::after{display:none}}

/* Checkbox pendiente = X; confirmado = tilde. Tamaño fijo para evitar aplaste. */
.field-with-confirm{grid-template-columns:minmax(0,1fr) 44px;gap:6px}
.confirm-check,.quick-confirm-box{width:44px!important;min-width:44px!important;height:34px;position:relative;overflow:hidden;flex:none}
.confirm-check input,.quick-confirm-box input{appearance:none;-webkit-appearance:none;width:100%;height:100%;margin:0;cursor:pointer;border:0;border-radius:6px;background-color:#b91c1c;background-repeat:no-repeat;background-position:center;background-size:18px 18px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' stroke='rgba(255,255,255,0.92)' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")}
.confirm-check:has(input:checked),.quick-confirm-box:has(input:checked){border-color:#22c55e!important;background:#052e16!important}
.confirm-check input:checked,.quick-confirm-box input:checked{background-color:#16a34a;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M7.6 13.2 4.8 10.4l-1.4 1.4 4.2 4.2L16.7 6.9l-1.4-1.4z'/%3E%3C/svg%3E")}

/* Estado solo imanes: mapa limpio con etiquetas visibles, herramientas y columna derecha ocultas. */
body.tools-hidden .left-dock,body.tools-hidden .right-dock{opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
body.tools-hidden .left-dock{transform:translateX(-115%)}
body.tools-hidden .right-dock{transform:translateX(115%)}


/* === M08.6 · compacidad final de interfaz === */
/* Docks sin aire arriba/abajo. */
.floating-dock{top:2px!important;bottom:26px!important;border-radius:12px}
.left-dock{left:8px!important}
.right-dock{right:8px!important}

/* Cabecera superior: achicamos el cuadro central y los botones para evitar solapes. */
:root{--header-actions-w:286px;--header-menus-w:318px}
.top-actions{min-width:var(--header-actions-w)!important;gap:4px!important}
.top-menus{right:calc(var(--header-actions-w) + 18px)!important;min-width:var(--header-menus-w)!important;gap:4px!important}
.top-menu-trigger{height:34px!important;min-width:66px!important;padding:0 8px!important;font-size:10px!important}
.top-actions button{width:34px!important;height:34px!important;min-width:34px!important;border-radius:8px!important}
.top-actions .glyph-action,.top-actions .text-action{font-size:16px;line-height:1}
.top-actions img{width:17px!important;height:17px!important}
.incident-chip{width:min(520px,28vw)!important;max-width:520px!important;height:46px!important}
.incident-main-data{padding:0 46px!important}
.incident-chip b{font-size:16px!important}.incident-chip small{font-size:10px!important}
@media(max-width:1450px){:root{--header-actions-w:268px;--header-menus-w:300px}.incident-chip{width:min(460px,24vw)!important;max-width:460px!important}.top-menu-trigger{min-width:60px!important}}
@media(max-width:1220px){:root{--header-actions-w:252px;--header-menus-w:258px}.incident-chip{width:min(380px,20vw)!important;height:42px!important}.top-actions button{width:32px!important;height:32px!important}.top-menu-trigger{min-width:56px!important;padding:0 6px!important}}

/* Acciones con iconografía simple y visible. */
.top-actions .glyph-action{display:grid;place-items:center;color:#fff;font-weight:900}

/* Capas: más legibles y sin scroll interno. */
.right-dock{width:286px!important;grid-template-rows:minmax(420px,66%) 1fr!important}
.layers-list{height:calc(100% - 40px)!important;overflow:hidden!important;padding:6px 8px 4px!important}
.layer-row{grid-template-columns:22px 1fr 24px 24px 20px 20px!important;gap:4px!important;min-height:39px!important;padding:4px 4px!important}
.layer-name{font-size:13px!important;font-weight:700}.layer-count{font-size:10px!important}
.layer-radio,.layer-icon-btn,.layer-move{width:22px!important;height:22px!important;font-size:13px!important}
.properties-panel{overflow:auto!important}
#propertiesEmpty{font-size:12px;line-height:1.35}

/* Ocultar propiedades ya no usadas. */
#propertiesForm .prop-row:has(#propScale),
#propertiesForm label:has(#propZoomMode),
#propertiesForm .prop-row:has(#propRotation),
#editGeometryBtn{display:none!important}

/* Aligerar panel de propiedades visible. */
.properties-form{gap:8px!important}
.properties-form label{font-size:12px!important;margin-bottom:0!important}
.properties-form input,.properties-form select{padding:7px 9px!important;min-height:34px}

/* Checks más claros y cuadrados. */
.field-with-confirm{grid-template-columns:minmax(0,1fr) 42px!important}
.confirm-check,.quick-confirm-box{width:42px!important;min-width:42px!important;height:36px!important}

/* Estado solo imanes / solo herramientas / vista limpia. */
body.tools-hidden .left-dock,body.tools-hidden .right-dock{opacity:0;pointer-events:none;transition:transform .18s ease,opacity .18s ease}
body.tools-hidden .left-dock{transform:translateX(-115%)}
body.tools-hidden .right-dock{transform:translateX(115%)}

/* Modo compacto con mejor aire. */
body.tools-collapsed .left-dock{width:56px!important}
body.tools-collapsed .tools-list{padding:5px 5px!important}
body.tools-collapsed .tool{height:41px!important}


/* === M08.7 · propiedades compactas + nueva Unidad === */
.object-identity-row{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;align-items:center;margin-bottom:8px}
.object-identity-row strong{font-size:13px;color:#f8fafc;white-space:nowrap;min-width:62px}
.object-identity-row input{min-width:0;width:100%;height:35px;background:#0b1220;border:1px solid #334155;color:#fff;border-radius:7px;padding:7px 9px;outline:none}
.object-identity-row input:focus{border-color:#38bdf8}
#propWidthLabel.hidden{display:none!important}

/* En PNG no dejamos huecos de propiedades que no aplican. */
.properties-form .hidden{display:none!important}

/* Nueva unidad vertical: el icono de herramienta debe verse completo, no recortado. */
.tool[data-tool="unidad"] img{object-fit:contain!important;max-height:30px!important;width:28px!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:29px!important;height:31px!important;object-fit:contain!important}

/* Iconos superiores: contraste y contenido centrado. */
.top-actions .glyph-action{font-family:"Segoe UI Symbol","Segoe UI Emoji",Arial,sans-serif;font-size:17px!important;color:#fff!important;text-shadow:0 1px 1px #0008}
.top-actions button{overflow:visible!important}


/* === M08.8 · orden visual final === */
/* Docks a toda altura útil y sin aire; consola inferior sólo entre columnas. */
.floating-dock{top:0!important;bottom:0!important}
.left-dock,.right-dock{top:0!important;bottom:0!important}
.map-status{left:calc(var(--tools-w) + 18px)!important;right:calc(var(--right-w) + 18px)!important;bottom:4px!important;z-index:630;background:color-mix(in srgb, var(--panel) 88%, #000 12%)!important}
body.tools-collapsed .map-status{left:76px!important}
body.tools-hidden .map-status{left:10px!important;right:10px!important}

/* Herramientas compactas sin scroll. */
.left-dock{display:flex!important;flex-direction:column!important;width:154px!important}
.left-dock .panel-title{height:36px!important;min-height:36px!important;padding:0 8px!important}
.left-dock .panel-title span{font-size:14px}
.tools-list{padding:6px!important;gap:4px!important;overflow:hidden!important;align-content:start!important}
.tool{height:36px!important;min-height:36px!important;padding:4px 6px!important;gap:8px!important;border-radius:10px!important}
.tool img{width:22px!important;height:22px!important;object-fit:contain!important;filter:none!important;opacity:1!important}
.tool b{font-size:12px!important;line-height:1!important}
.tools-bottom{padding:6px!important;gap:4px!important}
.tools-bottom button{height:34px!important}
.tools-bottom img{filter:none!important}
body.tools-collapsed .left-dock{width:58px!important}
body.tools-collapsed .tool{height:36px!important;padding:4px 0!important}
body.tools-collapsed .tool img{width:24px!important;height:24px!important}
body.tools-collapsed .tools-list{overflow:hidden!important}

/* Icono de Unidad nuevo. */
.tool[data-tool="unidad"] img{width:28px!important;height:16px!important;max-height:16px!important;filter:none!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:30px!important;height:18px!important}

/* Columna capas completa y sin scroll interno. */
.right-dock{width:308px!important;grid-template-rows:minmax(410px,54%) 1fr!important}
.right-dock .panel-title{height:36px!important;min-height:36px!important;padding:0 8px!important}
.layers-list{padding:4px 6px!important;overflow:hidden!important}
.layer-row{min-height:33px!important;padding:3px 4px!important;grid-template-columns:18px 1fr 20px 20px 18px 18px!important;gap:4px!important}
.layer-name{font-size:14px!important;font-weight:700!important;line-height:1.1}
.layer-count{font-size:10px!important}
.layer-radio,.layer-icon-btn,.layer-move{width:18px!important;height:18px!important;font-size:12px!important}
.properties-panel{padding:8px!important;overflow:auto!important}
.properties-panel .panel-title, #propertiesEmpty{font-size:13px}

/* Ocultar propiedades que ya no se usan en esta etapa. */
#propertiesForm .prop-row:has(#propScale),
#propertiesForm label:has(#propZoomMode),
#propertiesForm .prop-row:has(#propRotation),
#editGeometryBtn{display:none!important}

/* Tipo + identificación en una sola línea y sin espejado para figuras geométricas. */
#propNameRow{display:grid;grid-template-columns:110px minmax(0,1fr)!important;gap:8px!important;align-items:end}
#propTypeName{display:flex;align-items:center;height:34px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#0b1220;font-size:13px}
#propLabel{width:100%}
#propFlipWrap{margin-top:2px}

/* Cabecera superior: caja más chica para que no la pisen los botones. */
:root{--header-actions-w:286px;--header-menus-w:306px}
.top-actions{min-width:var(--header-actions-w)!important;gap:4px!important}
.top-menus{right:calc(var(--header-actions-w) + 16px)!important;min-width:var(--header-menus-w)!important;gap:4px!important}
.top-actions button{width:34px!important;height:34px!important;min-width:34px!important;font-size:18px!important}
.top-menu-trigger{height:34px!important;min-width:64px!important;padding:0 8px!important;font-size:10px!important}
.theme-action{font-size:16px!important;color:#60a5fa!important}
.incident-chip{width:min(460px,25vw)!important;max-width:460px!important;height:44px!important}
.incident-main-data{padding:0 42px!important}
.incident-chip b{font-size:15px!important}.incident-chip small{font-size:10px!important}
@media(max-width:1500px){.incident-chip{width:min(410px,21vw)!important;max-width:410px!important}}

/* Temas de interfaz */
.theme-grid{display:grid;grid-template-columns:1fr;gap:6px}
.theme-swatch{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;background:#0b1220;border:1px solid var(--line);text-align:left}
.theme-swatch.active{outline:2px solid var(--accent2);background:#172033}
.theme-dot{width:18px;height:18px;border-radius:50%;display:inline-block;border:2px solid #fff6;box-shadow:0 0 0 1px #0004 inset}
.t-original{background:linear-gradient(135deg,#0b1220,#1e293b,#22c55e)}
.t-light1{background:linear-gradient(135deg,#f8fafc,#dbeafe,#60a5fa)}
.t-light2{background:linear-gradient(135deg,#fff7ed,#ffedd5,#fb7185)}
.t-light3{background:linear-gradient(135deg,#f0fdf4,#dcfce7,#34d399)}
.t-dark1{background:linear-gradient(135deg,#111827,#1f2937,#38bdf8)}
.t-dark2{background:linear-gradient(135deg,#1a1024,#312e81,#8b5cf6)}
.t-dark3{background:linear-gradient(135deg,#122218,#14532d,#22c55e)}

body[data-theme="light1"]{--bg:#edf2f7;--panel:#ffffff;--panel2:#f8fafc;--line:#cbd5e1;--text:#0f172a;--muted:#475569;--accent:#2563eb;--accent2:#0284c7;--danger:#dc2626;--shadow:0 10px 26px #94a3b833}
body[data-theme="light2"]{--bg:#fff7ed;--panel:#fffaf3;--panel2:#fffbeb;--line:#fed7aa;--text:#431407;--muted:#9a3412;--accent:#ea580c;--accent2:#fb7185;--danger:#dc2626;--shadow:0 10px 26px #f59e0b33}
body[data-theme="light3"]{--bg:#effcf6;--panel:#ffffff;--panel2:#f0fdf4;--line:#bbf7d0;--text:#052e16;--muted:#166534;--accent:#16a34a;--accent2:#0ea5e9;--danger:#dc2626;--shadow:0 10px 26px #22c55e22}
body[data-theme="dark1"]{--bg:#0f172a;--panel:#111827;--panel2:#172554;--line:#334155;--text:#e2e8f0;--muted:#94a3b8;--accent:#22c55e;--accent2:#38bdf8;--danger:#ef4444}
body[data-theme="dark2"]{--bg:#140f1f;--panel:#1b1730;--panel2:#272347;--line:#4c4b7a;--text:#ede9fe;--muted:#c4b5fd;--accent:#8b5cf6;--accent2:#22d3ee;--danger:#fb7185}
body[data-theme="dark3"]{--bg:#08140d;--panel:#102015;--panel2:#16301f;--line:#355c41;--text:#e7f5eb;--muted:#a7cbb2;--accent:#22c55e;--accent2:#84cc16;--danger:#ef4444}
body[data-theme] .topbar,
body[data-theme] .magnet-panel,
body[data-theme] .floating-dock,
body[data-theme] .top-menu-panel,
body[data-theme] .panel-title,
body[data-theme] .menu-panel-head,
body[data-theme] .tool,
body[data-theme] .top-actions button,
body[data-theme] .top-menu-trigger,
body[data-theme] .layer-row,
body[data-theme] .properties-panel,
body[data-theme] .incident-chip,
body[data-theme] .map-status,
body[data-theme] .compact-menu-body,
body[data-theme] .quick-stat,
body[data-theme] .confirm-quick,
body[data-theme] .palette-block,
body[data-theme] .theme-swatch,
body[data-theme] button,
body[data-theme] input,
body[data-theme] select,
body[data-theme] textarea{background:var(--panel);border-color:var(--line);color:var(--text)}
body[data-theme] .tool.active,body[data-theme] .top-menu-trigger.primary-menu{background:color-mix(in srgb, var(--accent2) 28%, var(--panel2) 72%);border-color:var(--accent2)}
body[data-theme] .magnet-title{background:var(--panel2)}
body[data-theme] .incident-chip small,body[data-theme] .layer-count,body[data-theme] .brand span{color:var(--muted)}
body[data-theme] .tool-hint{background:var(--panel2);color:var(--text);border-color:var(--line)}
body[data-theme] .theme-swatch.active{background:var(--panel2)}



/* === M08.9 · imanes intensos + columnas llenas sin scroll === */
/* Los desplegables de imanes mantienen color intenso en TODOS los temas. */
.magnet-field select,
body[data-theme] .magnet-field select{
  background:#ff6666 !important;
  color:#ffffff !important;
  border-color:#e34d4d !important;
  font-weight:900 !important;
}
.magnet-field select:focus,
body[data-theme] .magnet-field select:focus{
  background:#ff4d4d !important;
  color:#ffffff !important;
}
.magnet-field input:focus,
body[data-theme] .magnet-field input:focus{
  box-shadow:inset 3px 0 #ef4444 !important;
  background:#fff7f7 !important;
}

/* Herramientas: ocupar toda la altura sin scroll y con íconos lo más grandes posible. */
.left-dock{display:flex!important;flex-direction:column!important;overflow:hidden!important}
.left-dock .panel-title{height:38px!important;min-height:38px!important}
.left-dock .tools-list{
  flex:1 1 auto !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-rows:repeat(11, minmax(0,1fr)) !important;
  align-content:stretch !important;
  gap:5px !important;
  padding:6px !important;
  overflow:hidden !important;
}
.left-dock .tool{
  height:auto !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:4px 8px !important;
}
.left-dock .tool img{width:24px!important;height:24px!important;max-width:24px!important;max-height:24px!important}
.left-dock .tool .tool-glyph{width:24px!important;height:24px!important;font-size:24px!important}
.left-dock .tool b{font-size:13px!important}
.left-dock .tools-bottom{padding:6px!important;gap:5px!important;flex:none!important}
.left-dock .tools-bottom button{height:35px!important}
body.tools-collapsed .left-dock .tools-list{
  grid-template-rows:repeat(11, minmax(0,1fr)) !important;
  gap:4px !important;
  padding:5px !important;
}
body.tools-collapsed .left-dock .tool{height:auto!important;padding:2px 0!important}
body.tools-collapsed .left-dock .tool img,
body.tools-collapsed .left-dock .tool .tool-glyph{width:26px!important;height:26px!important;max-width:26px!important;max-height:26px!important}

/* Capas: deben verse completas siempre, sin scroll ni corte de la última. */
.right-dock{
  display:grid !important;
  grid-template-rows:auto minmax(170px,1fr) !important;
  overflow:hidden !important;
}
.right-dock .layers-panel{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
}
.right-dock .layers-panel .panel-title{height:38px!important;min-height:38px!important}
.layers-list{
  flex:1 1 auto !important;
  display:grid !important;
  align-content:start !important;
  gap:0 !important;
  padding:6px 7px 8px !important;
  overflow:hidden !important;
}
.layer-row{
  min-height:31px !important;
  padding:2px 4px !important;
  grid-template-columns:18px 1fr 18px 18px 18px 18px !important;
}
.layer-name{font-size:15px!important;line-height:1!important}
.layer-count{font-size:10px!important;line-height:1.1!important}
.layer-radio,.layer-icon-btn,.layer-move{width:18px!important;height:18px!important;font-size:12px!important}

/* El panel de propiedades conserva espacio pero no roba altura a la lista de capas. */
.properties-panel{min-height:170px!important;overflow:auto!important}
.properties-panel .panel-title{height:38px!important;min-height:38px!important}
.properties-empty{font-size:12px!important;line-height:1.35!important;padding:12px 10px!important}

/* Si el tema es claro, mantener buenos contrastes en los botones de herramientas. */
body[data-theme^="light"] .left-dock .tool{background:#f8fafc!important;border-color:#bfc9d6!important;color:#1f2937!important}
body[data-theme^="light"] .left-dock .tool.active{background:#dbeafe!important;border-color:#38bdf8!important;color:#0f172a!important}
body[data-theme^="light"] .right-dock .layer-row.active{background:#e0f2fe!important}


/* === M08.10 · ajuste quirúrgico final de densidad y contraste === */
/* Ocultar la leyenda de selección solicitada. */
.tool-hint{display:none!important}

/* Paleta intensa de desplegables por tema (cada tema con su propio equilibrio). */
body{
  --magnet-accent:#ff6666;
  --magnet-accent-focus:#ff4d4d;
  --magnet-accent-text:#ffffff;
  --magnet-input-focus:#ef4444;
}
body[data-theme="original"]{--magnet-accent:#ff6666;--magnet-accent-focus:#ff4d4d;--magnet-accent-text:#fff;--magnet-input-focus:#ef4444}
body[data-theme="light1"]{--magnet-accent:#4f9cf9;--magnet-accent-focus:#2f7de0;--magnet-accent-text:#fff;--magnet-input-focus:#2563eb}
body[data-theme="light2"]{--magnet-accent:#f97373;--magnet-accent-focus:#ea5454;--magnet-accent-text:#fff;--magnet-input-focus:#ea580c}
body[data-theme="light3"]{--magnet-accent:#34c38f;--magnet-accent-focus:#18a974;--magnet-accent-text:#fff;--magnet-input-focus:#16a34a}
body[data-theme="dark1"]{--magnet-accent:#0ea5e9;--magnet-accent-focus:#0284c7;--magnet-accent-text:#fff;--magnet-input-focus:#38bdf8}
body[data-theme="dark2"]{--magnet-accent:#8b5cf6;--magnet-accent-focus:#7c3aed;--magnet-accent-text:#fff;--magnet-input-focus:#a78bfa}
body[data-theme="dark3"]{--magnet-accent:#22c55e;--magnet-accent-focus:#16a34a;--magnet-accent-text:#fff;--magnet-input-focus:#84cc16}
.magnet-field select,
body[data-theme] .magnet-field select{
  background:var(--magnet-accent)!important;
  color:var(--magnet-accent-text)!important;
  border-color:color-mix(in srgb, var(--magnet-accent) 78%, #000 22%)!important;
  text-shadow:0 1px 0 rgba(0,0,0,.18);
}
.magnet-field select:focus,
body[data-theme] .magnet-field select:focus{
  background:var(--magnet-accent-focus)!important;
  color:var(--magnet-accent-text)!important;
}
.magnet-field input:focus,
body[data-theme] .magnet-field input:focus{
  box-shadow:inset 3px 0 var(--magnet-input-focus)!important;
}

/* Herramientas: mismo alto total, cajas más densas para liberar icono/tipografía. */
.left-dock{width:152px!important}
.left-dock .panel-title{height:35px!important;min-height:35px!important;padding:0 8px!important}
.left-dock .panel-title span{font-size:13px!important}
.left-dock .tools-list{
  grid-template-rows:repeat(11,minmax(0,1fr))!important;
  gap:4px!important;
  padding:5px!important;
}
.left-dock .tool{
  border-radius:9px!important;
  padding:2px 6px!important;
  gap:7px!important;
}
.left-dock .tool img{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important}
.left-dock .tool .tool-glyph{width:28px!important;height:28px!important;font-size:28px!important;line-height:28px!important}
.left-dock .tool b{font-size:13px!important;line-height:1!important}
.tool[data-tool="unidad"] img{width:34px!important;height:18px!important;max-width:34px!important;max-height:18px!important}
.left-dock .tools-bottom{padding:5px!important;gap:4px!important}
.left-dock .tools-bottom button{height:32px!important;font-size:12px!important}
body.tools-collapsed .left-dock{width:56px!important}
body.tools-collapsed .left-dock .tool{padding:1px 0!important}
body.tools-collapsed .left-dock .tool img,
body.tools-collapsed .left-dock .tool .tool-glyph{width:28px!important;height:28px!important;max-width:28px!important;max-height:28px!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:36px!important;height:20px!important}

/* Capas: ampliar ligeramente sin llegar a scroll ni cortar la última opción. */
.right-dock{
  width:310px!important;
  grid-template-rows:minmax(455px,60%) minmax(145px,1fr)!important;
}
.right-dock .panel-title{height:35px!important;min-height:35px!important;padding:0 8px!important}
.layers-list{
  padding:5px 6px 6px!important;
  overflow:hidden!important;
}
.layer-row{
  min-height:32px!important;
  padding:2px 4px!important;
  grid-template-columns:18px 1fr 18px 18px 18px 18px!important;
  gap:4px!important;
}
.layer-name{font-size:15px!important;font-weight:700!important;line-height:1.02!important}
.layer-count{font-size:10px!important;line-height:1.0!important}
.layer-radio,.layer-icon-btn,.layer-move{width:18px!important;height:18px!important;font-size:12px!important}
.properties-panel{min-height:145px!important;padding:8px!important}
.properties-form{padding:6px!important}
.properties-form label{margin-bottom:6px!important}

/* Mejor contraste para modos claros y paneles. */
body[data-theme^="light"] .brand,
body[data-theme^="light"] .panel-title,
body[data-theme^="light"] .panel-title span,
body[data-theme^="light"] .properties-panel,
body[data-theme^="light"] .properties-form label,
body[data-theme^="light"] .palette-head,
body[data-theme^="light"] .layer-count,
body[data-theme^="light"] .properties-empty,
body[data-theme^="light"] .theme-swatch b,
body[data-theme^="light"] .magnet-title small,
body[data-theme^="light"] .brand span,
body[data-theme^="light"] .incident-chip small,
body[data-theme^="light"] .top-menu-panel small{
  color:var(--muted)!important;
}
body[data-theme^="light"] .panel-title,
body[data-theme^="light"] .panel-title span,
body[data-theme^="light"] .magnet-title b,
body[data-theme^="light"] .layer-name,
body[data-theme^="light"] .theme-swatch b,
body[data-theme^="light"] .top-menu-trigger,
body[data-theme^="light"] .top-actions button,
body[data-theme^="light"] .brand b,
body[data-theme^="light"] .properties-form strong,
body[data-theme^="light"] #propTypeName{
  color:var(--text)!important;
}
body[data-theme^="light"] .properties-form input,
body[data-theme^="light"] .properties-form select,
body[data-theme^="light"] .properties-form textarea,
body[data-theme^="light"] .incident-grid input,
body[data-theme^="light"] .incident-grid select,
body[data-theme^="light"] .incident-grid textarea,
body[data-theme^="light"] #propTypeName,
body[data-theme^="light"] .palette-block,
body[data-theme^="light"] .theme-swatch,
body[data-theme^="light"] .tool,
body[data-theme^="light"] .layer-row,
body[data-theme^="light"] .map-status{
  color:var(--text)!important;
}
body[data-theme^="light"] .top-actions .glyph-action,
body[data-theme^="light"] .theme-action,
body[data-theme^="light"] .tool-glyph{color:#1f2937!important}
body[data-theme^="light"] .tool.active{background:color-mix(in srgb,var(--accent2) 18%, #ffffff 82%)!important}


/* === M08.11 · contraste claro + capas sin hueco + icono Unidad nuevo === */
/* NO tocar tamaños generales: sólo pulido visual y tipografía de Capas. */

/* 1) Capas: textos más grandes y sin espacio entre 'Mapa' y 'Propiedades'. */
.right-dock{display:flex!important;flex-direction:column!important}
.right-dock .layers-panel{flex:none!important;min-height:auto!important;overflow:visible!important}
.layers-list{height:auto!important;overflow:visible!important;padding-bottom:0!important;margin-bottom:0!important}
.layer-row{margin-bottom:0!important}
.layer-name{font-size:16px!important;line-height:1.04!important}
.layer-count{font-size:11px!important;line-height:1.02!important}
.properties-panel{flex:1 1 auto!important;margin-top:0!important;padding-top:0!important}
.properties-panel .panel-title{margin-top:0!important}

/* 2) Tema claro: mejorar contraste del título principal y del botón Eliminar. */
body[data-theme^="light"] .incident-chip b,
body[data-theme^="light"] .incident-chip small,
body[data-theme^="light"] .brand b,
body[data-theme^="light"] .brand span{color:#3b1d0f!important}
body[data-theme^="light"] #deleteBtn,
body[data-theme^="light"] .tools-bottom #deleteBtn{
  color:#7f1d1d!important;
  border-color:#b91c1c!important;
  background:#fff7f7!important;
  font-weight:800!important;
}
body[data-theme^="light"] #deleteBtn img,
body[data-theme^="light"] .tools-bottom #deleteBtn img{filter:none!important;opacity:1!important}

/* 3) Las ventanas desplegables deben respetar el tema claro, no quedarse oscuras. */
body[data-theme^="light"] .top-menu-panel,
body[data-theme^="light"] .intervention-panel,
body[data-theme^="light"] .drawer-card,
body[data-theme^="light"] .drawer-head,
body[data-theme^="light"] .incoming-interventions,
body[data-theme^="light"] .intervention-editor,
body[data-theme^="light"] .compact-menu-body,
body[data-theme^="light"] .quick-stat,
body[data-theme^="light"] .confirm-quick,
body[data-theme^="light"] .empty-interventions,
body[data-theme^="light"] .data-source-grid article{
  background:var(--panel)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body[data-theme^="light"] .drawer,
body[data-theme^="light"] .top-menu-panel{box-shadow:0 16px 40px rgba(60,40,20,.18)!important}
body[data-theme^="light"] .drawer-head,
body[data-theme^="light"] .menu-panel-head,
body[data-theme^="light"] .incident-editor-head,
body[data-theme^="light"] .intervention-tabs{background:var(--panel2)!important;color:var(--text)!important;border-color:var(--line)!important}
body[data-theme^="light"] .compact-menu-body select,
body[data-theme^="light"] .intervention-fields input,
body[data-theme^="light"] .intervention-fields select,
body[data-theme^="light"] .intervention-fields textarea,
body[data-theme^="light"] .data-source-grid input,
body[data-theme^="light"] .data-source-grid select,
body[data-theme^="light"] .data-source-grid textarea,
body[data-theme^="light"] .incident-search-row input{
  background:color-mix(in srgb, var(--panel) 88%, #fff 12%)!important;
  color:var(--text)!important;
  border-color:var(--line)!important;
}
body[data-theme^="light"] .intervention-fields label,
body[data-theme^="light"] .field-help,
body[data-theme^="light"] .empty-interventions,
body[data-theme^="light"] .empty-interventions small,
body[data-theme^="light"] .data-source-grid p,
body[data-theme^="light"] .incident-grid label{color:var(--muted)!important}
body[data-theme^="light"] .important-field{color:#7f1d1d!important}

/* 4) Icono nuevo de Unidad con visibilidad asegurada. */
.tool[data-tool="unidad"] img{filter:none!important;opacity:1!important}


/* === M08.12 · tool_unidad más grande === */
.tool[data-tool="unidad"] img{width:46px!important;height:24px!important;max-width:46px!important;max-height:24px!important;object-fit:contain!important;filter:none!important;opacity:1!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:46px!important;height:24px!important;max-width:46px!important;max-height:24px!important}


/* === M08.13 · alineación fina de tool_unidad === */
.tool[data-tool="unidad"] img{width:40px!important;height:22px!important;max-width:40px!important;max-height:22px!important;display:block!important;object-fit:contain!important;object-position:center center!important;filter:none!important;opacity:1!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:40px!important;height:22px!important;max-width:40px!important;max-height:22px!important}


/* === M08.14 · tool_unidad con imagen correcta === */
.tool[data-tool="unidad"] img{width:28px!important;height:32px!important;max-width:28px!important;max-height:32px!important;display:block!important;object-fit:contain!important;object-position:center center!important;filter:none!important;opacity:1!important}
body.tools-collapsed .tool[data-tool="unidad"] img{width:28px!important;height:32px!important;max-width:28px!important;max-height:32px!important}


/* === M08.15 · iconos de Capas más grandes, misma disposición === */
/* Conservamos exactamente el tamaño de celda 18x18; sólo crece el glifo visible. */
.layer-radio,.layer-icon-btn,.layer-move{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
  padding:0!important;
  line-height:18px!important;
  font-size:15px!important;
  display:grid!important;
  place-items:center!important;
}
.layer-radio{font-size:16px!important}
.layer-icon-btn.eye,.layer-icon-btn.lock{font-size:15px!important}
.layer-move{font-size:16px!important;font-weight:800!important}

/* === M09 · Incidente vivo / actualizaciones / informe === */
.report-action{font-size:17px!important}
.report-menu-panel{right:210px!important;width:350px!important}
.report-menu-body{gap:8px!important}
.report-current-status{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.report-current-status span{display:block;border:1px solid var(--line);border-radius:8px;padding:7px;background:var(--panel2);text-align:center}
.report-current-status small{display:block;font-size:8px;color:var(--muted);margin-bottom:3px}.report-current-status b{font-size:13px;color:var(--text)}
.report-primary-action{height:42px!important;background:#075985!important;border-color:#38bdf8!important;color:#fff!important;font-weight:900!important}
.report-help{margin:2px 0 0;color:var(--muted);font-size:9px;line-height:1.35}
.emit-update-panel{left:50%;transform:translateX(-50%);width:min(650px,calc(100vw - 24px));max-height:calc(100vh - var(--top-h) - 16px);overflow:auto}
.emit-update-body{padding:14px;display:grid;gap:12px;background:var(--panel);color:var(--text)}
.emit-update-body label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--text)}
.emit-update-body select,.emit-update-body textarea{width:100%;background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:9px;outline:none}
.emit-summary-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--panel2)}
.emit-summary-head b{font-size:15px}.emit-summary-head span{font-size:11px;font-weight:900;color:var(--accent2)}
.emit-confirm-warning{padding:9px;border:1px solid #f59e0b;border-radius:8px;background:#78350f33;color:#fde68a;font-size:10px;font-weight:800}
.emit-section-title{display:block;font-size:10px;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.emit-changes-preview{max-height:180px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:9px;background:var(--panel2);font-size:10px;line-height:1.45}
.emit-actions{display:flex;justify-content:flex-end;gap:8px}.emit-actions button{min-width:145px}
.history-panel{left:50%;transform:translateX(-50%);width:min(760px,calc(100vw - 24px));max-height:calc(100vh - var(--top-h) - 16px);overflow:hidden}
.updates-list{max-height:calc(100vh - var(--top-h) - 72px);overflow:auto;padding:12px;display:grid;gap:9px;background:var(--panel)}
.history-empty{padding:25px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:9px}
.update-card{border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--panel2);display:grid;gap:8px}
.update-card.reference{border-color:#eab308;box-shadow:inset 4px 0 #eab308}
.update-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.update-card-head b{font-size:14px}.update-card-head small{display:block;color:var(--muted);font-size:9px;margin-top:2px}
.reference-badge{font-size:9px;font-weight:900;color:#eab308;white-space:nowrap}
.update-card-changes{font-size:10px;line-height:1.35;color:var(--text)}.update-note{margin:0;padding:7px 8px;border-left:3px solid var(--accent2);background:color-mix(in srgb,var(--accent2) 10%,var(--panel) 90%);font-size:10px}
.update-card-actions{display:flex;gap:6px;justify-content:flex-end}.update-card-actions button{padding:7px 9px;font-size:10px;font-weight:700}
body[data-theme^="light"] .report-primary-action{background:#0284c7!important;color:#fff!important}
body[data-theme^="light"] .emit-confirm-warning{background:#fff7ed!important;color:#9a3412!important}
body[data-theme^="light"] .emit-update-panel,body[data-theme^="light"] .history-panel,body[data-theme^="light"] .report-menu-panel{background:var(--panel)!important;color:var(--text)!important}
@media(max-width:820px){.report-menu-panel{right:4px!important;width:min(360px,calc(100vw - 8px))!important}.emit-update-panel,.history-panel{top:var(--top-h);width:100vw;max-height:calc(100vh - var(--top-h));border-radius:0}}

/* === M09.1 · Integración RH + marco exacto del informe === */
.report-frame{
  position:absolute;z-index:590;left:50%;top:50%;transform:translate(-50%,-50%);
  width:min(76%,1040px);aspect-ratio:1200/670;max-height:76%;
  border:2px dashed rgba(245,158,11,.92);border-radius:8px;
  box-shadow:0 0 0 1px rgba(15,23,42,.45),inset 0 0 0 9999px rgba(255,255,255,.015);
  pointer-events:none;transition:opacity .16s ease;
}
.report-frame span{
  position:absolute;right:8px;top:7px;padding:3px 7px;border-radius:6px;
  background:rgba(15,23,42,.78);color:#fde68a;font-size:9px;font-weight:900;
  letter-spacing:.08em;text-shadow:0 1px 1px #000;
}
.report-frame.hidden{display:none!important}
.rh-source-status{font-size:9px;color:var(--muted);padding:4px 2px 0;line-height:1.3}
body[data-theme^="light"] .report-frame{border-color:#d97706;box-shadow:0 0 0 1px rgba(120,53,15,.25),inset 0 0 0 9999px rgba(255,255,255,.01)}
body[data-theme^="light"] .report-frame span{background:rgba(120,53,15,.86);color:#fff7ed}

/* La búsqueda de intervención queda: dirección + Buscar + Ir al lugar. */
.incident-search-row{grid-template-columns:minmax(0,1fr) auto auto!important}
.incident-marker-toggle{display:inline-flex;align-items:center;gap:8px;margin-top:8px;font-size:12px;font-weight:700;color:var(--text);padding:6px 10px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.04)}.incident-marker-toggle input{accent-color:#f59e0b;width:16px;height:16px}.report-frame{display:none!important}

/* Hidrantes oficiales: icono pequeño pero visible, sin fotos. */
.official-hydrant{filter:drop-shadow(0 1px 2px rgba(0,0,0,.45))}
.intervention-count{min-width:17px;height:17px;padding:0 4px;border-radius:999px;display:inline-grid;place-items:center;background:#ef4444;color:#fff;font-size:9px;font-style:normal;font-weight:900;box-shadow:0 0 0 2px rgba(239,68,68,.16)}
.intervention-count.hidden{display:none!important}


/* === M09.2 · encabezado con Ir al lugar + Informe y consola F2 === */
.topbar{grid-template-columns:210px minmax(420px,1fr) auto auto!important;gap:8px!important}
.incident-header-strip{display:flex;align-items:center;gap:8px;min-width:0}
.header-side-action{height:42px;min-width:104px;padding:0 12px;border-radius:10px;font-size:12px;font-weight:800;white-space:nowrap;background:#132238!important;border-color:#36516f!important;color:#e5e7eb!important}
.header-side-action:hover{background:#17304f!important}
.report-inline-action{min-width:90px}
.incident-chip{flex:1 1 auto;width:auto!important;max-width:none!important}
.top-actions{min-width:auto!important}
.top-zoom-presets{grid-template-columns:repeat(3,1fr)!important}
.zoom-menu-panel{width:300px!important}
.ops-config-panel{left:50%;right:auto!important;transform:translateX(-50%);width:min(900px,calc(100vw - 24px));max-height:calc(100vh - var(--top-h) - 16px);overflow:auto}
.ops-config-body{padding:14px!important;display:grid;gap:10px!important}
.ops-config-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ops-config-grid label,.ops-config-body>label{display:grid;gap:5px;font-size:11px;font-weight:700;color:var(--text)}
.ops-config-body input,.ops-config-body textarea{width:100%;background:var(--panel2);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:8px;outline:none}
.ops-config-body textarea{resize:vertical;font-family:Consolas,Monaco,monospace;font-size:12px;line-height:1.35}
.ops-config-note{padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--panel2);font-size:11px;line-height:1.4;color:var(--muted)}
body[data-theme^="light"] .header-side-action{background:#eef4fb!important;border-color:#b5c9df!important;color:#0f172a!important}
@media(max-width:1500px){.topbar{grid-template-columns:175px minmax(280px,1fr) auto auto!important}.header-side-action{min-width:92px;padding:0 10px;font-size:11px}}
@media(max-width:1180px){.topbar{grid-template-columns:52px minmax(260px,1fr) auto auto!important}.brand>div{display:none}.header-side-action{min-width:82px}}
@media(max-width:920px){.incident-header-strip{gap:5px}.header-side-action{min-width:76px;font-size:10px;padding:0 8px}.ops-config-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.topbar{grid-template-columns:44px minmax(140px,1fr) auto!important}.incident-header-strip{grid-column:2;min-width:0}.top-menus{grid-column:3}.header-side-action{display:none}.ops-config-panel{top:var(--top-h);width:100vw;max-height:calc(100vh - var(--top-h));border-radius:0}.ops-config-grid{grid-template-columns:1fr}}


/* === M09.9 · reparación de cabecera + consola F2 flotante === */
/* Anula reglas antiguas absolutas que rompían la barra superior. */
.topbar{display:grid!important;grid-template-columns:210px minmax(430px,1fr) auto auto!important;align-items:center!important;gap:8px!important;padding:7px 10px!important;position:relative!important}
.topbar .brand,.topbar .top-menus,.topbar .top-actions{position:static!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;min-width:0!important}
.incident-header-strip{position:static!important;display:grid!important;grid-template-columns:104px minmax(280px,1fr) 88px!important;align-items:center!important;gap:7px!important;width:min(760px,100%)!important;max-width:760px!important;justify-self:center!important;min-width:0!important}
.incident-header-strip .incident-chip{position:relative!important;left:auto!important;right:auto!important;top:auto!important;transform:none!important;width:100%!important;max-width:none!important;height:44px!important;min-width:0!important;padding:0!important;display:block!important}
.incident-header-strip .incident-main-data{position:absolute!important;inset:0!important;padding:0 36px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important}
.incident-header-strip .incident-chip .pulse-dot{position:absolute!important;left:12px!important;top:50%!important;transform:translateY(-50%)!important}
.incident-header-strip .incident-chip::after{display:none!important}
.header-side-action{width:100%!important;min-width:0!important;height:38px!important;padding:0 7px!important;font-size:11px!important}
.topbar .top-menus{display:flex!important;align-items:center!important;gap:4px!important;justify-self:end!important}
.topbar .top-actions{display:flex!important;align-items:center!important;gap:4px!important;justify-self:end!important}
@media(max-width:1450px){.topbar{grid-template-columns:175px minmax(350px,1fr) auto auto!important}.incident-header-strip{grid-template-columns:86px minmax(220px,1fr) 72px!important}.header-side-action{font-size:10px!important}.incident-header-strip .incident-chip b{font-size:13px!important}}
@media(max-width:1180px){.topbar{grid-template-columns:52px minmax(300px,1fr) auto auto!important}.incident-header-strip{grid-template-columns:76px minmax(180px,1fr) 68px!important}}

/* F2: ventana flotante compacta que deja visible el mapa detrás. */
.ops-config-panel{position:fixed!important;top:calc(var(--top-h) + 10px)!important;left:auto!important;right:calc(var(--data-w) + 18px)!important;transform:none!important;width:430px!important;max-width:calc(100vw - 30px)!important;max-height:calc(100vh - var(--top-h) - 20px)!important;overflow:hidden!important;z-index:1900!important;border-radius:12px!important;box-shadow:0 16px 44px rgba(0,0,0,.42)!important}
.ops-config-panel .menu-panel-head{cursor:default!important}
.ops-config-body{max-height:calc(100vh - var(--top-h) - 72px)!important;overflow:auto!important;padding:10px!important;gap:8px!important}
.ops-config-section{border:1px solid var(--line);border-radius:9px;background:var(--panel2);overflow:hidden}
.ops-config-section summary{cursor:pointer;padding:8px 10px;font-size:11px;font-weight:900;color:var(--text);background:color-mix(in srgb,var(--panel2) 72%,var(--accent2) 28%)}
.ops-config-section[open] summary{border-bottom:1px solid var(--line)}
.ops-config-section>.ops-config-grid,.ops-config-section>label{padding:9px}
.ops-config-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
.ops-config-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.ops-config-grid label,.ops-config-section label{font-size:10px!important}
.ops-config-body input{padding:6px 7px!important;font-size:11px!important}
.ops-config-body textarea{font-size:10px!important}
.ops-preview-box{border:1px solid var(--line);border-radius:9px;padding:8px;background:var(--panel2)}
.ops-section-title{font-size:10px;font-weight:900;color:var(--muted);text-transform:uppercase;margin-bottom:7px}
.ops-preview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.ops-preview-item{min-height:72px;border:1px solid var(--line);border-radius:7px;background:var(--panel);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:4px;overflow:hidden}
.ops-preview-item small{font-size:8px;color:var(--muted)}
.ops-symbol-list{display:grid;gap:8px;padding:9px}.ops-symbol-row{display:grid;grid-template-columns:84px 1fr;gap:10px;align-items:center;padding:8px;border-top:1px solid var(--line)}.ops-symbol-row:first-child{border-top:0}.ops-symbol-thumb{min-height:60px;border:1px solid var(--line);border-radius:8px;background:var(--panel);display:flex;align-items:center;justify-content:center;padding:6px}.ops-symbol-thumb img{max-width:70px;max-height:50px;object-fit:contain}.ops-symbol-free{display:inline-flex;align-items:center;justify-content:center;width:58px;height:40px;border:1px dashed var(--line);border-radius:8px;font-weight:900;color:var(--muted);font-size:14px}.ops-symbol-fields{display:grid;gap:6px}.ops-symbol-name{font-size:11px;font-weight:900;color:var(--text)}.ops-symbol-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.ops-symbol-field-grid label{display:grid;gap:4px;font-size:10px!important}.report-menu-body button{width:100%}
.ops-prev-img{width:72px;height:50px;display:grid;place-items:center}.ops-prev-img img{display:block;object-fit:contain;max-width:70px;max-height:50px}
.ops-prev-shape{display:block;border:3px solid #ef4444;background:rgba(239,68,68,.12);min-width:16px;min-height:16px;max-width:64px;max-height:52px}.ops-prev-shape.circle{border-radius:50%;border-color:#16a34a;background:rgba(22,163,74,.08)}.ops-prev-shape.zone{border-radius:50%;border-color:#22c55e;border-style:dashed;background:rgba(34,197,94,.06)}
.ops-config-actions{position:sticky;bottom:0;background:var(--panel);padding-top:7px;border-top:1px solid var(--line)}
body[data-theme^="light"] .ops-config-section summary{color:var(--text)!important}
@media(max-width:1100px){.ops-config-panel{right:12px!important;width:400px!important}}
@media(max-width:820px){.ops-config-panel{top:var(--top-h)!important;right:0!important;width:100vw!important;max-width:none!important;max-height:calc(100vh - var(--top-h))!important;border-radius:0!important}.ops-preview-grid{grid-template-columns:repeat(4,1fr)}}

@media(max-width:820px){.ops-symbol-row{grid-template-columns:1fr}.ops-symbol-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* === M09.9 · valores desde inicio + marcador mínimo === */
.top-marker-toggle{margin:0!important;padding:0 5px!important;border:0!important;background:transparent!important;white-space:nowrap;font-size:9px!important;font-weight:700!important;gap:5px!important;min-width:0!important;flex:none!important}
.top-marker-toggle input{width:14px!important;height:14px!important;margin:0!important}
.incident-point-marker{width:16px;height:16px;border-radius:50%;background:#dc2626;border:2px solid #991b1b;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 5px rgba(0,0,0,.45)}
.incident-point-marker span{display:block;width:7px;height:7px;border-radius:50%;background:#fde047;border:1px solid #f59e0b}
body[data-theme^="light"] .top-marker-toggle{color:var(--text)!important}
@media(max-width:1500px){.top-marker-toggle{font-size:8px!important;padding:0 2px!important}.top-marker-toggle input{width:13px!important;height:13px!important}}
@media(max-width:1180px){.top-marker-toggle{max-width:92px;white-space:normal;line-height:1.05}}


/* === M09.9 · encabezado restaurado + checkbox compacto === */
.incident-header-strip{
  display:grid!important;
  grid-template-columns:104px 18px minmax(280px,1fr) 88px!important;
  align-items:center!important;
  gap:7px!important;
  width:min(780px,100%)!important;
  max-width:780px!important;
  justify-self:center!important;
}
.top-marker-toggle{
  width:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:visible!important;
}
.top-marker-toggle input{
  width:14px!important;
  height:14px!important;
  margin:0!important;
  flex:0 0 14px!important;
}
@media(max-width:1450px){
  .incident-header-strip{grid-template-columns:86px 16px minmax(220px,1fr) 72px!important;width:min(700px,100%)!important}
  .top-marker-toggle{width:16px!important;min-width:16px!important;max-width:16px!important}
  .top-marker-toggle input{width:13px!important;height:13px!important;flex-basis:13px!important}
}
@media(max-width:1180px){
  .incident-header-strip{grid-template-columns:76px 16px minmax(180px,1fr) 68px!important}
  .top-marker-toggle{max-width:16px!important;white-space:nowrap!important}
}


/* === M09.9 · ENCABEZADO FIJO / TÍTULO CENTRADO REAL ===
   Regla final: no depende del ancho de las columnas del grid anterior. */
.topbar{
  position:relative!important;
  display:block!important;
  height:var(--top-h)!important;
  padding:0 10px!important;
  overflow:visible!important;
}
.topbar .brand{
  position:absolute!important;
  left:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:210px!important;
  min-width:0!important;
  z-index:6!important;
}
.topbar .top-actions{
  position:absolute!important;
  right:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:4px!important;
  width:auto!important;
  min-width:0!important;
  z-index:6!important;
}
.topbar .top-menus{
  position:absolute!important;
  right:242px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:4px!important;
  width:auto!important;
  min-width:0!important;
  z-index:6!important;
}
.topbar .top-actions button{
  width:34px!important;
  min-width:34px!important;
  height:34px!important;
  padding:0!important;
}
.topbar .top-menu-trigger{
  height:34px!important;
  min-width:62px!important;
  padding:0 8px!important;
  font-size:10px!important;
}

/* Grupo central. El título está exactamente en el 50% de la pantalla. */
.incident-header-strip{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  display:block!important;
  width:690px!important;
  max-width:none!important;
  height:46px!important;
  min-width:0!important;
  z-index:5!important;
  pointer-events:none!important;
}
.incident-header-strip .incident-chip{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:470px!important;
  max-width:470px!important;
  height:44px!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  pointer-events:auto!important;
}
.incident-header-strip .incident-main-data{
  position:absolute!important;
  inset:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  padding:0 34px!important;
}
.incident-header-strip .incident-chip .pulse-dot{
  position:absolute!important;
  left:12px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
}
.incident-header-strip .incident-chip::after{display:none!important}

/* Ir al lugar | checkbox | Título | Informe */
.incident-header-strip #centerIncidentTopBtn{
  position:absolute!important;
  right:calc(50% + 267px)!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:92px!important;
  min-width:92px!important;
  height:38px!important;
  padding:0 7px!important;
  font-size:11px!important;
  pointer-events:auto!important;
}
.incident-header-strip .top-marker-toggle{
  position:absolute!important;
  left:calc(50% - 259px)!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:16px!important;
  min-width:16px!important;
  max-width:16px!important;
  height:18px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  pointer-events:auto!important;
}
.incident-header-strip .top-marker-toggle input{
  display:block!important;
  width:14px!important;
  height:14px!important;
  margin:0!important;
  padding:0!important;
  flex:none!important;
}
.incident-header-strip #reportMenuBtn{
  position:absolute!important;
  left:calc(50% + 243px)!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:82px!important;
  min-width:82px!important;
  height:38px!important;
  padding:0 6px!important;
  font-size:11px!important;
  pointer-events:auto!important;
}

@media(max-width:1700px){
  .incident-header-strip{width:610px!important}
  .incident-header-strip .incident-chip{width:390px!important;max-width:390px!important}
  .incident-header-strip #centerIncidentTopBtn{right:calc(50% + 227px)!important;width:88px!important;min-width:88px!important}
  .incident-header-strip .top-marker-toggle{left:calc(50% - 219px)!important}
  .incident-header-strip #reportMenuBtn{left:calc(50% + 203px)!important;width:76px!important;min-width:76px!important}
  .topbar .top-menus{right:222px!important}
  .topbar .top-menu-trigger{min-width:58px!important;padding:0 6px!important}
}
@media(max-width:1450px){
  .topbar .brand{width:155px!important}
  .brand strong{font-size:13px!important}
  .incident-header-strip{width:540px!important}
  .incident-header-strip .incident-chip{width:330px!important;max-width:330px!important}
  .incident-header-strip #centerIncidentTopBtn{right:calc(50% + 197px)!important;width:78px!important;min-width:78px!important;font-size:10px!important}
  .incident-header-strip .top-marker-toggle{left:calc(50% - 189px)!important}
  .incident-header-strip #reportMenuBtn{left:calc(50% + 173px)!important;width:68px!important;min-width:68px!important;font-size:10px!important}
  .topbar .top-menus{right:212px!important}
  .topbar .top-menu-trigger{min-width:54px!important;padding:0 5px!important;font-size:9px!important}
  .incident-header-strip .incident-chip b{font-size:13px!important}
  .incident-header-strip .incident-chip small{font-size:9px!important}
}
@media(max-width:1180px){
  .topbar .brand{width:46px!important}
  .topbar .brand>div{display:none!important}
  .incident-header-strip{width:430px!important}
  .incident-header-strip .incident-chip{width:270px!important;max-width:270px!important}
  .incident-header-strip #centerIncidentTopBtn{right:calc(50% + 164px)!important;width:66px!important;min-width:66px!important;font-size:9px!important}
  .incident-header-strip .top-marker-toggle{left:calc(50% - 156px)!important}
  .incident-header-strip #reportMenuBtn{left:calc(50% + 143px)!important;width:58px!important;min-width:58px!important;font-size:9px!important}
  .topbar .top-menus{right:198px!important}
  .topbar .top-menu-trigger{min-width:48px!important;padding:0 4px!important;font-size:8px!important}
}
@media(max-width:900px){
  .incident-header-strip #centerIncidentTopBtn,
  .incident-header-strip .top-marker-toggle,
  .incident-header-strip #reportMenuBtn{display:none!important}
  .incident-header-strip{left:52px!important;right:250px!important;width:auto!important;transform:translateY(-50%)!important}
  .incident-header-strip .incident-chip{left:0!important;right:0!important;width:100%!important;max-width:none!important;transform:translateY(-50%)!important}
}
