/* CHB Inicio operativo v2: componentes con ámbito propio */
.chb-overview{--overview-muted:#a9b7c7;display:grid;gap:24px;min-width:0}
.chb-overview *{box-sizing:border-box}
.chb-overview h2,.chb-overview h3,.chb-overview p{margin:0}
.chb-overview a{text-decoration:none;color:inherit}
.chb-overview-head{display:flex;align-items:center;justify-content:space-between;gap:20px}
.chb-overview-head p{color:var(--overview-muted);margin-top:8px;max-width:600px;line-height:1.6}
.chb-overview-eyebrow{display:block;color:#39cfff;font-size:12px;letter-spacing:1.5px;margin-bottom:10px}
.chb-overview h2{font-size:clamp(26px,3vw,36px);line-height:1.2;letter-spacing:-.8px}
.chb-overview-link{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;padding:10px 16px;border:1px solid rgba(255,255,255,.12);border-radius:9px;background:#0c1825;font-size:14px;font-weight:600}
.chb-overview a:hover{background:#102033}
.chb-overview a:focus-visible{outline:2px solid #39cfff;outline-offset:4px}
.chb-overview-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.chb-overview-metric,.chb-overview-device,.chb-overview-empty{background:#08121d;border:1px solid rgba(255,255,255,.09);border-radius:18px;padding:24px;min-width:0}
.chb-overview-metric{display:flex;flex-direction:column;gap:8px}
.chb-overview-label,.chb-overview-note{color:var(--overview-muted);font-size:14px;line-height:1.5}
.chb-overview-number{font-size:36px;line-height:1.2;letter-spacing:-1px;font-weight:700}
.chb-overview-section{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.chb-overview-section h3{font-size:20px}
.chb-overview-section a{color:#39cfff;min-height:44px;display:inline-flex;align-items:center;padding:8px;border-radius:6px}
.chb-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.chb-overview-device{display:grid;gap:18px;overflow-wrap:anywhere}
.chb-overview-device h3{font-size:18px;line-height:1.4;margin-bottom:6px}
.chb-overview-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.chb-overview-status{display:inline-flex;align-items:center;gap:8px;color:#31d081;font-size:13px}
.chb-overview-status:before{content:'';width:6px;height:6px;border-radius:50%;background:currentColor}
.chb-overview-status[data-state="offline"],.chb-overview-status[data-state="unknown"]{color:#a9b7c7}
.chb-overview-badge{font-size:12px;padding:3px 8px;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:var(--overview-muted)}
.chb-overview-footer{padding-top:16px;border-top:1px solid rgba(255,255,255,.09);font-size:14px;color:var(--overview-muted)}
.chb-overview-alert{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;border-left:3px solid #f0c769;padding:20px 24px;background:#151710;border-radius:9px}
.chb-overview-alert p{color:var(--overview-muted);margin-top:6px;font-size:14px}
.chb-overview-empty{text-align:center;padding:36px 24px}
.chb-overview-empty p{color:var(--overview-muted);margin:12px auto 20px;max-width:520px;line-height:1.6}
@media(max-width:1100px){.chb-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.chb-overview-head{align-items:flex-start;flex-direction:column}.chb-overview-metrics,.chb-overview-grid{grid-template-columns:1fr}.chb-overview-metric{padding:20px}.chb-overview-number{font-size:30px}.chb-overview-section{align-items:flex-start;flex-wrap:wrap}.chb-overview-alert{padding:20px}.chb-overview-head .chb-overview-link{width:100%}}

/* CHB Inicio: resumen de cuenta por ubicación, sin paneles de métricas grandes */
.chb-overview-v3{display:grid;gap:28px;min-width:0;color:#f4f7fb}
.chb-overview-v3 *{box-sizing:border-box}
.chb-overview-v3 h2,.chb-overview-v3 h3,.chb-overview-v3 p{margin:0}
.chb-overview-v3 a{color:inherit;text-decoration:none}
.chb-overview-v3 a:focus-visible{outline:2px solid #39cfff;outline-offset:4px}
.chb-v3-heading h2{font-size:clamp(25px,3vw,34px);letter-spacing:-.7px;line-height:1.2}
.chb-v3-heading p{margin-top:8px;color:#a9b7c7;line-height:1.6}
.chb-v3-summary{display:flex;gap:8px 18px;align-items:baseline;flex-wrap:wrap;padding:15px 0;border-top:1px solid rgba(255,255,255,.09);border-bottom:1px solid rgba(255,255,255,.09);font-size:14px}
.chb-v3-summary strong{font-size:16px}.chb-v3-summary span{color:#a9b7c7}.chb-v3-divider{color:#617183}
.chb-v3-section{display:grid;gap:13px;min-width:0}.chb-v3-section-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.chb-v3-section-head h3{font-size:20px}.chb-v3-section-head a,.chb-v3-inline{color:#72cbff;font-size:14px;min-height:44px;display:inline-flex;align-items:center;padding:6px;border-radius:6px}
.chb-v3-location{border-top:1px solid rgba(255,255,255,.09);padding-top:16px;display:grid;gap:10px}.chb-v3-location-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.chb-v3-location-head h4{font-size:16px;margin:0}.chb-v3-count{color:#a9b7c7;font-size:13px;white-space:nowrap}
.chb-v3-device{display:flex;justify-content:space-between;align-items:center;gap:16px;min-height:52px;padding:10px 12px;background:#08121d;border-radius:9px;overflow-wrap:anywhere}.chb-v3-device:hover{background:#102033}.chb-v3-device-name{font-size:14px;font-weight:600}.chb-v3-device-meta{display:flex;align-items:center;gap:10px;color:#a9b7c7;font-size:12px;text-align:right}.chb-v3-state{white-space:nowrap}.chb-v3-state[data-state="online"]{color:#31d081}.chb-v3-state[data-state="offline"],.chb-v3-state[data-state="unknown"]{color:#a9b7c7}
.chb-v3-empty{padding:18px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:#08121d;color:#a9b7c7;line-height:1.6}.chb-v3-alert{padding:14px 16px;border-left:3px solid #f0c769;background:#151710;border-radius:7px;color:#f4f7fb}.chb-v3-alert p{margin-top:5px;color:#a9b7c7;font-size:13px}
@media(max-width:700px){.chb-overview-v3{gap:21px}.chb-v3-summary{gap:7px 11px;font-size:13px}.chb-v3-summary strong{font-size:15px}.chb-v3-section-head{align-items:flex-start;flex-wrap:wrap}.chb-v3-device{align-items:flex-start;flex-direction:column;gap:4px}.chb-v3-device-meta{text-align:left;flex-wrap:wrap}.chb-v3-location-head{align-items:flex-start}}


/* CHB V4: marca persistente, cabecera útil e Inicio operativo */
.brand{gap:0;justify-content:flex-start;min-width:0}
.brand img{display:block;width:min(100%,190px);height:auto;max-height:128px;object-fit:contain;border-radius:9px;background:#06142a}
.sidebar-brand{padding:2px 5px 18px;border-bottom:1px solid var(--border)}
.sidebar-brand .brand{justify-content:center}
.sidebar-brand .brand img{width:184px;max-height:136px}
.dashboard-header{justify-content:space-between;gap:16px}
.dashboard-header-tools{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0}
.chb-header-uid{display:flex;align-items:center;gap:7px;min-width:0;color:#8296aa;font-size:10px;white-space:nowrap}
.chb-header-uid strong{max-width:170px;overflow:hidden;text-overflow:ellipsis;color:#d4e0eb;font:600 10px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace}
.chb-notification-link{position:relative;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:10px;background:#0a1521;color:#a9c2d6;text-decoration:none}
.chb-notification-link:hover{background:#102033;border-color:rgba(57,207,255,.28);color:#eaf8ff}
.chb-notification-link svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.chb-notification-count{position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border:2px solid #03080d;border-radius:99px;background:#e6b54e;color:#111923;font-size:9px;font-weight:800}
.chb-notification-count[hidden]{display:none}
.dashboard-mobile-brand{display:none}
.chb-home-v4{display:grid;gap:21px;min-width:0}
.chb-home-v4 *{box-sizing:border-box}
.chb-home-v4 h2,.chb-home-v4 h3,.chb-home-v4 h4,.chb-home-v4 p{margin:0}
.chb-v4-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.chb-v4-heading h2{font-size:clamp(25px,2.4vw,33px);line-height:1.18;letter-spacing:-.8px}
.chb-v4-heading p{margin-top:7px;color:#9aaec2;font-size:13px;line-height:1.6}
.chb-v4-actions{display:flex;gap:8px;flex:none}
.chb-v4-action{min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:0 13px;border:1px solid rgba(185,211,235,.17);border-radius:9px;background:#0d1b2a;color:#d8e6f2;font-size:11px;font-weight:650;text-decoration:none}
.chb-v4-action:hover{background:#132a40;border-color:rgba(57,207,255,.3)}
.chb-v4-action.primary{border-color:#2587cf;background:#1475bc;color:#fff}
.chb-v4-overview{display:grid;grid-template-columns:minmax(0,1fr) 176px 176px;gap:11px}
.chb-v4-health,.chb-v4-mini{min-height:102px;border:1px solid rgba(185,211,235,.12);border-radius:14px;background:linear-gradient(140deg,#0e1e2e,#0a1724)}
.chb-v4-health{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:17px 20px}
.chb-v4-label{display:block;color:#8da4b9;font-size:10px;font-weight:720;letter-spacing:.07em;text-transform:uppercase}
.chb-v4-health strong{display:block;margin-top:3px;font-size:22px;line-height:1.3;letter-spacing:-.5px}
.chb-v4-health strong span{color:#a8bacb;font-size:14px;font-weight:520;letter-spacing:0}
.chb-v4-sub{margin-top:4px;color:#91a5b9;font-size:10px}
.chb-v4-track{width:min(210px,32%);height:6px;flex:none;overflow:hidden;border-radius:99px;background:#24384c}
.chb-v4-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#25a66e,#51d49b)}
.chb-v4-mini{display:flex;align-items:center;gap:11px;padding:14px}
.chb-v4-mini-icon{width:33px;height:33px;display:grid;place-items:center;flex:none;border:1px solid rgba(57,207,255,.17);border-radius:9px;background:rgba(39,139,231,.1);color:#74c9ec}
.chb-v4-mini-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.chb-v4-mini strong{display:block;font-size:21px;line-height:1.15}
.chb-v4-mini small{display:block;margin-top:3px;color:#91a5b9;font-size:9px}
.chb-v4-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:17px;align-items:start}
.chb-v4-section{display:grid;gap:11px;min-width:0}
.chb-v4-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.chb-v4-section-head h3{font-size:16px;letter-spacing:-.2px}
.chb-v4-section-head p{margin-top:3px;color:#8fa4b8;font-size:10px}
.chb-v4-link{color:#79cbee;font-size:10px;font-weight:680;text-decoration:none;white-space:nowrap}
.chb-v4-link:hover{color:#b4edff}
.chb-v4-locations{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.chb-v4-location{min-width:0;overflow:hidden;border:1px solid rgba(185,211,235,.12);border-radius:13px;background:linear-gradient(180deg,#0d1b29,#0a1622);transition:border-color .15s,transform .15s}
.chb-v4-location:hover{border-color:rgba(57,207,255,.24);transform:translateY(-1px)}
.chb-v4-location-top{padding:13px 14px 10px}
.chb-v4-location-title{display:flex;align-items:flex-start;justify-content:space-between;gap:9px}
.chb-v4-location-title h4{overflow-wrap:anywhere;font-size:12px;font-weight:720}
.chb-v4-location-title p{margin-top:3px;color:#91a5b9;font-size:9px}
.chb-v4-badge{display:inline-flex;align-items:center;gap:5px;min-height:22px;padding:0 7px;border:1px solid rgba(57,208,143,.17);border-radius:6px;background:rgba(57,208,143,.07);color:#7bdbaa;font-size:9px;font-weight:680;white-space:nowrap}
.chb-v4-badge.warn{border-color:rgba(233,185,84,.2);background:rgba(233,185,84,.08);color:#edc569}
.chb-v4-badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.chb-v4-loc-count{margin-top:9px;color:#aabaca;font-size:9px}
.chb-v4-loc-count strong{color:#e1eaf3;font-size:10px}
.chb-v4-device{display:flex;align-items:center;gap:9px;min-height:39px;padding:7px 12px;border-top:1px solid rgba(185,211,235,.07);color:#e0eaf3;text-decoration:none}
.chb-v4-device:hover{background:rgba(255,255,255,.025)}
.chb-v4-device-name{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-weight:620}
.chb-v4-device-meta{display:inline-flex;align-items:center;gap:5px;color:#87d9a9;font-size:9px;white-space:nowrap}
.chb-v4-device-meta:before{content:"";width:5px;height:5px;border-radius:50%;background:#3bd18f}
.chb-v4-device-meta[data-state="offline"],.chb-v4-device-meta[data-state="unknown"]{color:#edc569}
.chb-v4-device-meta[data-state="offline"]:before,.chb-v4-device-meta[data-state="unknown"]:before{background:#e9b954}
.chb-v4-location-foot{display:flex;justify-content:space-between;gap:8px;padding:8px 12px;border-top:1px solid rgba(185,211,235,.07);color:#8298ac;font-size:9px}
.chb-v4-aside{display:grid;gap:12px}
.chb-v4-panel{overflow:hidden;border:1px solid rgba(185,211,235,.12);border-radius:13px;background:linear-gradient(160deg,#0e1c2b,#0a1622)}
.chb-v4-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px 10px}
.chb-v4-panel-head h3{font-size:12px;font-weight:720}
.chb-v4-count{min-width:19px;height:19px;display:grid;place-items:center;padding:0 5px;border-radius:6px;background:rgba(233,185,84,.14);color:#f0c76a;font-size:9px;font-weight:750}
.chb-v4-issue{display:flex;align-items:flex-start;gap:8px;padding:9px 13px;border-top:1px solid rgba(185,211,235,.07)}
.chb-v4-issue:before{content:"";width:6px;height:6px;margin-top:5px;flex:none;border-radius:50%;background:#e9b954}
.chb-v4-issue strong{display:block;overflow-wrap:anywhere;color:#e0e9f2;font-size:10px;font-weight:650}
.chb-v4-issue span{display:block;margin-top:2px;color:#8fa4b8;font-size:9px}
.chb-v4-panel-action{display:block;margin:9px 13px 12px;padding:8px;text-align:center;border:1px solid rgba(185,211,235,.12);border-radius:8px;color:#9bdcf4;font-size:9px;font-weight:680;text-decoration:none}
.chb-v4-panel-action:hover{background:rgba(57,207,255,.05)}
.chb-v4-empty{padding:15px;border:1px dashed rgba(185,211,235,.16);border-radius:11px;color:#9aafc2;font-size:11px;line-height:1.55}
.chb-v4-shared{padding:13px 14px}
.chb-v4-shared h3{font-size:11px}.chb-v4-shared p{margin-top:4px;color:#91a5b9;font-size:9px}
.chb-v4-shared .chb-v4-location-foot{margin-top:10px;padding:9px 0 0;border-top:1px solid rgba(185,211,235,.08)}
@media(max-width:1050px){.chb-v4-overview{grid-template-columns:minmax(0,1fr) 148px 148px}.chb-v4-grid{grid-template-columns:minmax(0,1fr) 250px}}
@media(max-width:900px){.chb-v4-overview{grid-template-columns:minmax(0,1fr) 135px}.chb-v4-mini:last-child{display:none}.chb-v4-grid{grid-template-columns:1fr}.chb-v4-aside{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.sidebar-brand .brand img{width:180px}.dashboard-header{height:auto;min-height:70px;padding:7px 14px;gap:9px;justify-content:space-between}.dashboard-mobile-brand{display:block;width:92px;height:64px;flex:none;margin-right:auto}.dashboard-mobile-brand img{display:block;width:100%;height:100%;object-fit:contain;border-radius:7px;background:#06142a}.dashboard-header-tools{gap:7px;margin-left:0}.chb-header-uid{gap:4px;font-size:8px}.chb-header-uid strong{max-width:78px;font-size:8px}.chb-notification-link{width:36px;height:36px}.chb-v4-heading{display:block}.chb-v4-heading h2{font-size:26px}.chb-v4-heading p{font-size:12px}.chb-v4-actions{margin-top:12px}.chb-v4-action{flex:1;min-height:42px;padding:0 8px;font-size:10px}.chb-v4-overview{grid-template-columns:minmax(0,1fr) 108px;gap:8px}.chb-v4-health{min-height:94px;padding:13px 12px;gap:8px}.chb-v4-health strong{font-size:18px}.chb-v4-health strong span{font-size:11px}.chb-v4-label{font-size:8px}.chb-v4-sub{font-size:8px}.chb-v4-track{width:18%;height:5px}.chb-v4-mini{min-height:94px;gap:8px;padding:10px}.chb-v4-mini-icon{width:27px;height:27px}.chb-v4-mini-icon svg{width:14px;height:14px}.chb-v4-mini strong{font-size:18px}.chb-v4-mini small{font-size:8px}.chb-v4-mini:last-child{display:flex;grid-column:1/-1;min-height:59px}.chb-v4-grid{gap:17px}.chb-v4-locations{grid-template-columns:1fr}.chb-v4-aside{grid-template-columns:1fr}.chb-v4-section-head h3{font-size:15px}}
@media(max-width:390px){.dashboard-mobile-brand{width:78px;height:58px}.chb-header-uid span{display:none}.chb-header-uid strong{max-width:66px}.dashboard-header{padding-inline:10px}.chb-v4-overview{grid-template-columns:minmax(0,1fr) 96px}.chb-v4-health{padding-inline:9px}.chb-v4-health strong{font-size:16px}.chb-v4-track{width:13%}.chb-v4-actions{gap:6px}}
@media(prefers-reduced-motion:reduce){.chb-v4-location,.chb-v4-action,.chb-notification-link{transition:none}}


/* CHB V4.1: lockup vectorial horizontal, sin panel ni fondo añadido */
.brand img{display:block;width:min(100%,220px);height:auto;max-height:56px;object-fit:contain;border-radius:0;background:transparent;box-shadow:none}
.sidebar-brand .brand{justify-content:center}
.sidebar-brand .brand img{width:min(100%,214px);max-height:48px}
.dashboard-mobile-brand{display:block;width:128px;height:42px;flex:none;margin-right:auto;background:transparent}
.dashboard-mobile-brand img{display:block;width:100%;height:100%;object-fit:contain;border-radius:0;background:transparent}
@media(max-width:760px){.dashboard-mobile-brand{width:128px;height:42px}}
@media(max-width:390px){.dashboard-mobile-brand{width:116px;height:40px}}
.chb-header-uid{min-height:36px;gap:8px;padding:6px 10px;border:1px solid rgba(185,211,235,.13);border-radius:9px;background:rgba(12,29,45,.58);font-family:inherit;font-size:10px;text-align:left;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.chb-header-uid span{font-size:9px;font-weight:720;letter-spacing:.06em;text-transform:uppercase}
.chb-header-uid strong{font-size:12px}
.chb-header-uid:hover{border-color:rgba(57,207,255,.2);background:rgba(57,207,255,.06);color:#b5edff}
.chb-header-uid:hover strong{color:#b5edff}
.chb-header-uid:focus-visible{outline:2px solid #39cfff;outline-offset:2px}
.chb-header-uid:after{content:"Copiar";color:#79cbee;font-size:9px;font-weight:650;opacity:0;transition:opacity .15s}
.chb-header-uid:hover:after,.chb-header-uid:focus-visible:after,.chb-header-uid[data-copied]:after{opacity:1}
.chb-header-uid[data-copied]:after{content:"Copiado ✓";color:#87d9a9}
@media(max-width:390px){.chb-header-uid:after{display:none}}
@media(max-width:760px){.chb-header-uid{min-height:34px;gap:6px;padding:5px 8px}.chb-header-uid strong{max-width:125px;font-size:11px}}
@media(max-width:390px){.chb-header-uid{min-height:32px;padding:4px 7px}.chb-header-uid strong{max-width:78px;font-size:11px}}


/* CHB V4.2: ficha de detalle del dispositivo */
.chb-device-detail-v42{display:grid;gap:16px;min-width:0}
.chb-device-detail-v42 *{box-sizing:border-box}
.chb-device-detail-v42 h2,.chb-device-detail-v42 p{margin:0}
.chb-v42-status{display:inline-flex;align-items:center;gap:7px;align-self:flex-start;padding:8px 11px;border:1px solid rgba(185,211,235,.13);border-radius:9px;background:#0c1a28;color:#c0d2e1;font-size:11px;font-weight:650;white-space:nowrap}
.chb-v42-status i,.chb-v42-state-line i{width:7px;height:7px;border-radius:50%;background:#95a7b8;box-shadow:0 0 0 3px rgba(149,167,184,.1)}
.chb-v42-status[data-state="online"] i,.chb-v42-state-line[data-state="online"] i{background:#49d18f;box-shadow:0 0 0 3px rgba(73,209,143,.12)}
.chb-v42-status[data-state="offline"] i,.chb-v42-state-line[data-state="offline"] i{background:#e9b954;box-shadow:0 0 0 3px rgba(233,185,84,.12)}
.chb-v42-hero{display:flex;align-items:center;gap:16px;min-width:0;padding:19px;border:1px solid rgba(185,211,235,.13);border-radius:15px;background:linear-gradient(120deg,#10263a,#0c1a28 65%,#0a1723)}
.chb-v42-hero-mark{display:grid;place-items:center;width:54px;height:54px;flex:none;border:1px solid rgba(57,207,255,.24);border-radius:13px;background:linear-gradient(145deg,rgba(39,139,231,.2),rgba(24,67,106,.11));color:#68d7ef;font-size:13px;font-weight:800;letter-spacing:.04em}
.chb-v42-hero-copy{min-width:0;flex:1}
.chb-v42-eyebrow{display:block;color:#83a0b8;font-size:9px;font-weight:750;letter-spacing:.1em}
.chb-v42-hero-copy h2{margin-top:5px;overflow-wrap:anywhere;color:#f1f6fa;font-size:19px;letter-spacing:-.3px}
.chb-v42-hero-copy p{margin-top:4px;overflow-wrap:anywhere;color:#a4b7c8;font-size:11px}
.chb-v42-access{padding:6px 9px;border:1px solid rgba(57,207,255,.16);border-radius:7px;background:rgba(39,139,231,.08);color:#9bdcf4;font-size:9px;font-weight:700;white-space:nowrap}
.chb-v42-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden;border:1px solid rgba(185,211,235,.12);border-radius:13px;background:#0b1825}
.chb-v42-facts article{display:grid;align-content:start;gap:7px;min-width:0;min-height:75px;padding:14px;border-right:1px solid rgba(185,211,235,.09)}
.chb-v42-facts article:last-child{border-right:0}
.chb-v42-facts article span,.chb-v42-last-seen span{color:#8ea5b9;font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.chb-v42-facts article strong,.chb-v42-last-seen strong{overflow-wrap:anywhere;color:#e1eaf2;font-size:11px;font-weight:620;line-height:1.45}
.chb-v42-detail-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(220px,.75fr);gap:14px;align-items:start}
.chb-v42-panel{min-width:0;padding:16px;border:1px solid rgba(185,211,235,.12);border-radius:13px;background:linear-gradient(155deg,#0e1d2b,#0a1622)}
.chb-v42-panel-title{margin-bottom:13px}
.chb-v42-panel-title h2{margin-top:4px;color:#e7eff6;font-size:15px;letter-spacing:-.2px}
.chb-v42-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.chb-v42-action{display:flex;align-items:center;gap:10px;min-width:0;min-height:60px;padding:10px;border:1px solid rgba(185,211,235,.12);border-radius:10px;background:rgba(12,28,42,.8);color:#dce8f1;text-align:left;cursor:pointer;transition:border-color .15s,background .15s,transform .15s}
.chb-v42-action:hover{transform:translateY(-1px);border-color:rgba(57,207,255,.28);background:#10273a}
.chb-v42-action:focus-visible{outline:2px solid #39cfff;outline-offset:2px}
.chb-v42-action-icon{display:grid;place-items:center;width:32px;height:32px;flex:none;border:1px solid rgba(57,207,255,.14);border-radius:8px;background:rgba(39,139,231,.08);color:#83d9ed}
.chb-v42-action-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.chb-v42-action-copy{display:grid;gap:3px;min-width:0;flex:1}
.chb-v42-action-copy strong{overflow-wrap:anywhere;color:#e4edf4;font-size:10px;font-weight:700}
.chb-v42-action-copy small{overflow-wrap:anywhere;color:#8fa5b8;font-size:9px;line-height:1.4}
.chb-v42-action-arrow{color:#7090a8;font-size:18px}
.chb-v42-danger{margin-top:13px;padding:8px 0;border:0;background:transparent;color:#d8998e;font-family:inherit;font-size:10px;font-weight:600;line-height:1.4;cursor:pointer}
.chb-v42-danger:hover{color:#ffc0b3;text-decoration:underline}
.chb-v42-status-panel{display:grid;gap:12px}
.chb-v42-state-line{display:flex;align-items:center;gap:9px;color:#dce7f0}
.chb-v42-state-line strong{font-size:13px;font-weight:700}
.chb-v42-status-panel p{color:#9aafc1;font-size:10px;line-height:1.6}
.chb-v42-last-seen{display:grid;gap:5px;padding-top:11px;border-top:1px solid rgba(185,211,235,.1)}
.chb-v42-empty{padding:16px;border:1px dashed rgba(185,211,235,.16);border-radius:12px;color:#9aafc2;font-size:12px;line-height:1.6}
@media(max-width:900px){.chb-v42-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.chb-v42-facts article:nth-child(2){border-right:0}.chb-v42-facts article:nth-child(-n+2){border-bottom:1px solid rgba(185,211,235,.09)}.chb-v42-detail-grid{grid-template-columns:1fr}}
@media(max-width:600px){.chb-v42-hero{gap:11px;padding:14px}.chb-v42-hero-mark{width:44px;height:44px}.chb-v42-hero-copy h2{font-size:16px}.chb-v42-access{padding:5px 6px;font-size:8px}.chb-v42-actions{grid-template-columns:1fr}.chb-v42-panel{padding:13px}}
@media(prefers-reduced-motion:reduce){.chb-v42-action{transition:none}}


/* CHB Responsive Pass 1: marca y estructura móvil */
@media (max-width: 900px) {
  html, body { max-width:100%; overflow-x:hidden; }
  .dashboard-shell { display:block; width:100%; max-width:100%; min-width:0; overflow-x:clip; }
  .dashboard-main { grid-column:auto; width:100%; max-width:100%; min-width:0; }
  .dashboard-content { width:100%; max-width:1300px; min-width:0; padding-left:clamp(16px,4vw,32px); padding-right:clamp(16px,4vw,32px); }
  .dashboard-content > *, .dashboard-main > * { min-width:0; max-width:100%; }
  .chb-home-v4, .chb-v4-grid, .chb-v4-section, .chb-v4-aside, .chb-v4-location { min-width:0; }
  .chb-v4-overview, .chb-v4-grid, .chb-v4-locations, .chb-v4-aside { grid-template-columns:minmax(0,1fr); }
  .chb-v4-overview { gap:10px; }
  .chb-v4-mini:last-child { display:flex; grid-column:auto; }
  .chb-v4-health { min-width:0; }
}

/* En escritorio el lockup ocupa casi todo el ancho útil de la barra lateral. */
.sidebar-brand { min-width:0; }
.sidebar-brand .brand { width:100%; min-width:0; }
.sidebar-brand .brand img { width:min(100%,238px); max-height:62px; }

@media (max-width: 760px) {
  .dashboard-header {
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"brand account" "tools tools";
    align-items:center;
    gap:8px 12px;
    width:100%; min-width:0; height:auto; min-height:0;
    padding:12px clamp(14px,4vw,22px);
    padding-left:58px;
  }
  .dashboard-header .mobile-menu-button { position:absolute; left:14px; top:12px; z-index:2; }
  .dashboard-mobile-brand {
    display:block; grid-area:brand;
    width:clamp(150px,46vw,184px); height:auto; aspect-ratio:900 / 176;
    min-width:0; margin:0; flex:none; overflow:visible;
  }
  .dashboard-mobile-brand img {
    display:block; width:100%; height:100%; object-fit:contain;
    border:0; border-radius:0; background:transparent; box-shadow:none;
  }
  .dashboard-header-tools {
    grid-area:tools; display:flex; justify-content:flex-end; align-self:center;
    width:100%; min-width:0; margin:0; gap:8px;
  }
  .chb-header-uid { min-width:0; max-width:calc(100vw - 76px); }
  .chb-header-uid strong { max-width:min(42vw,220px); }
  .user-menu { grid-area:account; display:flex; min-width:0; max-width:100%; gap:8px; }
  .user-avatar { width:34px; height:34px; flex:none; }
  .user-meta { display:none; }
  .logout-button { min-height:36px; margin:0; padding:7px 9px; white-space:nowrap; }
  .dashboard-content { padding-top:28px; padding-bottom:36px; }
  .dashboard-title { align-items:flex-start; flex-wrap:wrap; gap:16px; }
  .dashboard-title h1 { font-size:clamp(25px,7vw,34px); line-height:1.15; }
  .chb-v4-heading { display:block; min-width:0; }
  .chb-v4-heading h2 { font-size:clamp(24px,7vw,30px); }
  .chb-v4-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .chb-v4-action { min-width:0; min-height:44px; padding:8px; text-align:center; }
  .chb-v4-health { padding:14px; }
  .chb-v4-track { width:min(32%,150px); }
  .chb-v4-location-title { min-width:0; }
  .chb-v4-device { min-width:0; }
  .chb-v4-device-name { min-width:0; overflow-wrap:anywhere; }
  .chb-v4-device-meta { flex:none; }
  .chb-device-options-menu { width:min(218px,calc(100vw - 24px)) !important; min-width:0 !important; max-width:calc(100vw - 24px) !important; }
  .modal-backdrop { box-sizing:border-box; width:100%; max-width:100vw; padding:12px !important; }
  .modal, .modal.chb-modal { box-sizing:border-box; width:min(620px,calc(100vw - 24px)) !important; max-width:calc(100vw - 24px) !important; max-height:calc(100dvh - 24px); overflow-x:hidden; overflow-y:auto; }
  .modal *, .modal *::before, .modal *::after { box-sizing:border-box; }
  .modal input, .modal select, .modal textarea, .modal button { max-width:100%; }
  .modal .modal-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .modal .modal-actions > * { min-width:0; }
  table { display:block; width:100%; max-width:100%; overflow-x:auto; }
  img, video, canvas, svg { max-width:100%; }
}

@media (max-width: 520px) {
  .dashboard-header { padding-top:10px; padding-bottom:10px; }
  .dashboard-mobile-brand { width:clamp(146px,48vw,170px); }
  .dashboard-header-tools { justify-content:flex-start; }
  .chb-header-uid { min-height:36px; }
  .chb-header-uid span { display:inline; }
  .chb-header-uid strong { max-width:calc(100vw - 190px); font-size:11px; }
  .dashboard-content { padding:24px 16px 32px; }
  .chb-v4-actions { grid-template-columns:1fr; }
  .chb-v4-overview { grid-template-columns:minmax(0,1fr); }
  .chb-v4-mini { min-height:70px; }
  .chb-v4-health { align-items:flex-start; flex-direction:column; }
  .chb-v4-track { width:100%; }
  .chb-v4-location-top { padding:14px; }
  .chb-v4-device { align-items:flex-start; flex-wrap:wrap; padding:10px 12px; }
  .chb-v4-device-name { flex-basis:100%; white-space:normal; }
  .chb-v4-device-meta { white-space:normal; }
  .chb-v4-location-foot { flex-wrap:wrap; }
  .modal .modal-actions { grid-template-columns:1fr; }
}

@media (max-width: 390px) {
  .dashboard-header { grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"brand brand" "tools tools" "account account"; gap:8px; padding:12px; }
  .dashboard-header .mobile-menu-button { left:12px; top:12px; }
  .dashboard-mobile-brand { width:clamp(140px,42vw,164px); margin-left:38px; }
  .user-menu { justify-self:end; }
  .dashboard-header-tools { gap:6px; }
  .chb-header-uid { gap:5px; padding-inline:7px; }
  .chb-header-uid span { display:none; }
  .chb-header-uid strong { max-width:calc(100vw - 90px); }
  .chb-notification-link { width:36px; height:36px; flex:none; }
  .logout-button { padding-inline:7px; font-size:10px; }
  .dashboard-content { padding-inline:13px; }
}
