
/* DC CONTROL 2.3.1 STABLE4.20.9.60 · Jerarquía final Hueso + GPS externo */
:root{
  --dc-ctl-bg:#f8fafc;
  --dc-ctl-bg-2:#ffffff;
  --dc-ctl-text:#0f172a;
  --dc-ctl-muted:#64748b;
  --dc-ctl-border:rgba(15,23,42,.14);
  --dc-ctl-soft:#eef2f7;
  --dc-ctl-blue:#0ea5e9;
  --dc-ctl-green:#22c55e;
  --dc-ctl-amber:#f59e0b;
  --dc-ctl-purple:#8b5cf6;
}
html[data-theme="dark"],body[data-theme="dark"]{
  --dc-ctl-bg:#0d1b26;
  --dc-ctl-bg-2:#142838;
  --dc-ctl-text:#f5f7fb;
  --dc-ctl-muted:#b8c7d5;
  --dc-ctl-border:rgba(205,229,248,.18);
  --dc-ctl-soft:#1b3346;
  --dc-ctl-blue:#38bdf8;
  --dc-ctl-green:#34d399;
  --dc-ctl-amber:#fbbf24;
  --dc-ctl-purple:#c084fc;
}

/* Hueso: nada blanco sobre blanco en modo oscuro */
html[data-theme="dark"] .hueso-page,
body[data-theme="dark"] .hueso-page{color:var(--dc-ctl-text)}
html[data-theme="dark"] .hueso-page :is(.hueso-card,.hueso-kpis button,.hueso-toolbar,.hueso-search,.hueso-part,.hueso-empty,.hueso-history),
body[data-theme="dark"] .hueso-page :is(.hueso-card,.hueso-kpis button,.hueso-toolbar,.hueso-search,.hueso-part,.hueso-empty,.hueso-history){
  background:rgba(20,40,56,.78)!important;
  color:var(--dc-ctl-text)!important;
  border-color:var(--dc-ctl-border)!important;
}
html[data-theme="dark"] .hueso-page :is(input,select,textarea),
body[data-theme="dark"] .hueso-page :is(input,select,textarea){
  background:#0f2231!important;
  color:#f8fafc!important;
  border-color:rgba(189,220,246,.24)!important;
  caret-color:#f8fafc!important;
}
html[data-theme="dark"] .hueso-page :is(input::placeholder,textarea::placeholder),
body[data-theme="dark"] .hueso-page :is(input::placeholder,textarea::placeholder){color:#a8bac8!important}
html[data-theme="dark"] .hueso-page select option,
body[data-theme="dark"] .hueso-page select option{background:#0f2231!important;color:#f8fafc!important}

html[data-theme="dark"] .hueso-overlay .hueso-sheet,
body[data-theme="dark"] .hueso-overlay .hueso-sheet,
html[data-theme="dark"] .hueso-sheet,
body[data-theme="dark"] .hueso-sheet{
  background:linear-gradient(180deg,#142838,#0e1d29)!important;
  color:#f8fafc!important;
  border:1px solid rgba(205,229,248,.2)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.55)!important;
}
html[data-theme="dark"] .hueso-sheet .sheet-head,
body[data-theme="dark"] .hueso-sheet .sheet-head{background:transparent!important;color:#f8fafc!important}
html[data-theme="dark"] .hueso-sheet :is(h2,h3,b,label,span),
body[data-theme="dark"] .hueso-sheet :is(h2,h3,b,label,span){color:#f8fafc}
html[data-theme="dark"] .hueso-sheet :is(small,p,.muted),
body[data-theme="dark"] .hueso-sheet :is(small,p,.muted){color:#c4d3df!important}

html[data-theme="dark"] .hueso-review-help,
body[data-theme="dark"] .hueso-review-help{
  background:rgba(15,34,49,.95)!important;
  border:1px solid rgba(205,229,248,.18)!important;
  color:#dbeafe!important;
}
html[data-theme="dark"] .hueso-review-row,
body[data-theme="dark"] .hueso-review-row{
  background:rgba(13,27,38,.72)!important;
  border:1px solid rgba(205,229,248,.15)!important;
  color:#f8fafc!important;
}
html[data-theme="dark"] .hueso-review-row.locked,
body[data-theme="dark"] .hueso-review-row.locked{background:rgba(12,23,33,.68)!important;opacity:.92}
html[data-theme="dark"] .hueso-review-row button,
body[data-theme="dark"] .hueso-review-row button,
html[data-theme="dark"] .hueso-part-action,
body[data-theme="dark"] .hueso-part-action{
  background:#183247!important;
  color:#f8fafc!important;
  border:1px solid rgba(205,229,248,.22)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .hueso-review-row button:hover,
body[data-theme="dark"] .hueso-review-row button:hover,
html[data-theme="dark"] .hueso-part-action:hover,
body[data-theme="dark"] .hueso-part-action:hover{
  background:#21435d!important;
  border-color:rgba(56,189,248,.55)!important;
}
html[data-theme="dark"] .hueso-review-row button.active,
body[data-theme="dark"] .hueso-review-row button.active,
html[data-theme="dark"] .hueso-part-action.active,
body[data-theme="dark"] .hueso-part-action.active{
  background:#0ea5e9!important;
  color:#06121c!important;
  border-color:#7dd3fc!important;
  font-weight:900!important;
}
html[data-theme="dark"] .hueso-part-icon,
body[data-theme="dark"] .hueso-part-icon{
  background:#102232!important;
  color:#f8fafc!important;
  border:1px solid rgba(205,229,248,.2)!important;
}
html[data-theme="dark"] .hueso-part.present .hueso-part-icon,
body[data-theme="dark"] .hueso-part.present .hueso-part-icon{background:rgba(52,211,153,.18)!important;color:#a7f3d0!important}
html[data-theme="dark"] .hueso-part.missing .hueso-part-icon,
body[data-theme="dark"] .hueso-part.missing .hueso-part-icon,
html[data-theme="dark"] .hueso-part.removed .hueso-part-icon,
body[data-theme="dark"] .hueso-part.removed .hueso-part-icon{background:rgba(251,191,36,.18)!important;color:#fde68a!important}

/* Ubicación 2.0: tarjetas oscuras, no crema en oscuro */
html[data-theme="dark"] :is(.gps-clean58-shell,.location-people,.live-map-card,.location-overview),
body[data-theme="dark"] :is(.gps-clean58-shell,.location-people,.live-map-card,.location-overview){color:var(--dc-ctl-text)}
html[data-theme="dark"] :is(.location-person,.location-person-stable,.dc-gps60-panel,.gps-live360-status,.location-share-card),
body[data-theme="dark"] :is(.location-person,.location-person-stable,.dc-gps60-panel,.gps-live360-status,.location-share-card){
  background:linear-gradient(180deg,rgba(20,40,56,.96),rgba(14,29,41,.96))!important;
  color:#f8fafc!important;
  border:1px solid rgba(205,229,248,.18)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.26)!important;
}
html[data-theme="dark"] .location-person *,
body[data-theme="dark"] .location-person *,
html[data-theme="dark"] .dc-gps60-panel *,
body[data-theme="dark"] .dc-gps60-panel *{color:inherit}
html[data-theme="dark"] .location-person small,
body[data-theme="dark"] .location-person small,
html[data-theme="dark"] .dc-gps60-panel small,
body[data-theme="dark"] .dc-gps60-panel small{color:#bfd0dd!important}
html[data-theme="dark"] .person-avatar,
body[data-theme="dark"] .person-avatar{background:#102333!important;color:#e0f2fe!important;border:1px solid rgba(125,211,252,.25)!important}
html[data-theme="dark"] .person-avatar.live,
body[data-theme="dark"] .person-avatar.live{background:rgba(34,197,94,.22)!important;color:#bbf7d0!important;border-color:rgba(74,222,128,.45)!important}
html[data-theme="dark"] .person-arrow,
body[data-theme="dark"] .person-arrow{color:#dbeafe!important}
.dc-gps60-panel{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:10px 0;padding:14px;border-radius:18px}
.dc-gps60-panel b{display:block;font-size:15px}
.dc-gps60-panel small{display:block;margin-top:3px}
.dc-gps60-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.dc-gps60-panel[data-state="live"]{border-color:rgba(52,211,153,.42)!important}
.dc-gps60-panel[data-state="warn"],.dc-gps60-panel[data-state="error"]{border-color:rgba(251,191,36,.48)!important}
@media(max-width:720px){.dc-gps60-panel{align-items:stretch;flex-direction:column}.dc-gps60-actions{justify-content:stretch}.dc-gps60-actions button{flex:1}}


/* STABLE4.20.9.65 · GPS oscuro: jerarquía semántica, sin recolor global */
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-people .location-person.location-person-stable,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-people .location-person.location-person-stable{
  background:linear-gradient(180deg,#14283a 0%,#102131 100%)!important;
  color:#f8fafc!important;
  border:1px solid rgba(148,180,203,.24)!important;
  border-left:5px solid #64748b!important;
  box-shadow:0 9px 24px rgba(0,0,0,.20)!important;
}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable .person-main b,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable .person-main b{color:#f8fafc!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable :is(.person-main small,.person-meta small),
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable :is(.person-main small,.person-meta small){color:#aec2d1!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable .person-arrow,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable .person-arrow{color:#dbeafe!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable:has(.person-avatar.live),
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-person.location-person-stable:has(.person-avatar.live){border-left-color:#22c55e!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .person-avatar,
body[data-theme="dark"] .location-shell .gps-clean58-shell .person-avatar{background:#0d2131!important;color:#dbeafe!important;border:1px solid rgba(125,211,252,.22)!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .person-avatar.live,
body[data-theme="dark"] .location-shell .gps-clean58-shell .person-avatar.live{background:rgba(34,197,94,.16)!important;color:#bbf7d0!important;border-color:rgba(74,222,128,.40)!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-toolbar,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-toolbar{color:#f8fafc!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-toolbar #locationMapSelected,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-toolbar #locationMapSelected{color:#dbeafe!important;opacity:1!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-legend,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-legend{color:#e2e8f0!important}
html[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-legend small,
body[data-theme="dark"] .location-shell .gps-clean58-shell .location-map-legend small{color:#a9bdcc!important}
