/* ds/tokens.css — REPLACED by the Designer's direction v1 (mockups/tokens.css, 27-11-2026), copied verbatim below except the
   @font-face lines (fonts are self-hosted in assets/fonts and declared in styles.css). Legacy names used by styles.css /
   components.css / charts follow at the end as aliases of the new tokens. Previous file: phase1/tokens.pre-designer.css. */
/* Karpol Partners Dashboard — design tokens, direction v1 (Designer, 27-11-2026)
   shadcn/ui naming. Values are hex so they drop into the vanilla stack (option 3) as-is.
   For a Tailwind/shadcn build, convert to the HSL/OKLCH triplets shadcn expects; the names stay the same.
   Brand source: Work/Karpol/Brand/Design/DESIGN.md v2.0 (teal #0A3236, gold #B28539, cream #F0E5D8 + support tones). */


:root {
  /* brand (fixed — DESIGN.md §2) */
  --brand-teal: #0A3236;
  --brand-gold: #B28539;
  --brand-cream: #F0E5D8;

  /* surfaces */
  --background: #F0E5D8;          /* page canvas = brand cream                         */
  --foreground: #0A3236;          /* 11.1:1 on background · 13.0:1 on card               */
  --card: #FBF8F4;                /* lifted cream; reads as a sheet on the canvas        */
  --card-foreground: #0A3236;
  --popover: #FBF8F4;
  --popover-foreground: #0A3236;
  --muted: #F3EBE0;               /* table header, segmented track, skeleton             */
  --muted-foreground: #4D6467;    /* DESIGN.md secondary text · 5.3:1 on muted, 6.0 on card */
  --surface-sunken: #F7F1EA;      /* DESIGN.md "superfície elevada sobre bege": zebra, hover */

  /* actions */
  --primary: #0A3236;             /* primary button, active segmented, selected row bar  */
  --primary-foreground: #F0E5D8;
  --secondary: #EDE2D3;           /* secondary button, chips                              */
  --secondary-foreground: #0A3236;
  --accent: #F1E6D2;              /* hover/selected background in menus, command list    */
  --accent-foreground: #0A3236;

  /* gold — accent, never small text */
  --gold: #B28539;                /* rules, active indicators, chart-2, focus ring (3.1:1 on card) */
  --gold-text: #7A5A22;           /* eyebrows and gold-looking text: 6.0:1 on card, 5.1:1 on canvas */
  --gold-soft: #F4E9D4;           /* gold-tinted badge background                         */

  /* status */
  --destructive: #8F3A2C;         /* 7.1:1 on card */
  --destructive-foreground: #FBF8F4;
  --destructive-soft: #F6E3DE;
  --success: #2F6B3A;             /* 6.0:1 */
  --success-soft: #E4EFE3;
  --warning: #8A5A12;             /* 5.6:1 */
  --warning-soft: #F8ECD6;
  --info: #0A5A62;
  --info-soft: #E3EFEF;

  /* lines */
  --border: #DCCDB9;              /* DESIGN.md filete web — decorative separators          */
  --input: #A08A66;               /* form control outline, 3.1:1 on card (WCAG 1.4.11)      */
  --ring: #B28539;                /* focus: 2px ring + 2px offset in card colour           */

  /* radius — DESIGN.md §7 "raio pequeno (4 px)" */
  --radius: 0.25rem;              /* 4px: inputs, buttons, cards                            */
  --radius-sm: 0.125rem;          /* 2px: badges inside tables, checkbox                   */
  --radius-lg: 0.375rem;          /* 6px: floating layers only (popover, dialog, sheet)    */
  --radius-full: 999px;           /* chips, status dots                                      */

  /* charts — every series ≥ 3:1 on --card */
  --chart-1: #0A3236;             /* teal — the company / primary series   13.0:1 */
  --chart-2: #B28539;             /* gold — market / benchmark              3.1:1 */
  --chart-3: #3F7F86;             /* light teal                             4.3:1 */
  --chart-4: #5E7F66;             /* sage                                   4.2:1 */
  --chart-5: #8C7A62;             /* taupe — "others"                       3.9:1 */
  --chart-positive: #2F6B3A;
  --chart-negative: #8F3A2C;
  --chart-grid: #E6DACA;
  --chart-axis: #4D6467;

  /* sidebar (dark, as today) */
  --sidebar: #0A3236;
  --sidebar-foreground: #F0E5D8;               /* 11.1:1 */
  --sidebar-muted-foreground: #9FB3B4;         /* 6.3:1  */
  --sidebar-primary: #B28539;                  /* active indicator bar + icon */
  --sidebar-primary-foreground: #0A3236;
  --sidebar-accent: #0F3F44;                   /* DESIGN.md "superfície elevada sobre verde": hover/active row */
  --sidebar-accent-foreground: #F0E5D8;        /* 9.3:1 */
  --sidebar-border: rgba(240, 229, 216, 0.12);
  --sidebar-ring: #D4B57A;

  /* type */
  --font-display: "Jost", "URW Gothic", "Century Gothic", Arial, sans-serif;
  --font-sans: "IBM Plex Sans", Arial, "Liberation Sans", sans-serif;
  --text-2xs: 11px;  /* eyebrow only (caps, Jost 500, gold-text)          */
  --text-xs: 12px;   /* captions, table meta, badges · lh 16              */
  --text-sm: 13px;   /* table body, labels, helper · lh 18                */
  --text-base: 14px; /* UI body, inputs, buttons · lh 20                  */
  --text-md: 16px;   /* card titles · lh 22                               */
  --text-lg: 18px;   /* section titles (Jost) · lh 24                     */
  --text-xl: 22px;   /* mobile page title (Jost) · lh 28                  */
  --text-2xl: 28px;  /* page title (Jost 500) · lh 34; KPI value (Plex 600) */
  --text-3xl: 34px;  /* hero KPI (one per page max) · lh 40               */

  /* space (4px grid) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px;
  --space-6: 24px; --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px;

  /* layout */
  --topbar-h: 56px;
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 64px;
  --content-max: 1600px;
  --content-px: 32px;   /* 24 at md, 16 below md */
  --grid-gap: 24px;     /* 16 below md           */

  /* elevation — in-flow surfaces are flat (DESIGN.md "sem sombras"); only floating layers lift */
  --shadow-float: 0 12px 32px -8px rgba(10, 50, 54, 0.22), 0 2px 6px rgba(10, 50, 54, 0.08);
  --overlay: rgba(10, 50, 54, 0.45);

  /* table */
  --row-h: 40px; --row-h-compact: 32px; --cell-px: 12px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1); --dur: 160ms;
}

/* Optional dark variant = DESIGN.md "tema escuro" (teal canvas, cream text). Not for Phase 1. */
.dark {
  --background: #0A3236; --foreground: #F0E5D8;
  --card: #0F3F44; --card-foreground: #F0E5D8; --popover: #0F3F44; --popover-foreground: #F0E5D8;
  --muted: #12464C; --muted-foreground: #B5C4C4; --surface-sunken: #0D393E;
  --primary: #F0E5D8; --primary-foreground: #0A3236;
  --secondary: #164E54; --secondary-foreground: #F0E5D8;
  --accent: #164E54; --accent-foreground: #F0E5D8;
  --gold-text: #D4B57A; --gold-soft: rgba(178, 133, 57, 0.18);
  --border: rgba(240, 229, 216, 0.14); --input: rgba(240, 229, 216, 0.38); --ring: #D4B57A;
  --chart-1: #F0E5D8; --chart-2: #D4B57A; --chart-3: #7FB3B8; --chart-4: #9DB8A2; --chart-5: #B9A88E;
  --chart-grid: rgba(240, 229, 216, 0.10); --chart-axis: #B5C4C4;
  --destructive: #E08A79; --success: #8CC79A; --warning: #E2B565;
}
@media (prefers-reduced-motion: reduce) { :root { --dur: 0ms; } }

/* ── Legacy aliases (v10 names → direction v1). Keep until styles.css / components.css are migrated to the new names. ── */
:root {
  --brand-teal-900: var(--brand-teal); --brand-teal-700: #0A5A62; --brand-teal-600: #0F6E78; --brand-teal-100: var(--info-soft);
  --brand-gold-text: var(--gold-text); --accent-text: var(--gold-text); --brand-cream-50: var(--card);
  --chart-6: #0A3236; --chart-7: #5E7F66; --chart-8: var(--gold-text); --chart-muted: var(--muted-foreground); --chart-marker: var(--gold);
  /* Daniel 27/11 14:37: in-flow surfaces are flat (4px, no shadow); only floating layers lift (6px + --shadow-float) */
  --shadow-xs: none; --shadow-sm: none; --shadow-md: none; --shadow-lg: var(--shadow-float);
  --kp-radius: var(--radius); --kp-radius-lg: var(--radius); --kp-radius-float: var(--radius-lg);
  --sidebar-width-expanded: var(--sidebar-w); --sidebar-width-collapsed: var(--sidebar-w-collapsed);
  --space-0: 0;
  --table-row-h: var(--row-h); --table-row-h-compact: var(--row-h-compact); --table-cell-px: var(--cell-px); --table-cell-py: 8px; --table-cell-py-compact: 4px;
  --table-head-bg: var(--muted);
  --z-topbar: 30; --z-sheet: 60; --z-dialog: 80; --z-tooltip: 90;
  --leading-xs: 16px; --leading-sm: 18px; --leading-base: 20px; --leading-lg: 24px; --leading-xl: 28px; --leading-2xl: 34px; --leading-3xl: 40px;
}
