/* ==========================================================================
   R3 / INSS TOMADORES - DESIGN SYSTEM TOKENS (Dark Corporativo & Light Executivo)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --r3-bg-app: #080c14;
  --r3-bg-surface: #0f172a;
  --r3-bg-elevated: #1e293b;
  --r3-bg-input: #0b1220;
  --r3-bg-hover: rgba(51, 65, 85, 0.45);
  --r3-border: rgba(148, 163, 184, 0.16);
  --r3-border-strong: rgba(148, 163, 184, 0.3);

  --r3-text-primary: #f8fafc;
  --r3-text-secondary: #cbd5e1;
  --r3-text-muted: #94a3b8;

  --r3-brand: #3b82f6;
  --r3-brand-hover: #2563eb;
  --r3-brand-soft: rgba(59, 130, 246, 0.16);

  --r3-success: #10b981;
  --r3-success-hover: #059669;
  --r3-success-soft: rgba(16, 185, 129, 0.16);
  --r3-warning: #f59e0b;
  --r3-warning-soft: rgba(245, 158, 11, 0.16);
  --r3-danger: #ef4444;
  --r3-danger-soft: rgba(239, 68, 68, 0.16);
  --r3-cyan: #06b6d4;
  --r3-cyan-soft: rgba(6, 182, 212, 0.16);
  --r3-purple: #a855f7;
  --r3-purple-soft: rgba(168, 85, 247, 0.16);

  --r3-radius-sm: 8px;
  --r3-radius-md: 12px;
  --r3-radius-lg: 16px;
  --r3-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --r3-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.48);
  color-scheme: dark;
}

[data-theme="light"] {
  --r3-bg-app: #f1f5f9;
  --r3-bg-surface: #ffffff;
  --r3-bg-elevated: #f8fafc;
  --r3-bg-input: #ffffff;
  --r3-bg-hover: rgba(226, 232, 240, 0.72);
  --r3-border: #e2e8f0;
  --r3-border-strong: #cbd5e1;

  --r3-text-primary: #0f172a;
  --r3-text-secondary: #334155;
  --r3-text-muted: #64748b;

  --r3-brand: #2563eb;
  --r3-brand-hover: #1d4ed8;
  --r3-brand-soft: rgba(37, 99, 235, 0.1);
  --r3-success: #059669;
  --r3-success-hover: #047857;
  --r3-success-soft: rgba(5, 150, 105, 0.12);
  --r3-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --r3-shadow-lg: 0 14px 30px rgba(15, 23, 42, 0.12);
  color-scheme: light;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--r3-bg-app);
  color: var(--r3-text-primary);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  scrollbar-color: var(--r3-border-strong) transparent;
}

.r3-num, .kpi-value, td[data-type="number"], td[data-type="currency"] {
  font-variant-numeric: tabular-nums lining-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
