/* MPS ERP MAKE - Estilos da Frente de Caixa e Retaguarda Multi-Temas
   Tokens Beauty Retail OS (Oxford Slate + Champagne / Rosé) */

:root {
  --primary-pink: #b76e79;
  --primary-pink-hover: #9f5a64;
  --accent-emerald: #059669;
  --mps-primary: #0f2b48;
  --mps-accent: #c5a880;
  --mps-touch-min: 48px;
}

/* Shell PDV: caber em 1366x768 / 1920x1080 sem scroll externo */
html.pdv-shell,
html.pdv-shell body {
  height: 100%;
  overflow: hidden;
}

body.pdv-app {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.pdv-app #aba-pdv,
body.pdv-app main.pdv-checkout-main {
  min-height: 0;
}

/* Total a pagar — centro de gravidade visual */
#txtTotalLiquido,
.pdv-total-gravidade {
  font-size: 2.25rem !important;
  line-height: 1.1 !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  color: var(--mps-accent, #c5a880) !important;
}

html.light #txtTotalLiquido,
html.light .pdv-total-gravidade {
  color: var(--mps-primary, #0f2b48) !important;
}

.valor-monetario {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Linhas do carrinho — respiro para touch */
.pdv-cart-row {
  padding: 10px 14px;
  min-height: 48px;
}

/* Botões de pagamento / ação primária */
.pdv-pay-btn,
.mps-touch-target {
  min-height: var(--mps-touch-min);
  gap: 8px;
}

/* Input de bipagem — acento champagne no foco (identidade beauty) */
#inputBarra:focus {
  border-color: var(--mps-accent, #c5a880) !important;
  box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.25);
}

/* Nav ativa: Oxford + champagne em vez de rosa Bootstrap genérico */
.nav-tab-active {
  background-color: var(--mps-primary, #0f2b48) !important;
  color: #fff !important;
  border-color: var(--mps-accent, #c5a880) !important;
  box-shadow: 0 2px 4px rgba(197, 168, 128, 0.35);
}

/* Animações e Indicadores */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.92); }
}

.status-dot-pulse {
  animation: pulse-dot 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Barra de Rolagem Customizada */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Teclas de Atalho Visuais */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.transition-card {
  transition: all 0.15s ease-in-out;
}

/* =====================================================================
 * SUPORTE A TEMA CLARO (LIGHT MODE)
 * ===================================================================== */

html.light body {
  background-color: var(--mps-bg-light, #fcfbfa) !important;
  color: #0f172a !important;
}

html.light ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html.light ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

html.light header {
  background-color: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

html.light .bg-slate-950 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .bg-slate-900 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

html.light .bg-slate-900\/60,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/90 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html.light .bg-slate-800 {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

html.light .bg-slate-800\/40,
html.light .bg-slate-800\/50,
html.light .bg-slate-800\/80 {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

html.light .hover\:bg-slate-750:hover,
html.light .hover\:bg-slate-700:hover {
  background-color: #e2e8f0 !important;
}

html.light .border-slate-800,
html.light .border-slate-700 {
  border-color: #e2e8f0 !important;
}

html.light .text-slate-100,
html.light .text-slate-200 {
  color: #0f172a !important;
}

html.light .text-slate-300,
html.light .text-slate-400 {
  color: #475569 !important;
}

html.light input {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light input:focus {
  background-color: #ffffff !important;
  border-color: #c5a880 !important;
}

/* Modais no modo claro */
html.light .modal-bg-card {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Abas de Navegação Ativa (Oxford Slate + Champagne) */
.nav-tab-active {
  background-color: var(--mps-primary, #0f2b48) !important;
  color: #ffffff !important;
  border-color: var(--mps-accent, #c5a880) !important;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(197, 168, 128, 0.35);
}

.nav-tab-inactive {
  opacity: 0.85;
}

.nav-tab-inactive:hover {
  opacity: 1;
}

/* =====================================================================
 * TEMA CLARO — contraste reforçado (clareza operacional no PDV)
 * ===================================================================== */

/* Abas inativas: cinza legível + borda, não “fantasma” */
html.light .nav-tab-inactive,
html.light button.nav-tab-inactive,
html.light .bg-slate-800.text-slate-300 {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 600 !important;
}

html.light .nav-tab-inactive:hover,
html.light button.nav-tab-inactive:hover {
  background-color: #cbd5e1 !important;
  color: #020617 !important;
}

html.light .nav-tab-active {
  background-color: #0f2b48 !important;
  color: #ffffff !important;
  border-color: #7a5c38 !important;
}

/* Chips Cliente / Consultora (antes: fundo escuro + texto pastel) */
html.light #txtClienteAtivo,
html.light #txtConsultoraAtiva,
html.light .text-sky-300,
html.light .text-pink-300,
html.light .text-fuchsia-300,
html.light .text-purple-300 {
  color: #0f2b48 !important;
  font-weight: 700 !important;
}

html.light kbd {
  background-color: #cbd5e1 !important;
  color: #0f172a !important;
  border: 1px solid #94a3b8 !important;
}

/* Metadados FEFO / lote: contraste WCAG em fundo branco */
html.light .item-lote,
html.light .text-emerald-400.font-mono,
html.light .item-lote.text-emerald-400 {
  color: #065f46 !important;
  font-weight: 700 !important;
}

html.light .item-subtom,
html.light .text-slate-500.text-\[11px\] {
  color: #334155 !important;
}

html.light .pdv-cart-row {
  border-bottom-color: #e2e8f0 !important;
}

html.light .pdv-cart-row:hover {
  background-color: #f1f5f9 !important;
}

/* Placeholder do bipador */
html.light input::placeholder,
html.light #inputBarra::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

html.light input {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

/* Badges / painéis verde-escuro que viram ilegíveis no light */
html.light .bg-emerald-950,
html.light .bg-emerald-950\/60,
html.light .bg-sky-950,
html.light .bg-indigo-950,
html.light .bg-rose-950,
html.light .bg-amber-950 {
  background-color: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #064e3b !important;
}

html.light .bg-emerald-950 .text-emerald-300,
html.light .bg-emerald-950\/60 .text-emerald-200,
html.light .text-emerald-200,
html.light .text-emerald-300 {
  color: #065f46 !important;
}

/* Painel “Venda Assistida” e totais auxiliares */
html.light .text-xs.uppercase.tracking-wider,
html.light .text-xs.font-bold.text-slate-400,
html.light .text-sm.text-slate-400 {
  color: #334155 !important;
}

html.light #txtTotalLiquido,
html.light .pdv-total-gravidade {
  color: #020617 !important;
}

/* Botões de atalho F-keys: texto sempre escuro o bastante no fundo claro */
html.light button.border,
html.light [class*="border-emerald"],
html.light [class*="border-sky"],
html.light [class*="border-cyan"] {
  font-weight: 600;
}

/* Footer atalhos */
html.light .text-slate-400.font-mono,
html.light footer .text-slate-400 {
  color: #475569 !important;
}

/* Header loja / operador */
html.light header .text-slate-400 {
  color: #475569 !important;
}
html.light header .text-slate-200,
html.light header .text-slate-100 {
  color: #0f172a !important;
}

/* Select de filial no modal PIN — contraste forçado (Windows/Chromium) */
#selectFilialOperador {
  color: #f8fafc !important;
  background-color: #020617 !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
}
#selectFilialOperador option {
  color: #0f172a !important;
  background-color: #ffffff !important;
}

/* Venda assistida: não usa gradient slate-900 (no tema claro o fundo vira branco e o texto claro some). */
.pdv-card-assistida {
  background: #0f172a;
  border: 1px solid #7a5c38;
  color: #f8fafc;
}
.pdv-assistida-titulo { color: #e8d5b5; }
.pdv-assistida-badge {
  background: #064e3b;
  color: #ecfdf5;
  border: 1px solid #059669;
}
.pdv-assistida-item {
  background: #1e293b;
  border: 1px solid #334155;
}
.pdv-assistida-nome { color: #f8fafc; }
.pdv-assistida-motivo { color: #cbd5e1; }
.pdv-assistida-preco { color: #34d399; }
.pdv-assistida-btn {
  background: #0f2b48;
  color: #ffffff;
}

html.light .pdv-card-assistida {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}
html.light .pdv-assistida-titulo { color: #9a3412; }
html.light .pdv-assistida-badge {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}
html.light .pdv-assistida-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
html.light .pdv-assistida-nome { color: #0f172a; }
html.light .pdv-assistida-motivo { color: #334155; }
html.light .pdv-assistida-preco { color: #047857; }
html.light .pdv-assistida-btn {
  background: #0f2b48;
  color: #ffffff;
}
