/* Padrão visual Dominus para os sistemas internos: cores da marca, tema claro/escuro e peças comuns.
   Cores oficiais (dominusmkt.com): laranja #FF6210, laranja escuro #F15808, preto quente #1C0D0A.
   O laranja aparece com disciplina: na ação principal e nos dados (barras de progresso); o resto é tinta.
   Texto sobre o laranja é o preto quente (o branco não tem contraste suficiente nele). */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@700&display=swap");

:root {
  color-scheme: light;
  --ground: #f3f3f2;   --surface: #ffffff;  --raised: #faf9f8;  --active: #efebe8;
  --border: #e7e3df;   --rule: #f0edea;     --control: #cfc9c4;
  --text: #1c0d0a;     --muted: #5c5550;    --faint: #6b6460;
  --accent: #ff6210;   --accent-hover: #f15808;  --on-accent: #1c0d0a;
  --track: #ece8e4;
  --positive: #247b50; --negative: #b4232a;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fffbeb;  --pill-warning-ink: #92400e;  --pill-warning-border: #fde68a;
  --scrim: rgba(28, 13, 10, 0.72);

  --radius-card: 8px;  --radius-control: 6px;
  --gap: 16px;  --card-pad: 20px;
  --control-height: 36px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-marca: "Poppins", var(--font);
  --fs-title: 24px;  --fs-section: 16px;  --fs-body: 14px;  --fs-small: 12px;
}

/* Escuro: preto quente da marca, sem azul-marinho. Aplica-se pela escolha salva ou pelo sistema. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #110d0b;   --surface: #1a1512;  --raised: #221c18;  --active: #2c2420;
  --border: #2c2420;   --rule: #241e1a;     --control: #4d433d;
  --text: #f5f4f3;     --muted: #bdb4ae;    --faint: #9c938d;
  --track: #2f2723;
  --positive: #3fc07a; --negative: #f07a72;
  --pill-negative-bg: #2c1a1a; --pill-negative-ink: #f07a72;
  --pill-warning-bg: #2a2010;  --pill-warning-ink: #f4c46b;  --pill-warning-border: #5c4520;
  --scrim: rgba(0, 0, 0, 0.78);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: var(--fs-body)/20px var(--font);
  -webkit-font-smoothing: antialiased;
}
.num { font-variant-numeric: tabular-nums; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Barra do topo: marca, nome do sistema, escopo e utilidades --- */
.barra-topo {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.marca svg { width: 28px; height: 28px; flex: none; }
.marca-nome { font: 700 17px/1 var(--font-marca); letter-spacing: -0.01em; white-space: nowrap; }
.marca-escopo { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-topo .espaco { flex: 1; }

/* --- Botões: uma ação principal (laranja) por tela; o resto é neutro --- */
.botao, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-height);
  padding: 0 14px;
  font: 500 var(--fs-body)/1 var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s, border-color 0.12s, transform 0.08s;
}
.botao:hover, button:hover { background: var(--raised); border-color: var(--faint); }
.botao:active, button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; transform: none; }
.botao.principal, button.principal {
  height: 40px;
  padding: 0 18px;
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.botao.principal:hover, button.principal:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.botao.texto, button.texto { border-color: transparent; background: transparent; padding: 0 8px; color: var(--muted); }
.botao.texto:hover, button.texto:hover { color: var(--text); background: var(--active); }
.botao.icone, button.icone { width: var(--control-height); padding: 0; }
.botao svg, button svg { width: 16px; height: 16px; flex: none; }

/* Botão de tema: mostra o ícone do tema para o qual vai mudar. */
.so-escuro { display: none; }
:root[data-theme="dark"] .so-escuro { display: inline; }
:root[data-theme="dark"] .so-claro { display: none; }

/* --- Campos --- */
input[type="text"], input[type="search"], input[type="password"], input:not([type]) {
  height: var(--control-height);
  padding: 0 10px;
  font: 400 var(--fs-body)/1 var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--control);
  border-radius: var(--radius-control);
}
input::placeholder { color: var(--faint); }
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }

/* --- Painéis --- */
.painel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--card-pad);
}
.painel h2 { margin: 0; font-size: var(--fs-section); line-height: 24px; font-weight: 600; }

/* --- Avisos dentro do bloco que falhou --- */
.aviso-atencao {
  background: var(--pill-warning-bg);
  color: var(--pill-warning-ink);
  border: 1px solid var(--pill-warning-border);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  font-size: 13px;
}
.aviso-erro {
  background: var(--pill-negative-bg);
  color: var(--pill-negative-ink);
  border-radius: var(--radius-control);
  padding: 10px 12px;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
