/*
 * Senjara design tokens: the single source of truth for every product.
 *
 * Framework-free: plain custom properties on :root, usable with or without
 * Tailwind. Origin: senjara-crm frontend/app/globals.css (Notes, 2026-10-13).
 * Apps override tokens in their own stylesheet, scoped to an opt-in selector
 * (see docs/liquid-glass.md), never by editing a copy of this file.
 */

@font-face {
  font-family: "Senjara Sans";
  src: url("../fonts/dm-sans.woff2?v=468d56b6b25b") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 1000;
}

:root {
  color-scheme: light;

  /* Fonts. System fallbacks keep an offline build rendering like an online one. */
  --font-sans:
    "Senjara Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --font-geist-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;

  /* Brand palette. Use the semantic tokens below in product code. */
  --paper: #fafaf8;
  --sand: #ebdccb;
  --moss: #a3b18a;
  --ochre: #d9a441;
  --logo-tan: #b89355;
  --forest: #2e4a3f;
  --forest-deep: #19392e;

  /* Semantic tokens (shadcn names, so every shadcn primitive follows). */
  --background: var(--paper);
  --foreground: var(--forest);
  --card: #ffffff;
  --card-foreground: var(--forest);
  --popover: #ffffff;
  --popover-foreground: var(--forest);
  --primary: var(--forest);
  --primary-foreground: var(--paper);
  --secondary: var(--sand);
  --secondary-foreground: var(--forest);
  --muted: var(--sand);
  --muted-foreground: #4b6054;
  /* Third text level for metadata (timestamps, IDs). AA on paper and card
     only, not on sand or tinted surfaces. */
  --tertiary-foreground: #66756d;
  /* Moss as a tint: highlight, selection, menu focus. Full moss under forest
     text is only 4.25:1. */
  --accent: #e1e7d6;
  --accent-foreground: var(--forest);
  --destructive: #b13838;
  --border: #c4cabe;
  --input: #829389;
  /* Forest is the one interactive colour, focus included. Ochre stays a
     brand colour (the "moment"), not a UI state. */
  --ring: var(--forest);

  /* Status: state only, never decoration, never colour alone (pair with an
     icon or a word). Text and icon on the surface or on a card are AA. */
  --success: #2f7344;
  --success-surface: #e6f1e8;
  --warning: #8c4a0b;
  --warning-surface: #fbeedd;
  --danger: var(--destructive);
  --danger-surface: #fbebea;
  --info: #2f5d7e;
  --info-surface: #e6eff6;
  /* Deprecated aliases: "urgent" was used as a warning. */
  --urgent: var(--warning);
  --urgent-surface: var(--warning-surface);

  --sidebar: var(--paper);
  --sidebar-foreground: var(--forest);
  --sidebar-primary: var(--forest);
  --sidebar-primary-foreground: var(--paper);
  --sidebar-accent: var(--sand);
  --sidebar-accent-foreground: var(--forest);
  --sidebar-border: #c4cabe;
  --sidebar-ring: var(--forest);

  /* Report series: fixed order, never cycled. Validated against --card
     (#ffffff); slots 3-5 are below 3:1 contrast, so always pair them with a
     legend and a visible table. "Rest" is grey, not an eighth hue. */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-rest: #a3aaa5;

  /* Type scale (promoted from Notes): size and line height always as a pair. */
  --type-caption: 0.75rem;
  --type-caption-leading: 1rem;
  --type-label: 0.8125rem;
  --type-label-leading: 1.125rem;
  --type-body: 0.875rem;
  --type-body-leading: 1.25rem;
  --type-lead: 1rem;
  --type-lead-leading: 1.5rem;
  --type-section: 1.25rem;
  --type-section-leading: 1.75rem;
  --type-title: 1.75rem;
  --type-title-leading: 2.125rem;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-strong: 600;

  /* Shape and motion. --radius drives the shadcn primitives (rounded-*); the
     named radii are the Notes look, binding for every product (2026-10-14):
     8 px controls, chips, avatars · 16 px cards and lists · 24 px work
     surfaces · pill for segments and filters. */
  --radius: 1.375rem;
  --radius-small: 8px;
  --radius-medium: 16px;
  --radius-large: 24px;
  --radius-pill: 9999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-fast: 140ms;
  --motion-base: 160ms;

  /* Elevation. Raised: the selected segment and nav item. Card: glass edge,
     a hairline and a short shadow, shared by content cards and the sidebar. */
  --raised-shadow:
    inset 0 1px 0 rgb(255 255 255 / 75%), 0 2px 4px rgb(46 74 63 / 6%),
    0 8px 20px -12px rgb(46 74 63 / 20%);
  --card-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 72%),
    inset 2px 2px 1px rgb(255 255 255 / 90%),
    inset -1px -1px 1px rgb(184 147 85 / 16%),
    0 0 0 1px rgb(46 74 63 / 7%),
    0 1px 2px rgb(25 57 46 / 6%),
    0 12px 28px -18px rgb(25 57 46 / 28%);
}
