/*
 * Tokens antes do Tailwind — editorial (creme / carvão quente);
 * laranja #ea8c48 só como marca. --success / --warning / --destructive em globals.css.
 */

html {
  --legacy-mix: #ea8c48;

  --primary: #ea8c48;
  --primary-foreground: #fafafa;
  --dashboard-featured-from: #2e2a33;
  --dashboard-featured-via: #1d1b25;
  --dashboard-featured-to: #13111a;
  --dashboard-featured-ember: color-mix(in oklab, var(--primary) 24%, transparent);
  --dashboard-featured-shine: color-mix(in oklab, #ffffff 12%, transparent);
  --dashboard-featured-bg: linear-gradient(
    158deg,
    var(--dashboard-featured-from) 0%,
    var(--dashboard-featured-via) 52%,
    var(--dashboard-featured-to) 100%
  );
  --dashboard-featured-layers:
    radial-gradient(ellipse 108% 72% at 96% -6%, var(--dashboard-featured-ember), transparent 52%),
    radial-gradient(ellipse 68% 52% at -4% 104%, color-mix(in oklab, var(--primary) 11%, transparent), transparent 48%),
    var(--dashboard-featured-bg);
  --dashboard-featured-elevation:
    0 22px 48px color-mix(in oklab, var(--foreground) 14%, transparent),
    0 0 0 1px color-mix(in oklab, var(--dashboard-featured-shine) 18%, transparent),
    inset 0 1px 0 var(--dashboard-featured-shine);
  --brand-earth: #221f28;
  --brand-earth-foreground: #f7f5fa;
  --brand-deep-blue: #1c1b19;
  --brand-oatmeal: #8a8580;
  --brand-palladian: #f3f1ec;
  --brand-accent: color-mix(in oklab, var(--primary) 22%, #fafafa 78%);
  --brand-accent-foreground: #1c1b19;
  --brand-accent-soft: color-mix(in oklab, var(--primary) 9%, transparent);

  --canvas: #f6f4f0;
  --chrome: #f3f1ec;
  --surface-border: #e8e4de;

  --background: var(--canvas);
  --foreground: #1c1b19;
  --card: #ffffff;
  --card-foreground: #1c1b19;
  --popover: #ffffff;
  --popover-foreground: #1c1b19;

  --secondary: #faf8f5;
  --secondary-foreground: #1c1b19;
  --muted: #efece6;
  --muted-foreground: #6f6a63;
  --border: var(--surface-border);
  --input: var(--surface-border);

  --ring: var(--primary);
  --chart-1: var(--primary);
  --chart-2: var(--success);
  --chart-3: #52525b;
  --chart-4: var(--warning);
  --chart-5: var(--destructive);
  --dashboard-revenue: var(--primary);
  --dashboard-customers: #52525b;
  --dashboard-retention: var(--success);
  --dashboard-expansion: var(--primary);
  --dashboard-contraction: var(--warning);
  --dashboard-churn: var(--destructive);
  --dashboard-warm: var(--brand-earth);

  --sidebar: var(--chrome);
  --sidebar-foreground: #1c1b19;
  --sidebar-primary: var(--primary);
  --sidebar-primary-foreground: var(--primary-foreground);
  --sidebar-accent: #eceae6;
  --sidebar-accent-foreground: #1c1b19;
  --accent: var(--sidebar-accent);
  --accent-foreground: var(--sidebar-accent-foreground);
  --sidebar-border: #ddd8d0;
  --sidebar-ring: var(--primary);
  --sidebar-shell: var(--chrome);
  --main-shell: var(--canvas);

  --surface: #ffffff;
  --glass: color-mix(in oklab, #ffffff 90%, transparent);
  --glass-border: var(--surface-border);
  --hero-from: color-mix(in oklab, var(--primary) 72%, #1c1b19 28%);
  --hero-to: color-mix(in oklab, var(--primary) 48%, #1c1b19 52%);
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-subtle: #faf8f5;
}

html.dark {
  --canvas: #181716;
  --chrome: #181716;
  --surface-border: transparent;

  --background: var(--canvas);
  --foreground: #f5f3f0;
  --card: #232221;
  --card-foreground: #f5f3f0;
  --popover: rgba(35, 34, 33, 0.96);
  --popover-foreground: #f5f3f0;
  --secondary: rgba(255, 255, 255, 0.06);
  --secondary-foreground: #f5f3f0;
  --muted: rgba(255, 255, 255, 0.05);
  --muted-foreground: #a6a5a2;
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.07);
  --primary: #ea8c48;
  --primary-foreground: #fafafa;
  --dashboard-featured-from: #34303c;
  --dashboard-featured-via: #222028;
  --dashboard-featured-to: #15131c;
  --dashboard-featured-ember: color-mix(in oklab, var(--primary) 34%, transparent);
  --dashboard-featured-shine: color-mix(in oklab, #ffffff 9%, transparent);
  --dashboard-featured-bg: linear-gradient(
    158deg,
    var(--dashboard-featured-from) 0%,
    var(--dashboard-featured-via) 52%,
    var(--dashboard-featured-to) 100%
  );
  --dashboard-featured-layers:
    radial-gradient(ellipse 108% 72% at 94% -8%, var(--dashboard-featured-ember), transparent 52%),
    radial-gradient(ellipse 70% 54% at -6% 106%, color-mix(in oklab, var(--primary) 14%, transparent), transparent 48%),
    var(--dashboard-featured-bg);
  --dashboard-featured-elevation:
    0 24px 52px rgba(0, 0, 0, 0.42),
    0 0 0 1px color-mix(in oklab, #ffffff 8%, transparent),
    inset 0 1px 0 color-mix(in oklab, #ffffff 10%, transparent);
  --brand-earth: #26232c;
  --brand-earth-foreground: #f7f5fa;
  --brand-deep-blue: #232221;
  --brand-oatmeal: #a6a5a2;
  --brand-palladian: #2a2a28;
  --brand-accent: color-mix(in oklab, var(--primary) 32%, #2a2a28 68%);
  --brand-accent-foreground: #f5f3f0;
  --brand-accent-soft: color-mix(in oklab, var(--primary) 10%, transparent);

  --ring: var(--primary);
  --chart-1: var(--primary);
  --chart-2: var(--success);
  --chart-3: #a6a5a2;
  --chart-4: var(--warning);
  --chart-5: var(--destructive);
  --dashboard-revenue: var(--primary);
  --dashboard-customers: #a6a5a2;
  --dashboard-retention: var(--success);
  --dashboard-expansion: var(--primary);
  --dashboard-contraction: var(--warning);
  --dashboard-churn: var(--destructive);
  --dashboard-warm: var(--brand-earth);

  --sidebar: var(--chrome);
  --sidebar-foreground: #f5f3f0;
  --sidebar-primary: var(--primary);
  --sidebar-primary-foreground: var(--primary-foreground);
  --sidebar-accent: rgba(255, 255, 255, 0.06);
  --sidebar-accent-foreground: #f5f3f0;
  --accent: var(--sidebar-accent);
  --accent-foreground: var(--sidebar-accent-foreground);
  --sidebar-border: rgba(255, 255, 255, 0.07);
  --sidebar-ring: var(--primary);
  --sidebar-shell: var(--chrome);
  --main-shell: var(--canvas);

  --surface: #232221;
  --glass: rgba(35, 34, 33, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --hero-from: color-mix(in oklab, var(--primary) 62%, #181716 38%);
  --hero-to: color-mix(in oklab, var(--primary) 34%, #181716 66%);
  --panel: #232221;
  --panel-solid: #181716;
  --panel-subtle: #232221;
}
