/*
 * V1.03.8.60 — Paleta integral em modais, submenus da Alocação e Modo TV.
 * Mantém cores semânticas de status/frota e aplica a paleta somente à estrutura visual.
 */
html[data-sgo-palette] body .modal-root:not(.hidden){
  background:color-mix(in srgb,var(--sgo-theme-950) 58%,transparent)!important;
  -webkit-backdrop-filter:blur(10px) saturate(.88)!important;
  backdrop-filter:blur(10px) saturate(.88)!important;
}
html[data-sgo-palette] body .modal-root .modal:not(.report-view),
html[data-sgo-palette] body .modal-root .modal-card,
html[data-sgo-palette] body .modal-root .modal-content,
html[data-sgo-palette] body .modal-root .dialog-card{
  background:var(--sgo-surface)!important;
  color:var(--sgo-ink)!important;
  border-color:var(--sgo-line)!important;
  box-shadow:0 28px 78px rgba(var(--sgo-accent-rgb),.22)!important;
}
html[data-sgo-palette] body .modal-root .modal-header{
  background:linear-gradient(118deg,var(--sgo-theme-950),var(--sgo-theme-900) 62%,var(--sgo-theme-700))!important;
  border-color:rgba(var(--sgo-accent-rgb),.32)!important;
}
html[data-sgo-palette] body .modal-root .modal-header :is(h2,h3,strong){color:#fff!important}
html[data-sgo-palette] body .modal-root .modal-header :is(p,small,span){color:color-mix(in srgb,#fff 82%,var(--sgo-theme-100))!important}
html[data-sgo-palette] body .modal-root .modal-body{background:var(--sgo-surface)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body .modal-root .modal-actions{
  background:color-mix(in srgb,var(--sgo-surface) 88%,var(--sgo-theme-50))!important;
  border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body .modal-root :is(.info-card,.selection-item,.toolbar-line,.det-oficina-resumo-v111,.det-oficina-pane-p16,.det-oficina-lote-lista-p16){
  background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important;
}
html[data-sgo-palette] body .modal-root :is(.field span,label>span,.selection-item strong,.det-oficina-lote-toolbar-p16 strong){color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body .modal-root :is(input,select,textarea){background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body .modal-root :is(input,select,textarea):focus{border-color:var(--sgo-theme-700)!important;box-shadow:0 0 0 3px rgba(var(--sgo-accent-rgb),.14)!important}
html[data-sgo-palette] body .modal-root .btn.ghost:not(.danger){
  background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-theme-900)!important;
}
html[data-sgo-palette] body .modal-root .btn.ghost:not(.danger):hover{background:var(--sgo-theme-50)!important;border-color:var(--sgo-theme-700)!important}

/* Alocação — Determinar oficina */
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-oficina-mode-switch-p16{
  background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-oficina-mode-switch-p16 button{
  background:transparent!important;color:var(--sgo-muted)!important;border-color:transparent!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-oficina-mode-switch-p16 button.active{
  background:linear-gradient(135deg,var(--sgo-theme-900),var(--sgo-theme-700))!important;color:#fff!important;box-shadow:0 7px 18px rgba(var(--sgo-accent-rgb),.20)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-oficina-lote-lista-p16 > *{
  border-color:var(--sgo-line)!important;background:var(--sgo-surface)!important;color:var(--sgo-ink)!important;
}

/* Alocação — Adicionar / alocar (modal independente anexado ao body). */
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-modal-wrap,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-modal-wrap-v2{
  background:color-mix(in srgb,var(--sgo-theme-950) 58%,transparent)!important;
  -webkit-backdrop-filter:blur(10px) saturate(.88)!important;
  backdrop-filter:blur(10px) saturate(.88)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-backdrop{background:transparent!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-modal,.alocar-hard-modal-v2){
  background:var(--sgo-surface)!important;color:var(--sgo-ink)!important;border-color:var(--sgo-line)!important;
  box-shadow:0 30px 90px rgba(var(--sgo-accent-rgb),.24)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-modal,.alocar-hard-modal-v2)>header{
  background:linear-gradient(118deg,var(--sgo-theme-950),var(--sgo-theme-900) 62%,var(--sgo-theme-700))!important;
  border-color:rgba(var(--sgo-accent-rgb),.30)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-modal,.alocar-hard-modal-v2)>header h2{color:#fff!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-modal,.alocar-hard-modal-v2)>header p{color:color-mix(in srgb,#fff 82%,var(--sgo-theme-100))!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-close{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.24)!important;color:#fff!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-grid label span{color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-grid :is(input,select,textarea){background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-list,.alocar-hard-list-v2){background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-item,.alocar-hard-item-v2){background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-frota-block strong,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-origem-block b,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-tipo-block b{color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-frota-block,.alocar-hard-origem-block,.alocar-hard-tipo-block) :is(small,em){color:var(--sgo-muted)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .alocar-hard-status{background:var(--sgo-theme-50)!important;color:var(--sgo-theme-900)!important;border:1px solid var(--sgo-line)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] :is(.alocar-hard-modal,.alocar-hard-modal-v2)>footer{background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important}

/* Alocação — Modo TV: estrutura acompanha a paleta; estados operacionais continuam semânticos. */
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-overlay{
  background:color-mix(in srgb,var(--sgo-theme-950) 70%,transparent)!important;
  -webkit-backdrop-filter:blur(10px) saturate(.88)!important;
  backdrop-filter:blur(10px) saturate(.88)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-shell{background:var(--sgo-canvas)!important;border-color:var(--sgo-line)!important;box-shadow:0 28px 90px rgba(var(--sgo-accent-rgb),.28)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-header{background:linear-gradient(118deg,var(--sgo-theme-950),var(--sgo-theme-900) 62%,var(--sgo-theme-700))!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-eyebrow,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-header p,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-side :is(span,small){color:color-mix(in srgb,#fff 82%,var(--sgo-theme-100))!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-close{background:var(--sgo-surface)!important;color:var(--sgo-theme-900)!important;border:1px solid rgba(255,255,255,.42)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-kpis{background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-kpi{background:var(--sgo-surface)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-kpi span{background:var(--sgo-theme-50)!important;color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-board{background:var(--sgo-canvas)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-status{background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;box-shadow:0 8px 24px rgba(var(--sgo-accent-rgb),.08)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-status-head{background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-status-head h3{color:var(--sgo-ink)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-process{background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-process h4{color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-process h4 span{color:var(--sgo-muted)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-empty{color:var(--sgo-theme-900)!important}

/* Alocação — cobertura dos submenus internos que ainda tinham cores fixas. */
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot :is(
  .det-modal-premium,.det-modal-hub,.det-modal-pane,.det-order-types-modal,
  .det-tratativa-modal-card,.det-oficina-modal-v111,.det-oficina-modal-v113
){
  background:var(--sgo-surface)!important;color:var(--sgo-ink)!important;border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot :is(
  .det-modal-hub-intro,.det-modal-pane-head,.det-order-types-intro,.det-tratativa-current,
  .det-tratativa-form,.det-oficina-resumo-v111
){
  background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-modal-hub-card{
  background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important;
  box-shadow:0 8px 24px rgba(var(--sgo-accent-rgb),.08)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-modal-hub-card:hover{
  background:var(--sgo-theme-50)!important;border-color:var(--sgo-theme-700)!important;
  box-shadow:0 12px 30px rgba(var(--sgo-accent-rgb),.14)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-modal-hub-icon{
  background:linear-gradient(135deg,var(--sgo-theme-900),var(--sgo-theme-700))!important;color:#fff!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot :is(
  .det-modal-hub-card strong,.det-modal-hub-intro strong,.det-modal-pane-head h3,
  .det-order-types-intro strong,.det-tratativa-modal-head h3
){color:var(--sgo-theme-900)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot :is(
  .det-modal-hub-card small,.det-modal-hub-intro span,.det-order-types-intro p,.det-modal-pane-head span
){color:var(--sgo-muted)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-order-types-list{
  background:var(--sgo-soft)!important;border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-order-types-item{
  background:var(--sgo-surface)!important;border-color:var(--sgo-line)!important;color:var(--sgo-ink)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-order-types-item:hover{
  background:var(--sgo-theme-50)!important;border-color:var(--sgo-theme-700)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-tratativa-modal-head{
  background:linear-gradient(118deg,var(--sgo-theme-950),var(--sgo-theme-900) 62%,var(--sgo-theme-700))!important;
  border-color:rgba(var(--sgo-accent-rgb),.30)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-tratativa-modal-head :is(h3,span){color:#fff!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-tratativa-modal-head p{color:color-mix(in srgb,#fff 82%,var(--sgo-theme-100))!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot :is(.det-info-card-premium,.det-os-panel-premium,.det-section-head-premium){
  border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-info-card-premium{
  background:var(--sgo-soft)!important;color:var(--sgo-ink)!important;
}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-info-card-premium span{color:var(--sgo-muted)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] #modalRoot .det-info-card-premium strong{color:var(--sgo-theme-900)!important}
