/* b20cn: identical pictograms, clear message counter and structured reception sheets. */
body .bpe-picto-marker.bpe-legend-marker.bpe-legend-marker>span{color:#fff!important;filter:brightness(0) invert(1) drop-shadow(0 1px 1px #0006)!important;font-family:system-ui,"Segoe UI Symbol","Segoe UI Emoji",sans-serif!important}
body .bpe-symbol.economic,body .stake-map-marker.economic,body .stake-marker.economic{background:#674080!important;--bpe-color:#674080}
.top-actions #communicationDock{overflow:visible!important;display:flex!important;align-items:stretch!important;border-radius:12px!important;box-shadow:0 3px 12px #12384a18!important}
.top-actions #communicationDock .communication-dock-main{display:flex!important;align-items:center!important;height:40px!important;min-height:40px!important;gap:8px!important;padding:0 12px!important;max-width:none!important;width:auto!important;white-space:nowrap;overflow:visible!important;border-radius:12px 0 0 12px!important}
.top-actions #communicationDock .communication-dock-compose{height:40px!important;min-height:40px!important;width:38px!important;min-width:38px!important;max-width:38px!important;border-radius:0 12px 12px 0!important}
.top-actions #communicationDock #floatingCommBadge:not([hidden]){position:static!important;flex:0 0 auto;min-width:24px!important;width:auto!important;height:24px!important;padding:0 6px!important;line-height:20px!important;font-size:12px!important;transform:none!important;box-shadow:none!important;margin:0!important;overflow:visible!important;border:2px solid #fff!important;border-radius:999px!important}
.top-actions #communicationDock .communication-dock-grip{display:none!important}
.vr-site-detail{display:grid;gap:16px}.vr-site-detail-hero{display:flex;gap:12px;align-items:center;padding:16px;background:#edf4f7;border:1px solid #d4e1e7;border-radius:12px}.vr-site-detail-hero p{margin:4px 0}.vr-site-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.vr-site-detail-section{border:1px solid #d4e1e7;border-radius:12px;padding:14px}.vr-site-detail-section h4{margin:0 0 10px;color:#244c63}.vr-site-detail-section p{margin:6px 0}.vr-site-detail-services{display:flex;flex-wrap:wrap;gap:7px}.vr-site-detail-services span{padding:5px 9px;background:#edf4f7;border-radius:8px;font-size:13px}.vr-site-contact{padding:9px 0;border-bottom:1px solid #edf4f7}.vr-site-contact:last-child{border-bottom:0}.vr-site-status{padding:12px;border-left:4px solid #267b66;background:#eef7f3;border-radius:8px}.vr-site-detail .vr-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.vr-site-detail .vr-metrics>span{display:block;padding:12px;background:#f4f7f9;border-radius:10px}.vr-site-detail .vr-metrics strong{display:block;margin-top:4px;font-size:22px;color:#244c63}
body .report-map-marker .report-category-emoji{text-shadow:-1px -1px 0 #f4c430,1px -1px 0 #f4c430,-1px 1px 0 #f4c430,1px 1px 0 #f4c430!important}
body .legend-report-triangle{border-bottom-color:#f4c430!important}
@media(max-width:760px){.top-actions #communicationDock .communication-dock-label{display:none!important}.top-actions #communicationDock .communication-dock-main{min-width:40px!important;max-width:none!important;padding:0 8px!important}.vr-site-detail-grid{grid-template-columns:1fr}.vr-site-detail .vr-metrics{grid-template-columns:1fr 1fr}}

body .report-category-triangle .triangle-shell{stroke:#f4c430!important}

.vr-prep-dialog .vr-site-detail-actions{display:flex!important;gap:8px;flex-wrap:wrap;margin-right:auto}

body .bpe-picto-marker.economic,body .bpe-symbol.economic>span,body .bpe-symbol.economic .bpe-picto-marker,body [data-bpe-category="economic"]~.bpe-symbol,body [data-ac-bpe-layer="economic"]~.bpe-symbol{background:#674080!important;--bpe-color:#674080!important}
.vr-site-card .mean-stock-box strong{overflow-wrap:anywhere}.vr-site-card .mean-stock-box:last-child strong{font-size:14px}

#directoryTable .table-actions .directory-share-button{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;min-width:0!important;min-height:26px!important;height:auto!important;padding:3px 6px!important;border:1px solid transparent!important;border-radius:5px!important;background:transparent!important;box-shadow:none!important;font-size:.72rem!important;font-weight:600!important;color:#527085!important;line-height:1.35!important;white-space:nowrap}
#directoryTable .table-actions .directory-share-button:hover,#directoryTable .table-actions .directory-share-button:focus-visible{background:#e3edf4!important;color:#244c63!important}
#directoryTable .table-actions .directory-share-button[aria-pressed="true"]{color:#316c5a!important}

.stakes-bpe-subgroup>.muted.mini{font-size:11px;margin:8px 0}


/* Cohérence graphique b20cw : composantes opérationnelles */
#communicationDock{display:inline-flex;align-items:center;gap:4px;padding:3px;border:1px solid #42627a;border-radius:13px;background:#1b405c;box-shadow:none;overflow:visible}
#communicationDock .communication-dock-main,#communicationDock .communication-dock-compose{font-family:inherit!important;color:#f7fbfe!important;background:transparent!important;border:0!important;border-radius:9px!important;box-shadow:none!important;font-size:12px!important;min-height:34px!important}
#communicationDock .communication-dock-main{display:inline-flex!important;align-items:center;gap:8px;padding:7px 9px!important}
#communicationDock .communication-dock-icon{width:18px;height:18px;color:#fff}
#communicationDock .communication-dock-compose{width:31px!important;min-width:31px!important;padding:5px!important;border-left:1px solid #4c6b80!important;font-size:19px!important}
#communicationDock .communication-dock-main:hover,#communicationDock .communication-dock-compose:hover{background:#2a5673!important}
#communicationDock .communication-dock-badge:not([hidden]){background:#bf434b!important;color:#fff!important;border:2px solid #153249;position:absolute;right:29px;top:-6px}
.watch-threshold-dialog{font-family:inherit}
.watch-threshold-dialog button:not(.primary){font-family:inherit;font-weight:600;font-size:12px!important;min-height:34px;padding:7px 11px;background:#f7fafc;color:#284d65;border:1px solid #cbdce6;border-radius:9px;box-shadow:none;cursor:pointer}
.watch-threshold-dialog button:not(.primary):hover{background:#e9f3f8}
.watch-threshold-dialog button[data-test-delivery]{background:#eaf4fb;color:#145e89;border-color:#a6cedf}
.watch-threshold-dialog button[data-close]{min-height:31px}
.hero,.phase-card,.coordination-alert{font-family:inherit}
.hero #activeEventTitle{font-family:inherit;font-size:clamp(23px,2.2vw,28px);font-weight:750;letter-spacing:-.018em;line-height:1.2}
.hero .active-event-meta{font-family:inherit;font-size:12px;font-weight:500;color:#6b8090}
.hero .active-event-description{font-family:inherit;font-size:16px;font-weight:400}
.hero .event-status-banner strong{font-family:inherit;font-size:13px;font-weight:650}
.phase-card .eyebrow,.hero .eyebrow{font-family:inherit;font-size:11px;font-weight:650;letter-spacing:.055em}
.phase-card .phase-plan-line{font-family:inherit}
.dashboard-information-panel,.coordination-alert{font-family:inherit}
.tablewrap:has(.hazards-coverage-table){overflow:auto;max-height:min(74vh,780px);scrollbar-gutter:stable;border:1px solid #d8e5ed;border-radius:11px}
.hazards-coverage-table{border-collapse:separate!important;border-spacing:0;min-width:1100px}
.hazards-coverage-table thead th{position:sticky;top:0;z-index:5;background:#edf4f8!important;border-bottom:2px solid #b9cedc;padding:12px 9px!important;vertical-align:top;text-align:left!important;font-family:inherit;font-size:12px;font-weight:700;line-height:1.35;color:#213c51}
.hazards-coverage-table thead .hazard-card-icon{width:23px!important;height:23px!important}
.hazards-coverage-table thead svg{width:19px!important;height:19px!important}
.hazards-coverage-table tbody td{padding:11px 9px!important;vertical-align:top!important;text-align:left!important;border-bottom:1px solid #d6e3eb}
.hazards-coverage-table tbody tr:nth-child(even) td{background:#f4f8fa}
.hazards-coverage-table tbody tr:hover td{background:#e8f2f8}
.hazards-coverage-table th:first-child,.hazards-coverage-table td:first-child{position:sticky;left:0;min-width:165px;max-width:185px;z-index:4;background:#fff}
.hazards-coverage-table thead th:first-child{z-index:7;background:#edf4f8!important}
.hazards-coverage-table tbody tr:nth-child(even) td:first-child{background:#f4f8fa}
.hazards-coverage-table .hazard-exposure-cell{gap:5px}
.hazards-coverage-table .hazard-submetric{margin:1px 0!important;gap:5px!important}
.hazards-coverage-table .hazard-card-icon{width:18px!important;height:18px!important;flex-shrink:0}
.hazards-coverage-table .hazard-asset-grid{gap:3px!important}

/* Header geometry: messaging follows the account pill. */
.top-actions{--header-control-radius:999px;--header-control-height:32px}
.top-actions #topAccountIdentity,.top-actions #communicationDock{box-sizing:border-box!important;height:var(--header-control-height)!important;min-height:var(--header-control-height)!important;border-radius:var(--header-control-radius)!important}
.top-actions #communicationDock{align-items:center!important;gap:0!important;padding:0!important;border:1px solid rgba(255,255,255,.22)!important;background:rgba(255,255,255,.10)!important;box-shadow:none!important;overflow:visible!important}
.top-actions #communicationDock .communication-dock-main,.top-actions #communicationDock .communication-dock-compose{box-sizing:border-box!important;height:30px!important;min-height:30px!important;margin:0!important;color:#fff!important;background:transparent!important}
.top-actions #communicationDock .communication-dock-main{padding:0 11px!important;gap:6px!important;font:700 11px/1.2 "Segoe UI",Arial,sans-serif!important;min-width:30px!important;max-width:none!important;border-radius:999px 0 0 999px!important}
.top-actions #communicationDock .communication-dock-compose{width:30px!important;min-width:30px!important;max-width:30px!important;padding:0!important;border-left:1px solid rgba(255,255,255,.22)!important;border-radius:0 999px 999px 0!important;font-size:19px!important}
.top-actions #communicationDock .communication-dock-main:hover,.top-actions #communicationDock .communication-dock-compose:hover{background:rgba(255,255,255,.17)!important}
.top-actions #communicationDock #floatingCommBadge:not([hidden]){position:static!important;box-sizing:border-box!important;min-width:20px!important;height:20px!important;padding:0 5px!important;border:0!important;font-size:10px!important;line-height:20px!important}
.top-actions #communicationDock button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media(max-width:760px){.top-actions #communicationDock .communication-dock-main{padding:0 8px!important}}

/* Analysis secondary counts stay within their parent metric. */
.analysis-metric .analysis-dwellings-detail{display:block;font-size:10px!important;line-height:1.35;font-weight:400!important;color:#617789;margin-top:3px}
.analysis-metric .analysis-employment-detail{display:grid;gap:3px;margin-top:7px;padding-top:6px;border-top:1px solid #e8eef2}
.analysis-metric .analysis-employment-detail>span{font-size:10px!important;line-height:1.3;text-transform:none!important;letter-spacing:0!important;font-weight:500!important;min-height:0!important;padding:0!important;color:#617789}
.analysis-metric .analysis-employment-detail>strong{font-size:14px!important;line-height:1.2;font-weight:650!important}

/* Analysis scrolling is available before any drag. */
#mapAnalysisPopover #analysisPanelContent{min-height:0;overflow-y:scroll!important;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#8aa0ae #edf2f5}
#mapAnalysisPopover #analysisPanelContent::-webkit-scrollbar{width:8px}
#mapAnalysisPopover #analysisPanelContent::-webkit-scrollbar-track{background:#edf2f5;border-radius:8px}
#mapAnalysisPopover #analysisPanelContent::-webkit-scrollbar-thumb{background:#8aa0ae;border-radius:8px;border:2px solid #edf2f5}

/* Compact public version, shared by territorial and partner headers. */
.topbar-signature-wrap{flex-direction:row;align-items:center;justify-content:flex-end;justify-self:end;text-align:right;white-space:nowrap;line-height:1.1}
.topbar .topbar-signature,#acWorkspace .ac-main-topbar .topbar-signature{padding-right:0;text-align:right;white-space:nowrap}
.topbar-public-version{font-size:inherit;font-weight:600}

/* Grouped perimeter inventory and adjacent exports. */
.vr-analysis-detail-table{width:100%;overflow-x:auto;margin-top:8px}.vr-analysis-detail-table table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px}.vr-analysis-detail-table th,.vr-analysis-detail-table td{padding:6px 8px;text-align:left;vertical-align:top;overflow-wrap:anywhere;border-bottom:1px solid #d4e1e7}.vr-analysis-detail-table .vr-analysis-group th{background:#edf4f7;color:#244c63;font-weight:700}.vr-analysis-exports{display:flex;flex-wrap:nowrap;gap:8px}.vr-analysis-exports button{flex:1 1 0;min-width:0;padding:7px 8px;font-size:11px;white-space:nowrap}

/* Compact description, without a redundant name heading. */
.vr-analysis-detail-table table{font-size:10px!important;line-height:1.3}.vr-analysis-detail-table th,.vr-analysis-detail-table td{font-size:10px!important;padding:5px 6px!important;line-height:1.3!important}.vr-analysis-detail-table .vr-analysis-item-name{font-size:10px!important;font-weight:500}.vr-analysis-detail-table .vr-analysis-item-type{font-size:9px!important;color:#718391;margin-top:2px}.vr-analysis-count-note{font-size:9px!important;line-height:1.35}

.analysis-sensitive-detail{font-size:10px;line-height:1.3;color:#718391;margin-top:3px}

/* Compact territorial equipment popup. */
.leaflet-popup-content .bpe-popup{font-size:11px!important;line-height:1.35!important;min-width:220px}.leaflet-popup-content .bpe-popup h4{font-size:13px!important;line-height:1.25!important;margin-bottom:8px!important}.leaflet-popup-content .bpe-popup-grid,.leaflet-popup-content .bpe-popup-grid b,.leaflet-popup-content .bpe-popup-grid span,.leaflet-popup-content .bpe-popup-local{font-size:11px!important;line-height:1.35!important}.leaflet-popup-content .bpe-popup-grid{gap:5px 9px!important}.leaflet-popup-content .bpe-popup .map-popup-last-update{font-size:10px!important;line-height:1.35!important;color:#8393a2!important;font-weight:400!important}.leaflet-popup-content .bpe-popup .map-popup-last-update b{font-size:9px!important;font-weight:500!important}.leaflet-popup-content .bpe-popup-actions{display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:flex-end;gap:6px!important;margin-top:8px!important;padding-top:8px!important}.leaflet-popup-content .bpe-popup-actions button{font-size:11px!important;line-height:1.3!important;min-height:28px!important;padding:5px 9px!important}.leaflet-popup-content .bpe-popup-actions [data-bpe-edit],.leaflet-popup-content .bpe-popup-actions [data-ac-map-edit]{background:#e5f0f6!important;border-color:#c7d7e0!important;color:#244c63!important}.leaflet-popup-content .bpe-popup-actions [data-bpe-edit]:hover,.leaflet-popup-content .bpe-popup-actions [data-ac-map-edit]:hover{background:#d6e8f3!important}.leaflet-popup-content .bpe-popup .bpe-sensitivity:not(.standard){display:inline-flex;justify-self:start;align-self:start;padding:2px 6px;border-radius:5px;border:1px solid #e3c6c6;background:#fff2f2!important;color:#934343!important;font-size:10px!important;line-height:1.25!important;font-weight:650}

/* Shared equipment table actions: edit, locate, then delete. */
.bpe-table-actions [data-stake-table-edit],.bpe-table-actions [data-bpe-table-edit],.bpe-table-actions [data-stake-table-map],.bpe-table-actions [data-bpe-table-map]{background:#e5f0f6!important;border-color:#c7d7e0!important;color:#244c63!important}.bpe-table-actions [data-stake-table-edit]:hover,.bpe-table-actions [data-bpe-table-edit]:hover,.bpe-table-actions [data-stake-table-map]:hover,.bpe-table-actions [data-bpe-table-map]:hover{background:#d6e8f3!important}.bpe-table-location-icon{display:block;width:17px;height:17px;flex:0 0 auto}

/* UI1: directory and report actions. */
#directory .directory-top-actions{flex-wrap:nowrap!important;gap:7px}
#directory .directory-top-actions .small{white-space:nowrap;flex:0 0 auto}
#directoryCsvInput[hidden]{display:none!important}
#directory .directory-row-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:5px}
:is(#directoryTable,#logTable) .table-actions .directory-icon-button{display:inline-flex!important;align-items:center;justify-content:center;width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:5px!important;border:1px solid #c7d7e0!important;border-radius:7px!important;background:#e5f0f6!important;color:#244c63!important;box-shadow:none!important}
:is(#directoryTable,#logTable) .table-actions .directory-icon-button:hover{background:#d6e8f3!important}
:is(#directoryTable,#logTable) .table-actions .directory-icon-button.danger-soft{background:#fff2f2!important;border-color:#ead2d2!important;color:#934343!important}
#directoryTable .table-actions .directory-share-button[aria-pressed="true"]{background:#e7f3ed!important;border-color:#c4dfd0!important;color:#316c5a!important}
.directory-action-icon{width:17px;height:17px;display:block}
.leaflet-popup-content .report-popup-actions-labeled{display:flex!important;flex-wrap:wrap!important;gap:5px!important;align-items:center}
.leaflet-popup-content .report-popup-actions-labeled .small{background:#e5f0f6!important;border:1px solid #c7d7e0!important;color:#244c63!important;border-radius:7px!important;padding:5px 8px!important;font-size:11px!important;min-height:30px!important;box-shadow:none!important;flex:0 0 auto!important}
.leaflet-popup-content .report-popup-actions-labeled .small:hover{background:#d6e8f3!important}
.leaflet-popup-content .report-popup-actions-labeled .success-soft{background:#e7f3ed!important;border-color:#c4dfd0!important;color:#316c5a!important}
.leaflet-popup-content .report-popup-actions-labeled .danger-soft{background:#fff2f2!important;border-color:#ead2d2!important;color:#934343!important}
.leaflet-popup-content .report-popup-actions-labeled .report-popup-delete{width:30px!important;min-width:30px!important;padding:5px!important;display:inline-flex!important;align-items:center;justify-content:center}
.report-popup-delete svg{width:17px;height:17px}
#reportDialog .dialog-actions button,#reportDialog .report-draw-actions button{background:#e5f0f6;border-color:#c7d7e0;color:#244c63;border-radius:8px;box-shadow:none}
#reportDialog .dialog-actions button:hover,#reportDialog .report-draw-actions button:hover{background:#d6e8f3}
#reportDeleteDialog #confirmReportDeleteBtn{background:#fff2f2;border-color:#ead2d2;color:#934343;box-shadow:none}
@media(max-width:760px){#directory .section-head{flex-wrap:wrap}#directory .directory-top-actions{max-width:100%;overflow-x:auto;justify-content:flex-start;padding-bottom:3px}}

/* Action column: fit controls within the four-column operational log. */
#log .tablewrap{overflow-x:auto}
#log .log-table-simplified{width:100%!important;min-width:0!important;table-layout:fixed}
#log .log-table-simplified th,#log .log-table-simplified td{box-sizing:border-box;min-width:0!important;vertical-align:top;overflow-wrap:anywhere}
#log .log-table-simplified th:nth-child(1){width:105px}
#log .log-table-simplified th:nth-child(2){width:105px}
#log .log-table-simplified th:nth-child(3){width:auto}
#log .log-table-simplified th:nth-child(4),#log .log-table-simplified td:nth-child(4){width:240px}
#log .log-table-simplified .log-action-cell{min-width:0;max-width:100%;flex-direction:column;align-items:flex-start;gap:6px}
#log .log-table-simplified .log-linked-action{min-width:0;max-width:100%;flex:0 1 auto}
#log .log-table-simplified .log-row-actions{min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:5px}
#log .log-table-simplified .log-action-cell .small{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
@media(min-width:721px) and (max-width:1050px){#log .log-table-simplified th:nth-child(1){width:90px}#log .log-table-simplified th:nth-child(2){width:90px}#log .log-table-simplified th:nth-child(4),#log .log-table-simplified td:nth-child(4){width:190px}}
@media(max-width:720px){
#log .log-table-simplified,#log .log-table-simplified tbody,#log .log-table-simplified tr{display:block;width:100%!important;min-width:0!important;box-sizing:border-box}
#log .log-table-simplified thead{display:none}
#log .log-table-simplified td,#log .log-table-simplified td:nth-child(4){display:block!important;width:100%!important;min-width:0!important;box-sizing:border-box}
#log .log-table-simplified .log-info-cell{min-width:0!important}
#log .log-table-simplified .log-action-cell{flex-direction:column}
}

/* DIR2: keep native picker out of the toolbar even after permissions refresh. */
#directoryCsvInput{display:none!important}
#directoryTable a[href^="tel:"],#directoryTable a[href^="mailto:"],#directoryTable a[href^="tel:"]:visited,#directoryTable a[href^="mailto:"]:visited,#directoryTable a[href^="tel:"]:hover,#directoryTable a[href^="mailto:"]:hover{color:#000!important;text-decoration:none!important}

/* LOG2: shared edit/delete controls and alternating rows. */
#logTable tr:nth-child(odd)>td{background:#fff}
#logTable tr:nth-child(even)>td{background:#edf3f7}
#logTable .log-row-actions .directory-icon-button{flex:0 0 30px}

/* LOG3: operational follow-up filters and status. */
#log .log-primary-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
#log .log-followup-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-items:end;margin-bottom:8px}
#log .log-followup-filters label{display:grid;gap:4px;font-size:11px;color:#607681;min-width:0}
#log .log-followup-filters input,#log .log-followup-filters select{width:100%;min-width:0;box-sizing:border-box;font-size:12px;min-height:34px;padding:6px 8px}
.log-results-count{font-size:11px;color:#607681;margin:8px 0}
.log-treatment-badge{display:inline-flex;align-self:flex-start;padding:3px 7px;border:1px solid #d2dee7;border-radius:6px;background:#edf3f7;color:#426579;font-size:11px;white-space:nowrap}
.log-treatment-badge[data-treatment="IN_PROGRESS"]{background:#e5f0f6;border-color:#c7d7e0;color:#244c63}
.log-treatment-badge[data-treatment="DONE"]{background:#e7f3ed;border-color:#c4dfd0;color:#316c5a}
#log .log-author-line{font-size:11px;color:#607681;font-weight:400;margin-top:4px}
#logDialog .log-main-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:900px){#log .log-followup-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){#log .log-followup-filters,#logDialog .log-main-fields{grid-template-columns:1fr}}

/* LOG4: explicit recipient and compact filters without dates. */
#log .log-recipient-line{font-size:11px;color:#426579;font-weight:500;margin-top:4px}
@media(min-width:901px){#log .log-followup-filters{grid-template-columns:repeat(4,minmax(0,1fr)) auto}}

.leaflet-popup-content .manual-stake-popup-detail{grid-column:1 / -1}.leaflet-popup-content .bpe-popup-actions .popup-edit{background:#e5f0f6!important;border-color:#c7d7e0!important;color:#244c63!important}.leaflet-popup-content .bpe-popup-actions .popup-edit:hover{background:#d6e8f3!important}

/* Direct qualification of territorial stakes. */
#stakes .bpe-data-table th,#stakes .bpe-data-table td{width:auto!important}
#stakes .bpe-data-table th:nth-child(6),#stakes .bpe-data-table td:nth-child(6){display:table-cell!important;width:100px!important}
#stakes .bpe-data-table th:nth-child(7),#stakes .bpe-data-table td:nth-child(7){width:110px!important}
#stakes .bpe-data-table th:nth-child(8),#stakes .bpe-data-table td:nth-child(8){width:112px!important}
#stakes .stake-sensitivity-value{display:inline-flex;align-items:center;justify-content:center;padding:4px 8px;border:1px solid #ccd8df;border-radius:6px;background:#eef3f6;color:#355266;font-size:11px;white-space:nowrap;min-height:27px}
#stakes .stake-sensitivity-value.is-sensitive{background:#fff2f2;border-color:#e3c6c6;color:#934343}
#stakes button.stake-sensitivity-value:hover{box-shadow:0 0 0 2px #dce8ef}
#stakes button.stake-sensitivity-value:disabled{opacity:.6;cursor:wait}

/* stake6: compact manual stake editor with map and fields side by side. */
#stakeDialog{width:min(960px,calc(100vw - 32px))!important;max-width:960px!important;max-height:calc(100dvh - 32px)!important;padding:0!important;overflow:hidden!important}
#stakeDialog #stakeForm{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;gap:0!important;padding:0!important;max-height:calc(100dvh - 34px)!important;overflow:hidden!important}
#stakeDialog #stakeForm>.dialog-title{position:static!important;margin:0!important;padding:14px 18px 12px!important;align-items:center!important;gap:12px!important}
#stakeDialog .dialog-title h3{font-size:20px!important;margin:2px 0 0!important}
#stakeDialog .dialog-title .eyebrow{font-size:10px!important}
#stakeDialog #stakeOwnerContext{font-size:10px!important;line-height:1.35;max-width:48%;white-space:normal}
#stakeDialog .stake-editor-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;padding:14px 18px;min-height:0;overflow:auto}
#stakeDialog .picker-block{display:flex;flex-direction:column;margin:0;padding:9px;min-width:0;min-height:330px}
#stakeDialog .picker-head{display:block;margin-bottom:8px}
#stakeDialog .picker-head strong{font-size:12px}
#stakeDialog #stakePositionStatus{display:block;font-size:10px;line-height:1.35;margin-top:3px}
#stakeDialog #stakePickerMap{height:100%!important;min-height:280px;flex:1}
#stakeDialog .stake-editor-details{display:grid;align-content:start;gap:10px;min-width:0}
#stakeDialog .stake-editor-details label{font-size:11px!important;min-width:0}
#stakeDialog .stake-editor-details input,#stakeDialog .stake-editor-details select,#stakeDialog .stake-editor-details textarea{box-sizing:border-box;font-size:12px!important;margin-top:4px;padding:7px 9px!important;width:100%;min-width:0}
#stakeDialog .stake-editor-details input,#stakeDialog .stake-editor-details select{min-height:33px!important;height:33px}
#stakeDialog #stakeDynamicFields .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px 10px!important}
#stakeDialog .stake-editor-details textarea{min-height:58px!important;height:58px;resize:vertical}
#stakeDialog #stakeDynamicFields label:has(textarea){grid-column:1/-1}
#stakeDialog #stakeForm>.dialog-actions{position:static!important;margin:0!important;padding:10px 18px!important;box-shadow:none;gap:8px!important}
#stakeDialog .dialog-actions button{font-size:12px!important;min-height:35px!important;padding:7px 12px!important;flex:0 0 auto!important}
@media(max-width:700px){
 #stakeDialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
 #stakeDialog #stakeForm{max-height:calc(100dvh - 18px)!important}
 #stakeDialog .stake-editor-layout{grid-template-columns:1fr;grid-template-rows:max-content max-content;padding:10px 12px;gap:12px}
 #stakeDialog .picker-block{min-height:210px}
 #stakeDialog #stakePickerMap{min-height:170px;height:170px!important}
 #stakeDialog #stakeOwnerContext{max-width:45%;margin:0!important}
 #stakeDialog #stakeForm>.dialog-title{display:flex!important;padding:10px 12px!important}
 #stakeDialog #stakeDynamicFields .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* stake7: discreet export action consistent with other blue controls. */
#stakes #exportBpeModifiedBtnTop{display:inline-flex!important;align-items:center;justify-content:center;gap:7px!important;width:max-content!important;max-width:100%!important;min-width:0!important;min-height:34px!important;height:auto!important;flex:0 0 auto!important;justify-self:start;padding:6px 11px!important;background:#e5f0f6!important;border:1px solid #c7d7e0!important;border-radius:8px!important;color:#244c63!important;box-shadow:none!important;font-size:12px!important;line-height:1.35!important}
#stakes #exportBpeModifiedBtnTop:hover{background:#d6e8f3!important;border-color:#adc8d8!important}
#stakes #exportBpeModifiedBtnTop:focus-visible{outline:2px solid #176b9c;outline-offset:2px}
#stakes #exportBpeModifiedBtnTop .action-icon{width:16px!important;height:16px!important;min-width:16px!important;flex:0 0 16px!important;padding:0!important;background:transparent!important;border:0!important}
#stakes #exportBpeModifiedBtnTop svg{width:16px!important;height:16px!important}
#stakes #exportBpeModifiedBtnTop .stakes-action-label,#stakes #exportBpeModifiedBtnTop strong{font-size:12px!important;line-height:1.35!important;font-weight:600!important}

/* stake9: distinct toolbar controls and compact IGN basemap chooser. */
#stakes .bpe-table-toolbar{column-gap:12px!important;row-gap:8px!important}
#stakePickerMap .leaflet-control-layers{border:1px solid #c7d7e0;border-radius:8px;box-shadow:0 2px 6px rgba(25,57,74,.12)}
#stakePickerMap .leaflet-control-layers-toggle{width:32px;height:32px;background-color:#e5f0f6;border-radius:8px;background-size:20px 20px}
#stakePickerMap .leaflet-control-layers-expanded{padding:8px 10px;background:#fff}
#stakePickerMap .leaflet-control-layers label{font-size:11px!important;color:#244c63;display:block}
#stakePickerMap .leaflet-control-layers input[type=radio]{width:auto!important;min-height:0!important;height:auto!important;margin:0 5px 0 0!important;padding:0!important}

/* stake6: compact manual stake editor with map and fields side by side. */
#bpeDialog{width:min(960px,calc(100vw - 32px))!important;max-width:960px!important;max-height:calc(100dvh - 32px)!important;padding:0!important;overflow:hidden!important}
#bpeDialog #bpeForm{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;gap:0!important;padding:0!important;max-height:calc(100dvh - 34px)!important;overflow:hidden!important}
#bpeDialog #bpeForm>.dialog-title{position:static!important;margin:0!important;padding:14px 18px 12px!important;align-items:center!important;gap:12px!important}
#bpeDialog .dialog-title h3{font-size:20px!important;margin:2px 0 0!important}
#bpeDialog .dialog-title .eyebrow{font-size:10px!important}
#bpeDialog #bpeSourceSummary{font-size:10px!important;line-height:1.35;max-width:48%;white-space:normal}
#bpeDialog .stake-editor-layout{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:14px;padding:14px 18px;min-height:0;overflow:auto}
#bpeDialog .picker-block{display:flex;flex-direction:column;margin:0;padding:9px;min-width:0;min-height:330px}
#bpeDialog .picker-head{display:block;margin-bottom:8px}
#bpeDialog .picker-head strong{font-size:12px}
#bpeDialog #bpePositionStatus{display:block;font-size:10px;line-height:1.35;margin-top:3px}
#bpeDialog #bpePickerMap{height:100%!important;min-height:280px;flex:1}
#bpeDialog .stake-editor-details{display:grid;align-content:start;gap:10px;min-width:0}
#bpeDialog .stake-editor-details label{font-size:11px!important;min-width:0}
#bpeDialog .stake-editor-details input,#bpeDialog .stake-editor-details select,#bpeDialog .stake-editor-details textarea{box-sizing:border-box;font-size:12px!important;margin-top:4px;padding:7px 9px!important;width:100%;min-width:0}
#bpeDialog .stake-editor-details input,#bpeDialog .stake-editor-details select{min-height:33px!important;height:33px}
#bpeDialog .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px 10px!important}
#bpeDialog .stake-editor-details textarea{min-height:58px!important;height:58px;resize:vertical}
#bpeDialog label:has(textarea){grid-column:1/-1}
#bpeDialog #bpeForm>.dialog-actions{position:static!important;margin:0!important;padding:10px 18px!important;box-shadow:none;gap:8px!important}
#bpeDialog .dialog-actions button{font-size:12px!important;min-height:35px!important;padding:7px 12px!important;flex:0 0 auto!important}
@media(max-width:700px){
 #bpeDialog{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}
 #bpeDialog #bpeForm{max-height:calc(100dvh - 18px)!important}
 #bpeDialog .stake-editor-layout{grid-template-columns:1fr;grid-template-rows:max-content max-content;padding:10px 12px;gap:12px}
 #bpeDialog .picker-block{min-height:210px}
 #bpeDialog #bpePickerMap{min-height:170px;height:170px!important}
 #bpeDialog #bpeSourceSummary{max-width:45%;margin:0!important}
 #bpeDialog #bpeForm>.dialog-title{display:flex!important;padding:10px 12px!important}
 #bpeDialog .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


#bpeDialog .dialog-title h3{font-size:18px!important}
#bpeDialog #bpeSourceSummary{font-size:11px!important;max-width:none!important;margin:4px 0 0!important;line-height:1.3}
#bpeDialog .stake-editor-details{gap:8px}
#bpeDialog .form-grid.two{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0!important}
#bpeDialog .stake-editor-layout{align-items:stretch}
#bpeDialog .picker-block{min-height:0!important}
#bpeDialog #bpePickerMap{min-height:270px!important}
#bpeDialog .report-draw-actions{margin:6px 0 0!important}
#bpeDialog #resetBpePositionBtn{font-size:10px!important;min-height:26px!important;padding:4px 7px!important}
#bpeDialog #bpeSchoolFields{grid-column:1/-1}
#bpeDialog #bpeSchoolFields:empty{display:none}
#bpePickerMap .leaflet-control-layers{border:1px solid #c7d7e0;border-radius:8px;box-shadow:0 2px 6px rgba(25,57,74,.12)}
#bpePickerMap .leaflet-control-layers-toggle{width:32px;height:32px;background-color:#e5f0f6;border-radius:8px;background-size:20px 20px}
#bpePickerMap .leaflet-control-layers-expanded{padding:8px 10px;background:#fff}
#bpePickerMap .leaflet-control-layers label{font-size:11px!important;color:#244c63;display:block}
#bpePickerMap .leaflet-control-layers input[type=radio]{width:auto!important;min-height:0!important;height:auto!important;margin:0 5px 0 0!important;padding:0!important}
@media(max-width:700px){#bpeDialog #bpePickerMap{min-height:170px!important;height:170px!important}}

/* Keep the catalog editor near half the desktop width, including compact screens. */
@media(min-width:701px){
#bpeDialog{width:min(960px,max(720px,55vw),calc(100vw - 32px))!important}
}
@media(min-width:701px) and (max-height:620px){
#bpeDialog #bpeForm>.dialog-title{padding:8px 12px!important}
#bpeDialog .dialog-title h3{font-size:16px!important}
#bpeDialog .stake-editor-layout{padding:8px 12px;gap:10px}
#bpeDialog .stake-editor-details{gap:5px}
#bpeDialog .stake-editor-details label{font-size:10px!important;line-height:1.2}
#bpeDialog .stake-editor-details input,#bpeDialog .stake-editor-details select{height:28px!important;min-height:28px!important;padding:4px 6px!important;margin-top:3px;font-size:11px!important}
#bpeDialog .stake-editor-details textarea{height:42px!important;min-height:42px!important;padding:5px 7px!important;margin-top:3px;font-size:11px!important}
#bpeDialog #bpeForm>.dialog-actions{padding:7px 12px!important}
#bpeDialog .dialog-actions button{min-height:30px!important;padding:5px 9px!important;font-size:11px!important}
#bpeDialog #bpePickerMap{min-height:200px!important}
}

/* stake11: give the position map the larger share while keeping all fields visible. */
@media(min-width:701px){
#bpeDialog .stake-editor-layout{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}
#bpeDialog .picker-block{padding:7px}
#bpeDialog .picker-head{margin-bottom:6px}
#bpeDialog #bpePickerMap{flex:1 1 0!important;height:auto!important}
#bpeDialog .stake-editor-details{min-width:0}
#bpeDialog .stake-editor-details label{overflow-wrap:anywhere}
}

/* stake12: slightly larger equipment editor with the same map/fields balance. */
@media(min-width:701px){
#bpeDialog{width:min(1080px,max(800px,60vw),calc(100vw - 32px))!important;max-width:1080px!important}
}

/* Reception sites share the compact equipment dialog design. */
dialog.vr-site-editor,dialog.vr-site-viewer{width:min(1080px,calc(100vw - 32px))!important;max-width:1080px!important;padding:16px!important;border:1px solid #d3e0e8;border-radius:14px;background:#fff;color:#223b4c;box-shadow:0 18px 60px #15334d33;font-size:12px}
.vr-site-editor .dialog-title,.vr-site-viewer .dialog-title{margin:0 0 12px!important;padding:0 0 10px;border-bottom:1px solid #e2eaf0}.vr-site-editor h3,.vr-site-viewer h3{font-size:18px;margin:0}.vr-site-editor .eyebrow,.vr-site-viewer .eyebrow{font-size:10px;color:#72899a}.vr-site-editor .vr-prep-body{display:grid;grid-template-columns:minmax(0,55fr) minmax(0,45fr);gap:16px;max-height:none;overflow:visible;padding:0;height:min(430px,calc(100dvh - 210px))}
.vr-site-map-panel{display:flex;flex-direction:column;min-height:0;min-width:0}.vr-site-map-panel h4{margin:0;font-size:12px}.vr-site-map-panel>p{margin:3px 0 5px}.vr-site-editor .vr-site-picker{flex:1;min-height:120px;height:auto;margin:0 0 8px;border:1px solid #d3e0e8;border-radius:9px}.vr-site-fields-panel{min-width:0;min-height:0;display:flex;flex-direction:column}.vr-site-tabs{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px}.vr-site-tabs button{padding:6px 7px;font-size:11px;border:1px solid #d5e2ed;background:#f5f8fb;color:#36556f;border-radius:6px}.vr-site-tabs button[aria-selected=true]{background:#e3f0fb;border-color:#a8cbe5;color:#225b83}.vr-site-pane{min-height:0;overflow:auto;flex:1}.vr-site-pane[hidden]{display:none!important}.vr-site-editor .form-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:7px 10px}.vr-site-editor label{font-size:11px;gap:3px;margin:0}.vr-site-editor input:not([type=checkbox]),.vr-site-editor select{height:30px;padding:4px 7px;font-size:12px;border:1px solid #ccdbe5;border-radius:6px;width:100%;min-width:0}.vr-site-editor textarea{height:54px;min-height:42px;padding:5px 7px;font-size:12px;resize:vertical}.vr-site-editor .vr-site-coordinates input{height:26px;font-size:10px}.vr-site-editor fieldset{border:1px solid #d6e2e9;border-radius:8px;padding:9px;margin:0}.vr-site-editor legend{font-size:11px;color:#49687d}.vr-site-editor .vr-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px}.vr-site-editor .checkbox-line{display:flex;align-items:center;gap:6px;margin:5px 0}.vr-site-editor .vr-site-pane:nth-last-child(1)>label{display:flex;flex-direction:column;margin-bottom:6px}.vr-site-editor .dialog-actions,.vr-site-viewer .dialog-actions{display:flex;justify-content:flex-end;gap:9px;border-top:1px solid #e2eaf0;margin-top:12px;padding-top:10px}.vr-site-editor .dialog-actions button,.vr-site-viewer .dialog-actions button{background:#e7f2fb;border:1px solid #c4dcec;color:#285e85;border-radius:7px;font-size:12px;padding:7px 12px;min-height:32px}.vr-site-editor .dialog-actions button.primary{background:#dbeefa;color:#194f76}.vr-site-editor .vr-prep-error:empty{display:none}.vr-site-editor .muted{color:#7a8e9c;font-size:10px}.vr-site-viewer .vr-prep-body{font-size:12px}.vr-site-viewer .vr-site-detail-actions{gap:9px}
@media(max-width:700px){dialog.vr-site-editor{padding:12px!important}.vr-site-editor .vr-prep-body{display:flex;flex-direction:column;height:auto;max-height:calc(100dvh - 170px);overflow:auto}.vr-site-editor .vr-site-picker{flex:none;height:220px}.vr-site-fields-panel{min-height:300px}.vr-site-pane{overflow:visible}}

@media(min-width:701px){.vr-site-editor .vr-site-pane:last-child{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start}.vr-site-editor .vr-site-pane:last-child>label{min-width:0}}

dialog.vr-site-editor{max-height:calc(100dvh - 20px)!important}.vr-site-editor>form{margin:0}.vr-site-editor .vr-prep-body{height:min(430px,calc(100dvh - 225px))}

.vr-site-editor .vr-site-pane>p{margin:5px 0;font-size:10px;line-height:1.25}.vr-site-editor label{line-height:1.25}.vr-site-editor .vr-site-pane .form-grid.two{row-gap:6px}
@media(min-width:701px) and (max-height:650px){.vr-site-editor input:not([type=checkbox]),.vr-site-editor select{height:26px}.vr-site-editor .vr-site-pane .form-grid.two{row-gap:4px}.vr-site-editor .checkbox-line{margin:3px 0}.vr-site-editor .vr-site-pane>p{font-size:9px;margin:3px 0}.vr-site-editor .vr-site-tabs{margin-bottom:5px}.vr-site-editor .vr-site-tabs button{padding:4px 6px}.vr-site-editor textarea{height:46px}}
@media(max-width:700px){.vr-site-editor .vr-prep-body{height:auto}}
