:root{--ink:#1e293b;--muted:#64748b;--blue:#2563eb;--green:#166534;--line:#e2e8f0;--soft:#f4f7fb;--red:#991b1b;--amber:#92400e}*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:var(--ink);font:14px/1.55 system-ui,-apple-system,Segoe UI,sans-serif}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{border:1.5px solid var(--line);border-radius:8px;background:white;color:var(--ink);padding:10px 18px;font-weight:700;font-size:13px;cursor:pointer;transition:background .15s}button:hover{background:var(--soft)}button:disabled{opacity:.5;cursor:default}.primary{background:#2c4875;border-color:#2c4875;color:white}.primary:hover{background:#1e3354}a{color:var(--blue);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid #2563eb;outline-offset:2px}header{max-width:1580px;margin:auto;padding:24px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);background:white;gap:20px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1px;color:var(--blue);margin:10px 0 3px;text-transform:uppercase}h1{font-size:31px;line-height:1.2;margin:4px 0 10px;letter-spacing:-.6px;color:var(--ink)}h2{font-size:19px;line-height:1.35;margin:0 0 12px;color:var(--ink)}h3{font-size:15px;margin:5px 0 10px;color:var(--ink)}p{margin:8px 0 15px}.back{font-size:12px;font-weight:600}.account{display:grid;grid-template-columns:auto auto;gap:5px 10px;align-items:center}.account b,.account small{grid-column:1/-1}.account small,.small{color:var(--muted);font-size:12px}.shell{max-width:1580px;margin:auto;padding:20px 32px 50px}.connection{padding:12px 16px;border-radius:8px;background:#edf7f1;color:#235b46;font-size:12px;margin-bottom:18px}.warning,.notice{background:#fff8e7;color:#72571e}.notice{padding:12px;border:1px solid #eddfb4;border-radius:8px;font-size:12px}.danger{background:#fff0f1;color:var(--red);border-color:#edbdc6}.tabs{display:flex;gap:22px;overflow:auto;border-bottom:1px solid var(--line);margin-bottom:18px}.tabs button{border:0;border-radius:0;white-space:nowrap;padding:9px 0 13px;color:var(--muted);border-bottom:3px solid transparent}.tabs button.active{color:var(--blue);border-bottom-color:var(--blue);font-weight:700}label{display:block;color:var(--ink);font-size:13px;font-weight:700;margin-bottom:6px}input:not([type=checkbox],[type=radio]),select,textarea{display:block;width:100%;border:1.5px solid #cbd5e1;border-radius:8px;padding:10px 14px;background:white;color:var(--ink);font-size:14px;margin-top:5px;min-height:42px;box-sizing:border-box}select{appearance:none;-webkit-appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563EB' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;cursor:pointer}input[type="file"]{border:1.5px solid #cbd5e1;border-radius:8px;background:#ffffff;color:#64748b;padding:6px 10px;font-size:13px;min-height:auto}input[type="file"]::file-selector-button{background:#f1f5f9;color:#1e293b;border:1px solid #cbd5e1;border-radius:6px;padding:6px 14px;font-size:12px;font-weight:700;margin-right:12px;cursor:pointer;font-family:inherit}input[type="file"]::file-selector-button:hover{background:#e2e8f0}textarea{resize:vertical;line-height:1.5}input[type=checkbox],input[type=radio]{accent-color:var(--blue);width:17px;height:17px;vertical-align:middle}.filterbar{display:grid;grid-template-columns:2fr 1fr 1.3fr 1fr;gap:13px;margin-bottom:24px}.metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin:12px 0 23px}.metric{border:1px solid var(--line);padding:18px 20px;border-radius:14px;background:white;box-shadow:0 1px 3px 0 rgba(0,0,0,0.04);display:flex;flex-direction:column;gap:6px}.metric strong{font-size:30px;font-weight:850;color:#1e293b;line-height:1.1;letter-spacing:-0.03em}.metric span{font-size:12px;font-weight:600;color:var(--muted)}.panel{border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:20px;background:white;box-shadow:0 1px 3px 0 rgba(0,0,0,0.04);min-width:0}.grid2{display:grid;grid-template-columns:1.25fr 1fr;gap:20px}.progress-row{display:flex;align-items:center;gap:13px;margin:15px 0;font-size:12px}.progress-row progress{flex:1}progress{width:100%;height:9px;accent-color:var(--blue);border:0;border-radius:10px}progress::-webkit-progress-bar{border-radius:10px;background:#edf1f3}progress::-webkit-progress-value{background:var(--blue);border-radius:10px}dl{display:grid;grid-template-columns:1fr auto;gap:15px}dt{color:var(--muted);font-size:12px}dd{margin:0;font-weight:650}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{text-align:left;vertical-align:top;padding:12px;border-bottom:1px solid var(--line)}th{background:var(--soft);font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.capture-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:20px;align-items:start}.unit-list{max-height:calc(100vh - 180px);overflow:auto;position:sticky;top:15px}.unit{display:block;text-align:left;width:100%;padding:14px;margin-bottom:8px;line-height:1.45;border-radius:10px;border:1px solid var(--line);background:white}.unit b{font-size:13px;color:var(--ink)}.unit small{display:block;color:var(--muted);font-size:11px;margin:5px 0}.unit.active{border-color:var(--blue);background:#eef4fb;box-shadow:inset 3px 0 #2563eb}.badge{display:inline-block;font-size:11px;font-weight:750;border-radius:9999px;padding:4px 10px;border:1px solid;white-space:nowrap}.badge.DRAFT{background:#e0f2fe;color:#0369a1;border-color:#bae6fd}.badge.SUBMITTED{background:#fef3c7;color:#92400e;border-color:#fcd34d}.badge.VALIDATED{background:#dcfce7;color:#166534;border-color:#86efac}.badge.RETURNED{background:#fee2e2;color:#991b1b;border-color:#fca5a5}.local-label,.conflict-label{display:block;font-size:10px;margin-top:4px;color:var(--amber)}.conflict-label{color:var(--red)}.editor-head{display:flex;justify-content:space-between;gap:15px;align-items:start}.editor-head h2{font-size:23px;font-weight:800}.save-line{font-size:11px;color:var(--green);border-bottom:1px solid var(--line);padding-bottom:12px}.section{border-top:1px solid var(--line);padding:18px 0;margin-top:12px}.section>summary{font-weight:700;font-size:14px;cursor:pointer;margin-bottom:15px;color:var(--ink)}.fields{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:12px 0 18px}.scope{display:grid;grid-template-columns:1fr 1fr;gap:12px}.scope label{color:var(--ink)}fieldset{border:0;padding:0;margin:0;min-width:0}fieldset:disabled,fieldset.is-locked{opacity:.83}.area-tabs{display:flex;gap:8px;overflow:auto;padding:8px 0 14px;margin:10px 0}.area-tabs button{font-size:12px;font-weight:700;white-space:nowrap;border-radius:8px}.area-tabs .active{background:#2c4875;border-color:#2c4875;color:white}.completion{display:flex;gap:15px;align-items:center;margin:12px 0 23px}.completion b{font-size:12px;font-weight:700;white-space:nowrap}.question{border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:18px;background:white;box-shadow:0 1px 3px 0 rgba(0,0,0,0.04)}.question h3{font-size:16px;font-weight:800;color:#1e293b;margin-top:6px;margin-bottom:12px;line-height:1.4}.question .small{font-size:11px;margin:0 0 5px;color:var(--muted)}.question details{margin-bottom:12px}.question summary{cursor:pointer;font-weight:600}.ratings{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.rating{border:1px solid var(--line);border-radius:9999px;padding:6px 14px;display:flex;gap:6px;align-items:center;color:var(--ink);font-size:12px;font-weight:700;background:#f8fafc}.rating:has(input:checked){background:#dcfce7;border-color:#86efac;color:#166534}.rating.CRITICO:has(input:checked){background:#fee2e2;border-color:#fca5a5;color:#991b1b}.rating.ATENCION:has(input:checked){background:#fef3c7;border-color:#fcd34d;color:#92400e}.rating.NA:has(input:checked){background:#f1f5f9;border-color:#cbd5e1;color:#475569}.photo-add{font-size:12px;font-weight:700;margin-top:10px;color:var(--blue);background:none;border:none;padding:0}.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px;margin:16px 0}.photos a{border:1px solid var(--line);border-radius:8px;padding:6px;background:white}.photos img{height:120px;object-fit:cover;width:100%;border-radius:5px}.photos small{font-size:10px;display:block;color:var(--muted)}.photo-placeholder{padding:20px;font-size:11px;background:var(--soft)}.sticky-actions{position:sticky;bottom:0;padding:15px 20px;background:#fffffff2;backdrop-filter:blur(8px);border-top:1px solid var(--line);display:flex;gap:10px;justify-content:flex-end;box-shadow:0 -4px 16px rgba(0,0,0,0.04)}.login{max-width:550px;margin:60px auto;padding:24px;background:white;border-radius:18px;border:1px solid var(--line);box-shadow:0 2px 8px rgba(0,0,0,0.04)}.login>p{color:var(--muted)}.login h1{font-size:36px;margin-bottom:20px;color:var(--ink)}.login .panel{margin-top:22px}.login label{margin:15px 0}.login .primary{width:100%;margin-top:10px}.login summary{cursor:pointer;font-weight:650}.loading{padding:50px;color:var(--muted)}.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-top:25px}.report-grid button{text-align:left;padding:22px;color:var(--blue);border-radius:12px}.report-grid small{display:block;font-size:11px;font-weight:400;color:var(--muted);margin-top:7px}.map-panel iframe{border:1px solid var(--line);width:100%;height:760px;border-radius:12px;background:var(--soft)}.slide{padding:35px;min-height:500px}.slide .metrics{grid-template-columns:repeat(3,1fr);margin:25px 0}.slide .prose{white-space:pre-wrap;font-size:17px}.slide:fullscreen{background:white;padding:60px;overflow:auto}.actions{display:flex;gap:10px;justify-content:center}#notice{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);max-width:min(90vw,700px);padding:14px 22px;background:#183a4b;color:white;border-radius:10px;box-shadow:0 6px 30px #12263430;white-space:pre-line;pointer-events:none;opacity:0;transition:.15s;z-index:1000}#notice.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(3,1fr)}.capture-layout{grid-template-columns:235px minmax(0,1fr)}.report-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:540px){header{flex-wrap:wrap}header>div:first-child{width:100%}.account{width:100%;max-width:none!important;grid-template-columns:minmax(0,1fr) auto auto}.account b,.account small{grid-column:1}.account button{grid-row:1/3}.account button#sync{grid-column:2}.account button#logout{grid-column:3}.filterbar label{min-width:0}input,select,textarea{min-width:0}}
@media(max-width:760px){header{padding:18px;align-items:start}.shell{padding:15px}.account{max-width:180px}.account b{font-size:11px}.account small{font-size:10px}h1{font-size:27px}.tabs{gap:20px}.tabs button{font-size:12px}.filterbar{grid-template-columns:1fr 1fr;gap:10px}.grid2{grid-template-columns:1fr}.capture-layout{display:block}.unit-list{position:static;display:flex;overflow:auto;max-height:220px;gap:8px;margin-bottom:18px;align-items:stretch}.unit-list>p{display:none}.unit-list .unit{flex:0 0 220px;margin:0}.panel{padding:16px}.editor-head{display:block}.editor-head h2{font-size:21px}.fields,.scope{grid-template-columns:1fr}.ratings{gap:5px}.rating{padding:8px 6px;font-size:10px}.question{padding:13px}.question h3{font-size:14px}.metrics{gap:8px}.metric{padding:12px}.metric strong{font-size:24px}.metric span{font-size:10px}.completion{display:block}.report-grid{grid-template-columns:1fr}.map-panel iframe{height:700px}.slide{padding:20px}.login{margin-top:25px}.sticky-actions{bottom:env(safe-area-inset-bottom);flex-wrap:wrap}.sticky-actions button{flex:1}.photos{grid-template-columns:repeat(2,1fr)}input,textarea{scroll-margin:100px}}

.aligned-fields .fields,.question-data .fields{margin-top:12px}.question-data,.aligned-table{margin:14px 0;padding:12px;border:1px solid #dce6e9;border-radius:8px;background:#fbfdfd}.question-data summary,.aligned-table summary{cursor:pointer;font-weight:600}.question-data small{display:block;font-size:10px;font-weight:400;margin-top:4px}.aligned-table .table-wrap{margin:12px 0}.aligned-table input,.aligned-table select{min-width:140px}.aligned-table td{vertical-align:top}.aligned-table th{white-space:normal;min-width:150px}.verification{margin:10px 0;max-width:360px}.territorial p{max-width:900px}#offline-package-status{margin:0 0 16px;line-height:1.5;min-height:18px}.sticky-actions{scroll-margin-bottom:35px}input,textarea,select{scroll-margin-top:100px;scroll-margin-bottom:140px}@media(max-width:700px){header{flex-wrap:wrap}.account{width:100%;grid-template-columns:1fr 1fr}.fields{grid-template-columns:1fr!important}.aligned-table{padding:9px}.aligned-table .actions{display:flex;flex-wrap:wrap;gap:8px}.sticky-actions{padding-bottom:env(safe-area-inset-bottom,12px)}body{padding-bottom:env(safe-area-inset-bottom,0px)}}

.checklist-guide{background:#f1f7f5;border:1px solid #dce6e9;border-radius:10px;padding:16px;line-height:1.6}.step-navigation{display:flex;gap:12px;justify-content:space-between;margin:20px 0}.guided-select{position:relative;margin:0!important}.guided-select summary{border:1px solid #cbd9de;border-radius:8px;padding:12px;list-style:none;background:white;cursor:pointer}.guided-select summary:after{content:" ▾";float:right}.guided-options{position:static!important;display:grid;gap:5px;padding:8px;background:#f5f8f9;border:1px solid #dce6e9;border-radius:8px;margin-top:5px}.guided-options button{text-align:left;padding:12px;white-space:normal}.guided-options button[aria-pressed=true]{background:#e6f3ed;border-color:#237d65}.question-data{background:white}.area-tabs button{min-width:44px;min-height:44px}
select[data-guided="1"]{display:none!important}

[hidden]{display:none!important}

.specialty-nav{margin:18px 0;padding:18px;border:1px solid #dce6e9;border-radius:12px;background:#f6faf8}.specialty-nav h2{font-size:19px;margin:0}.specialty-nav .area-tabs{flex-wrap:wrap}.specialty-nav .area-tabs button{white-space:normal}.specialty-check{display:flex;align-items:center;gap:10px;margin:12px 0}.specialty-check input{width:auto}

.person-directory{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:16px}.person-card{display:flex;flex-direction:column;gap:12px;text-align:left;padding:22px;border:1px solid #dae5e8;border-radius:18px;background:white}.person-card span{font-size:14px;color:#526b78;font-weight:400}.person-dialog{border:1px solid #d9e4e7;border-radius:20px;width:min(1040px,94vw);max-height:88dvh;overflow:auto;padding:28px;color:#203c4c}.person-dialog::backdrop{background:#17364466}.person-dialog .metrics{margin-top:24px}

.media-evidence{display:flex;flex-direction:column;gap:8px;max-width:320px}.media-evidence video,.media-evidence img{max-width:100%;max-height:260px;object-fit:contain;border-radius:10px;background:#edf2f4;cursor:pointer;transition:transform .15s}.media-evidence img:hover{transform:scale(1.02)}.media-evidence small{white-space:normal;overflow-wrap:anywhere}
.photo-dialog{width:min(96vw,1000px);max-height:92vh;padding:20px;border:1px solid #cbd5e1;border-radius:16px;background:white;color:#1e293b;box-shadow:0 20px 40px rgba(0,0,0,.25);overflow:auto}
.photo-dialog::backdrop{background:rgba(15,23,42,.75);backdrop-filter:blur(3px)}
.question-photos{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0}
.question-photo-thumb{position:relative;width:95px;height:85px;border-radius:8px;overflow:hidden;border:1.5px solid #cbd5e1;cursor:pointer;background:#f1f5f9;display:flex;align-items:center;justify-content:center}
.question-photo-thumb img,.question-photo-thumb video{width:100%;height:100%;object-fit:cover}
.question-photo-thumb .thumb-overlay{position:absolute;bottom:0;left:0;right:0;background:rgba(15,23,42,.75);color:white;font-size:10px;font-weight:700;padding:2px 4px;text-align:center}

.pdf-previews{display:flex;flex-wrap:wrap;gap:16px;margin:18px 0}.pdf-card{display:flex;flex-direction:column;gap:10px;align-items:center;max-width:240px;padding:16px;background:#f6f9fa;border:1px solid #dce6e9;border-radius:14px;white-space:normal}.pdf-card canvas{width:100%;max-height:260px;object-fit:contain;background:white}.pdf-card span{overflow-wrap:anywhere;font-weight:600}.pdf-dialog{width:min(94vw,1100px);max-height:94vh;padding:20px;border:1px solid #dce6e9;border-radius:14px;overflow:auto}.pdf-dialog::backdrop{background:#17334488}.pdf-page{width:100%;height:auto}.rating.NO{color:#a23845}.rating.SI{color:#237d65}

.dossier-summary{margin:24px 0;padding:24px;border:1px solid #dae5e8;border-radius:18px;background:linear-gradient(125deg,#f0f7f3,#fff)}.dossier-summary h2{margin:6px 0}.dossier-documents{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.dossier-document{display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid #d9e4e7;border-radius:12px;background:#fff}.dossier-document span{font-size:13px;color:#667985}.dossier-document.received{border-color:#afd2c3;background:#f2faf6}.pdf-group{flex:1 1 100%;min-width:0}.pdf-group h3{margin:12px 0}.pdf-group-items{display:flex;flex-wrap:wrap;gap:16px}.pdf-card small{font-size:12px;line-height:1.5;color:#5d7280}.pdf-card .pdf-category{font-size:12px;color:#237d65;font-weight:700;align-self:flex-start}.pdf-card{width:230px;max-width:100%;text-align:left}.pdf-card span{width:100%}@media(max-width:650px){.dossier-documents{grid-template-columns:1fr}.dossier-summary{padding:16px}.pdf-group-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.pdf-card{width:100%}}

.pdf-document{display:flex;flex-direction:column;gap:10px;width:230px;max-width:100%}.pdf-document .pdf-card{flex:1;margin:0;width:100%}.pdf-download{width:100%;background:#fff;border:1px solid #237d65;color:#216d58;font-weight:600}.pdf-download:disabled{opacity:.65}
.dossier-document{min-width:0}.dossier-document .pdf-group>h3{display:none}.dossier-document .pdf-previews{margin:8px 0 0}.dossier-document .pdf-document,.dossier-document .pdf-card{width:100%;max-width:none}.dossier-document .pdf-group-items{display:flex;flex-direction:column}.dossier-document .pdf-card canvas{height:200px;object-fit:contain}.dossier-document .pdf-card{padding:12px}.dossier-documents{align-items:start}

.pdf-card img{width:100%;max-height:260px;object-fit:contain;background:white}.dossier-document .pdf-card img{height:200px}
#person-pdfs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}#person-pdfs>h3,#person-pdfs>.pdf-previews{grid-column:1/-1}.person-document-group{min-width:0;border:1px solid #dce6e9;border-radius:12px;padding:14px;background:#f7faf9}.person-document-group>h4{margin:0 0 10px}.person-document-group .pdf-group>h3{display:none}.person-document-group .pdf-document,.person-document-group .pdf-card{width:100%;max-width:100%}.person-document-group .pdf-previews{margin:0}.person-document-group .pdf-card canvas,.person-document-group .pdf-card img{height:180px;object-fit:contain}@media(max-width:700px){#person-pdfs{grid-template-columns:1fr}}

.person-observations{display:block;padding:12px 14px;border:1px solid #e6dfbf;border-radius:10px;background:#fffcf1;color:#58616b;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}.person-card .person-observations{font-size:13px;width:100%;box-sizing:border-box}.person-observations b,.person-observations strong{display:block;color:#475769;font-size:12px;margin-bottom:4px}.person-observations p{margin:0}.dossier-notes-cell{min-width:260px;max-width:420px;white-space:pre-wrap;overflow-wrap:anywhere}.dossier-summary>.person-observations{margin-top:16px}

.person-card .person-files{display:flex;flex-direction:column;gap:7px;width:100%;padding-top:10px;border-top:1px solid #e4ece8}.person-files>b{font-size:12px;color:#506577}.person-card .person-file-status{display:flex;justify-content:space-between;gap:10px;padding:8px 10px;border-radius:8px;background:#f4f6f7;font-size:12px}.person-file-status strong{font-size:12px}.person-card .person-file-status.received{background:#edf7f1;color:#236b51}.person-card .person-file-status.received>span{color:#236b51}.person-card .person-file-status>span{font-size:12px;text-align:right}

.pdf-delete{border:1px solid #ba5b62;background:#fff7f7;color:#9e303b;font-size:13px}.pdf-document>.pdf-delete{width:100%}.pdf-delete:disabled{opacity:.6}

.person-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:12px;align-items:end;margin:20px 0 10px}.person-filters label{display:grid;gap:6px;font-size:.88rem;font-weight:600}.person-filters input,.person-filters select{width:100%;min-width:0}.person-export-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.person-card[hidden]{display:none}

.person-details>section{margin:16px 0;padding:18px;border:1px solid #dce6e9;border-radius:12px;background:#f8faf9}.person-details h4{margin:0 0 12px}.person-details dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0}.person-details dt{font-size:12px;color:#617582;margin-bottom:5px}.person-details dd{margin:0;font-weight:600;white-space:pre-wrap;overflow-wrap:anywhere}@media(max-width:650px){.person-details dl{grid-template-columns:1fr}}
.vision-run{align-self:flex-start}.vision-box{border:1px solid #c9d6dc;border-radius:10px;padding:10px;display:grid;gap:6px;font-size:.9rem}.vision-tag{margin:0;font-size:.75rem;font-weight:600;color:#6a4fb3;text-transform:uppercase;letter-spacing:.04em}.vision-box ul{list-style:none;margin:0;padding:0;display:grid;gap:8px}.vision-finding{border-left:3px solid #c9d6dc;padding-left:8px}.vision-finding.sev-moderado{border-color:#d29a2c}.vision-finding.sev-grave{border-color:#c23d37}.vision-finding p{margin:2px 0}.vision-actions{display:flex;flex-wrap:wrap;gap:6px}
.tracking-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.tracking-map-wrap{position:relative;height:640px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--soft)}
.tracking-map{width:100%;height:100%}
.tracking-map-error{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted);font-size:13px}
.tracking-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.tracking-route-bar input{display:block;width:100%;margin-top:4px}
.tracking-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;max-height:560px;overflow:auto}
.tracking-person{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:white}
.tracking-person.selected{border-color:var(--blue);box-shadow:0 0 0 2px #286d9b33}
.tracking-person label{margin-top:8px}.tracking-person select{display:block;width:100%;margin-top:4px}
.tracking-person p{margin:6px 0 0}
.tracking-pick{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;width:100%;border:0;padding:0;background:none;text-align:left}
.tracking-pick small{flex-basis:100%;color:var(--muted);font-weight:500;padding-left:20px}
.tracking-state{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:12px}
.tracking-effective{font-weight:650}.tracking-effective.on{color:var(--green)}.tracking-effective.off{color:var(--muted)}
.tracking-dot{display:inline-block;width:12px;height:12px;border-radius:50%;border:2px solid white;box-shadow:0 0 0 1px #17334433;vertical-align:middle}
.tracking-fresh{background:#237d65}.tracking-recent{background:#c08a1e}.tracking-stale,.tracking-none{background:#8a979e}
.tracking-legend{white-space:nowrap}.tracking-legend .tracking-dot{margin-right:4px}
@media (max-width:900px){.tracking-layout{grid-template-columns:1fr}.tracking-map-wrap{height:420px}.tracking-list{max-height:none}}

/* ========================================================
   SISTEMA DE DISEÑO SUPERVISIÓN DE CAMPO / PANORAMA OPERATIVO
   ======================================================== */
.hero-banner{background:#eef4fb;border:1px solid #dce7f5;border-radius:16px;padding:24px;margin-bottom:24px;display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
@media(max-width:700px){.hero-banner{grid-template-columns:1fr}}
.hero-info .pill-label{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:#2563eb;margin-bottom:8px}
.hero-unit-name{font-size:22px;font-weight:800;color:#1e293b;margin-bottom:6px;letter-spacing:-.015em}
.hero-meta{font-size:13px;color:#64748b;margin-bottom:16px}
.btn-action-primary{background:#2c4875;color:#ffffff;border:none;padding:10px 18px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer;display:inline-flex;align-items:center;gap:8px;transition:background .15s}
.btn-action-primary:hover{background:#1e3354}

.gauge-wrapper{position:relative;width:120px;height:120px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.gauge-svg{width:105px;height:105px;transform:rotate(-90deg)}
.gauge-bg{fill:none;stroke:#cbd5e1;stroke-width:8;opacity:.35}
.gauge-val{fill:none;stroke:#2563eb;stroke-width:8;stroke-linecap:round;stroke-dasharray:283;transition:stroke-dashoffset .5s ease}
.gauge-text{position:absolute;text-align:center}
.gauge-percent{font-size:22px;font-weight:850;color:#1e293b;line-height:1;letter-spacing:-.03em}
.gauge-sub{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:#64748b;margin-top:2px}

.metrics-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
@media(max-width:640px){.metrics-row{grid-template-columns:1fr}}
.metric-card{background:white;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
.metric-num{font-size:30px;font-weight:850;letter-spacing:-.03em;color:#1e293b;line-height:1;margin-bottom:4px}
.metric-label{font-size:13px;font-weight:600;color:#64748b}
.metric-icon-box{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.icon-attention{background:#fee2e2;color:#ef4444}
.icon-in-progress{background:#f1f5f9;color:#475569}
.icon-success{background:#dcfce7;color:#16a34a}

.dashboard-split{display:grid;grid-template-columns:1.8fr 1.2fr;gap:20px;margin-bottom:28px}
.dashboard-split.dashboard-split-single{grid-template-columns:1fr}
@media(max-width:860px){.dashboard-split{grid-template-columns:1fr}}
.card{background:white;border:1px solid #e2e8f0;border-radius:16px;padding:22px;box-shadow:0 1px 3px rgba(0,0,0,0.04)}
.card-header-line{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.card-heading{font-size:17px;font-weight:800;letter-spacing:-.01em;color:#1e293b}
.card-link{font-size:13px;font-weight:700;color:#2563eb;text-decoration:none;display:inline-flex;align-items:center;gap:4px}

.clean-table{width:100%;border-collapse:collapse;font-size:13px}
.clean-table th{text-align:left;padding:10px 8px;color:#64748b;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;border-bottom:1px solid #e2e8f0}
.clean-table td{padding:12px 8px;border-bottom:1px solid #f1f5f9;vertical-align:middle;color:#334155}
.clean-table tr:last-child td{border-bottom:none}
.clean-table tbody tr{cursor:pointer;transition:background .12s}
.clean-table tbody tr:hover{background:#f8fafc}
.unit-info-cell{display:flex;align-items:center;gap:12px}
.unit-store-icon{width:32px;height:32px;border-radius:8px;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;color:#64748b;background:#eef4fb;flex-shrink:0}
.unit-store-icon svg{width:16px;height:16px;stroke-width:2}
.unit-cell-title{font-weight:750;color:#1e293b;line-height:1.3}
.unit-cell-sub{font-size:11px;color:#64748b;margin-top:1px}

.pill-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:9999px;font-size:11px;font-weight:750;letter-spacing:.2px;border:1px solid;white-space:nowrap}
.pill-badge svg{width:12px;height:12px;stroke-width:2.4}
.badge-critica{background:#fee2e2;border-color:#fca5a5;color:#991b1b}
.badge-encurso{background:#e0f2fe;border-color:#bae6fd;color:#0369a1}
.badge-cumple{background:#dcfce7;border-color:#86efac;color:#166534}
.badge-sinvisita{background:#f1f5f9;border-color:#e2e8f0;color:#475569}

.priority-card{border-top:4px solid #ef4444;display:flex;flex-direction:column;justify-content:space-between}
.priority-badge-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.priority-icon-pill{width:32px;height:32px;border-radius:8px;background:#fee2e2;color:#ef4444;display:flex;align-items:center;justify-content:center}

/* ========================================================
   TOPBAR, MARCA, ESTADO Y TABS MODERNAS
   ======================================================== */
.app-topbar{max-width:1580px;margin:auto;padding:12px 28px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);background:white;gap:16px;transition:background .2s ease,border-color .2s ease}
.brand-group{display:flex;align-items:center;gap:16px}
.back-link{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:700;color:var(--muted);padding:6px 10px;border-radius:8px;border:1px solid var(--line);background:var(--soft);text-decoration:none;transition:all .15s ease}
.back-link:hover{color:var(--blue);border-color:var(--blue)}
.brand-logo-wrap{display:flex;align-items:center;gap:10px}
.brand-badge-icon{width:34px;height:34px;border-radius:9px;background:#2563eb;color:white;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(37,99,235,0.25)}
.brand-title{font-size:15px;font-weight:800;letter-spacing:-0.015em;color:var(--ink);line-height:1.2}
.brand-sub{font-size:11px;color:var(--muted);font-weight:600}
.topbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.status-indicator-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:700;padding:5px 11px;border-radius:9999px;border:1px solid var(--line);background:var(--soft);color:var(--muted)}
.status-indicator-pill .status-dot{width:7px;height:7px;border-radius:50%;background:#94a3b8}
.status-indicator-pill.is-online .status-dot{background:#10b981}
.status-indicator-pill.is-online{color:#065f46;border-color:#a7f3d0;background:#ecfdf5}
.status-indicator-pill.is-demo .status-dot{background:#3b82f6}
.status-indicator-pill.is-demo{color:#1e40af;border-color:#bfdbfe;background:#eff6ff}
.status-indicator-pill.is-offline .status-dot{background:#ef4444}
.status-indicator-pill.is-offline{color:#991b1b;border-color:#fecaca;background:#fef2f2}
.theme-switch-pill{display:inline-flex;align-items:center;padding:3px;border-radius:9999px;border:1px solid var(--line);background:var(--soft)}
.theme-switch-btn{display:inline-flex;align-items:center;gap:5px;border:none;background:transparent;padding:5px 10px;border-radius:9999px;font-size:11px;font-weight:700;color:var(--muted);cursor:pointer;transition:all .15s ease}
.theme-switch-btn:hover{color:var(--ink)}
.theme-switch-btn.active{background:white;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,0.08)}
.user-pill{display:flex;flex-direction:column;align-items:flex-end;padding:0 4px}
.user-name{font-size:13px;font-weight:750;color:var(--ink);line-height:1.2}
.user-role{font-size:11px;color:var(--muted)}
.btn-sync{background:#2563eb!important;color:white!important;border:none!important;padding:8px 14px!important;border-radius:8px!important;font-size:12px!important;font-weight:700!important;display:inline-flex!important;align-items:center!important;gap:6px!important;cursor:pointer!important}
.btn-sync:hover{background:#1d4ed8!important}
.btn-secondary-sm{background:var(--soft)!important;color:var(--ink)!important;border:1px solid var(--line)!important;padding:8px 12px!important;border-radius:8px!important;font-size:12px!important;font-weight:700!important;cursor:pointer!important}
.btn-secondary-sm:hover{background:var(--line)!important}

.nav-tabs{display:flex;gap:8px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:22px;padding-bottom:4px}
.tab-item{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--muted);font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap;transition:all .15s ease}
.tab-item:hover{background:var(--soft);color:var(--ink)}
.tab-item.active{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;font-weight:750}
.tab-item svg{flex-shrink:0}

.dash-hero-header{margin-bottom:22px}
.dash-eyebrow{font-size:11px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:var(--blue);margin:0 0 4px}
.dash-title{font-size:32px;font-weight:800;color:var(--ink);margin:0 0 6px;letter-spacing:-.025em;line-height:1.15}
.dash-subtitle{font-size:14px;color:var(--muted);margin:0}

/* ========================================================
   MODO OSCURO INTEGRAL (THEME-DARK)
   ======================================================== */
html.theme-dark{--ink:#f8fafc;--muted:#94a3b8;--blue:#38bdf8;--blue-hover:#0284c7;--blue-soft:#1e3a5f;--green:#4ade80;--line:#334155;--soft:#0b1120;--card-bg:#1e293b;--red:#f87171;--amber:#fbbf24;background-color:#0b1120;color:#f8fafc}
html.theme-dark body{background:#0b1120;color:#f8fafc}
html.theme-dark header,html.theme-dark .app-topbar{background:#0f172a;border-bottom-color:#1e293b}
html.theme-dark .back-link{background:#1e293b;border-color:#334155;color:#94a3b8}
html.theme-dark .back-link:hover{color:#38bdf8;border-color:#38bdf8}
html.theme-dark .status-indicator-pill{background:#1e293b;border-color:#334155;color:#94a3b8}
html.theme-dark .status-indicator-pill.is-online{background:rgba(16,185,129,0.15);border-color:rgba(16,185,129,0.3);color:#6ee7b7}
html.theme-dark .status-indicator-pill.is-demo{background:rgba(56,189,248,0.15);border-color:rgba(56,189,248,0.3);color:#7dd3fc}
html.theme-dark .status-indicator-pill.is-offline{background:rgba(239,68,68,0.15);border-color:rgba(239,68,68,0.3);color:#fca5a5}
html.theme-dark .theme-switch-pill{background:#1e293b;border-color:#334155}
html.theme-dark .theme-switch-btn{color:#94a3b8}
html.theme-dark .theme-switch-btn.active{background:#334155;color:#f8fafc;box-shadow:0 1px 3px rgba(0,0,0,0.3)}
html.theme-dark .btn-secondary-sm{background:#1e293b!important;color:#f8fafc!important;border-color:#334155!important}
html.theme-dark .btn-secondary-sm:hover{background:#334155!important}

html.theme-dark .panel,html.theme-dark .card,html.theme-dark .metric-card,html.theme-dark .unit,html.theme-dark .question{background:#1e293b;border-color:#334155;color:#f8fafc;box-shadow:0 1px 3px rgba(0,0,0,0.25)}
html.theme-dark .hero-banner{background:#131e32;border-color:#1e3a5f;box-shadow:0 1px 3px rgba(0,0,0,0.25)}
html.theme-dark .hero-unit-name{color:#f8fafc}
html.theme-dark .hero-meta{color:#94a3b8}
html.theme-dark .gauge-bg{stroke:#334155;opacity:.6}
html.theme-dark .gauge-val{stroke:#38bdf8}
html.theme-dark .gauge-percent{color:#f8fafc}
html.theme-dark .gauge-sub{color:#94a3b8}
html.theme-dark .metric-num{color:#f8fafc}
html.theme-dark .metric-label{color:#94a3b8}
html.theme-dark .card-heading{color:#f8fafc}
html.theme-dark .dash-title{color:#f8fafc}
html.theme-dark .dash-subtitle{color:#94a3b8}
html.theme-dark .icon-attention{background:rgba(239,68,68,0.15);color:#f87171}
html.theme-dark .icon-in-progress{background:#24334a;color:#94a3b8}
html.theme-dark .icon-success{background:rgba(34,197,94,0.15);color:#4ade80}

html.theme-dark .clean-table th{color:#94a3b8;border-bottom-color:#334155}
html.theme-dark .clean-table td{border-bottom-color:#24334a;color:#e2e8f0}
html.theme-dark .clean-table tbody tr:hover{background:#24334a}
html.theme-dark .unit-cell-title{color:#f8fafc}
html.theme-dark .unit-cell-sub{color:#94a3b8}
html.theme-dark .unit-store-icon{background:#24334a;border-color:#334155;color:#94a3b8}
html.theme-dark .priority-card{background:#1e293b;border-top:4px solid #ef4444!important}
html.theme-dark .priority-icon-pill{background:rgba(239,68,68,0.15);color:#f87171}

html.theme-dark .tab-item{color:#94a3b8}
html.theme-dark .tab-item:hover{background:#24334a;color:#f8fafc}
html.theme-dark .tab-item.active{background:#1e3a5f;border-color:#2563eb;color:#60a5fa}

html.theme-dark input:not([type=checkbox],[type=radio]),
html.theme-dark select,
html.theme-dark textarea{background:#1e293b!important;color:#f8fafc!important;border-color:#334155!important}
html.theme-dark input:not([type=checkbox],[type=radio]):focus,
html.theme-dark select:focus,
html.theme-dark textarea:focus{border-color:#38bdf8!important;box-shadow:0 0 0 3px rgba(56,189,248,0.2)!important}
html.theme-dark select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E")!important}
html.theme-dark label{color:#e2e8f0!important}

html.theme-dark input[type="file"]{background:#1e293b!important;color:#94a3b8!important;border-color:#334155!important}
html.theme-dark input[type="file"]::file-selector-button{background:#24334a!important;color:#60a5fa!important;border-color:#3b82f6!important}
html.theme-dark input[type="file"]::file-selector-button:hover{background:#1e3a5f!important}

html.theme-dark button{border-color:#334155;background:#1e293b;color:#f8fafc}
html.theme-dark button:hover{background:#24334a}
html.theme-dark button.primary{background:#2563eb!important;border-color:#2563eb!important;color:#ffffff!important}
html.theme-dark button.primary:hover{background:#1d4ed8!important}

html.theme-dark .unit.active{background:#1e3a5f;border-color:#38bdf8}
html.theme-dark .unit b{color:#f8fafc}
html.theme-dark .rating{background:#1e293b;border-color:#334155;color:#e2e8f0}
html.theme-dark .filterbar,html.theme-dark .filters{background:#1e293b;border-color:#334155}
html.theme-dark .checklist-guide{background:#131e32;border-color:#1e3a5f}
html.theme-dark .specialty-nav{background:#131e32;border-color:#1e3a5f}
html.theme-dark .sticky-actions{background:rgba(15,23,42,0.92);border-color:#334155}
html.theme-dark .login{background:#1e293b;border-color:#334155;color:#f8fafc}
html.theme-dark .login h1{color:#f8fafc}
html.theme-dark table th{background:#131e32;color:#94a3b8}
html.theme-dark table td{border-bottom-color:#334155}
html.theme-dark tbody tr:hover{background:#24334a}

/* Tablero de equipos y rutas */
.map-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(340px,1fr);gap:18px;align-items:start;margin-top:14px}
.teams-panel{width:100%;max-width:100%;box-sizing:border-box;overflow-x:hidden}
.teams-header{margin-bottom:14px}
.teams-title-row{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.teams-title-row h3{margin:0}
.teams-global-actions{display:flex;gap:8px;align-items:center}
.selected-unit-card{margin-bottom:16px;background:var(--soft);border-color:var(--line)}
.selected-unit-card h4{margin:0 0 8px}
.unit-assignment-item{padding:8px 0;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:6px}
.assignment-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.team-tag{display:inline-block;padding:2px 8px;background:var(--soft);border:1px solid var(--line);color:var(--ink);border-radius:6px;font-size:12px}
.team-group{margin-bottom:12px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--card-bg,white);color:var(--ink)}
.team-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;padding:12px 14px;background:var(--soft);color:var(--ink);user-select:none}
.team-summary::-webkit-details-marker{display:none}
.team-summary-info{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.team-dot{width:12px;height:12px;border-radius:50%;display:inline-block;flex-shrink:0}
.team-summary-actions{display:flex;gap:6px;align-items:center}
.team-summary-actions button{padding:4px 10px;font-size:12px}
.team-group-content{padding:14px;border-top:1px solid var(--line)}
.team-people-block h5,.team-route-block h5{margin:0 0 10px;font-size:13px;text-transform:uppercase;color:var(--muted);letter-spacing:.5px}
.people-list{list-style:none;padding:0;margin:0 0 16px}
.person-item{padding:10px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.role-tag{font-size:11px;background:var(--soft);border:1px solid var(--line);color:var(--muted);border-radius:4px;padding:2px 6px;margin-left:6px}
.route-block-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.route-totals-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.route-totals-text{font-weight:700;font-size:13px}
.visit-list{list-style:none;padding:0;margin:0}
.visit-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--card-bg,white);color:var(--ink);transition:background .15s}
.visit-row.dragging{opacity:.5;background:var(--blue-soft,#e0f2fe)}
.visit-row.drag-over{border-top:2px solid var(--blue);background:var(--blue-soft,#f0f9ff)}
.drag-handle{cursor:grab;user-select:none;font-size:16px;color:var(--muted);touch-action:none}
.visit-order-buttons,.person-order-buttons{margin-left:auto;display:flex;gap:4px}
.visit-order-buttons button,.person-order-buttons button{padding:2px 8px;font-size:13px;min-width:32px;min-height:32px}
.person-row{transition:background .15s}
.person-row.dragging{opacity:.5;background:var(--blue-soft,#e0f2fe)}
.person-row.drag-over{border-top:2px solid var(--blue);background:var(--blue-soft,#f0f9ff)}
.team-lead-badge{background:var(--soft);border-color:var(--line);color:var(--ink);font-weight:600}
.team-name-hint{font-size:12px;color:var(--muted);font-style:italic}
.team-filter-compact{display:flex;flex-direction:column;gap:8px;padding:14px;background:var(--soft);border:1px solid var(--line);border-radius:12px;color:var(--ink)}
.team-filter-compact select{min-height:40px}
.teams-dialog{border:1px solid var(--line);border-radius:14px;padding:22px;max-width:min(90vw,600px);box-shadow:0 10px 40px rgba(0,0,0,.15);background:var(--card-bg,white);color:var(--ink)}
.teams-dialog::backdrop{background:rgba(0,0,0,.4);backdrop-filter:blur(2px)}
.dialog-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}
.history-table-wrap{max-height:400px;overflow:auto;margin:12px 0}
.history-table th,.history-table td{padding:8px;font-size:12px}
@media(max-width:900px){
  .map-layout{grid-template-columns:minmax(0,1fr);display:grid}
  .map-layout>*{min-width:0}
  .teams-panel{width:100%;max-width:100%;overflow-x:hidden}
}
@media(max-width:760px){
  .teams-panel button{min-height:44px;min-width:44px}
  .visit-order-buttons button,.person-order-buttons button{min-height:44px;min-width:44px;font-size:16px}
  .team-summary{flex-wrap:wrap;gap:8px}
  .person-item{flex-direction:column}
}
/* Enlace con forma de botón (manual de usuario) */
a.button{display:inline-flex;align-items:center;justify-content:center;border:1.5px solid var(--line);border-radius:8px;background:var(--card-bg,white);color:var(--ink);padding:10px 18px;font-weight:700;font-size:13px;text-decoration:none;min-height:42px}
a.button.primary{background:#2c4875;border-color:#2c4875;color:white}
a.button:hover{filter:brightness(1.05)}
/* Barra de alertas SOS (no bloquea la pantalla) */
#sos-banner{position:sticky;top:0;z-index:1200;background:#991b1b;color:#fff;padding:8px 16px;display:flex;flex-direction:column;gap:6px;box-shadow:0 2px 10px rgba(0,0,0,.25)}
.sos-banner-item{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px}
.sos-banner-item b{background:#fff;color:#991b1b;border-radius:6px;padding:1px 8px;letter-spacing:.5px}
.sos-banner-item a{color:#fff;text-decoration:underline;font-weight:700}
.sos-banner-item button{margin-left:auto;background:#fff;color:#991b1b;border-color:#fff;padding:4px 12px;min-height:32px}
.sos-banner-muted{opacity:.85;font-size:12px}
.sos-banner-sound{font-weight:700}
/* Evidencias: botones de fotos y de video lado a lado */
.media-buttons{display:flex;flex-wrap:wrap;gap:8px 22px;align-items:center}.media-buttons .photo-add{margin-top:10px}
/* Croquis y planos (Construcción y mantenimiento) */
.plans-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0}.plan-slot{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff;min-width:0}.plan-file{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center;font-size:12px;color:var(--muted);margin:6px 0}.plan-file .link{border:0;background:none;padding:0;color:var(--blue);font-size:12px}.plan-fields{grid-template-columns:minmax(0,1fr) minmax(0,2fr)}@media (max-width:700px){.plan-fields{grid-template-columns:minmax(0,1fr)}}
.expense-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 20px}.expense-card{border:1px solid var(--line);border-radius:14px;padding:16px 18px;background:white;box-shadow:0 1px 3px 0 rgba(0,0,0,0.04);min-width:0;overflow:auto}.expense-card h3{margin:0 0 2px}.expense-card p.small{margin:0 0 10px}.expense-card th,.expense-card td{padding:8px 10px}.expense-total span{display:block;font-weight:750;white-space:nowrap}.receipt-location{margin:6px 0 12px}#ops-receipt-photo{margin:0 0 12px}@media(max-width:760px){.expense-cards{grid-template-columns:1fr}}
/* Gastos y Comprobación (0039) */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.xp-panel{overflow:hidden}.xp-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;align-items:flex-start}.xp-head>div:first-child{flex:1 1 320px;min-width:0}.xp-head-actions{display:flex;flex-wrap:wrap;gap:8px}.xp-big{font-size:15px;padding:12px 20px}
.xp-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,140px),1fr));gap:10px;margin:14px 0}.xp-kpi{display:flex;flex-direction:column;gap:2px;text-align:left;border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card-bg,#fff);color:var(--ink);min-width:0;font-weight:400}.xp-kpi span{font-size:12px;color:var(--muted);font-weight:600}.xp-kpi strong{font-size:20px;line-height:1.2;overflow-wrap:anywhere}.xp-kpi small{font-size:11px;color:var(--muted)}.xp-kpi-mxn{border-color:var(--blue)}button.xp-kpi:hover{background:var(--soft)}
.xp-balance-return strong{color:var(--amber)}.xp-balance-pay strong{color:var(--green)}
.xp-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 12px}.xp-chips button{padding:6px 12px;font-size:12px;border-radius:999px}.xp-chips button.active{background:#2c4875;border-color:#2c4875;color:#fff}
.xp-status{display:inline-block;font-size:11px;font-weight:750;border-radius:999px;padding:3px 9px;border:1px solid;white-space:nowrap}.xp-draft{background:#e0f2fe;color:#0369a1;border-color:#bae6fd}.xp-submitted{background:#fef3c7;color:#92400e;border-color:#fcd34d}.xp-approved{background:#dcfce7;color:#166534;border-color:#86efac}.xp-observed{background:#fee2e2;color:#991b1b;border-color:#fca5a5}
.xp-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:10px}.xp-card{border:1px solid var(--line);border-radius:12px;background:var(--card-bg,#fff);overflow:hidden;min-width:0}.xp-card-observed{border-color:#fca5a5}.xp-card-main{display:flex;flex-direction:column;gap:4px;width:100%;text-align:left;border:0;border-radius:0;padding:12px 14px;font-weight:400;background:transparent}.xp-card-top,.xp-card-bottom{display:flex;justify-content:space-between;gap:8px;align-items:center}.xp-card-merchant{color:var(--muted);overflow-wrap:anywhere}.xp-card-bottom strong{font-size:16px}
div.xp-observed{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;border-top:1px solid #fca5a5;padding:10px 14px;font-size:13px;border-radius:0}.xp-ai-pending{background:var(--soft);color:var(--ink);border-color:var(--line)}
.xp-pending{display:block;color:var(--amber);font-size:11px}.xp-error{display:block;color:var(--red);font-size:11px}.xp-warn{color:var(--amber);font-weight:700}small.xp-warn{display:block;font-size:11px}.xp-empty{padding:18px;text-align:center}
.xp-form-head{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:10px}.xp-form-head h2{margin:0}.xp-back{padding:8px 12px}
.xp-form-grid{display:grid;grid-template-columns:minmax(220px,320px) minmax(0,1fr);gap:20px;align-items:start}.xp-photo{position:sticky;top:12px;display:flex;flex-direction:column;gap:8px;min-width:0}.xp-photo img{width:100%;max-height:60vh;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.xp-photo-empty{display:flex;align-items:center;justify-content:center;min-height:140px;border:1.5px dashed var(--line);border-radius:10px;color:var(--muted);font-size:12px;padding:12px;text-align:center}.xp-photo-actions{display:flex;flex-wrap:wrap;gap:8px}
.xp-ai-status p{margin:0;padding:8px 10px;border-radius:8px;font-size:12px}.xp-ai-busy{background:var(--soft)}.xp-ai-ok{background:#ecfdf5;color:#065f46}.xp-ai-msg{background:#fff8e7;color:#72571e}.xp-dup{background:#fff0f1;color:var(--red);font-weight:700}
.xp-ai-tag{display:inline-block;font-size:10px;font-weight:700;color:#0369a1;background:#e0f2fe;border-radius:999px;padding:1px 7px;margin-left:4px;vertical-align:middle}.xp-ai-review{color:#92400e;background:#fef3c7}.xp-ai-field{border-color:#7dd3fc!important;background:#f0f9ff}.xp-help{display:block;font-weight:400;color:var(--muted);font-size:11px;margin-top:3px}
.xp-section{border-top:1px solid var(--line);padding:12px 0;margin-top:8px}.xp-section>summary{font-weight:700;cursor:pointer;padding:4px 0}
.xp-items-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.xp-items-head h3{margin:0}.xp-item{display:grid;grid-template-columns:minmax(0,2.2fr) repeat(3,minmax(0,1fr)) auto;gap:8px;align-items:end;padding:8px 0;border-bottom:1px dashed var(--line)}.xp-item label{margin:0;font-size:12px;min-width:0}.xp-item-del{padding:8px 12px}
.xp-save{margin-top:12px}.xp-file{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0}
.xp-filters{border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0;background:var(--soft)}.xp-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}.xp-filter-grid label{margin:0;font-size:12px;min-width:0}.xp-form-end{display:flex;align-items:flex-end}
.xp-tabs{flex-wrap:nowrap}.xp-tabs button[aria-selected=true]{background:#2c4875;border-color:#2c4875;color:#fff}
.xp-link{border:0;background:none;padding:2px 0;color:var(--blue);font-weight:600;text-align:left;cursor:pointer}.xp-link:hover{background:none;text-decoration:underline}
.xp-num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}.xp-num small{display:block;color:var(--muted);font-weight:400}
.xp-sort{border:0;background:none;padding:0;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer}.xp-row-review td{background:#fffbeb}
.xp-bulk{min-height:36px;margin:6px 0}.xp-currency-line{margin:4px 0}
.xp-detail{width:min(1100px,96vw)}.xp-detail-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.xp-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px;margin-top:10px}.xp-detail-photos figure{margin:0 0 10px}.xp-detail-photos img{width:100%;max-height:70vh;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.xp-detail-photos figcaption{font-size:12px;color:var(--muted)}
.xp-compare,.xp-facts{font-size:13px;margin-bottom:8px}.xp-compare th,.xp-compare td,.xp-facts th,.xp-facts td{padding:6px 8px}.xp-facts th{width:38%;text-transform:none;letter-spacing:0;font-size:12px}.xp-diff td{background:#fff7ed}.xp-diff td:nth-child(3){font-weight:700}
.xp-timeline{padding-left:18px;font-size:13px}.xp-timeline time{color:var(--muted);font-size:12px;margin-right:6px}
.xp-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px;align-items:center}
.xp-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.xp-thumb{display:flex;flex-direction:column;gap:6px;padding:6px;text-align:left;font-weight:400}.xp-thumb img,.xp-thumb .xp-photo-empty{width:100%;height:150px;min-height:0;object-fit:cover;border-radius:6px}.xp-thumb small{font-size:11px;color:var(--muted)}
.xp-split{align-items:start}.xp-form-compact .fields{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.xp-settle{border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:12px}.xp-settle-result{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:10px;background:var(--soft);margin-bottom:10px}.xp-settle-result span{font-weight:800;font-size:15px}.xp-settle-result strong{font-size:26px}.xp-settle-result.xp-balance-pay{background:#ecfdf5}.xp-settle-result.xp-balance-return{background:#fff8e7}
.xp-mini{padding-left:18px;font-size:13px;margin:4px 0 10px}.xp-rate{border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin-bottom:10px}.xp-rate p{margin:4px 0}
.xp-trips{display:grid;gap:10px}.xp-trip{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card-bg,#fff)}.xp-trip h4{margin:0 0 6px}
.xp-ask{width:min(520px,94vw)}.xp-panel table.xp-compare,.xp-panel table.xp-facts,.xp-detail table,.xp-group,.expense-card table{min-width:0}.xp-filters>summary{font-weight:700;cursor:pointer;margin-bottom:8px}.xp-detail-grid>*{min-width:0}
html.theme-dark .xp-ai-field{background:#0c2a3d}html.theme-dark .xp-row-review td,html.theme-dark .xp-diff td{background:#3b2f12}html.theme-dark .xp-ai-ok,html.theme-dark .xp-settle-result.xp-balance-pay{background:#123524;color:#bbf7d0}html.theme-dark .xp-ai-msg,html.theme-dark .xp-settle-result.xp-balance-return{background:#3b2f12;color:#fde68a}html.theme-dark .xp-dup{background:#3f1d1d}
@media(max-width:760px){.xp-form-grid,.xp-detail-grid{grid-template-columns:minmax(0,1fr)}.xp-detail{padding:16px}.xp-table{min-width:0}.xp-compare td,.xp-facts td{overflow-wrap:anywhere}.xp-photo{position:static}.xp-photo img{max-height:40vh}.xp-head-actions{width:100%}.xp-head-actions button{flex:1 1 auto}.xp-item{grid-template-columns:1fr 1fr}.xp-item label:first-child{grid-column:1/-1}.xp-kpi strong{font-size:17px}.xp-tabs{flex-wrap:wrap}
 .xp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.xp-table,.xp-table tbody,.xp-table tr,.xp-table td{display:block;width:100%}.xp-table tr{border:1px solid var(--line);border-radius:10px;margin-bottom:8px;padding:6px 10px;background:var(--card-bg,#fff)}.xp-table td{border:0;padding:3px 0;display:flex;justify-content:space-between;gap:10px;text-align:right}.xp-table td::before{content:attr(data-label);font-size:11px;font-weight:700;color:var(--muted);text-align:left}.xp-table td:empty{display:none}.xp-table td.xp-num{white-space:normal}.xp-group th,.xp-group td{padding:6px}}

/* Espacios por unidad (0043) */
.spaces-panel{padding:16px 20px;margin:14px 0 18px;min-width:0}
.spaces-head{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:12px}
.spaces-head-copy{min-width:0;flex:1 1 280px}
.spaces-head-actions{display:flex;flex-wrap:wrap;gap:8px}
.space-add-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:12px;font-weight:700;border-radius:8px;border:1.5px dashed var(--blue);color:var(--blue);background:#eff6ff;cursor:pointer;transition:all .15s ease}
.space-add-btn:hover:not(:disabled){background:#dbeafe}
.space-add-btn:disabled{opacity:.5;cursor:not-allowed;border-style:solid;border-color:var(--line);color:var(--muted);background:var(--soft)}
.space-add-btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.spaces-chips{display:flex;flex-wrap:wrap;gap:8px;align-items:stretch;max-width:100%}
.space-chip{display:flex;align-items:stretch;max-width:100%;border:1.5px solid var(--line);border-radius:10px;background:#f8fafc;transition:all .15s ease}
.space-chip:hover{border-color:var(--blue);background:#f0f7ff}
.space-chip.active{border-color:var(--blue);background:#eef4fb;box-shadow:0 0 0 1px var(--blue)}
.space-chip-main{display:inline-flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;padding:8px 10px;border:0;border-radius:10px;background:none;color:var(--ink);font-weight:400;text-align:left;cursor:pointer}
.space-chip-main:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.space-chip-icon{font-size:14px;flex-shrink:0}
.space-chip-info{display:flex;flex-direction:column;min-width:0}
.space-chip-title{font-size:13px;color:var(--ink);overflow-wrap:anywhere}
.space-chip-actions{display:inline-flex;align-items:center;gap:2px;padding-right:4px}
.space-action-btn{background:none;border:none;padding:4px;font-size:12px;line-height:1;cursor:pointer;border-radius:4px;color:var(--muted)}
.space-action-btn:hover{background:rgba(0,0,0,.08)}
.space-action-btn:focus-visible{outline:2px solid var(--blue);outline-offset:1px}
.space-title{font-size:.68em;color:var(--muted);font-weight:600;letter-spacing:0}
.space-report-block{break-inside:avoid;min-width:0}
.slide-space{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.slide-space h3{margin:10px 0 4px}
.badge.PENDING{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
html.theme-dark .spaces-panel{background:var(--card-bg);border-color:var(--line)}
html.theme-dark .space-chip{background:#131e32;border-color:#334155}
html.theme-dark .space-chip:hover{background:#1a2a42;border-color:var(--blue)}
html.theme-dark .space-chip.active{background:#1e3a5f;border-color:var(--blue)}
html.theme-dark .space-chip-main{color:var(--ink)}
html.theme-dark .space-chip-title{color:var(--ink)}
html.theme-dark .space-action-btn{color:var(--muted)}
html.theme-dark .space-action-btn:hover{background:rgba(255,255,255,.12)}
html.theme-dark .space-add-btn{background:#1e3a5f;border-color:var(--blue);color:#7dd3fc}
html.theme-dark .badge.PENDING{background:#1e293b;color:#94a3b8;border-color:#334155}
@media(max-width:540px){
  .spaces-panel{padding:12px 14px}
  .spaces-head{flex-direction:column;align-items:stretch}
  .spaces-head-copy{flex:0 0 auto}
  .spaces-head-actions{width:100%}
  .space-add-btn{flex:1 1 auto;justify-content:center}
  .spaces-chips{flex-direction:column}
  .space-chip{width:100%}
  .space-chip-main{width:100%}
  .space-chip-actions{padding:0 6px 0 0}
}
@media(max-width:375px){
  .spaces-panel{padding:10px 12px}
  .space-chip-main{flex-wrap:wrap;gap:4px 8px;padding:8px}
  .space-chip-info{flex:1 1 140px}
  .space-chip .badge{font-size:10px;padding:2px 7px}
}


/* Tiempo real, historial por campo y retiro de evidencias locales */
.editor-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.save-status-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:12px;margin:8px 0 14px}
.save-status-row .save-line{margin:0;border-bottom:0;padding-bottom:0}
.realtime-indicator{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:700;background:#ecfdf5;color:#065f46;border:1px solid #a7f3d0}
.btn-history-head{padding:5px 12px;font-size:12px;border-radius:999px;border:1px solid var(--line);background:var(--soft);color:var(--ink)}
.btn-history-sm{padding:3px 9px;font-size:11px;font-weight:700;border-radius:6px;border:1px solid var(--line);background:var(--soft);color:var(--blue);line-height:1.25}
.btn-history-head:hover,.btn-history-sm:hover{background:#eff6ff;border-color:#93c5fd}
.field-with-history{display:flex;flex-direction:column;margin-bottom:6px}
.field-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.field-label-row label{margin-bottom:0}
.question-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.question-head .small{margin:0}
.question-photo-item{display:flex;flex-direction:column;gap:4px;align-items:stretch}
.photo-remove-btn{padding:4px 8px;font-size:11px;font-weight:700;border-radius:6px;border:1px solid #fca5a5;background:#fff7f7;color:#991b1b}
.photo-remove-btn:hover:not(:disabled){background:#fee2e2}
.plan-remove{padding:2px 8px;font-size:11px}

.history-dialog{width:min(760px,95vw)}
.history-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:14px}
.history-dialog-head h2{margin:2px 0 4px}
.history-subtitle{margin:0}
.history-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.history-item{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card-bg,#fff)}
.history-item.is-restored{border-left:4px solid var(--blue)}
.history-item-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.history-actor{font-weight:750;color:var(--ink);font-size:13px}
.history-time{font-size:11px;color:var(--muted)}
.history-item-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.history-field{font-size:12px;font-weight:700;color:var(--ink)}
.history-badge{display:inline-block;font-size:10px;font-weight:750;padding:2px 8px;border-radius:999px;background:var(--soft);border:1px solid var(--line);color:var(--muted)}
.history-badge-restored{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.history-res-conflict_lost{background:#fef3c7;border-color:#fcd34d;color:#92400e}
.history-res-conflict_won{background:#dcfce7;border-color:#86efac;color:#166534}
.history-diff{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px;background:var(--soft);padding:8px 10px;border-radius:8px;overflow-wrap:anywhere}
.history-val-old{color:var(--muted);text-decoration:line-through}
.history-val-new{color:var(--ink);font-weight:650}
.history-actions{margin-top:8px;display:flex;justify-content:flex-end}
.history-restore-btn{padding:5px 12px;font-size:12px;border-radius:7px;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8}
.history-restore-btn:hover:not(:disabled){background:#dbeafe}
.xp-ai-compare>summary{font-weight:700;cursor:pointer}

html.theme-dark .realtime-indicator{background:rgba(16,185,129,0.16);color:#6ee7b7;border-color:rgba(16,185,129,0.35)}
html.theme-dark .btn-history-head,html.theme-dark .btn-history-sm{background:#131e32;border-color:#334155;color:#7dd3fc}
html.theme-dark .btn-history-head:hover,html.theme-dark .btn-history-sm:hover{background:#1e3a5f;border-color:#38bdf8}
html.theme-dark .photo-remove-btn{background:#3f1d1d;border-color:#7f1d1d;color:#fecaca}
html.theme-dark .history-dialog{background:#1e293b;color:#f8fafc;border-color:#334155}
html.theme-dark .history-item{background:#131e32;border-color:#334155}
html.theme-dark .history-diff{background:#0b1120}
html.theme-dark .history-badge-restored,html.theme-dark .history-restore-btn{background:#1e3a5f;border-color:#2563eb;color:#93c5fd}

/* ========================================================
   TABLERO EJECUTIVO INTERACTIVO ESTILO POWER BI (GLOBAL -> DETALLE)
   ======================================================== */
.pbi-dashboard{display:flex;flex-direction:column;gap:20px}
.pbi-header-bar{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:4px}
.pbi-scope-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pbi-scope-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;font-size:12px;font-weight:700}
.pbi-scope-count{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;border-radius:999px;background:var(--soft);border:1px solid var(--line);color:var(--muted);font-size:12px;font-weight:650}
.pbi-eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.75px;text-transform:uppercase;color:var(--blue);margin-bottom:4px}

/* Barra de Segmentadores (Slicers) */
.pbi-slicers-card{background:white;border:1px solid var(--line);border-radius:16px;padding:16px 20px;box-shadow:0 1px 3px rgba(0,0,0,0.04);display:flex;flex-direction:column;gap:14px}
.pbi-specialty-pills{display:flex;flex-wrap:wrap;gap:8px}
.pbi-spec-pill{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;border:1.5px solid var(--line);background:#f8fafc;color:var(--ink);font-size:12.5px;font-weight:750;cursor:pointer;transition:all .15s ease}
.pbi-spec-pill:hover{border-color:#93c5fd;background:#eff6ff}
.pbi-spec-pill.active{background:#1e3a8a;border-color:#1e3a8a;color:#ffffff;box-shadow:0 2px 6px rgba(30,58,138,0.22)}
.pbi-spec-pill-count{font-size:11px;font-weight:800;padding:2px 7px;border-radius:999px;background:rgba(15,23,42,0.07);color:var(--muted)}
.pbi-spec-pill-count.has-active{background:#dbeafe;color:#1d4ed8}
.pbi-spec-pill.active .pbi-spec-pill-count{background:rgba(255,255,255,0.22);color:#ffffff}

.pbi-slicer-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(200px,1.35fr);gap:12px;align-items:end}
.pbi-slicer-field{margin:0;min-width:0}
.pbi-slicer-field>span{display:block;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);margin-bottom:4px}
.pbi-slicer-field select,.pbi-slicer-field input{margin-top:0;min-height:38px;padding:7px 12px;font-size:13px;border-radius:9px}
.pbi-slicer-field select{padding-right:34px}

.pbi-active-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:10px;border-top:1px dashed var(--line)}
.pbi-active-filters-label{font-size:11px;font-weight:750;color:var(--muted);text-transform:uppercase}
.pbi-filter-chips{display:flex;flex-wrap:wrap;gap:6px;flex:1}
.pbi-filter-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#eff6ff;border:1px solid #93c5fd;color:#1d4ed8;font-size:11.5px;font-weight:700}
.pbi-filter-chip strong{font-size:14px;line-height:1}
.pbi-reset-btn{padding:5px 12px;border-radius:8px;font-size:12px;font-weight:750;background:#fff1f2;border:1px solid #fecdd3;color:#be123c}
.pbi-reset-btn:hover{background:#ffe4e6}

/* Hero Ejecutivo (2 Columnas) */
.pbi-hero-grid{display:grid;grid-template-columns:1.25fr 1fr;gap:20px;align-items:stretch}
.pbi-hero-card{border-radius:16px;padding:22px;border:1px solid var(--line);background:white;box-shadow:0 1px 3px rgba(0,0,0,0.04);display:flex;flex-direction:column;justify-content:space-between;margin-bottom:0}
.pbi-hero-global{background:linear-gradient(145deg,#ffffff 0%,#f8fafc 100%)}
.pbi-hero-featured.hero-banner{background:#eef4fb;border-color:#dce7f5;margin-bottom:0}
.pbi-hero-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.pbi-hero-title{font-size:20px;font-weight:850;color:var(--ink);margin:0;letter-spacing:-.015em}
.pbi-total-pill{display:inline-block;padding:4px 10px;border-radius:999px;background:var(--soft);border:1px solid var(--line);font-size:11.5px;font-weight:750;color:var(--ink);white-space:nowrap}

.pbi-hero-body{display:grid;grid-template-columns:148px minmax(0,1fr);gap:20px;align-items:center;margin-bottom:16px}
.pbi-donut-wrap{position:relative;width:148px;height:148px;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin:auto}
.pbi-donut-svg{width:148px;height:148px;transform:rotate(-90deg)}
.pbi-donut-track{fill:none;stroke:#e2e8f0;stroke-width:10}
.pbi-donut-seg{fill:none;stroke-width:10;stroke-linecap:butt;transition:stroke-dasharray .4s ease}
.pbi-donut-seg.seg-validated{stroke:#16a34a}
.pbi-donut-seg.seg-submitted{stroke:#2563eb}
.pbi-donut-seg.seg-progress{stroke:#0ea5e9}
.pbi-donut-inner-track{fill:none;stroke:#f1f5f9;stroke-width:6}
.pbi-donut-inner-val{fill:none;stroke:#6366f1;stroke-width:6;stroke-linecap:round;transition:stroke-dasharray .4s ease}
.pbi-donut-center{position:absolute;text-align:center;padding:0 8px}
.pbi-donut-pct{font-size:23px;font-weight:850;color:var(--ink);line-height:1.05;letter-spacing:-.03em}
.pbi-donut-sub{font-size:9.5px;font-weight:750;text-transform:uppercase;letter-spacing:.4px;color:var(--muted);margin-top:2px}

.pbi-hero-splits{display:flex;flex-direction:column;gap:10px}
.pbi-split-stat{padding:10px 14px;border-radius:12px;border:1px solid var(--line);background:white;cursor:pointer;transition:all .15s ease}
.pbi-split-stat:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 2px 8px rgba(37,99,235,0.08)}
.pbi-split-head{display:flex;align-items:center;gap:7px;margin-bottom:2px}
.pbi-split-label{font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.3px;color:var(--muted)}
.pbi-split-val-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.pbi-split-pct{font-size:21px;font-weight:850;color:var(--ink);letter-spacing:-.02em}
.stat-sent .pbi-split-pct{color:#1d4ed8}
.stat-progress .pbi-split-pct{color:#0284c7}
.stat-checklist .pbi-split-pct{color:#4f46e5}
.pbi-split-count{font-size:12px;font-weight:750;color:var(--ink)}
.pbi-split-sub{font-size:11px;color:var(--muted);margin-top:2px}

.pbi-dot{display:inline-block;width:9px;height:9px;border-radius:50%;flex-shrink:0}
.dot-validated{background:#16a34a}
.dot-sent{background:#2563eb}
.dot-progress{background:#0ea5e9}
.dot-checklist{background:#6366f1}
.dot-pending{background:#cbd5e1}

.pbi-stacked-footer{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid var(--line)}
.pbi-bar-stack-lg{height:11px;background:#e2e8f0;border-radius:999px;overflow:hidden;display:flex}
.pbi-bar-stack{height:9px;background:#e2e8f0;border-radius:999px;overflow:hidden;display:flex;margin:6px 0}
.pbi-bar-stack.pbi-bar-sm{height:7px}
.pbi-seg{height:100%;transition:width .35s ease}
.pbi-seg.seg-validated{background:#16a34a}
.pbi-seg.seg-submitted{background:#2563eb}
.pbi-seg.seg-progress{background:#0ea5e9}

.pbi-legend-row{display:flex;flex-wrap:wrap;gap:6px}
.pbi-legend-item{display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:999px;border:1px solid var(--line);background:#f8fafc;font-size:11px;font-weight:650;color:var(--ink);cursor:pointer}
.pbi-legend-item.active{background:#eff6ff;border-color:#2563eb;color:#1d4ed8}

.pbi-featured-top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.pbi-featured-specs{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 12px}
.pbi-featured-spec-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:8px;background:white;border:1px solid #cbd5e1;font-size:11.5px;color:var(--ink);cursor:pointer}
.pbi-featured-spec-chip:hover{border-color:var(--blue);background:#f0f7ff}
.pbi-chip-photos{font-size:11px;color:#0284c7;font-weight:700}
.pbi-featured-finding{padding:10px 12px;border-radius:10px;background:rgba(255,255,255,0.78);border:1px solid #cbd5e1;font-size:12px;line-height:1.45;color:var(--ink);margin-bottom:14px}
.pbi-featured-finding.is-critical{background:#fff1f2;border-color:#fecdd3;color:#9f1239}
.pbi-featured-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}

/* Fila de 6 Tarjetas KPI Interactivas */
.pbi-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}
.pbi-kpi-card{display:flex;flex-direction:column;justify-content:space-between;gap:6px;text-align:left;padding:16px;border-radius:14px;border:1.5px solid var(--line);background:white;box-shadow:0 1px 3px rgba(0,0,0,0.04);cursor:pointer;transition:all .15s ease}
.pbi-kpi-card:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 4px 12px rgba(37,99,235,0.08)}
.pbi-kpi-card.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 2px rgba(37,99,235,0.18)}
.pbi-kpi-top{display:flex;justify-content:space-between;align-items:center;gap:6px}
.pbi-kpi-label{font-size:11.5px;font-weight:750;color:var(--muted);line-height:1.25}
.pbi-kpi-badge{font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px;white-space:nowrap}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-indigo{background:#e0e7ff;color:#4338ca}
.badge-cyan{background:#e0f2fe;color:#0369a1}
.badge-green{background:#dcfce7;color:#15803d}
.badge-red{background:#fee2e2;color:#b91c1c}
.badge-slate{background:#f1f5f9;color:#334155}
.pbi-kpi-num{font-size:28px;font-weight:850;color:var(--ink);line-height:1.05;letter-spacing:-.03em}
.pbi-kpi-num small{font-size:15px;font-weight:700;color:var(--muted)}
.pbi-kpi-sub{font-size:11px;font-weight:600;color:var(--muted);line-height:1.35}

/* Cuadrícula de 4 Paneles Visuales Power BI */
.pbi-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.pbi-chart-card{margin-bottom:0;display:flex;flex-direction:column;gap:12px}
.pbi-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px solid var(--line);padding-bottom:10px}
.pbi-card-head h3{font-size:16px;font-weight:800;margin:0}
.pbi-hint{font-size:11px;color:var(--muted);font-weight:650;white-space:nowrap}

.pbi-spec-bars{display:flex;flex-direction:column;gap:10px}
.pbi-spec-row{padding:11px 13px;border-radius:12px;border:1px solid var(--line);background:#f8fafc;cursor:pointer;transition:all .15s ease}
.pbi-spec-row:hover{border-color:#93c5fd;background:#f0f7ff}
.pbi-spec-row.selected{border-color:#2563eb;background:#eff6ff;box-shadow:inset 3px 0 0 #2563eb}
.pbi-spec-row-top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.pbi-spec-row-title{display:flex;align-items:center;gap:6px;font-size:13px}
.pbi-spec-row-badges{display:flex;gap:6px;flex-wrap:wrap}
.pbi-mini-stat{font-size:11px;font-weight:750;padding:2px 7px;border-radius:6px}
.pbi-mini-stat.stat-sent{background:#dbeafe;color:#1e40af}
.pbi-mini-stat.stat-prog{background:#e0f2fe;color:#0369a1}
.pbi-spec-row-sub{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-size:11.5px;color:var(--muted)}
.text-danger{color:#dc2626}
.text-sent{color:#1d4ed8;font-weight:700}
.text-prog{color:#0284c7;font-weight:700}

.pbi-ratings-bars{display:flex;flex-direction:column;gap:10px}
.pbi-rating-row{display:flex;flex-direction:column;gap:4px}
.pbi-rating-top{display:flex;justify-content:space-between;font-size:12.5px}
.pbi-bar-track{height:8px;background:#e2e8f0;border-radius:999px;overflow:hidden}
.pbi-bar-track.pbi-bar-sm{height:7px}
.pbi-bar-track.pbi-bar-xs{height:6px}
.pbi-bar-fill{height:100%;border-radius:999px;transition:width .35s ease}
.fill-validated{background:#16a34a}
.fill-submitted{background:#2563eb}
.fill-progress{background:#0ea5e9}
.fill-amber{background:#d97706}
.fill-critical{background:#dc2626}
.fill-slate{background:#64748b}

.pbi-tech-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:10px;border-top:1px solid var(--line);margin-top:auto}
.pbi-tech-item{padding:9px 11px;border-radius:10px;background:#f8fafc;border:1px solid var(--line);display:flex;flex-direction:column;gap:2px}
.pbi-tech-item span{font-size:11px;color:var(--muted);font-weight:650}
.pbi-tech-item strong{font-size:13.5px;color:var(--ink);font-weight:800}

.pbi-scroll-list{display:flex;flex-direction:column;gap:8px;max-height:330px;overflow-y:auto;padding-right:4px}
.pbi-group-row{padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:#f8fafc;cursor:pointer;transition:all .15s ease}
.pbi-group-row:hover{border-color:#93c5fd;background:#f0f7ff}
.pbi-group-row.selected{border-color:#2563eb;background:#eff6ff;box-shadow:inset 3px 0 0 #2563eb}
.pbi-group-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12.5px}
.pbi-group-name{display:flex;align-items:center;gap:6px;min-width:0}
.pbi-team-badge{display:inline-block;padding:1px 6px;border-radius:5px;background:#1e3a8a;color:white;font-size:10.5px;font-weight:800}
.pbi-group-nums{font-size:11.5px;color:var(--muted);white-space:nowrap}
.pbi-group-sub{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--muted)}

/* Matriz Drill-Down de Unidades */
.pbi-matrix-panel{margin-bottom:0}
.pbi-matrix-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.pbi-matrix-head h2{margin:2px 0 4px}
.pbi-matrix-head p.small{margin:0}
.pbi-matrix-actions{display:flex;gap:8px;flex-wrap:wrap}
.pbi-matrix-table th{font-size:11px;padding:10px 10px;white-space:nowrap}
.pbi-matrix-table td{padding:11px 10px;vertical-align:middle}
.pbi-matrix-row.row-active{background:#f8fbff}
.pbi-matrix-row.row-expanded{background:#eff6ff}
.pbi-cell-status{display:flex;flex-direction:column;gap:6px;min-width:130px}
.pbi-cell-progress{display:flex;flex-direction:column;gap:3px}
.pbi-cell-progress small{font-size:11px;color:var(--muted)}

.pbi-cell-spec-btn{width:100%;min-width:135px;text-align:left;padding:7px 9px;border-radius:9px;border:1px solid var(--line);background:white;cursor:pointer;display:flex;flex-direction:column;gap:3px;transition:all .15s ease}
.pbi-cell-spec-btn:hover{border-color:var(--blue);background:#f0f7ff}
.pbi-cell-spec-btn.status-DRAFT,.pbi-cell-spec-btn.status-SUBMITTED{border-color:#bae6fd;background:#f0f9ff}
.pbi-cell-spec-btn.status-VALIDATED{border-color:#86efac;background:#f0fdf4}
.pbi-cell-spec-btn.status-RETURNED{border-color:#fca5a5;background:#fef2f2}
.pbi-cell-spec-top{display:flex;align-items:center;gap:5px;font-size:11.5px}
.pbi-cell-spec-pct{margin-left:auto;font-weight:800;color:var(--blue)}
.pbi-cell-spec-sub{font-size:10.5px;color:var(--muted);font-weight:600}
.pbi-dot-sm{width:7px;height:7px;border-radius:50%;display:inline-block;background:#cbd5e1}
.pbi-dot-sm.status-DRAFT{background:#0ea5e9}
.pbi-dot-sm.status-SUBMITTED{background:#2563eb}
.pbi-dot-sm.status-VALIDATED{background:#16a34a}
.pbi-dot-sm.status-RETURNED{background:#dc2626}

.pbi-cell-badges{display:flex;flex-direction:column;gap:4px;min-width:110px}
.pbi-mini-badge{display:inline-block;padding:2px 7px;border-radius:6px;font-size:11px;font-weight:750;width:fit-content}
.badge-danger{background:#fee2e2;color:#991b1b}
.badge-warn{background:#fef3c7;color:#92400e}
.badge-info{background:#e0f2fe;color:#0369a1}
.pbi-row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.btn-open-unit-sm{padding:7px 11px;font-size:12px;font-weight:750;border-radius:8px;background:#2c4875;border:1px solid #2c4875;color:white;cursor:pointer}
.btn-open-unit-sm:hover{background:#1e3354}
.pbi-matrix-foot{display:flex;justify-content:center;padding-top:14px}
.pbi-empty-cell{text-align:center;padding:28px!important;color:var(--muted)}

/* Panel Desplegable Drill-Down por Unidad */
.pbi-drilldown-row td{padding:0!important;background:#f1f5f9;border-bottom:2px solid #cbd5e1}
.pbi-drilldown-box{padding:18px 20px;display:flex;flex-direction:column;gap:16px}
.pbi-drilldown-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.pbi-drilldown-head h4{font-size:16px;font-weight:800;margin:2px 0 4px;color:var(--ink)}
.pbi-drilldown-head h4 small{font-weight:600;color:var(--muted);font-size:13px}
.pbi-drilldown-head p.small{margin:0}
.pbi-drilldown-specs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.pbi-spec-detail-card{background:white;border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px}
.pbi-spec-detail-card.is-active{border-color:#93c5fd;box-shadow:0 1px 4px rgba(37,99,235,0.08)}
.pbi-spec-detail-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.pbi-spec-title{font-size:13px;font-weight:800;color:var(--ink);display:block;margin-bottom:3px}
.pbi-spec-meta{font-size:11.5px;color:var(--muted)}
.pbi-spec-counts{display:flex;flex-wrap:wrap;gap:6px;font-size:11px}
.tag-cumple{color:#15803d;background:#dcfce7;padding:2px 6px;border-radius:5px}
.tag-atencion{color:#92400e;background:#fef3c7;padding:2px 6px;border-radius:5px}
.tag-critico{color:#991b1b;background:#fee2e2;padding:2px 6px;border-radius:5px}
.tag-na{color:#475569;background:#f1f5f9;padding:2px 6px;border-radius:5px}

.pbi-steps-breakdown{display:flex;flex-direction:column;gap:5px;padding-top:8px;border-top:1px dashed var(--line)}
.pbi-steps-title{font-size:10.5px;font-weight:750;text-transform:uppercase;color:var(--muted)}
.pbi-step-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(50px,1fr) auto;gap:6px;align-items:center;font-size:11px}
.pbi-step-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);font-weight:600}
.pbi-step-val{font-size:10.5px;color:var(--muted);font-variant-numeric:tabular-nums}
.pbi-spec-note{font-size:11.5px;color:var(--ink);margin:0;background:var(--soft);padding:7px 9px;border-radius:7px}
.pbi-spec-card-foot{margin-top:auto;padding-top:6px}
.pbi-spaces-mini{display:flex;flex-direction:column;gap:4px}
.pbi-spaces-chips{display:flex;flex-wrap:wrap;gap:4px}
.pbi-space-pill{font-size:10.5px;padding:2px 7px;border-radius:999px;background:var(--soft);border:1px solid var(--line)}

.pbi-findings-box{background:white;border:1px solid var(--line);border-radius:12px;padding:14px}
.pbi-findings-box h5{margin:0 0 10px;font-size:13px;font-weight:800;color:var(--ink)}
.pbi-findings-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:10px}
.pbi-finding-item{padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:#f8fafc;border-left:4px solid #f59e0b}
.pbi-finding-item.is-critical{border-left-color:#dc2626;background:#fff5f5}
.pbi-finding-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:4px;font-size:11.5px}
.pbi-finding-q{font-size:12px;font-weight:750;color:var(--ink);margin-bottom:4px}
.pbi-finding-obs{font-size:11.5px;color:#334155;font-style:italic}

/* Soporte Modo Oscuro (html.theme-dark) para Power BI Dashboard */
html.theme-dark .pbi-slicers-card,
html.theme-dark .pbi-hero-card,
html.theme-dark .pbi-kpi-card,
html.theme-dark .pbi-spec-detail-card,
html.theme-dark .pbi-findings-box{background:#1e293b;border-color:#334155;color:#f8fafc}
html.theme-dark .pbi-hero-global{background:linear-gradient(145deg,#1e293b 0%,#0f172a 100%)}
html.theme-dark .pbi-hero-featured.hero-banner{background:#131e32;border-color:#1e3a5f}
html.theme-dark .pbi-scope-badge{background:#1e3a5f;border-color:#2563eb;color:#93c5fd}
html.theme-dark .pbi-spec-pill{background:#0f172a;border-color:#334155;color:#e2e8f0}
html.theme-dark .pbi-spec-pill:hover{border-color:#38bdf8;background:#1e3a5f}
html.theme-dark .pbi-spec-pill.active{background:#2563eb;border-color:#38bdf8;color:#ffffff}
html.theme-dark .pbi-spec-pill-count{background:#1e293b;color:#94a3b8}
html.theme-dark .pbi-spec-pill-count.has-active{background:#1e3a5f;color:#7dd3fc}
html.theme-dark .pbi-filter-chip{background:#1e3a5f;border-color:#2563eb;color:#93c5fd}
html.theme-dark .pbi-reset-btn{background:#3f1d1d;border-color:#7f1d1d;color:#fecaca}
html.theme-dark .pbi-donut-track{stroke:#334155}
html.theme-dark .pbi-donut-inner-track{stroke:#1e293b}
html.theme-dark .pbi-split-stat,
html.theme-dark .pbi-legend-item,
html.theme-dark .pbi-spec-row,
html.theme-dark .pbi-group-row,
html.theme-dark .pbi-tech-item,
html.theme-dark .pbi-cell-spec-btn{background:#0f172a;border-color:#334155;color:#f8fafc}
html.theme-dark .pbi-spec-row.selected,
html.theme-dark .pbi-group-row.selected,
html.theme-dark .pbi-kpi-card.active,
html.theme-dark .pbi-legend-item.active{background:#1e3a5f;border-color:#38bdf8;color:#f8fafc}
html.theme-dark .stat-sent .pbi-split-pct,html.theme-dark .text-sent{color:#60a5fa}
html.theme-dark .stat-progress .pbi-split-pct,html.theme-dark .text-prog{color:#38bdf8}
html.theme-dark .stat-checklist .pbi-split-pct{color:#818cf8}
html.theme-dark .pbi-bar-stack-lg,
html.theme-dark .pbi-bar-stack,
html.theme-dark .pbi-bar-track{background:#334155}
html.theme-dark .pbi-featured-spec-chip{background:#0f172a;border-color:#334155;color:#f8fafc}
html.theme-dark .pbi-featured-finding{background:#0f172a;border-color:#334155;color:#e2e8f0}
html.theme-dark .pbi-featured-finding.is-critical{background:#3f1d1d;border-color:#7f1d1d;color:#fecaca}
html.theme-dark .pbi-matrix-row.row-active{background:#131e32}
html.theme-dark .pbi-matrix-row.row-expanded{background:#1e3a5f}
html.theme-dark .pbi-drilldown-row td{background:#0b1120;border-bottom-color:#334155}
html.theme-dark .pbi-finding-item{background:#0f172a;border-color:#334155}
html.theme-dark .pbi-finding-item.is-critical{background:#2d1619;border-left-color:#ef4444}
html.theme-dark .pbi-finding-obs{color:#cbd5e1}

@media(max-width:1280px){
  .pbi-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .pbi-drilldown-specs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pbi-slicer-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pbi-slicer-search{grid-column:1/-1}
}
@media(max-width:960px){
  .pbi-hero-grid,.pbi-charts-grid{grid-template-columns:1fr}
}
@media(max-width:640px){
  .pbi-kpi-grid,.pbi-drilldown-specs,.pbi-slicer-controls,.pbi-tech-summary{grid-template-columns:1fr}
  .pbi-hero-body{grid-template-columns:1fr}
}
.env-banner{position:sticky;top:0;z-index:9999;background:#b45309;color:#fff;text-align:center;font-weight:800;letter-spacing:.04em;padding:4px 8px;font-size:12px}

/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}:root,:host{--color-slate-50:oklch(98.4% .003 247.858);--color-slate-900:oklch(20.8% .042 265.755);--color-white:#fff;--radius-2xl:1rem}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.block{display:block}.grid{display:grid}.hidden{display:none}.table{display:table}.border-collapse{border-collapse:collapse}.border{border-style:var(--tw-border-style);border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.filter{filter:var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, )}:root{--ink:#1e293b;--muted:#64748b;--line:#e2e8f0;--green:#166534;--soft:#f4f7fb}body{background-color:var(--color-slate-50);color:var(--color-slate-900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3{color:var(--ink);text-wrap:balance}h1{letter-spacing:-.035em}h2{letter-spacing:-.02em}button,a.btn,input,textarea,select,summary{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #2563eb}.panel,.map-card,.selection,.side,.metric,.specialty-nav{border-color:var(--line);box-shadow:0 1px 3px #0000000a}.panel,.map-card,.selection,.side{border-radius:var(--radius-2xl);background-color:var(--color-white)}.panel h2,.section-head h2,.map-head h2{font-size:clamp(19px,1.7vw,26px);font-weight:750;line-height:1.25}.muted,.small,small{color:var(--muted)}.section-head,.map-head{padding-top:23px;padding-bottom:23px}header{border-bottom:1px solid var(--line);background:#fff}.top{border-bottom:0}.top h1{font-size:clamp(28px,3vw,40px)}.tabs button{border-radius:10px 10px 0 0;padding:14px 16px;font-weight:650}.tabs button.active{color:#2563eb;background:#edf4fc;border-bottom-color:#2563eb}.metrics,.facts{gap:14px}.metric{border:1px solid var(--line);border-radius:14px;padding:19px}.metric strong{color:#1e293b;font-weight:850;line-height:1.1}.metric small{margin-top:5px;line-height:1.5}.filterbar,.filters{border:1px solid var(--line);background:#fff;border-radius:14px;align-items:end;padding:16px}.filterbar label,.filters label{color:var(--ink);font-size:13px;font-weight:700}.location-badge{white-space:normal;border:1px solid #0000;border-radius:99px;align-items:center;gap:7px;min-height:27px;padding:3px 10px;font-size:11px;font-weight:650;line-height:1.4;display:inline-flex}.location-badge i{background:currentColor;border-radius:50%;flex:0 0 6px;width:6px;height:6px}.location-record{color:#28648a;background:#eef5fb;border-color:#d7e7f3}.location-approximate{color:#856015;background:#fff8e7;border-color:#eee0b7}.location-pending{color:#9c4c32;background:#fff1eb;border-color:#efdbd0}.location-reference{color:#5b6a79;background:#f1f4f6;border-color:#dce3e8}table{font-size:13px;line-height:1.55}th{color:#476273;text-align:left;background:#f4f8fa;padding-top:15px;padding-bottom:15px;font-weight:700}td{vertical-align:middle;text-align:left;padding-top:17px;padding-bottom:17px}td small{margin-top:6px;font-size:11px;line-height:1.5;display:block}tbody tr:hover{background:#f8fbfc}.catalog .table-wrap{border-radius:0 0 15px 15px}.catalog .section-head{padding-left:24px;padding-right:24px}.specialty-nav{background:#f8fbfa;border-left:3px solid #237d65;border-radius:14px;padding:22px}.specialty-nav h2{font-size:21px}.specialty-nav .area-tabs{gap:9px;margin-top:18px}.specialty-nav button{border-radius:10px;padding:12px 17px;font-size:12px;font-weight:650}.specialty-nav button.active{color:#fff;background:#237d65;border-color:#237d65}.capture-layout{gap:22px}.unit-list .unit{border-radius:12px;padding:16px;transition:background .15s}.unit-list .unit.active{background:#eef4fb;border-color:#bae6fd;box-shadow:inset 3px 0 #2563eb}.unit-list .unit b{font-size:13px;line-height:1.5}.editor-head{border-bottom:1px solid var(--line);margin-bottom:18px;padding-bottom:17px}.editor-head h2{font-size:clamp(23px,2.4vw,31px);font-weight:800;line-height:1.2}.question{border:1px solid var(--line);background:#fff;border-radius:14px;margin-bottom:18px;padding:22px}.question>h3{color:var(--ink);margin-top:7px;margin-bottom:15px;font-size:16px;font-weight:800;line-height:1.45}.question>p.small{color:var(--muted);font-weight:600}.question:focus-within{border-color:#2563eb;box-shadow:0 0 0 2px #2563eb26}.rating{border-radius:9999px;min-height:38px;font-size:12px;font-weight:700}.ratings{gap:9px;margin:15px 0}.checklist-guide{background:#eef4fb;border-color:#dce7f5;border-radius:14px;padding:20px}.guided-select summary{min-height:46px}.guided-options button{min-height:44px}.fields{gap:18px}.sticky-actions{border:1px solid var(--line);background:#fffffff2;border-radius:12px;gap:10px;padding:14px 20px;box-shadow:0 -4px 20px #0000000a}.connection{border-radius:10px;padding:12px 16px;line-height:1.5}.save-line{color:var(--green);font-weight:600}.login h1{font-size:38px;line-height:1.12}.login .panel{padding:28px}.login .panel h2{margin-bottom:24px}.release-card{border:1px solid #dce7eb;border-radius:14px;margin:18px 0;padding:22px}.release-card label{margin:15px 0;display:block}.release-card input,.release-card textarea{width:100%}.release-card progress{width:100%;height:8px}.release-meta{background:#f5f9fb;border-radius:12px;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin:16px 0;padding:18px;display:grid}.specialty-switcher{background:#fff;border:1px solid #dce7eb;border-radius:10px;width:fit-content;max-width:100%;margin:14px 0}.specialty-switcher>summary{cursor:pointer;color:#526b78;align-items:center;gap:8px;padding:10px 13px;font-size:12px;list-style:none;display:flex}.specialty-switcher>summary::-webkit-details-marker{display:none}.specialty-switcher strong{color:#245f4e}.specialty-switcher>summary>span{color:#286d9b;margin-left:16px;font-weight:600}.specialty-switcher .area-tabs{flex-wrap:wrap;gap:7px;margin:0;padding:0 12px 12px;display:flex}.specialty-switcher .area-tabs button{border-radius:9px;padding:10px 12px;font-size:12px}.specialty-switcher .area-tabs button.active{color:#1d705b;background:#edf7f2;border-color:#237d65}.specialty-switcher .small{padding:0 13px 10px}#connection-status[hidden],#offline-package-status[hidden]{display:none!important}@media (max-width:760px){.question{padding:17px}.ratings{gap:6px}.rating{flex:1;min-width:70px}.specialty-nav{padding:16px}.specialty-nav .area-tabs{grid-template-columns:1fr 1fr;display:grid}.specialty-nav button{padding:11px 8px}.filterbar,.filters{padding:12px}.top h1{font-size:30px}.tabs{gap:4px;overflow:auto}.tabs button{flex-shrink:0;padding:12px;font-size:12px}.section-head,.map-head{padding:18px}.catalog .table-wrap{overflow-x:auto}table,.question table{min-width:720px}.login .panel{padding:20px}.login h1{font-size:32px}}.location-confirmed{color:#216549;background:#e9f6ee;border-color:#c6e4d3}.ops-panel .section-head{align-items:flex-start;padding:0}.ops-panel .section-head>div:last-child{flex-wrap:wrap;gap:8px;display:flex}.ops-editor{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}.ops-panel .fields{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-panel .metric strong{font-size:21px}@media (max-width:760px){.ops-panel .fields{grid-template-columns:1fr}.ops-panel .section-head{display:block}.ops-panel table{min-width:640px}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}
/* Final layer for the capture app. Keep this after the shared visor styles. */
:root {
  color-scheme: light;
  --ink: #2d3748;
  --muted: #4b5d73;
  --blue: #2c5282;
  --soft: #f8f9fa;
  --surface: #fff;
  --surface-alt: #edf2f7;
  --control-line: #718096;
  --heading: #2c5282;
  --number: #101318;
  --focus: #2c5282;
}
html.theme-dark {
  color-scheme: dark;
  --ink: #f8fafc;
  --soft: #0b1120;
  --surface: #1e293b;
  --surface-alt: #24334a;
  --control-line: #94a3b8;
  --heading: #dbeafe;
  --number: #f8fafc;
  --focus: #7dd3fc;
  --muted: #b8c6d8;
}
html body { background: var(--soft); color: var(--ink); }
html .shell { max-width: 1440px; padding: 28px 32px 56px; }
html h1,html h2,html h3,html .dash-title,html .card-heading,html .hero-unit-name { color: var(--heading); }
html .dash-title { font-size: clamp(30px,3.4vw,46px); line-height: 1.15; letter-spacing: -.04em; }
html .dash-subtitle { font-size: 16px; color: var(--muted); }
html .dash-eyebrow,html .hero-info .pill-label { color: var(--blue); }
html .panel,html .card,html .metric,html .metric-card,html .unit,html .question,
html .filterbar,html .filters,html .login,html .specialty-switcher { background: var(--surface); color: var(--ink); }
html .small,html small,html .muted,html .metric-label,html .unit-cell-sub,
html .hero-meta,html .gauge-sub,html .dash-subtitle,html .question>p.small { color: var(--muted); }
html .metric strong,html .metric-num,html .gauge-percent,html .completion b { color: var(--number); }
html .metric-num { font-size: 38px; }
html label,html .filterbar label,html .filters label { color: var(--ink); font-size: 14px; line-height: 1.5; }
html input:not([type=checkbox],[type=radio]),html select,html textarea {
  background-color: var(--surface); color: var(--ink); border-color: var(--control-line);
  -webkit-text-fill-color: currentColor; min-width: 0; min-height: 46px; font-size: 15px;
}
html input::placeholder,html textarea::placeholder { color: var(--muted); opacity: 1; -webkit-text-fill-color: currentColor; }
html select option { background: var(--surface); color: var(--ink); }
html input[type=file] { background: var(--surface); color: var(--ink); max-width: 100%; white-space: normal; }
html input[type=file]::file-selector-button {
  background: var(--surface-alt); color: var(--ink); border: 1px solid var(--control-line);
  padding: 10px 12px; border-radius: 8px; max-width: 100%;
}
html .guided-select summary { background: var(--surface); color: var(--ink); border-color: var(--control-line); min-height: 46px; padding: 12px 38px 12px 14px; position: relative; }
html .guided-select summary::after { position: absolute; right: 14px; top: 12px; color: var(--ink); }
html .guided-options { background: var(--surface-alt); border-color: var(--control-line); }
html .guided-options button { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
html .guided-options button[aria-pressed=true] { background: var(--surface-alt); color: var(--ink); border: 2px solid var(--focus); }
html .guided-select[open]>summary { outline: 2px solid var(--focus); outline-offset: 2px; }
html .rating { min-height: 44px; padding: 10px 14px; font-size: 14px; border-color: var(--control-line); color: var(--ink); background: var(--surface); }
html .rating:has(input:checked) { border: 2px solid var(--focus); box-shadow: 0 0 0 1px var(--focus); }
html:not(.theme-dark) .rating.CUMPLE { background: #e6f4ea; color: #176430; }
html:not(.theme-dark) .rating.ATENCION { background: #fef7e0; color: #805000; }
html:not(.theme-dark) .rating.CRITICO { background: #fce8e6; color: #a8201d; }
html .rating input { flex-shrink: 0; }
html.theme-dark .rating.CUMPLE { background: #16362b; color: #a7f3c0; }
html.theme-dark .rating.ATENCION { background: #3b301b; color: #fde6a2; }
html.theme-dark .rating.CRITICO { background: #402329; color: #fecaca; }
html.theme-dark input:not([type=checkbox],[type=radio]),html.theme-dark select,html.theme-dark textarea {
  border-color: var(--control-line)!important;
}
html.theme-dark select {
  background-repeat: no-repeat!important;
  background-position: right 12px center!important;
  background-size: 16px 16px!important;
}
html button:focus-visible,html a:focus-visible,html input:focus-visible,html select:focus-visible,html textarea:focus-visible,html summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
html .question-data,html .aligned-table,html .person-card,html .person-details>section,
html .person-document-group,html .pdf-card,html .release-meta { background: var(--surface); color: var(--ink); border-color: var(--line); }
html .person-observations { background: var(--surface-alt); color: var(--ink); }
html .person-observations b,html .person-observations strong { color: var(--ink); }
html .hero-banner { padding: 28px; gap: 28px; background: var(--surface-alt); }
html .hero-unit-name { font-size: 30px; }
html .btn-action-primary,html .brand-badge-icon { background: #2c5282; color: #fff; }
html .btn-action-primary { min-height: 48px; padding: 12px 18px; font-size: 15px; }
html .btn-action-primary:hover { background: #213e63; }
html.theme-dark .btn-action-primary { background: #2c5282; color: #fff; }
html.theme-dark .btn-action-primary:hover { background: #213e63; }
html .gauge-wrapper { width: 160px; height: 160px; }
html .gauge-svg { width: 150px; height: 150px; }
html .gauge-percent { font-size: 32px; }
html .metrics-row { gap: 0; border-block: 1px solid var(--line); }
html .metric-card { border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; padding: 20px; }
html .metric-card:last-child { border-right: 0; }
html .card-heading { font-size: 23px; }
html .card-link { color: var(--blue); }
html .clean-table td { color: var(--ink); }
html .unit-cell-title { color: var(--ink); overflow-wrap: anywhere; }
html .unit-cell-sub { overflow-wrap: anywhere; }
html .unit-info-cell { min-width: 0; }
html .dashboard-split>* { min-width: 0; }
html .shell>* { min-width: 0; max-width: 100%; }
html .fields>* { min-width: 0; }
html .step-navigation { flex-wrap: wrap; }
html .app-topbar { flex-wrap: wrap; }
html .brand-group,html .topbar-actions { min-width: 0; flex-wrap: wrap; }
html.theme-dark .guided-options button:hover { background: #334155; }
html.theme-dark .hero-info .pill-label { color: #7dd3fc; }
html.theme-dark .specialty-switcher strong { color: #a7f3d0; }
html.theme-dark .theme-switch-btn.active { color: #f8fafc; }
@media(max-width:1000px) {
  html .filterbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html .dashboard-split { grid-template-columns: 1fr; }
}
@media(max-width:760px) {
  html .shell { padding: 20px 16px 40px; }
  html .app-topbar { padding: 16px; }
  html .hero-banner { padding: 20px; gap: 16px; }
  html .hero-unit-name { font-size: 25px; }
  html .gauge-wrapper { width: 120px; height: 120px; }
  html .gauge-svg { width: 110px; height: 110px; }
  html .metrics-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  html .metric-card { padding: 16px 10px; flex-wrap: wrap; gap: 10px; }
  html .metric-num { font-size: 30px; }
  html .metric-label { font-size: 12px; }
  html .card { padding: 18px; }
  html .ratings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  html .rating { min-width: 0; font-size: 13px; padding: 10px; }
  html input:not([type=checkbox],[type=radio]),html textarea,html select { font-size: 16px; }
  html .clean-table { min-width: 0; table-layout: fixed; }
  html .clean-table th,html .clean-table td { padding: 12px 5px; overflow-wrap: anywhere; }
  html .clean-table th:first-child { width: 46%; }
  html .unit-info-cell { align-items: flex-start; gap: 6px; }
  html .unit-store-icon { display: none; }
  html .pill-badge { white-space: normal; padding: 4px 6px; }
  html .card-header-line { gap: 12px; flex-wrap: wrap; }
}
@media(max-width:420px) { html .filterbar { grid-template-columns: minmax(0,1fr); } }
@media(max-width:360px) {
  html .metrics-row { grid-template-columns: minmax(0,1fr); }
  html .metric-card { border-right: 0; border-bottom: 1px solid var(--line); }
  html .metric-card:last-child { border-bottom: 0; }
}
/* Navegación lateral, con el contenido independiente del ancho del menú. */
body.has-sidebar { --nav-width: 236px; }
body.has-sidebar.nav-collapsed { --nav-width: 68px; }
body.has-sidebar .shell { margin-left:var(--nav-width); width:calc(100% - var(--nav-width)); max-width:none; padding:24px; }
body.has-sidebar #app-navigation { position:fixed; inset:0 auto 0 0; width:var(--nav-width); padding:calc(var(--topbar-height,100px) + 12px) 10px 20px; display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; overflow-y:auto; overflow-x:hidden; background:var(--surface,#fff); border-right:1px solid var(--border,#dde1e9); z-index:20; gap:6px; }
body.has-sidebar .app-topbar { position:relative; z-index:30; }
body.has-sidebar #app-navigation .tab-item { width:100%; flex-shrink:0; justify-content:flex-start; text-align:left; padding:12px; border-radius:8px; white-space:normal; }
body.has-sidebar #app-navigation svg { flex-shrink:0; }
body.nav-collapsed #app-navigation .tab-item span { display:none; }
html.theme-dark body.has-sidebar #app-navigation { background:#172130; }
@media(max-width:700px){body.has-sidebar .shell{margin-left:0;width:100%;padding:16px}body.has-sidebar #app-navigation{top:0;padding-top:calc(var(--topbar-height,160px) + 12px);width:min(280px,85vw);box-shadow:8px 0 24px #0003}body.nav-collapsed #app-navigation{display:none}body.has-sidebar:not(.nav-collapsed) .shell > :not(nav){opacity:.55;pointer-events:none}}

#sos {border-color:#ad2636;color:#ad2636;font-weight:800}html.theme-dark #sos{color:#ffb4b4}.sos-dialog{max-width:min(90vw,480px);color:var(--ink);background:var(--surface)}.sos-dialog::backdrop{background:#0008}
