/* ============================================================
   StallPOS design tokens — "Tropical Modern" (2026-11-05)
   Docs: docs/STALLPOS_DESIGN_STANDARD.md  (tokens + doc move together)
   Load AFTER the page's existing stylesheets; per-page v2 css
   layers the retheme on top. Additive only — no logic, no layout
   takeover. Fonts self-hosted (no CDN) so the app works offline.
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('/assets/verticals/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/verticals/fonts/pjs-var.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* canvas & ink (warm neutrals) */
  --sp-paper: #FAF8F3;
  --sp-paper-2: #F2EDE3;
  --sp-card: #FFFFFF;
  --sp-ink-900: #201B14;
  --sp-ink-700: #4A4337;
  --sp-ink-500: #7C7365;
  --sp-ink-400: #A29885;
  --sp-line: #EAE3D4;
  --sp-line-2: #DBD2BE;

  /* brand: hibiscus emerald */
  --sp-brand-700: #0A5C3D;
  --sp-brand-600: #0E7A4E;
  --sp-brand-500: #139A63;
  --sp-brand-100: #D8F3E3;
  --sp-brand-050: #F0FBF5;
  --sp-brand-bright: #6FDDA2;

  /* semantic */
  --sp-danger: #C13A3A;  --sp-danger-bg: #FBEDEA;
  --sp-amber:  #A16207;  --sp-amber-bg:  #FCF3E1;
  --sp-info:   #3557A7;  --sp-info-bg:   #EBF0FB;

  /* vertical accents */
  --sp-v-retail: #7458C4; --sp-v-retail-bg: #F1EDF9;
  --sp-v-salon:  #A64D79; --sp-v-salon-bg:  #F8ECF3;
  --sp-v-fit:    #D96C2F; --sp-v-fit-bg:    #FCEEDF;
  --sp-v-hotel:  #2C7A9B; --sp-v-hotel-bg:  #E7F2F7;
  --sp-v-queue:  #B45309; --sp-v-queue-bg:  #FCF0DE;

  /* shape & depth */
  --sp-radius: 14px;
  --sp-radius-s: 10px;
  --sp-shadow-1: 0 1px 2px rgba(32,27,20,.05), 0 1px 3px rgba(32,27,20,.05);
  --sp-shadow-2: 0 4px 14px rgba(32,27,20,.09);
  --sp-shadow-pop: 0 16px 40px rgba(32,27,20,.16);

  --sp-font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --sp-font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --sp-font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* aliases so early adopter pages can use short names */
  --sp-accent: var(--sp-brand-600);
  --sp-accent-bg: var(--sp-brand-050);
}

/* base: the font is the identity (fallback stack untouched otherwise) */
body, input, select, textarea, button {
  font-family: var(--sp-font-ui);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--sp-font-display); letter-spacing: -0.02em; }

/* money + identifiers */
.sp-num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.sp-mono { font-family: var(--sp-font-mono); font-size: .92em; letter-spacing: 0; }

/* icons hydrate from /assets/verticals/icons.js (window.icon) */
.ic { flex: none; vertical-align: -0.18em; }

/* focus ring, single system */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--sp-brand-600);
  outline-offset: 2px;
}

/* status pill (generic component, opt-in via .sp-pill) */
.sp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 12px/1 var(--sp-font-ui);
  padding: 5px 10px; border-radius: 999px;
  background: var(--sp-paper-2); color: var(--sp-ink-700);
}
.sp-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sp-pill.ok    { background: var(--sp-brand-050); color: var(--sp-brand-700); }
.sp-pill.err   { background: var(--sp-danger-bg); color: var(--sp-danger); }
.sp-pill.warn  { background: var(--sp-amber-bg);  color: var(--sp-amber); }
.sp-pill.info  { background: var(--sp-info-bg);   color: var(--sp-info); }

/* vertical accent theming: body.v-<vertical> flips the accent pair */
body.v-retail { --sp-accent: var(--sp-v-retail); --sp-accent-bg: var(--sp-v-retail-bg); }
body.v-salon  { --sp-accent: var(--sp-v-salon);  --sp-accent-bg: var(--sp-v-salon-bg); }
body.v-fit    { --sp-accent: var(--sp-v-fit);    --sp-accent-bg: var(--sp-v-fit-bg); }
body.v-hotel  { --sp-accent: var(--sp-v-hotel);  --sp-accent-bg: var(--sp-v-hotel-bg); }
body.v-queue  { --sp-accent: var(--sp-v-queue);  --sp-accent-bg: var(--sp-v-queue-bg); }
