/* ============================================================
   Portalic — Color tokens
   Source: DESIGN.md + apps/dashboard/src/index.css @theme (F54S01)
          + apps/menu-qr/src/index.css (tenant theming, ADR-023)
   One light ground shared by both surfaces. Accent separates roles:
   tenant primary on menu-qr, Portal Teal in the dashboard.
   ============================================================ */
:root {
  /* ---------- Ground (shared light) ---------- */
  --canvas-warm: #fafaf9;      /* page ground — never pure white */
  --canvas: #ffffff;           /* cards, sheets, modals */
  --surface-subtle: #f4f4f2;   /* input bg, placeholders, hover fills */
  --border: #e5e4e2;           /* card outlines, dividers */
  --border-strong: #d1d0ce;    /* input outlines at rest, table dividers */

  /* ---------- Text ---------- */
  --press-dark: #1c1c1c;       /* primary text + menu-qr CTA fallback */
  --ink-soft: #333333;         /* secondary headings */
  --text-secondary: #4b5563;   /* supporting body */
  --text-soft: #6b7280;        /* captions, de-emphasized copy */
  --text-muted: #9ca3af;       /* metadata, placeholders */

  /* ---------- Dashboard brand — Portal Teal (F54S01) ---------- */
  --portal-teal: #0e9ba8;       /* fills / active states */
  --portal-teal-text: #0b7e8c;  /* teal as text on white (WCAG AA) */
  --portal-teal-light: #cfeef1; /* hover wash / soft fills */
  --portal-teal-tint: #eaf7f8;  /* faint wash — selected rows, chips */
  --portal-teal-mist: #f4fbfc;  /* faintest wash — large tinted surfaces */
  --portal-teal-deep: #0b7e8c;  /* active-nav hover */

  /* ---------- Dashboard CTA + reviews ---------- */
  --carbon: #1c1c1e;            /* primary buttons / CTAs */
  --gold: #e8b33d;              /* stars / review signals ONLY */

  /* ---------- Promotion badge (F54S02) ---------- */
  --promo: #c43b7a;
  --promo-light: #fbe9f0;

  /* ---------- Reserved accent (token kept, not active) ---------- */
  --saffron: #f97316;
  --saffron-light: #fff4ec;

  /* ---------- Semantic ---------- */
  --error: #ef4444;
  --error-strong: #dc2626;
  --error-light: #fee2e2;
  --success: #22c55e;
  --success-strong: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-strong: #d97706;
  --warning-light: #fef3c7;

  /* ---------- Tenant theming (menu-qr, ADR-023 / B25) ----------
     `--brand-primary` / `--brand-secondary` are set at runtime per tenant.
     The accent trio derives from the primary; unset → platform fallback
     (Press Dark CTAs on Canvas Warm). Never hardcode a tenant color. */
  --accent: var(--brand-primary, var(--press-dark));
  --accent-deep: color-mix(in oklab, var(--accent) 78%, black);
  --accent-tint: color-mix(in oklab, var(--accent) 12%, white);
  --brand-secondary-resolved: var(--brand-secondary, var(--canvas-warm));

  /* ---------- Semantic aliases (shadcn mapping, ADR-013) ---------- */
  --background: var(--canvas-warm);
  --foreground: var(--press-dark);
  --surface-card: var(--canvas);
  --card-foreground: var(--press-dark);
  --primary: var(--carbon);
  --primary-foreground: var(--canvas);
  --secondary: var(--surface-subtle);
  --secondary-foreground: var(--press-dark);
  --muted: var(--surface-subtle);
  --muted-foreground: var(--text-muted);
  --accent-ui: var(--portal-teal-light);
  --accent-ui-foreground: var(--portal-teal-text);
  --destructive: var(--error);
  --destructive-foreground: var(--canvas);
  --input: var(--border);
  --ring: var(--portal-teal);
}
