/*
 * V1.03.8.61 — ajuste final de paleta e modais.
 * Corrige sobras de cores, reforça botões/inputs e melhora a integração visual
 * de Determinar oficina, Salvar visual, Visuais salvos, Adicionar/Alocar e Modo TV.
 */
html[data-sgo-palette] body .modal-root:not(.hidden),
html[data-sgo-palette] body .alocar-hard-modal-wrap,
html[data-sgo-palette] body .alocar-hard-modal-wrap-v2,
html[data-sgo-palette] body .det-tv-overlay{
  background:color-mix(in srgb,var(--sgo-theme-950) 64%,transparent)!important;
  -webkit-backdrop-filter:blur(13px) saturate(.92)!important;
  backdrop-filter:blur(13px) saturate(.92)!important;
}

html[data-sgo-palette] body .modal-root .modal,
html[data-sgo-palette] body .modal-root .modal-card,
html[data-sgo-palette] body .modal-root .dialog-card,
html[data-sgo-palette] body .modal-root .modal-content,
html[data-sgo-palette] body .alocar-hard-modal,
html[data-sgo-palette] body .alocar-hard-modal-v2,
html[data-sgo-palette] body .det-tv-shell{
  background:var(--sgo-surface)!important;
  color:var(--sgo-ink)!important;
  border:1px solid color-mix(in srgb,var(--sgo-line) 86%,var(--sgo-theme-100))!important;
  box-shadow:0 34px 110px rgba(var(--sgo-accent-rgb),.24)!important;
}

html[data-sgo-palette] body .modal-root .modal-header,
html[data-sgo-palette] body .alocar-hard-modal > header,
html[data-sgo-palette] body .alocar-hard-modal-v2 > header,
html[data-sgo-palette] body .det-tv-header{
  background:linear-gradient(118deg,var(--sgo-theme-950),var(--sgo-theme-900) 60%,var(--sgo-theme-700))!important;
  border-bottom:1px solid rgba(var(--sgo-accent-rgb),.26)!important;
}
html[data-sgo-palette] body .modal-root .modal-header :is(h2,h3,strong),
html[data-sgo-palette] body .alocar-hard-modal > header :is(h2,h3,strong),
html[data-sgo-palette] body .alocar-hard-modal-v2 > header :is(h2,h3,strong){color:#fff!important}
html[data-sgo-palette] body .modal-root .modal-header :is(p,small,span),
html[data-sgo-palette] body .alocar-hard-modal > header :is(p,small,span),
html[data-sgo-palette] body .alocar-hard-modal-v2 > 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,
html[data-sgo-palette] body .modal-root .modal-actions,
html[data-sgo-palette] body .alocar-hard-modal > footer,
html[data-sgo-palette] body .alocar-hard-modal-v2 > footer{
  background:var(--sgo-surface)!important;
  color:var(--sgo-ink)!important;
  border-color:var(--sgo-line)!important;
}
html[data-sgo-palette] body .modal-root .field,
html[data-sgo-palette] body .modal-root .toolbar-line,
html[data-sgo-palette] body .modal-root .selection-item,
html[data-sgo-palette] body .modal-root .det-oficina-pane-p16,
html[data-sgo-palette] body .modal-root .det-oficina-resumo-v111,
html[data-sgo-palette] body .modal-root .det-oficina-lote-lista-p16,
html[data-sgo-palette] body .modal-root .info-card,
html[data-sgo-palette] body .alocar-hard-list,
html[data-sgo-palette] body .alocar-hard-list-v2,
html[data-sgo-palette] body .det-tv-kpis,
html[data-sgo-palette] body .det-tv-status,
html[data-sgo-palette] body .det-tv-process{
  background:var(--sgo-soft)!important;
  border-color:var(--sgo-line)!important;
  color:var(--sgo-ink)!important;
}
html[data-sgo-palette] body .modal-root :is(input,select,textarea),
html[data-sgo-palette] body .alocar-hard-grid :is(input,select,textarea),
html[data-sgo-palette] body .det-oficina-modal-p16 :is(input,select,textarea){
  background:var(--sgo-surface)!important;
  color:var(--sgo-ink)!important;
  border:1px solid var(--sgo-line)!important;
  box-shadow:none!important;
}
html[data-sgo-palette] body .modal-root :is(input,select,textarea):focus,
html[data-sgo-palette] body .alocar-hard-grid :is(input,select,textarea):focus,
html[data-sgo-palette] body .det-oficina-modal-p16 :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.primary,
html[data-sgo-palette] body .modal-root .modal-close,
html[data-sgo-palette] body .det-tv-close,
html[data-sgo-palette] body .alocar-hard-close,
html[data-sgo-palette] body .modal-root .report-print-btn,
html[data-sgo-palette] body .modal-root .report-copy-btn{
  background:linear-gradient(135deg,var(--sgo-theme-900),var(--sgo-theme-700))!important;
  color:#fff!important;
  border:1px solid var(--sgo-theme-800)!important;
  box-shadow:0 10px 22px rgba(var(--sgo-accent-rgb),.20)!important;
}
html[data-sgo-palette] body .modal-root .btn.primary:hover,
html[data-sgo-palette] body .modal-root .modal-close:hover,
html[data-sgo-palette] body .det-tv-close:hover,
html[data-sgo-palette] body .alocar-hard-close:hover{filter:brightness(1.06)!important}
html[data-sgo-palette] body .modal-root .btn.ghost:not(.danger),
html[data-sgo-palette] body .modal-root button[data-close-modal],
html[data-sgo-palette] body .modal-root button[data-close],
html[data-sgo-palette] body .modal-root .report-close-btn{
  background:var(--sgo-surface)!important;
  color:var(--sgo-theme-900)!important;
  border:1px solid var(--sgo-line)!important;
  box-shadow:none!important;
}
html[data-sgo-palette] body .modal-root .btn.ghost:not(.danger):hover,
html[data-sgo-palette] body .modal-root button[data-close-modal]:hover{
  background:var(--sgo-theme-50)!important;
  border-color:var(--sgo-theme-700)!important;
}

html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-shell{background:var(--sgo-canvas)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-kpi{background:var(--sgo-surface)!important;border:1px solid var(--sgo-line)!important;color:var(--sgo-ink)!important}
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-kpi strong,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-status-head h3,
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-shell .btn,
html[data-sgo-palette] body[data-current-menu="determinar-frente"] .det-tv-shell button{font-weight:900!important}
