/* SurgIA — tokens e componentes compartilhados entre o site e o painel.
   Identidade "Surgical Precision", na direção "Profunda" (02/12/2026): a
   mesma paleta (azul petróleo, teal, menta, champagne só como acento raro);
   o azul petróleo vira o chão (menu escuro, faixa com degradê radial de
   petróleo para teal no topo das telas iniciais). Manrope em tudo, títulos
   em peso forte e apertados; cantos de 14px, cartões com borda fina e quase
   sem sombra. Botão principal em azul petróleo; sobre o escuro, teal claro.
   Status têm cores próprias (verde, âmbar, vermelho, azul), nunca o teal. */

:root {
  --bg: #f2f5f8;
  --bg-soft: #eaeff4;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --ink: #0b2545;
  --ink-2: #34496a;
  --muted: #677791;
  --line: #e6eaf0;
  --line-2: #cfd6e0;

  --brand: #0e6b6a;
  --brand-hover: #0a5756;
  --brand-deep: #084a49;
  --brand-ink: #ffffff;
  --mint: #dcefee;
  --mint-2: #eef6f5;

  --accent: #d4b895;
  --accent-ink: #8a6a40;
  --accent-on: #3d2c12;

  /* Ação principal: azul petróleo no claro, teal claro no escuro e na faixa. */
  --action: #0b2545;
  --action-hover: #133a63;
  --action-ink: #ffffff;

  /* Faixa do topo das telas iniciais (site, painel, app): igual nos dois temas. */
  --faixa: radial-gradient(120% 140% at 100% 0%, #0e6b6a 0%, #0e4a5e 38%, #0b2545 75%);
  --faixa-ink: #f8f6ef;
  --faixa-muted: #a9c4d2;
  --faixa-tile: rgba(255, 255, 255, 0.08);
  --faixa-line: rgba(255, 255, 255, 0.14);
  --faixa-acao: #5cc0bb;
  --faixa-acao-ink: #04211f;

  --band: #0b2545;
  --band-2: #133a63;
  --band-ink: #f8f6ef;
  --band-muted: #a9b7ca;
  --band-line: #1f3f66;
  --band-hi: #5cc0bb;

  --warn: #9a5b0c;
  --warn-soft: #fbefd9;
  --good: #1d7446;
  --good-soft: #def2e5;
  --info: #2656a8;
  --info-soft: #e2eafa;
  --crit: #b3313b;
  --crit-soft: #f9e1e2;

  --wa: #25d366;
  --wa-ink: #05331a;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.05);
  --shadow: 0 1px 2px rgba(11, 37, 69, 0.05), 0 8px 24px rgba(11, 37, 69, 0.06);
  --shadow-lg: 0 2px 4px rgba(11, 37, 69, 0.06), 0 28px 70px rgba(11, 37, 69, 0.14);

  /* Manrope em títulos, texto, números e códigos (com algarismos de mesma
     largura). O campo onde se digita um código usa a monoespaçada do sistema,
     para 0 e O não se confundirem. */
  --f-display: "Manrope", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-body: "Manrope", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Manrope", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --f-digitar: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #051429;
    --bg-soft: #071a31;
    --surface: #0b2545;
    --surface-2: #163354;
    --ink: #f8f6ef;
    --ink-2: #c9d3e0;
    --muted: #93a4ba;
    --line: #1f3f66;
    --line-2: #2a4a70;
    --brand: #5cc0bb;
    --brand-hover: #7fd3ce;
    --brand-deep: #7fd3ce;
    --brand-ink: #04211f;
    --mint: #123f4a;
    --mint-2: #0e2e40;
    --accent: #d4b895;
    --accent-ink: #d4b895;
    --action: #5cc0bb;
    --action-hover: #7fd3ce;
    --action-ink: #04211f;
    --band: #030e1e;
    --band-2: #0c2544;
    --band-ink: #f8f6ef;
    --band-muted: #93a4ba;
    --band-line: #1a3657;
    --band-hi: #5cc0bb;
    --warn: #e4a852;
    --warn-soft: #3a2c14;
    --good: #6cc995;
    --good-soft: #143525;
    --info: #8db4f0;
    --info-soft: #172c4d;
    --crit: #ef8a90;
    --crit-soft: #3d1b22;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 70px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #051429;
  --bg-soft: #071a31;
  --surface: #0b2545;
  --surface-2: #163354;
  --ink: #f8f6ef;
  --ink-2: #c9d3e0;
  --muted: #93a4ba;
  --line: #1f3f66;
  --line-2: #2a4a70;
  --brand: #5cc0bb;
  --brand-hover: #7fd3ce;
  --brand-deep: #7fd3ce;
  --brand-ink: #04211f;
  --mint: #123f4a;
  --mint-2: #0e2e40;
  --accent: #d4b895;
  --accent-ink: #d4b895;
  --action: #5cc0bb;
  --action-hover: #7fd3ce;
  --action-ink: #04211f;
  --band: #030e1e;
  --band-2: #0c2544;
  --band-ink: #f8f6ef;
  --band-muted: #93a4ba;
  --band-line: #1a3657;
  --band-hi: #5cc0bb;
  --warn: #e4a852;
  --warn-soft: #3a2c14;
  --good: #6cc995;
  --good-soft: #143525;
  --info: #8db4f0;
  --info-soft: #172c4d;
  --crit: #ef8a90;
  --crit-soft: #3d1b22;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 28px 70px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
/* `hidden` precisa vencer o display das classes (.drawer, .login-box…). */
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}
/* A Manrope não tem itálico: o destaque no título é só a cor. */
h1 em,
h2 em {
  font-style: normal;
  color: var(--brand);
}
h4,
h5 {
  font-family: var(--f-body);
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
input.mono,
.codebox input {
  font-family: var(--f-digitar);
}
.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.muted {
  color: var(--muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

/* Marca */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.logo img {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
}
/* "IA" discretamente diferenciado: mesmo corpo, peso menor, teal. */
.logo em {
  font-style: normal;
  font-weight: 500;
  color: var(--brand);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn-primary {
  background: var(--action);
  color: var(--action-ink);
}
.btn-primary:hover {
  background: var(--action-hover);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-light {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.btn-wa {
  background: var(--wa);
  color: var(--wa-ink);
}
.btn-wa:hover {
  filter: brightness(0.95);
}
.btn-inverse {
  background: var(--band-ink);
  color: var(--band);
}
.btn-inverse:hover {
  background: #ffffff;
}
/* Detalhe institucional em champagne — nunca em ação operacional. */
.rule-accent {
  display: block;
  width: 44px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13.5px;
  gap: 7px;
}
.btn-sm svg {
  width: 15px;
  height: 15px;
}
.btn-lg {
  padding: 15px 28px;
  font-size: 16.5px;
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

/* Etiquetas de estado — cor semântica, separada do acento da marca */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--ink-2);
  line-height: 1.5;
}
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.good {
  background: var(--good-soft);
  color: var(--good);
}
.pill.info {
  background: var(--info-soft);
  color: var(--info);
}
.pill.crit {
  background: var(--crit-soft);
  color: var(--crit);
}
.pill.brand {
  background: var(--mint);
  color: var(--brand-deep);
}

/* Campos */
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 15px;
  width: 100%;
  min-width: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 0;
  border-color: transparent;
}
.field textarea {
  min-height: 92px;
  resize: vertical;
}

/* Aviso flutuante */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  opacity: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  max-width: min(92vw, 560px);
  box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Faixa de protótipo */
.demo-strip {
  background: var(--band);
  color: var(--band-muted);
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 6px 12px;
}
.demo-strip b {
  color: var(--band-ink);
  font-weight: 500;
}
