/* =====================================================================
   ÍRIS · Gestão para Óticas — base.css
   Tokens, reset e tipografia.
   ===================================================================== */

:root {
  /* =================================================================
     IDENTIDADE — Ótica Redentora
     Cores amostradas pixel a pixel da logo oficial:
     navy da arte #011332 · íris #0071F7 / #029DEC · prata #AAB2BC.
     Esta é a ÚNICA fonte de cor da marca; os tokens --c-* abaixo são
     apelidos que apontam para cá, então nenhuma tela precisou mudar.
     ================================================================= */
  --brand-navy: #04132F;
  --brand-navy-2: #08203F;
  --brand-navy-3: #123159;
  --brand-blue: #0B72E3;
  --brand-blue-strong: #0058C0;
  --brand-blue-light: #2E9BF0;
  --brand-blue-soft: #E7F1FD;
  --brand-blue-line: #B4D5F7;
  --brand-silver: #AAB2BC;
  --brand-silver-2: #C9CFD6;
  --brand-white: #FFFFFF;

  /* — Tipografia — */
  --font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;

  /* — Superfícies (tema claro) — */
  --c-canvas: #EDF1F7;
  --c-surface: var(--brand-white);
  --c-surface-2: #F5F8FC;
  --c-surface-3: #EAF0F8;
  --c-line: #D9E1EC;
  --c-line-soft: #E7EDF6;
  --c-line-strong: #BECBDC;

  /* — Texto — */
  --c-text: #0C1A30;
  --c-text-2: #4A5B73;
  --c-text-3: #7889A1;
  --c-text-inv: var(--brand-white);

  /* — Marca — */
  --c-ink: var(--brand-navy);
  --c-ink-2: var(--brand-navy-2);
  --c-ink-3: var(--brand-navy-3);
  --c-accent: var(--brand-blue);
  --c-accent-2: var(--brand-blue-light);
  --c-accent-3: var(--brand-blue-strong);
  --c-accent-soft: var(--brand-blue-soft);
  --c-accent-line: var(--brand-blue-line);

  /* — Semânticos (a marca não sequestra o significado das cores) — */
  --c-ok: #157F4E;
  --c-ok-soft: #E3F4EB;
  --c-ok-line: #A6DCC1;
  --c-warn: #A56B0C;
  --c-warn-soft: #FCF0D9;
  --c-warn-line: #EDCE92;
  --c-danger: #C0202F;
  --c-danger-soft: #FCE7E9;
  --c-danger-line: #F0B6BC;
  --c-info: #3F5D8C;
  --c-info-soft: #EBF0F8;
  --c-info-line: #C2CFE4;

  /* — Formas — */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-full: 999px;

  --sh-1: 0 1px 2px rgba(11, 21, 32, .06), 0 1px 1px rgba(11, 21, 32, .04);
  --sh-2: 0 2px 6px rgba(11, 21, 32, .07), 0 1px 2px rgba(11, 21, 32, .05);
  --sh-3: 0 12px 28px -10px rgba(11, 21, 32, .28), 0 4px 10px -4px rgba(11, 21, 32, .12);
  --sh-4: 0 32px 70px -24px rgba(11, 21, 32, .45);

  --ring: 0 0 0 3px rgba(11, 114, 227, .25);

  /* — Métricas — */
  --sidebar-w: 254px;
  --topbar-h: 62px;
  --gap: 18px;

  --t-fast: 120ms cubic-bezier(.4, 0, .2, 1);
  --t-med: 220ms cubic-bezier(.4, 0, .2, 1);

  color-scheme: light;
}

/* Escuro: a mesma marca à noite — navy quase preto, prata e azul elétrico. */
[data-theme="dark"] {
  --c-canvas: #050D1C;
  --c-surface: #0B182E;
  --c-surface-2: #102039;
  --c-surface-3: #162946;
  --c-line: #1E3153;
  --c-line-soft: #17273F;
  --c-line-strong: #2E4771;

  --c-text: #E6EDF7;
  --c-text-2: #A4B4CA;
  --c-text-3: #7286A1;

  --c-ink: #030E23;
  --c-ink-2: #061731;
  --c-ink-3: #0D2748;

  --c-accent: #2E9BF0;
  --c-accent-2: #57B6FF;
  --c-accent-3: #0B72E3;
  --c-accent-soft: #0B2545;
  --c-accent-line: #1D4A80;

  --c-ok: #33C08D;
  --c-ok-soft: #0B2A22;
  --c-ok-line: #1D5744;
  --c-warn: #E5AE4B;
  --c-warn-soft: #2B2214;
  --c-warn-line: #5A4520;
  --c-danger: #F27884;
  --c-danger-soft: #2E1519;
  --c-danger-line: #653038;
  --c-info: #8FA8CC;
  --c-info-soft: #13233C;
  --c-info-line: #2C4266;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .45);
  --sh-2: 0 2px 8px rgba(0, 0, 0, .5);
  --sh-3: 0 14px 32px -12px rgba(0, 0, 0, .72);
  --sh-4: 0 34px 80px -26px rgba(0, 0, 0, .88);

  --ring: 0 0 0 3px rgba(46, 155, 240, .28);

  color-scheme: dark;
}

/* ------------------------------ reset ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background-color: var(--c-canvas);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(11, 114, 227, .09), transparent 45%),
    radial-gradient(circle at 92% 0%, rgba(4, 19, 47, .06), transparent 40%);
  background-attachment: fixed;
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

table { border-collapse: collapse; width: 100%; }

svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.icon--sm { width: 15px; height: 15px; }
svg.icon--lg { width: 22px; height: 22px; stroke-width: 1.6; }

::selection { background: var(--c-accent); color: #fff; }

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--r-sm);
}

/* --------------------------- tipografia --------------------------- */
.t-mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: -.01em; }

.t-label {
  font-family: var(--font-cond);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-text-3);
}

.t-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.t-muted { color: var(--c-text-2); }
.t-dim { color: var(--c-text-3); }
.t-right { text-align: right; }
.t-center { text-align: center; }
.t-nowrap { white-space: nowrap; }
.t-strong { font-weight: 600; }
.t-sm { font-size: 12.5px; }
.t-xs { font-size: 11.5px; }

/* ---------------------------- scrollbar ---------------------------- */
* { scrollbar-width: thin; scrollbar-color: var(--c-line-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--c-line-strong);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: var(--r-full);
}
*::-webkit-scrollbar-thumb:hover { background: var(--c-text-3); background-clip: content-box; }

/* ---------------------------- utilitários ---------------------------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
