﻿/* ============================================================
   tokens.css — Balance Blitz Design Tokens
   Extracted directly from the Claude Design mockups
   (Marketing, Invoice Builder v2, Auth) — confirmed consistent
   across all three. This replaces the placeholder token values
   used in earlier scaffolding.
   ============================================================ */

:root {
    /* ── Brand ── */
    /* Indigo-600, moved down one step from indigo-500 (#6366f1) so WHITE TEXT
       ON A PRIMARY BUTTON PASSES WCAG AA. It was 4.47:1 against the 4.5
       required — close enough to look fine and still fail, on every primary
       button in the product.

       It fixes a second failure that was easier to miss: --color-primary is
       also used as TEXT on --color-primary-light (#eef2ff) for active tabs and
       hovered dropdown rows, and that pairing was 3.99:1. It is now 5.62:1.

       Still on Tailwind's indigo ramp rather than a hand-mixed colour, so the
       brand reads the same, just one shade deeper. Hover moves down with it to
       indigo-700 to keep the press affordance. */
    --color-primary: #4f46e5; /* --brand-600 */
    --color-primary-hover: #4338ca; /* --brand-700 */
    --color-primary-light: #eef2ff; /* --brand-50 */
    --color-primary-text: #ffffff;
    /* ── Neutrals (mockup names: ink / muted / faint / border / bg / card) ── */
    --color-text-primary: #1e2433; /* --ink */
    --color-text-secondary: #555d6b; /* --muted */
    --color-text-muted: #6b7280; /* --faint */
    --color-text-disabled: #9aa1ad; /* derived — lighter than faint */

    --color-border: #e9ecf2; /* --border */
    --color-border-light: #f1f3f8; /* derived, lighter than --border */
    /* The edge of a filled control, a step darker than the fill it outlines
       or it vanishes into it. Indigo-tinted to match --color-control. */
    --color-border-strong: #c3c9f0;

    /* Filled control surface (.btn-secondary and anything that should read as
       a quiet button rather than a panel). Deliberately NOT a border token and
       NOT --color-surface: it has to be visible against BOTH surfaces one of
       these can sit on — the card (#ffffff) and the app shell (--color-bg) —
       and the card white is what made these invisible.

       Tinted toward the brand rather than sitting on the neutral gray ramp,
       because a neutral fill under a muted-gray label is exactly the grammar
       of a disabled input (--color-bg under --color-text-disabled), and a
       plain gray button was being read as one. Interactive things carry a hint
       of the brand here; inert things stay gray. Kept off --color-primary-light
       (#eef2ff), which means "selected" in 18 places — a button resting on the
       selected colour would look permanently active. */
    --color-control: #e8ebfa;
    --color-control-hover: #dde2f6;
    /* Indigo-800. Full-strength, because a muted label is the single strongest
       cue that a control is dead. */
    --color-control-text: #3730a3;
    --color-bg: #f6f7fb; /* --bg — app shell background */
    --color-surface: #ffffff; /* --card */
    --color-white: #ffffff;
    /* ── Status — Success ── */
    --color-success: #16a34a; /* --ok */
    --color-success-light: #dcfce7; /* --ok-bg */
    --color-success-text: #166534; /* --ok-ink */
    /* ── Status — Warning ── */
    --color-warning: #c2410c; /* --warn — vivid orange, not muddy brown */
    --color-warning-light: #ffedd5; /* --warn-bg */
    --color-warning-text: #9a3412; /* --warn-ink */
    /* ── Status — Amber (grading middle-tier only) — --color-warning is a
       red-leaning orange that reads too close to --color-danger in small
       text/thin bars; this is a true yellow-amber for 3-tier grading
       (collection rate, etc.) where it needs to be visually distinct from red ── */
    --color-amber: #d97706;
    --color-amber-light: #fef3c7;
    --color-amber-text: #92400e;
    /* ── Status — Danger ── */
    --color-danger: #dc2626; /* --bad */
    --color-danger-light: #fde8e8; /* --bad-bg */
    --color-danger-text: #b42318; /* --bad-ink */
    /* ── Status — Info ── */
    --color-info: #2563eb; /* --info — matches original logo blue */
    --color-info-light: #dbeafe; /* --info-bg */
    --color-info-text: #1d4ed8; /* --info-ink */
    /* ── Sidebar (dark) — from Invoice Builder mockup ── */
    --color-sidebar-bg: #1b1830; /* --sb */
    --color-sidebar-bg-darker: #16131f; /* --sb-2 */
    --color-sidebar-item: #b4b0c8; /* --sb-item */
    --color-sidebar-active: #2c2748; /* --sb-active */
    /* ── Admin/Internal accent — used ONLY for internal-only UI
       like the invoice profit panel, never customer-facing ── */
    --color-admin: #7c5cf0;
    --color-admin-bg: #f3f0ff;
    --color-admin-border: #e3dcfb;
    --color-admin-text: #5b3fd6;
    /* ── Typography ── */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 13px;
    --font-size-sm: 14px;
    --font-size-base: 15px;
    --font-size-md: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 28px; /* matches the invoice builder's largest heading, +2px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600; /* most common weight across the mockups */
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    /* ── Spacing ── */
    --space-1: 3px;
    --space-2: 6px;
    --space-3: 9px;
    --space-4: 12px;
    --space-5: 14px;
    --space-6: 16px;
    --space-7: 20px;
    --space-8: 24px;
    --space-10: 32px;
    --space-12: 40px;
    --space-16: 60px;
    /* ── Border Radius — observed values: 4, 7, 8, 9, 10, 14, 16, 99 ── */
    --radius-sm: 4px;
    --radius-md: 8px; /* most common — buttons, inputs */
    --radius-lg: 10px; /* cards */
    --radius-xl: 16px; /* large panels, auth card */
    --radius-full: 99px; /* pills, badges */
    /* ── Shadows — from the marketing mockup ── */
    --shadow-sm: 0 2px 8px rgba(99, 102, 241, .12);
    --shadow-md: 0 4px 12px rgba(99, 102, 241, .4);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, .18);
    --shadow-xl: 0 30px 60px -20px rgba(30, 30, 70, .28);
    /* Brand-tinted shadow — used for primary CTA buttons */
    --shadow-brand: 0 4px 14px rgba(99, 102, 241, .4);
    /* ── Transitions ── */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
    /* ── Layout ── */
    --sidebar-width: 240px;
    --topbar-height: 68px; /* matches mockup nav height */
    --content-max-width: 1140px; /* matches mockup container width */
    --auth-card-max-width: 460px;
    /* ── Z-index ── */
    --z-dropdown: 100;
    --z-modal: 200;
    --z-toast: 300;
    --z-tooltip: 400;
}
