/* =========================================================
   Golden Parts — modo escuro dos apps (04/11/2026, etapa 2 da chave de aparência)
   GP Loja (body.gp-app), app do técnico (body.gp-tec) e app Golden Parts (body.gp-app.gp-cliente).
   Carregado depois do gp-ui.css e do app-b.css, só com a chave ligada (includes/aparencia.php).
   O claro é o visual de hoje e não muda. As barras de cima e de baixo já são pretas e douradas.
   Arquivo GERADO (cada regra sai 2x: escolha "Escuro" e Automático com o aparelho no escuro).
   ========================================================= */

/* ---------- Escuro escolhido em Ajustes ---------- */
html[data-tema="escuro"]:has(body:is(.gp-app,.gp-tec)){ background:#000000 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec){ --bg:#000000; --card:#121214; --line:#2B2B31; --txt:#F4EEDF; --muted:#9A9385; --gold:#D4A531; --orange:#D4A531; --gp-fundo:#000000; --gp-caixa:#121214; --gp-borda:#2B2B31; --gp-texto:#F4EEDF; --gp-suave:#9A9385; background:#000000 !important; color:#F4EEDF !important; color-scheme:dark; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) a{ color:#F1CF6B; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .card, html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-card, html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-box{ background:#121214 !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) a.card, html[data-tema="escuro"] body:is(.gp-app,.gp-tec) a.gp-card{ color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .card h2{ color:#9A9385; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .linha{ border-bottom-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .grande{ color:#F1CF6B !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .muted, html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-muted, html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .quem{ color:#9A9385; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .btn:not(.btn-p):not(.btn-ok){ background:#1B1B1F !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(input[type=text],input[type=search],input[type=email],input[type=password],input[type=tel],input[type=number],input[type=date],input:not([type]),textarea,select){ background:#0F0F11 !important; color:#F4EEDF !important; border-color:#3A3A42 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) ::placeholder{ color:#9A9385 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) label{ color:#B3AA9C !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .alert-ok{ background:#16301F !important; border-color:#2C5A3E !important; color:#9ED9B5 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(.alert-err,.alert-error,.aviso){ background:#3A1614 !important; border-color:#6A2A26 !important; color:#F2938B !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .abas a:not(.on), html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-abas a:not(.on){ background:#121214 !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .tile{ background:#121214 !important; border-color:#2B2B31 !important; box-shadow:none !important; color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .tile:active{ background:#1B1B1F !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .tile small{ color:#9A9385 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gar-res div{ border-bottom-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gar-res div:active{ background:#1B1B1F !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gar-op label{ background:#121214 !important; color:#F4EEDF !important; border-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-gal figure{ background:#121214 !important; border-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-gal figcaption{ color:#CFC7BA !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS){ background:#121214 !important; color:#F4EEDF !important; border-color:#2B2B31 !important; box-shadow:0 14px 40px rgba(0,0,0,.7) !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) h3{ color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) :is(p,label){ color:#B3AA9C !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) :is(input,textarea){ background:#0F0F11 !important; color:#F4EEDF !important; border-color:#3A3A42 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tab th{ color:#9A9385; border-bottom-color:#2B2B31; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tab td{ color:#F4EEDF; border-bottom-color:#1B1B1F; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tab tr:hover td{ background:#1B1B1F; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tag{ background:#2B2B31; color:#E6E0D3; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tag.ok{ background:#16301F; color:#9ED9B5; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tag.pend{ background:#3A2F14; color:#F3CF73; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tag.erro{ background:#3A1614; color:#F2938B; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-tag.info{ background:#0E2238; color:#8CC4F0; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-btn:not(.p):not(.v):not(.r){ background:#1B1B1F !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .gp-btn.r{ background:#1B1B1F !important; border-color:#6A2A26 !important; color:#F2938B !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="#ece8e0"]{ background:#2B2B31 !important; color:#E6E0D3 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .em-num{ background:#2B2B31 !important; color:#E6E0D3 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .fa-tabela{ background:#121214 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .fa-tabela :is(th,td){ border-bottom-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .fa-tabela th{ background:#1B1B1F !important; color:#9A9385 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) .fa-amarelo td{ background:#1A1608 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="color:#666"]{ color:#B3AA9C !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="border-top:1px solid #eee"]{ border-top-color:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="background:#fff;"]{ background:#121214 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="background:#e6e1d8"]{ background:#2B2B31 !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="background:#fff8e1"]{ background:#1A1608 !important; border-color:#5C4A1C !important; color:#E8C25E !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec) [style*="background:#fde2e2"]{ background:#3A1614 !important; border-color:#6A2A26 !important; color:#F2938B !important; }
html[data-tema="escuro"] body:is(.gp-app,.gp-tec){ --gp-nota-bg:#1A1608; --gp-nota-borda:#5C4A1C; --gp-nota-txt:#E8C25E; }

/* ---------- Automático, com o aparelho no modo escuro ---------- */
@media (prefers-color-scheme: dark){
  html[data-aparencia="auto"]:has(body:is(.gp-app,.gp-tec)){ background:#000000 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec){ --bg:#000000; --card:#121214; --line:#2B2B31; --txt:#F4EEDF; --muted:#9A9385; --gold:#D4A531; --orange:#D4A531; --gp-fundo:#000000; --gp-caixa:#121214; --gp-borda:#2B2B31; --gp-texto:#F4EEDF; --gp-suave:#9A9385; background:#000000 !important; color:#F4EEDF !important; color-scheme:dark; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) a{ color:#F1CF6B; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .card, html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-card, html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-box{ background:#121214 !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) a.card, html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) a.gp-card{ color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .card h2{ color:#9A9385; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .linha{ border-bottom-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .grande{ color:#F1CF6B !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .muted, html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-muted, html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .quem{ color:#9A9385; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .btn:not(.btn-p):not(.btn-ok){ background:#1B1B1F !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(input[type=text],input[type=search],input[type=email],input[type=password],input[type=tel],input[type=number],input[type=date],input:not([type]),textarea,select){ background:#0F0F11 !important; color:#F4EEDF !important; border-color:#3A3A42 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) ::placeholder{ color:#9A9385 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) label{ color:#B3AA9C !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .alert-ok{ background:#16301F !important; border-color:#2C5A3E !important; color:#9ED9B5 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(.alert-err,.alert-error,.aviso){ background:#3A1614 !important; border-color:#6A2A26 !important; color:#F2938B !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .abas a:not(.on), html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-abas a:not(.on){ background:#121214 !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .tile{ background:#121214 !important; border-color:#2B2B31 !important; box-shadow:none !important; color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .tile:active{ background:#1B1B1F !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .tile small{ color:#9A9385 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gar-res div{ border-bottom-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gar-res div:active{ background:#1B1B1F !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gar-op label{ background:#121214 !important; color:#F4EEDF !important; border-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-gal figure{ background:#121214 !important; border-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-gal figcaption{ color:#CFC7BA !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS){ background:#121214 !important; color:#F4EEDF !important; border-color:#2B2B31 !important; box-shadow:0 14px 40px rgba(0,0,0,.7) !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) h3{ color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) :is(p,label){ color:#B3AA9C !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) :is(#gpAutDlg,#dlgExcluirOS,#dlgRecusaOS) :is(input,textarea){ background:#0F0F11 !important; color:#F4EEDF !important; border-color:#3A3A42 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tab th{ color:#9A9385; border-bottom-color:#2B2B31; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tab td{ color:#F4EEDF; border-bottom-color:#1B1B1F; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tab tr:hover td{ background:#1B1B1F; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tag{ background:#2B2B31; color:#E6E0D3; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tag.ok{ background:#16301F; color:#9ED9B5; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tag.pend{ background:#3A2F14; color:#F3CF73; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tag.erro{ background:#3A1614; color:#F2938B; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-tag.info{ background:#0E2238; color:#8CC4F0; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-btn:not(.p):not(.v):not(.r){ background:#1B1B1F !important; border-color:#2B2B31 !important; color:#F4EEDF !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .gp-btn.r{ background:#1B1B1F !important; border-color:#6A2A26 !important; color:#F2938B !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="#ece8e0"]{ background:#2B2B31 !important; color:#E6E0D3 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .em-num{ background:#2B2B31 !important; color:#E6E0D3 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .fa-tabela{ background:#121214 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .fa-tabela :is(th,td){ border-bottom-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .fa-tabela th{ background:#1B1B1F !important; color:#9A9385 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) .fa-amarelo td{ background:#1A1608 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="color:#666"]{ color:#B3AA9C !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="border-top:1px solid #eee"]{ border-top-color:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="background:#fff;"]{ background:#121214 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="background:#e6e1d8"]{ background:#2B2B31 !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="background:#fff8e1"]{ background:#1A1608 !important; border-color:#5C4A1C !important; color:#E8C25E !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec) [style*="background:#fde2e2"]{ background:#3A1614 !important; border-color:#6A2A26 !important; color:#F2938B !important; }
  html[data-aparencia="auto"] body:is(.gp-app,.gp-tec){ --gp-nota-bg:#1A1608; --gp-nota-borda:#5C4A1C; --gp-nota-txt:#E8C25E; }
}
