/* ==========================================================================
   Design Tokens — DPM ManagerZone
   Identidade visual premium inspirada em Notion / Stripe / Linear / Vercel.
   Light mode é o tema base; dark mode sobrescreve via [data-theme="dark"].
   ========================================================================== */

:root {
  /* ---- Marca / paleta base (definida no briefing) ---- */
  --color-bg: #F5F7FA;
  --color-card: #FFFFFF;
  --color-blue: #0066FF;
  --color-blue-dark: #0B1F33;
  --color-green: #12B76A;
  --color-orange: #F79009;
  --color-red: #F04438;
  --color-gray: #667085;
  --color-border: #E4E7EC;

  /* ---- Tons derivados (tints/shades calculados a partir da paleta base) ---- */
  --color-blue-50: #EAF1FF;
  --color-blue-100: #D6E4FF;
  --color-blue-600: #0052CC;
  --color-blue-700: #003D99;

  --color-green-50: #E7F9F0;
  --color-green-600: #0D9257;

  --color-orange-50: #FFF4E5;
  --color-orange-600: #C97400;

  --color-red-50: #FEEAE8;
  --color-red-600: #C4221C;

  --color-gray-25: #FCFCFD;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F2F4F7;
  --color-gray-300: #D0D5DD;
  --color-gray-500: #667085;
  --color-gray-700: #344054;
  --color-gray-900: #101828;

  /* ---- Superfícies semânticas ---- */
  --surface-bg: var(--color-bg);
  --surface-card: var(--color-card);
  --surface-sidebar: #FFFFFF;
  --surface-topbar: rgba(255, 255, 255, 0.82);
  --surface-hover: var(--color-gray-50);
  --surface-active: var(--color-blue-50);
  --surface-inset: var(--color-gray-50);
  --surface-overlay: rgba(11, 31, 51, 0.48);
  --surface-skeleton: linear-gradient(90deg, #EEF1F5 25%, #F7F9FB 37%, #EEF1F5 63%);

  --text-primary: var(--color-blue-dark);
  --text-secondary: var(--color-gray);
  --text-tertiary: #98A2B3;
  --text-inverse: #FFFFFF;
  --text-link: var(--color-blue);

  --border-default: var(--color-border);
  --border-strong: var(--color-gray-300);
  --border-focus: var(--color-blue);

  --brand: var(--color-blue);
  --brand-strong: var(--color-blue-600);
  --success: var(--color-green);
  --warning: var(--color-orange);
  --danger: var(--color-red);
  --info: var(--color-blue);

  --success-bg: var(--color-green-50);
  --warning-bg: var(--color-orange-50);
  --danger-bg: var(--color-red-50);
  --info-bg: var(--color-blue-50);

  /* ---- Tipografia ---- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.375rem;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  /* ---- Espaçamento (escala 4px) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ---- Raios ---- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* ---- Sombras suaves ---- */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06), 0 2px 4px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, 0.08), 0 4px 8px rgba(16, 24, 40, 0.04);
  --shadow-xl: 0 24px 48px -12px rgba(16, 31, 51, 0.14);
  --shadow-focus: 0 0 0 4px rgba(0, 102, 255, 0.14);
  --shadow-glow-blue: 0 8px 24px rgba(0, 102, 255, 0.22);

  /* ---- Layout ---- */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;
  --content-max: 1440px;

  /* ---- Transições ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* ---- Séries de gráficos ---- */
  --chart-1: #0066FF;
  --chart-2: #12B76A;
  --chart-3: #F79009;
  --chart-4: #7A5AF8;
  --chart-5: #F04438;
  --chart-6: #06AED4;
  --chart-grid: #EEF1F5;
}

/* ================= DARK MODE ================= */
[data-theme="dark"] {
  --surface-bg: #0A1420;
  --surface-card: #101B2C;
  --surface-sidebar: #0B1626;
  --surface-topbar: rgba(11, 22, 38, 0.82);
  --surface-hover: #16233757;
  --surface-active: #12294D;
  --surface-inset: #0E1A2A;
  --surface-overlay: rgba(2, 8, 16, 0.64);
  --surface-skeleton: linear-gradient(90deg, #142238 25%, #1A2C48 37%, #142238 63%);

  --text-primary: #F2F5F9;
  --text-secondary: #93A0B4;
  --text-tertiary: #64748B;
  --text-inverse: #0B1F33;
  --text-link: #5B9BFF;

  --border-default: #1E2E44;
  --border-strong: #2A3F5C;
  --border-focus: #4B8CFF;

  --brand: #4B8CFF;
  --brand-strong: #6AA0FF;
  --success: #2ED598;
  --warning: #FFAD42;
  --danger: #FF6B61;
  --info: #4B8CFF;

  --success-bg: #0F2A22;
  --warning-bg: #2E230F;
  --danger-bg: #2E1614;
  --info-bg: #10203B;

  --chart-grid: #1B2A40;
}
