/* Atelier OS – design tokens.
   Every colour, size and font the UI uses is named here once.
   Components in app.css only reference these names. There is no blue in the UI. */

:root {
  /* Type: Inter 400 and 500; 600 only for page titles and "ATELIER OS" */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Playfair Display', Georgia, serif;   /* wordmark only */
  --text-2xs: 10px;
  --text-xs: 12px;      /* table heads, small labels */
  --text-sm: 13px;      /* sub-lines, segmented options, pager */
  --text-md: 14px;      /* body, cells, buttons */
  --text-lg: 16px;
  --text-wordmark: 17px;
  --text-title: 26px;   /* page titles */
  --text-figure: 40px;  /* key figures */

  /* Colour */
  --ink: #111111;       /* main text, primary button */
  --ink-2: #6B7280;     /* secondary text, table heads */
  --ink-3: #9CA3AF;     /* icons and decoration only, never text */
  --canvas: #FFFFFF;    /* main area */
  --sidebar: #FAFAFA;
  --fill: #F4F4F5;      /* search, segmented track, avatars */
  --nav-active: #EFEFEF;
  --line: #EAEAEA;      /* borders, sidebar border, tab line */
  --line-soft: #F0F0F0; /* row dividers */
  --line-strong: #E4E4E7; /* secondary buttons, inputs */
  --check: #D4D4D8;     /* checkbox border */
  --skeleton: #E4E4E7;  /* skeleton lines on thumbnails */
  --skeleton-strong: #D4D4D8;
  --shadow-paper: 0 1px 2px rgba(17, 17, 17, 0.06);
  --row-hover: #FAFAFA;
  --sunken: #F6F6F7;    /* record pages: body zone below the white header */
  --gold: #8A6418;      /* only the line "ATELIER OS" */
  --warn: #B54708;      /* waiting, no answer, no contact for long */
  --stripe: #C4C4CA;    /* a normal open task on a day tile, round tick border */
  --stripe-on-ink: rgba(255, 255, 255, 0.45);   /* the same on today's dark tile */
  --warn-on-ink: #F2B47E;
  --danger-on-ink: #F29C94;
  --danger: #B42318;    /* overdue, late */

  /* Object types: one muted tone each, used ONLY for the tag and badge on choice cards.
     Equal saturation and lightness, no blue. Lists and tables stay monochrome. */
  --type-quote: #856647;
  --type-order: #7C8547;
  --type-packing: #5E8547;
  --type-project: #478554;
  --type-payment: #478572;
  --type-customer: #855047;
  --type-note: #857847;
  --type-product: #724785;
  --type-sample: #85477C;
  --type-expense: #85475E;

  /* Shape and rhythm */
  --radius: 8px;
  --radius-sm: 6px;     /* menu items, active segment */
  --radius-lg: 12px;    /* choice cards, filter popover */
  --radius-md: 10px;    /* day tiles of the agenda week */
  --radius-xs: 4px;     /* checkboxes, tooltips */
  --tap: 44px;          /* large touch targets */
  --control: 36px;      /* buttons */
  --control-sm: 34px;   /* search */
  --pad-x: 14px;        /* inner side padding of buttons */
  --segment: 28px;      /* option inside a segmented control */
  --segment-pad: 3px;   /* track around the options */
  --row: 64px;          /* list rows */
  --row-head: 36px;     /* list head */
  --avatar: 34px;       /* initials in the first list column */
  --avatar-sm: 28px;    /* profile in the sidebar */
  --dot: 6px;           /* status dot */
  --check-size: 16px;
  --bar: 2px;           /* progress and stage bars, same weight as figure rules */
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 26px;
  --gap-6: 40px;
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 64px;
  --side-pad: 12px;
  --side-pad-collapsed: 10px;
  --side-head: 76px;
  --side-item: 36px;    /* menu rows, also rows in pop-up menus */
  --icon: 18px;
  --icon-sm: 16px;      /* chevrons */
  --flag: 16px;         /* round country flag */
  --day-tile-h: 84px;   /* agenda week: one tile per day */
  --task-row: 56px;     /* agenda task row */
  --avatar-row: 30px;   /* person on a task row */
  --record-avatar: 48px;  /* record pages: avatar or thumbnail in the header */
  --text-record: 30px;    /* record pages: name in the header */
  --text-kpi: 32px;       /* record pages: KPI value */
  --card-pad: 20px;       /* record pages: card padding and gap between cards */
  --card-row: 52px;       /* record pages: one row in a card */
  --tile: 28px;           /* record pages: icon tile in card heads, payment states, activity */
  --col-status: 136px;    /* record pages: fixed column widths, rows never wrap */
  --col-amount: 96px;
  --col-date: 76px;
  --col-mid: 124px;
  --round-check: 18px;  /* round tick button */
  --stripe-w: 18px;     /* one open task on a day tile */
  --stripe-h: 4px;
  --segment-sm: 24px;   /* small segmented control */
  --thumb-sm: 32px;     /* guiding thumbnail inside rows */
  --thumb-md: 56px;     /* cards, file lists, headers */
  --thumb-lg: 104px;    /* empty states, upload zones, choice cards */
  --thumb-badge: 16px;  /* action badge on a thumbnail */
  --text-tag: 9px;      /* type tag on a thumbnail */
  --radius-tag: 3px;
  --radius-badge: 5px;
  --icon-tile: 20px;    /* icons on filter tiles */
  --tag-h: 22px;        /* quiet tags in tables */
  --side-gap: 10px;     /* icon to text */
  --tip-gap: 14px;      /* tooltip distance from the collapsed sidebar */
  --panel-w: 464px;
  --shadow-pop: 0 14px 34px rgba(20, 20, 18, 0.14);  /* menus, panels, dialogs, toasts */
  --shadow-segment: 0 1px 2px rgba(0, 0, 0, 0.08);
  --scrim: rgba(20, 20, 18, 0.28);

  /* Motion – short, strong ease-out for enter and exit, never ease-in */
  --dur-fast: 120ms;    /* hover, press, menus */
  --dur-base: 180ms;    /* closing, section entrance */
  --dur-slow: 260ms;    /* sidebar, bars */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* movement within the screen */
  --dur-pop: 140ms;     /* menus and popovers */
  --dur-dialog: 160ms;
  --dur-toast: 180ms;
  --dur-panel: 220ms;
  --dur-page-out: 120ms; /* page change: old page fades and rises */
  --dur-page-in: 240ms;  /* page change: new page fades in from below */
  --dur-nav: 260ms;      /* active menu mark and page title glide to the new page */
  --ease-page: cubic-bezier(0.22, 1, 0.36, 1);
  --page-out-rise: 6px;
  --page-in-rise: 8px;
  --dur-intro: 700ms;    /* Home wordmark, letter by letter */
  --intro-step: 45ms;
  --intro-follow: 60ms;
  --shine: rgba(255, 255, 255, 0.65);  /* light sweep over the wordmark */
  --dur-tab: 200ms;     /* tab underline glide */
  --dur-segment: 180ms; /* white segment glide */
  --dur-fade-out: 80ms; /* tab content out */
  --dur-fade-in: 140ms; /* tab content in */
  --dur-day-in: 160ms;  /* agenda: the list of the newly selected day */
  --ease-tab: cubic-bezier(0.2, 0, 0, 1);
  --stagger: 40ms;      /* content blocks of a new page, at most 6 */
  --rise: 8px;

  /* Sidebar – light is the default. The page area stays white in both variants. */
  --side-bg: var(--sidebar);
  --side-border: var(--line);
  --side-text: var(--ink-2);
  --side-strong: var(--ink);
  --side-active: var(--nav-active);
  --side-brand: var(--ink);
  --side-line: var(--line);
  --side-avatar: var(--fill);
}

/* Dark sidebar, chosen in the profile menu. Neutral greys, no blue. */
:root[data-sidebar='ink'] {
  --side-bg: #111111;
  --side-border: #111111;
  --side-text: #A1A1AA;
  --side-strong: #FFFFFF;
  --side-active: #27272A;
  --side-brand: #FFFFFF;
  --side-line: #27272A;
  --side-avatar: #27272A;
}

/* reduced motion: tabs and segments switch without any movement */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-tab: 0ms; --dur-segment: 0ms; --dur-fade-out: 0ms; --dur-fade-in: 0ms; --dur-day-in: 0ms; --dur-page-out: 100ms; --dur-page-in: 100ms; --dur-nav: 0ms; --page-out-rise: 0px; --page-in-rise: 0px; }
}
