/* ============================================================
   PrintControl 3D — tokens da identidade visual
   Espelho do tokens.css do pacote da marca: cor, espaço, raio e tipografia saem daqui.
   Tema escuro é o padrão; o claro entra por data-theme="light".
   .tema-escuro reaplica os valores do escuro num bloco que é sempre escuro (cartão principal,
   painel do login, menu), para o texto e os status lerem bem nos dois temas.
   ============================================================ */
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/space-grotesk-500.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/space-grotesk-600.woff2) format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/space-grotesk-700.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url(../fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url(../fonts/inter-700.woff2) format('woff2'); }

/* ---------- marca: igual nos dois temas ---------- */
:root {
  --navy: #011526;
  --ocean: #024873;
  --azure: #048abf;
  --cyan: #05dbf2;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-sm: 10px;   /* botões, campos, mensagens */
  --radius-md: 14px;   /* selo da marca e miniaturas */
  --radius-lg: 16px;   /* cartões, painéis e indicadores */
  --radius-xl: 22px;   /* superfícies de marca: menu, cartão principal, painel do login (mesma proporção do ícone do app) */
  --radius-pill: 999px;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ---------- tema escuro (padrão) ---------- */
:root, :root[data-theme="dark"], .tema-escuro {
  color-scheme: dark;
  --bg: #0c0c10;
  --surface: #13131a;
  --surface-2: #1a1a24;
  --surface-3: #21212e;
  --border: rgba(255, 255, 255, .07);
  --border-hover: rgba(255, 255, 255, .14);
  --border-control: #7f7e98;
  --text: #f0eff8;
  --text-muted: #a8a7bc;
  --text-dim: #9392aa;
  --brand: #05dbf2;
  --on-brand: #011526;
  --accent: #05dbf2;
  --ok: #22c55e;       --ok-bg: rgba(34, 197, 94, .12);
  --warn: #f59e0b;     --warn-bg: rgba(245, 158, 11, .12);
  --danger: #fb5568;   --danger-bg: rgba(251, 85, 104, .12);
  --info: #38bdf8;     --info-bg: rgba(56, 189, 248, .12);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .55);
  --shadow-elevated: 0 24px 70px -20px rgba(0, 0, 0, .65);
  --shadow-brand: 0 4px 16px rgba(4, 138, 191, .35);
  --glow: 0 0 30px rgba(4, 138, 191, .2);
}

/* ---------- tema claro ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #f5f5f6;
  --surface-3: #eaeaec;
  --border: rgba(1, 21, 38, .09);
  --border-hover: rgba(1, 21, 38, .2);
  --border-control: #7a8494;
  --text: #011526;
  --text-muted: #4b5768;
  --text-dim: #5a6677;
  --brand: #024873;
  --on-brand: #ffffff;
  --accent: #036a99;
  --ok: #047857;       --ok-bg: rgba(4, 120, 87, .12);
  --warn: #9a4a07;     --warn-bg: rgba(154, 74, 7, .12);
  --danger: #be123c;   --danger-bg: rgba(190, 18, 60, .1);
  --info: #0369a1;     --info-bg: rgba(3, 105, 161, .12);
  --shadow-card: 0 1px 2px rgba(1, 21, 38, .06), 0 10px 26px -14px rgba(1, 21, 38, .16);
  --shadow-elevated: 0 24px 60px -22px rgba(1, 21, 38, .28);
}

/* ---------- derivados (recalculados onde o tema muda) ---------- */
:root, .tema-escuro {
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --accent-subtle: color-mix(in srgb, var(--accent) 6%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 34%, transparent);
  --ok-line: color-mix(in srgb, var(--ok) 32%, transparent);
  --warn-line: color-mix(in srgb, var(--warn) 32%, transparent);
  --danger-line: color-mix(in srgb, var(--danger) 34%, transparent);
  --info-line: color-mix(in srgb, var(--info) 30%, transparent);
  --t: .2s ease;
}
/* Poço: bloco rebaixado dentro de um cartão (linha de material, prévia de logo, senha provisória). */
:root, :root[data-theme="dark"], .tema-escuro { --inset: var(--bg); }
:root[data-theme="light"] { --inset: var(--surface); }
