:root{--brand:#0f766e;--brand-dark:#115e59;--brand-light:#14b8a6;--soft:#ecfdfb;--bg:#f3f7f8;--text:#152238;--muted:#64748b;--line:#dbe4ea;--white:#fff;--shadow:0 10px 30px rgba(15,23,42,.08)}
*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;background:linear-gradient(135deg,#f7fafb 0%,#edf5f5 100%);color:var(--text);font:14px/1.55 "Segoe UI",Arial,sans-serif}a{color:var(--brand);text-decoration:none}
#page{width:calc(100% - 40px);max-width:1400px;min-height:calc(100vh - 40px);margin:20px auto;display:flex;overflow:hidden;background:#fff;border:1px solid #dce8eb;border-radius:20px;box-shadow:var(--shadow)}
#header{width:232px;min-width:232px;min-height:calc(100vh - 40px);background:linear-gradient(180deg,#0f766e 0%,#0b665f 100%)}#mainmenu{padding:20px 14px}.brand{padding:4px 12px 26px;color:#fff;font-size:20px;font-weight:800;letter-spacing:.5px}#mainmenu ul{margin:0;padding:0;list-style:none}#mainmenu li{margin:5px 0}#mainmenu a{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 13px;color:rgba(255,255,255,.9);border-radius:11px;font-weight:650;transition:.18s}#mainmenu a:hover,#mainmenu li.active a{color:var(--brand-dark);background:#fff;box-shadow:0 7px 16px rgba(0,0,0,.13)}.nav-icon{width:21px;text-align:center;font-size:18px}
.nav-form{margin:0}.nav-form input{display:none}.nav-form button{display:flex;width:100%;align-items:center;gap:8px;min-height:44px;padding:10px 13px;color:rgba(255,255,255,.9);background:transparent;border:0;border-radius:11px;box-shadow:none;text-align:left}.nav-form button:hover{color:var(--brand-dark);background:#fff;box-shadow:0 7px 16px rgba(0,0,0,.13)}
.container{flex:1;min-width:0;min-height:calc(100vh - 40px);position:relative;background:#fff}.container:before{content:"";display:block;height:4px;background:linear-gradient(90deg,var(--brand),var(--brand-light))}.topbar{min-height:70px;padding:12px 26px 0;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.project-context{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:9px}.project-context strong{color:var(--brand);letter-spacing:.04em}.project-context span{color:var(--muted);font-size:13px}.project-context span:before{content:"·";margin-right:10px;color:#94a3b8}.logout-form{margin:0}.logout-form input{display:none}#logout{display:inline-flex;align-items:center;gap:7px;margin:0;padding:9px 13px;color:#475569;background:#f8fafc;border:1px solid var(--line);border-radius:10px;font-weight:650;box-shadow:none}#logout:hover{color:var(--brand-dark);background:var(--soft);border-color:#99f6e4}.topbar-separator{color:#94a3b8}
#content{padding:4px 32px 36px}h1{font-size:30px;line-height:1.2;margin:8px 0 22px;color:var(--text);font-weight:800;letter-spacing:-.025em}h2{color:var(--text)}.muted{color:var(--muted)}
.card{margin:0 0 28px;padding:26px 28px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 6px 20px rgba(15,23,42,.045)}.card>h1:first-child,.card>h2:first-child{margin-top:0}.error{margin:0 0 18px;padding:12px 14px;background:#fff1f2;color:#9f1239;border:1px solid #fecdd3;border-radius:10px}
.field{display:flex;flex-direction:column;gap:6px;margin:0 0 16px;color:#243247;font-weight:700;font-size:13px}input[type=text],input[type=password],input[type=email],input[type=tel],input:not([type]),select,textarea{width:100%;min-height:42px;padding:10px 12px;color:var(--text);background:#fff;border:1px solid #cfdbe3;border-radius:9px}input:focus,select:focus,textarea:focus{outline:none;border-color:#2dd4bf;box-shadow:0 0 0 3px rgba(20,184,166,.13)}button,.button{display:inline-block;min-height:40px;padding:9px 16px;border:0;border-radius:9px;color:#fff;background:linear-gradient(135deg,var(--brand),var(--brand-light));font-weight:700;cursor:pointer;box-shadow:0 7px 16px rgba(15,118,110,.18)}button:hover,.button:hover{filter:brightness(.98)}button.danger{color:#b42318;background:#fff1f2;border:1px solid #fecdd3;box-shadow:none}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}.card.table-wrap{padding:0}table{width:100%;border-collapse:collapse}th{padding:12px 14px;text-align:left;background:#e2f3f1;color:#0f172a;border-bottom:1px solid #b8dcd7;font-weight:800}td{padding:11px 14px;color:#334155;background:#fff;border-bottom:1px solid #edf2f5}tr:hover td{background:#f9fffe}.status{font-weight:700}.active{color:#147544}.inactive{color:#a52b36}.inline{display:inline}.toolbar{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.toolbar .field{margin:0;flex:1}
.page-heading{margin:2px 0 22px}.page-heading h1{margin:0 0 7px}.page-heading p{margin:0;color:var(--muted)}.flash-success{margin:0 0 18px;padding:12px 14px;background:#f0fdf4;color:#166534;border:1px solid #bbf7d0;border-radius:10px}.flash-error{margin:0 0 18px;padding:12px 14px;background:#fef2f2;color:#991b1b;border:1px solid #fecaca;border-radius:10px}.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 24px}.stat-card{padding:24px;background:#f8fffe;border:1px solid #d7efeb;border-radius:14px;text-align:center}.stat-card strong{display:block;color:var(--brand);font-size:34px}.stat-card span{display:block;color:var(--muted);font-weight:650}.action-links{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.action-links h2{width:100%;margin-top:0}.button.secondary{color:var(--brand);background:#fff;border:1px solid #99d9d1;box-shadow:none}.create-project-form{display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap}.create-project-form .field{min-width:280px;margin:0}.admin-form{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:20px 28px}.admin-form .field{margin:0}.form-actions{grid-column:1/-1}.password-control{display:flex;gap:8px}.password-toggle{flex:0 0 auto;color:var(--brand);background:#fff;border:1px solid #99d9d1;box-shadow:none}.password-reset{display:inline-block;margin-left:8px}.password-reset summary{color:var(--brand);cursor:pointer;font-weight:650}.password-reset form{position:absolute;z-index:5;width:300px;margin-top:8px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.password-reset label{display:block;margin-bottom:8px;font-size:12px;font-weight:700}.password-reset input{margin-top:4px}.password-reset button{width:100%}
.form-card{max-width:700px}.empty{text-align:center;color:var(--muted);padding:24px}.detail-card dl{display:grid;grid-template-columns:180px 1fr;margin:0}.detail-card dt,.detail-card dd{margin:0;padding:12px;border-bottom:1px solid #edf2f5}.detail-card dt{font-weight:800;background:#f8fafc}
.two-column-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}.two-column-grid .form-card{max-width:none}
.three-column-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}.three-column-grid .form-card{max-width:none}.territory-create-grid h3{margin-top:0}
.coord-level{display:inline-block;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}.coord-coordinadora_seccion{color:#075985;background:#e0f2fe}.coord-jefa_manzana{color:#7c2d12;background:#ffedd5}.coord-sin_asignar{color:#64748b;background:#f1f5f9}
.coord-tree{padding:6px 0}.coord-node{display:flex;justify-content:space-between;gap:20px;margin:5px 0;padding:11px 14px;border-left:4px solid var(--brand);background:#f5fbfa;border-radius:0 9px 9px 0}.coord-node span{color:var(--muted);white-space:nowrap}.coord-depth-1{margin-left:38px;border-left-color:#38a3a5;background:#f8fbff}.coord-depth-2{margin-left:76px;border-left-color:#f59e0b;background:#fffbeb}.coordination-table .coord-group td{border-bottom:0}.coord-group td strong{display:inline-block}.coord-group td span{margin-left:12px;color:var(--muted);font-weight:600}.coord-group-zone td{padding:15px 12px 8px;background:#e6f6f3}.coord-group-section td{padding:11px 12px 7px 42px;background:#f2faf9}.coord-group-block td{padding:9px 12px 6px 76px;background:#fffbeb}.coordination-table .promoter-row td:first-child{padding-left:108px}
.dashboard-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.dashboard-card{display:block;padding:22px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.dashboard-card:hover{border-color:#99d9d1;transform:translateY(-1px)}.dashboard-card strong{display:block;margin-bottom:5px;color:#172033;font-size:17px}.dashboard-card span{color:var(--muted)}
.flash-notice{margin:0 0 18px;padding:12px 14px;background:#fffbeb;color:#92400e;border:1px solid #fde68a;border-radius:10px}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:16px}.filter-grid .field{margin:0}.readonly-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px;padding:12px;background:#f8fafc;border-radius:10px}.readonly-grid p{margin:0}
.progress-summary{max-width:500px}.progress-summary>div{display:flex;justify-content:space-between}.progress-summary strong{color:var(--brand);font-size:24px}.progress-summary progress{width:100%;height:14px}.advance{display:inline-block;min-width:64px;padding:5px 8px;border-radius:7px;text-align:center;font-weight:800}.advance-low{background:#d40000;color:#fff}.advance-medium{background:#ff6600;color:#fff}.advance-high{background:#ffff64;color:#172033}.check-field{display:block;margin:14px 0}.link-danger{padding:0;color:#b4232e;background:none;border:0;box-shadow:none}.hormiguero-sheet{margin-bottom:22px;page-break-after:always}.hormiguero-grid{table-layout:fixed;font-size:9px}.hormiguero-grid td{padding:2px;text-align:center;border:1px solid #94a3b8}.hormiguero-grid td.promovido{color:#000;background:#cbd5e1;font-weight:800}@media print{#header,.topbar,#footer,.print-hidden{display:none!important}#page,.container{display:block;width:100%;margin:0;box-shadow:none}.hormiguero-sheet{margin:0}.hormiguero-grid{font-size:7px}}
.polygon-map{min-height:500px;border:1px solid var(--line);border-radius:12px;background:#f4fbfa}.polygon-map svg{display:block;width:100%;height:auto;min-height:500px}.polygon-map polygon:hover{fill-opacity:.58;stroke-width:4}.polygon-legend{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:14px}.polygon-legend span{font-size:12px;font-weight:700}.polygon-legend i{display:inline-block;width:12px;height:12px;margin-right:5px;border-radius:3px;vertical-align:-1px}.manzanas-map{height:620px;border:1px solid var(--line);border-radius:12px;background:#e8efec}.map-selection{margin:14px 0 0;padding:12px 15px;border-radius:9px;background:#eef9f7;color:#075c55;font-weight:800}.manzana-number-plain{background:transparent;border:0;color:#111;font-weight:900;text-align:center;line-height:1.15;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}.manzana-number-plain span{display:block}.button.compact{padding:7px 14px;min-height:auto}
.map-sample{overflow:auto}.map-sample img{display:block;width:100%;height:auto;min-width:900px}
.map-editor h2{margin-top:0}.map-editor-tools{margin-top:16px}.map-editor-tools button:disabled{cursor:not-allowed;opacity:.45}.map-editor-help{margin:14px 0 0;padding:10px 12px;border-radius:9px;background:#f8fafc;color:var(--muted);font-weight:650}.map-vertex{background:#fff;border:3px solid #006f66;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.35)}.map-vertex.active{background:#fbbf24;border-color:#92400e}
.mosaic-map{height:650px;border:1px solid var(--line);border-radius:12px;background:#eef4f2}.mosaic-section-label{background:#fff;border:2px solid #00796f;border-radius:7px;color:#064e3b;font-weight:900;text-align:center;line-height:24px;box-shadow:0 2px 5px rgba(0,0,0,.2)}
.rural-locality-label{background:#fffdf2;border:1px solid #a16207;border-radius:5px;color:#422006;font-size:11px;font-weight:800;box-shadow:0 1px 4px rgba(0,0,0,.22);padding:2px 5px;white-space:nowrap}.rural-locality-label:before{border-top-color:#a16207}
.geographic-map{height:680px;border:1px solid var(--line);border-radius:12px;background:#edf1ee}.street-label{background:rgba(255,255,255,.78);border:0;color:#475569;font-size:10px;font-weight:700;box-shadow:none}.section-number{background:#fff;border:2px solid #0f766e;border-radius:7px;color:#064e3b;font-weight:900;text-align:center;box-shadow:0 2px 5px rgba(0,0,0,.2)}.section-number span{display:block;white-space:nowrap}
.map-page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.map-page-heading .button{flex:0 0 auto}.map-stage{position:relative}.map-view-tools{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-bottom:12px;flex-wrap:wrap}.map-view-tools button{min-height:38px;padding:8px 13px}.map-view-tools strong{min-width:48px;text-align:center;color:var(--brand)}.map-rotation-help{margin-right:auto;color:var(--muted);font-size:12px;font-weight:700}.map-rotation-layer{position:absolute;inset:0;z-index:200;transform-origin:50% 50%;transition:transform .08s linear}.map-stage.map-is-rotated .leaflet-overlay-pane svg,.map-stage.map-is-rotated .leaflet-section-seams-pane svg{overflow:visible!important}.map-stage .map-rotation-dragging,.map-stage .map-rotation-dragging .leaflet-interactive{cursor:ew-resize!important}.map-stage .map-rotation-dragging~*{user-select:none}.map-hover-info{position:absolute;z-index:1300;max-width:220px;padding:8px 11px;color:#fff;background:rgba(15,23,42,.92);border-radius:8px;box-shadow:0 4px 14px rgba(15,23,42,.3);font-size:13px;font-weight:800;pointer-events:none;white-space:nowrap}body:has(.map-stage.map-is-rotated) [data-piece-action],body:has(.map-stage.map-is-rotated) #piece-navigation-mode{pointer-events:none;opacity:.45}.map-stage:fullscreen,.map-stage.fullscreen-active{width:100vw;height:100vh;padding:0;border:0;border-radius:0;background:#edf1ee}.map-stage:fullscreen .map-view-tools,.map-stage.fullscreen-active .map-view-tools{position:absolute;z-index:1400;top:12px;right:12px;margin:0;padding:8px;background:rgba(255,255,255,.94);border-radius:12px;box-shadow:0 5px 20px rgba(15,23,42,.22)}.map-stage:fullscreen .geographic-map,.map-stage.fullscreen-active .geographic-map{width:100%;height:100vh;border:0;border-radius:0}.map-stage:fullscreen .map-selection,.map-stage.fullscreen-active .map-selection{display:none}
.section-number-small{width:32px!important;height:14px!important;margin-left:-16px!important;margin-top:-7px!important;color:#263238;background:transparent;border:0;border-radius:0;box-shadow:none;font-size:10px;font-weight:900;line-height:14px;text-align:center;white-space:nowrap;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}.geographic-map.map-hide-block-numbers .block-number{display:none}.geographic-map.map-hide-block-numbers .section-number-small{display:block!important}
.block-number{color:#111;background:transparent;border:0;font-size:9px;font-weight:800;line-height:14px;text-align:center;white-space:nowrap;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}
#footer{clear:both;margin:20px 26px 0;padding:16px 0 22px;color:#94a3b8;border-top:1px solid var(--line);font-size:11px;text-align:center}
.guest-page #page{display:block}.guest-page .container{width:100%;min-height:calc(100vh - 40px)}.guest-page #content{padding:10px 28px 28px}.guest-page #footer{max-width:850px;margin-left:auto;margin-right:auto}.login-card{max-width:470px;margin:32px auto 20px;padding:30px 34px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 12px 30px rgba(15,23,42,.07);text-align:center}.login-brand{width:58px;height:58px;margin:0 auto 14px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(135deg,var(--brand),var(--brand-light));color:#fff;font-size:18px;box-shadow:0 10px 20px rgba(15,118,110,.2)}.login-card h1{margin:0 0 6px;font-size:28px}.login-subtitle{margin:0 0 24px;color:var(--muted)}.login-form{text-align:left}.login-input{position:relative;display:block}.input-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);z-index:2;color:#94a3b8;font-size:12px}.login-input input{padding-left:42px!important}.login-form button{width:100%;margin-top:5px}
@media(max-width:1050px){#page{width:calc(100% - 24px);margin:12px auto}#header{width:205px;min-width:205px}#content{padding-left:22px;padding-right:22px}}
@media(max-width:800px){#page{display:block;width:100%;max-width:none;margin:0;border-radius:0}#header{width:100%;min-width:0;min-height:auto}.brand{display:none}#mainmenu{padding:10px}#mainmenu ul{display:flex;flex-wrap:wrap;gap:4px}#mainmenu li{margin:0}#mainmenu a{min-height:38px;padding:8px 10px}.container{min-height:0}.topbar{padding-right:16px;padding-left:16px}#content{padding:8px 16px 24px}.card{padding:20px}.login-card{margin:18px 0;padding:24px 20px}.toolbar{align-items:stretch;flex-direction:column}.toolbar button{width:100%}.stats-grid,.admin-form,.filter-grid,.dashboard-cards,.two-column-grid,.three-column-grid{grid-template-columns:1fr}.create-project-form{align-items:stretch;flex-direction:column}.create-project-form .field,.create-project-form button{width:100%}.password-reset form{left:16px;right:16px;width:auto}.detail-card dl{grid-template-columns:1fr}.readonly-grid{grid-template-columns:1fr}}
.leaflet-overlay-pane svg path.integrator-block-selected{stroke:#006f66!important;stroke-width:5!important;fill:#14b8a6!important;fill-opacity:.55!important;filter:drop-shadow(0 0 3px rgba(0,111,102,.55))}
.leaflet-overlay-pane svg path.leaflet-interactive[style*="stroke-width: 5"]:not(.integrator-block-selected){pointer-events:none}
.geographic-map,.geographic-map .leaflet-interactive{cursor:grab}.geographic-map.leaflet-dragging,.geographic-map.leaflet-dragging .leaflet-interactive,.geographic-map.piece-dragging,.geographic-map.piece-dragging .leaflet-interactive{cursor:grabbing!important}.geographic-map.piece-navigation-mode .leaflet-interactive{cursor:move}.map-editor-tools .map-navigation-active{box-shadow:0 0 0 3px rgba(15,118,110,.22)}
.personas-table{overflow-x:hidden}.personas-table table{width:100%;min-width:0;table-layout:fixed}.personas-table th,.personas-table td{vertical-align:middle;padding:.55rem .4rem;font-size:.75rem;overflow-wrap:anywhere}.personas-table th:nth-child(1),.personas-table th:nth-child(2){width:11%}.personas-table th:nth-child(3){width:13%}.personas-table th:nth-child(4){width:15%}.personas-table th:nth-child(5),.personas-table th:nth-child(6){width:9%}.personas-table th:nth-child(7){width:10%}.personas-table th:nth-child(8){width:10%}.personas-table th:nth-child(9){width:9%}.filter-row th{padding:.35rem .3rem}.filter-row input{box-sizing:border-box;width:100%;min-width:0;padding:.42rem .3rem;border:1px solid #c9d9df;border-radius:7px;background:#fff}.personas-table .button.compact{max-width:100%;padding:.42rem .5rem;font-size:.75rem;white-space:nowrap}.button.compact{padding:.45rem .65rem;font-size:.82rem;white-space:nowrap}.empty-state{text-align:center;color:#6e7f89;padding:2rem!important}
.pagination{display:flex;align-items:center;justify-content:center;gap:.7rem;flex-wrap:wrap;margin:1rem 0 1.5rem}.pagination a,.pagination-summary{display:inline-flex;align-items:center;justify-content:center;padding:.48rem .7rem;border:1px solid #c9d9df;border-radius:7px;background:#fff;text-decoration:none}.pagination a.active{background:#078f83;color:#fff;border-color:#078f83}.pagination-summary{border:0;background:transparent;color:#60727c;margin-right:.35rem}.danger{background:#b42318!important;border-color:#b42318!important;color:#fff!important}
.password-fields-stack{display:grid;gap:1rem;align-self:start}
.record-update-meta{display:flex;flex-direction:column;gap:.3rem;margin-top:.25rem;padding:1rem 1.1rem;border:1px solid #cbdde0;border-left:4px solid #117c73;border-radius:10px;background:#f3faf9;color:#173d3a}.record-update-meta strong{font-size:.9rem}.record-update-meta span{font-weight:700}.record-update-meta small{color:#46635f}
.person-form-card{max-width:1050px}.person-form-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:28px;align-items:start}.person-review-panel{position:sticky;top:18px;padding:20px;background:#f8fbfb;border:1px solid #d9e7e7;border-radius:13px}.person-review-panel .field{margin-bottom:16px}.person-review-panel textarea{min-height:190px;resize:vertical}.person-form-card .form-actions{margin-top:4px}
@media(max-width:900px){.person-form-card{max-width:700px}.person-form-layout{grid-template-columns:1fr}.person-review-panel{position:static;padding:18px}.person-review-panel textarea{min-height:130px}}
.coordination-table .coord-group-zone td{padding-left:12px}.coordination-table .coord-group-section td{padding-left:24px}.coordination-table .coord-group-block td{padding-left:36px}.coordination-table .promoter-row td:first-child{padding-left:48px}
.coordination-table .promoter-row.promoter-level-section td:first-child{padding-left:30px}.coordination-table .promoter-row.promoter-level-block td:first-child{padding-left:62px}
.structure-progress-table{width:100%;table-layout:fixed}.structure-progress-table th,.structure-progress-table td{box-sizing:border-box}.structure-progress-table th:first-child{width:44%;text-align:left}.structure-progress-table th:nth-child(2),.structure-progress-table td:nth-child(2),.structure-progress-table th:nth-child(3),.structure-progress-table td:nth-child(3),.structure-progress-table th:nth-child(4),.structure-progress-table td:nth-child(4),.structure-progress-table th:nth-child(5),.structure-progress-table td:nth-child(5){width:12%;text-align:center;font-variant-numeric:tabular-nums}.structure-progress-table th:last-child,.structure-progress-table td:last-child{width:8%;text-align:center}
.structure-progress-table .coord-group-zone td:first-child{width:44%;text-align:left}.structure-progress-table .coord-group-zone td:nth-child(n+2):nth-child(-n+5){width:12%;text-align:center;font-variant-numeric:tabular-nums}.structure-progress-table .coord-group-zone td:last-child{width:8%;text-align:center}
.goal-balance{display:block;margin-top:3px;color:#b45309;font-weight:700}.goal-balance.is-complete{color:#15803d}
.territory-edit-form>[data-level-panel="responsable_zona"],.territory-edit-form>[data-level-panel="responsable_seccion"]{display:contents!important}.territory-edit-form>[data-level-panel][hidden]{display:none!important}
.territory-edit-grid{grid-template-columns:1fr}.territory-edit-grid .form-card{max-width:none}.territory-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}.territory-edit-form>[data-level-panel="promotora_manzana"]{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px}.territory-edit-form>[data-level-panel="promotora_manzana"]>small,.territory-edit-form>button{grid-column:1/-1}.territory-edit-form>button{justify-self:start}.territory-edit-form .readonly-grid{margin-bottom:16px}
.territory-edit-form{grid-template-rows:auto auto auto auto auto;align-items:start}.territory-edit-form>[data-level-panel="promotora_manzana"]{display:contents!important}.territory-edit-form>label:has([data-territory-level]){grid-column:1;grid-row:1}.territory-edit-form label:has([data-promoter-zone]){grid-column:1;grid-row:2}.territory-edit-form label:has([data-promoter-section]){grid-column:1;grid-row:3}.territory-edit-form label:has([data-promoter-blocks]){grid-column:1;grid-row:4/6}.territory-edit-form>label:has(input[name="clave"]){grid-column:2;grid-row:1}.territory-edit-form>label:has(input[name="nombre"]){grid-column:2;grid-row:2}.territory-edit-form>label:has(input[name="apellidos"]){grid-column:2;grid-row:3}.territory-edit-form .readonly-grid{grid-column:2;grid-row:4;align-self:start;margin:0;padding:12px}.territory-edit-form>[data-level-panel="promotora_manzana"]>small{display:none}.territory-edit-form>button{grid-column:2;grid-row:5;justify-self:start;align-self:start}
.feature-toggle-form{margin:0}.feature-toggle{display:flex;align-items:center;gap:10px;min-width:158px;padding:6px 8px;color:#334155;background:transparent;border:1px solid transparent;border-radius:10px;box-shadow:none;text-align:left}.feature-toggle:hover{background:#f8fafc;border-color:#d8e3e8;transform:none;box-shadow:none}.feature-toggle-track{position:relative;display:inline-block;flex:0 0 38px;width:38px;height:22px;background:#cbd5e1;border-radius:999px;transition:.18s}.feature-toggle-track span{position:absolute;top:3px;left:3px;width:16px;height:16px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #64748b;transition:.18s}.feature-toggle.is-enabled .feature-toggle-track{background:var(--brand)}.feature-toggle.is-enabled .feature-toggle-track span{left:19px}.feature-toggle-copy{display:flex;flex-direction:column;line-height:1.15}.feature-toggle-copy strong{font-size:12px;color:#172033}.feature-toggle-copy small{margin-top:3px;color:var(--muted);font-size:10px;font-weight:600}
.user-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;white-space:nowrap}.user-actions .inline{display:block;margin:0}.user-action{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 10px;border:1px solid #cbdde0;border-radius:8px;color:#36515b;background:#fff;font:inherit;font-size:12px;font-weight:750;line-height:1;box-shadow:none;cursor:pointer}.user-action:hover{color:var(--brand-dark);border-color:#74c9bf;background:#f2fbf9;filter:none}.user-action-edit{color:var(--brand);border-color:#8bd5cc}.user-action-disable{color:#a12b2b;border-color:#efb8b8;background:#fffafa}.user-action-disable:hover{color:#8e1f1f;border-color:#df9090;background:#fff3f3}.user-action-enable{color:#147544;border-color:#a7d9bb;background:#f6fff9}.user-password-action{position:relative;display:block;margin:0}.user-password-action summary{list-style:none}.user-password-action summary::-webkit-details-marker{display:none}.user-password-action[open] summary{color:var(--brand-dark);border-color:#74c9bf;background:#eefaf8}.user-password-action form{right:0;margin-top:7px}.user-password-action form button{min-height:38px}
.territory-progress-table th:not(:first-child),.territory-progress-table td:not(:first-child){text-align:center}.territory-progress-table td{font-variant-numeric:tabular-nums}.territory-progress-table th:last-child,.territory-progress-table td:last-child{width:64px}
.structure-progress-table .coordinator-self-row td{background:#fbfefd}.structure-progress-table .coordinator-self-row td:first-child{padding-left:46px}.structure-progress-table .coordinator-self-row td:nth-child(n+2){text-align:center}.structure-progress-table .promoter-row td:first-child{padding-left:76px}
.structure-progress-table th:nth-child(5),.structure-progress-table td:nth-child(5){padding-left:0;padding-right:0;text-align:center}.structure-progress-table .captured-number{display:block;width:100%;text-align:center;font-variant-numeric:tabular-nums}
.pending-actions{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.pending-actions form{display:inline;margin:0}.pending-delete{min-height:0;padding:0;color:#b42318;background:transparent;border:0;border-radius:0;box-shadow:none;font:inherit;font-weight:700}.pending-delete:hover{color:#8f1d16;background:transparent;filter:none}
.section-mismatch{color:#b45309;font-size:11px;font-weight:800;white-space:nowrap}
.google-map-card{padding:18px}.google-map-toolbar{display:flex;align-items:flex-end;gap:14px;margin-bottom:14px;flex-wrap:wrap}.google-map-toolbar .field{width:220px;margin:0}.google-map-source{display:flex;flex-direction:column;margin-left:auto;text-align:right;color:var(--muted);font-size:12px}.google-map-source strong{color:var(--text)}#google-map-shell{position:relative;min-height:690px;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#eef3f4}#google-sections-map{width:100%;height:690px}#google-sections-map.is-unavailable{opacity:.18;background:linear-gradient(135deg,#e6f4f1,#f8fafc)}.google-map-message{position:absolute;z-index:5;left:50%;top:50%;width:min(560px,calc(100% - 40px));padding:18px 20px;transform:translate(-50%,-50%);border:1px solid #fbbf24;border-radius:12px;background:#fffbeb;color:#78350f;box-shadow:var(--shadow);font-weight:750;text-align:center}.google-map-message.is-error{border-color:#fca5a5;background:#fff7f7;color:#991b1b}.google-map-footer{display:flex;align-items:center;gap:18px;margin-top:13px;color:var(--muted);font-size:12px;font-weight:700}.google-map-footer strong{margin-left:auto;color:var(--brand)}.google-map-line-sample{display:inline-block;width:28px;border-top:3px solid #075985;vertical-align:middle}.google-section-label{position:absolute;padding:1px 4px;color:#17324d;background:rgba(255,255,255,.88);border:1px solid rgba(7,89,133,.75);border-radius:4px;font-size:10px;font-weight:900;line-height:14px;white-space:nowrap;box-shadow:0 1px 3px rgba(15,23,42,.2);pointer-events:none}.google-section-popup{display:grid;gap:4px;min-width:170px;color:#334155;font-size:12px}.google-section-popup strong{color:#0f172a;font-size:14px}.google-section-popup span{display:block}@media(max-width:800px){.google-map-source{width:100%;margin-left:0;text-align:left}#google-map-shell,#google-sections-map{min-height:560px;height:560px}.google-map-footer{align-items:flex-start;flex-direction:column;gap:7px}.google-map-footer strong{margin-left:0}}
.small-section-table th:not(:first-child),.small-section-table td:not(:first-child){text-align:center;font-variant-numeric:tabular-nums}.small-section-table th:first-child{width:45%}.small-section-total td{background:#e6f6f3;font-weight:800}.small-section-coordinator td{background:#f5fbfa}.small-section-coordinator td:first-child{padding-left:30px}.small-section-promoter td:first-child{padding-left:58px}.small-role{display:inline-block;min-width:138px;margin-right:8px;color:#64748b;font-size:11px;font-weight:700}
@media(max-width:800px){.territory-edit-form,.territory-edit-form>[data-level-panel="promotora_manzana"]{grid-template-columns:1fr}.territory-edit-form>label:has([data-territory-level]),.territory-edit-form label:has([data-promoter-zone]),.territory-edit-form label:has([data-promoter-section]),.territory-edit-form label:has([data-promoter-blocks]),.territory-edit-form>label:has(input[name="clave"]),.territory-edit-form>label:has(input[name="nombre"]),.territory-edit-form>label:has(input[name="apellidos"]),.territory-edit-form .readonly-grid,.territory-edit-form>button{grid-column:1;grid-row:auto}}

.structure-progress-table td:last-child{white-space:nowrap}

/* Ajuste de estructura territorial: columnas completas y nombres legibles. */
table.structure-progress-table{width:100%;min-width:0;table-layout:fixed}
table.structure-progress-table th,table.structure-progress-table td{padding:10px 8px;vertical-align:middle;white-space:normal;overflow-wrap:anywhere}
table.structure-progress-table th:first-child,table.structure-progress-table td:first-child,table.structure-progress-table .coord-group-zone td:first-child{width:48%;text-align:left}
table.structure-progress-table th:nth-child(n+2):nth-child(-n+5),table.structure-progress-table td:nth-child(n+2):nth-child(-n+5),table.structure-progress-table .coord-group-zone td:nth-child(n+2):nth-child(-n+5){width:10%;text-align:center}
table.structure-progress-table th:last-child,table.structure-progress-table td:last-child,table.structure-progress-table .coord-group-zone td:last-child{width:12%;white-space:normal;text-align:center}
table.structure-progress-table .coord-group td:first-child span{white-space:normal;margin-left:8px}
table.structure-progress-table .coordinator-self-row td:first-child,table.structure-progress-table .small-section-coordinator td:first-child{padding-left:28px}
table.structure-progress-table .promoter-row td:first-child,table.structure-progress-table .small-section-promoter td:first-child{padding-left:44px}

/* Encabezados completos, sin dividir palabras. */
table.structure-progress-table.structure-progress-table th{overflow-wrap:normal;word-break:normal}
table.structure-progress-table.structure-progress-table th:nth-child(2),table.structure-progress-table.structure-progress-table td:nth-child(2),table.structure-progress-table.structure-progress-table .coord-group-zone td:nth-child(2){width:12%}
table.structure-progress-table.structure-progress-table th:nth-child(3),table.structure-progress-table.structure-progress-table td:nth-child(3),table.structure-progress-table.structure-progress-table .coord-group-zone td:nth-child(3),table.structure-progress-table.structure-progress-table th:nth-child(4),table.structure-progress-table.structure-progress-table td:nth-child(4),table.structure-progress-table.structure-progress-table .coord-group-zone td:nth-child(4){width:9%}
.progress-label-short,.progress-level-legend{display:none}
/* Tabla compacta compartida por municipios sencillos y territoriales. */
@media(max-width:800px){
  .card:has(.structure-progress-table){padding:16px 8px}
  table.structure-progress-table{min-width:320px;font-size:12px}
  table.structure-progress-table.structure-progress-table th{font-size:11px;line-height:1.3}
  table.structure-progress-table.structure-progress-table :is(th,td):nth-child(n){padding:9px 3px;width:13%;text-align:center}
  table.structure-progress-table.structure-progress-table :is(th,td):first-child{width:34%;padding-left:6px;text-align:left}
  table.structure-progress-table.structure-progress-table :is(th,td):last-child{width:14%}
  table.structure-progress-table.structure-progress-table .coord-group td:first-child span{display:block;margin:3px 0 0}
  table.structure-progress-table .progress-label-full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  table.structure-progress-table .progress-label-short{display:inline}
}
@media(max-width:800px){
  table.structure-progress-table.structure-progress-table tbody tr[class] td:first-child{padding-left:6px}
  table.structure-progress-table.structure-progress-table :is(th,td):first-child{width:32%}
  table.structure-progress-table.structure-progress-table :is(th,td):last-child{width:16%;font-size:11px;overflow-wrap:normal}
  .progress-level-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:-8px 0 12px;font-size:12px;font-weight:800}
  .progress-level-legend span::before{content:"";display:inline-block;width:8px;height:8px;margin-right:5px;border-radius:50%;background:currentColor}
  .progress-level-zone,table.structure-progress-table .coord-group-zone td:first-child strong{color:#111111}
  .progress-level-section,table.structure-progress-table :is(.coord-group-section,.coordinator-self-row,.small-section-total,.small-section-coordinator) td:first-child strong{color:#800020}
  .progress-level-block,table.structure-progress-table :is(.promoter-level-block,.small-section-promoter) td:first-child strong{color:#7e22ce}
}
