/* Franklin Consultoria: superfícies neutras e contraste por tema.
   Carregado após o branding; as cores de marca continuam vindo do admin. */
html:root {
  --bg-app: #101114; --bg-sidebar: #121316; --bg-content: #101114;
  --bg-card: #1b1c20; --surface: #1b1c20; --surface-2: #24252a; --surface-hover: #2c2d32;
  --border: #ffffff18; --border-2: #ffffff30; --border-glow: rgba(var(--cor-primaria-rgb), .22);
  --text: #faf9f7; --text-mute: #b6b6bc; --text-mute-2: #a3a3ab;
  --brand-link: color-mix(in srgb, var(--cor-primaria) 35%, white);
  --rosa: var(--brand-link); --rosa-hover: var(--brand-link);
  --rosa-glow: rgba(var(--cor-primaria-rgb), .16);
  --roxo: var(--brand-link); --roxo-hover: var(--brand-link); --roxo-glow: var(--rosa-glow);
  --laranja: var(--brand-link);
  --grad-brand: linear-gradient(90deg, var(--cor-primaria), var(--cor-secundaria));
  --grad-brand-hover: linear-gradient(90deg, var(--cor-secundaria), var(--cor-primaria));
  --grad-vertical: linear-gradient(180deg, var(--cor-primaria), var(--cor-secundaria));
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg-app: #f6f6f2; --bg-sidebar: #fff; --bg-content: #f6f6f2;
  --bg-card: #fff; --surface: #fff; --surface-2: #eeefe9; --surface-hover: #e8e9e3;
  --border: #dedfd8; --border-2: #c5c8be;
  --text: #262824; --text-mute: #686d65; --text-mute-2: #686d65;
  --cyan: #0e7490; --warn: #92400e;
  --brand-link: var(--cor-primaria);
  color-scheme: light;
}
html body .content-title, html body .mw-title, html body .auth-title {
  background: none; color: var(--text); -webkit-text-fill-color: var(--text);
}
html body .btn-primary, html body .theme-toggle-opt.is-active,
html body .mw-btn { background: var(--cor-primaria); color: #fff; box-shadow: none; }
html body .btn-primary:hover:not(:disabled), html body .mw-btn:hover {
  background: var(--cor-secundaria); color: #fff; box-shadow: none;
}
html body .sidebar { box-shadow: none; }
html[data-theme="light"] body .sidebar-brand { background: #17181c !important; }
html body .sidebar::after { background: var(--border); }
html body .nav-item.is-active { background: rgba(var(--cor-primaria-rgb), .09); border-color: var(--border-glow); color: var(--text); }
html body .panel { box-shadow: 0 3px 14px #00000008; }
html body .panel::before { display: none; }
html body .stat-card--accent { background: var(--cor-primaria); color: #fff; }
html body .stat-card--accent .stat-label, html body .stat-card--accent .stat-value { color: #fff; }
html body :is(a,button,input,select,textarea):focus-visible {
  outline: 3px solid var(--brand-link); outline-offset: 3px;
}
html body input[type="checkbox"], html body input[type="radio"] { accent-color: var(--cor-primaria); }
html body .sidebar-user-email, html body .field-hint-inline { color: var(--text-mute-2); }
body:not(.pg-app)::before, body:not(.pg-app)::after { opacity: .09; }
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
/* Impede que tabelas largas empurrem o seletor de tema para fora do celular. */
@media (max-width: 780px) {
  html body .app-shell { grid-template-columns: minmax(0, 1fr); }
  html body main.content { min-width: 0; width: 100%; }
  html body .panel { min-width: 0; overflow-x: auto; }
}
