/* UNIWISE shared theme — design tokens + base.  Import this FIRST on every page.
   Palette stays white / gray / orange (AI Office original); refined for a premium look. */
@font-face { font-family: 'Sarabun'; src: url('/fonts/Sarabun-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('/fonts/Sarabun-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('/fonts/Sarabun-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sarabun'; src: url('/fonts/Sarabun-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  /* surfaces */
  --u-bg: #f3f4f6;
  --u-bg-grad-top: #fafafa;
  --u-bg-grad-bottom: #eceef2;
  --u-surface: #ffffff;
  --u-surface-soft: #f8f9fb;
  --u-surface-sunk: #f1f3f6;
  --u-line: #e4e7ec;
  --u-line-strong: #cfd5de;
  /* text */
  --u-text: #1d232a;
  --u-text-2: #424b57;
  --u-muted: #6b7480;
  --u-ink: #262d36;          /* headings / dark accents */
  /* brand orange (single consistent accent) */
  --u-orange: #f26522;
  --u-orange-600: #d9561a;
  --u-orange-700: #b84612;
  --u-orange-50: #fff4ec;
  --u-orange-100: #ffe6d5;
  --u-orange-ring: rgba(242, 101, 34, 0.22);
  /* status (spec section 2) */
  --st-working-bg: #fff1e8; --st-working-fg: #d45214;
  --st-idle-bg: #e0f2fe;    --st-idle-fg: #0369a1;
  --st-meeting-bg: #f3e8ff; --st-meeting-fg: #6d28d9;
  --st-waiting-bg: #fef3c7; --st-waiting-fg: #b45309;
  --st-rest-bg: #f3f4f6;    --st-rest-fg: #4b5563;
  --st-blocked-bg: #fee2e2; --st-blocked-fg: #b91c1c;
  --st-offline-bg: #e5e7eb; --st-offline-fg: #1f2937;
  --st-training-bg: #e6f6f1; --st-training-fg: #0f766e;
  --u-good: #15803d; --u-good-bg: #dcfce7;
  /* type */
  --u-font: 'Sarabun', 'Noto Sans Thai', 'Leelawadee UI', 'Segoe UI', system-ui, sans-serif;
  --u-fs-xs: 11px; --u-fs-sm: 13px; --u-fs-md: 15px; --u-fs-lg: 18px; --u-fs-xl: 24px; --u-fs-2xl: clamp(26px, 2.4vw, 34px);
  --u-tracking-caps: 0.14em;
  /* shape + depth */
  --u-r-sm: 8px; --u-r-md: 12px; --u-r-lg: 18px; --u-r-pill: 999px;
  --u-shadow-1: 0 1px 2px rgba(17, 24, 39, 0.05), 0 1px 1px rgba(17, 24, 39, 0.03);
  --u-shadow-2: 0 10px 30px -12px rgba(17, 24, 39, 0.16), 0 2px 6px rgba(17, 24, 39, 0.04);
  --u-shadow-3: 0 24px 60px -24px rgba(17, 24, 39, 0.28);
  /* spacing */
  --u-s1: 4px; --u-s2: 8px; --u-s3: 12px; --u-s4: 16px; --u-s5: 20px; --u-s6: 28px; --u-s7: 40px;
  --u-max: 1720px;
  --u-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--u-text);
  background: linear-gradient(180deg, var(--u-bg-grad-top) 0%, var(--u-bg-grad-bottom) 100%) fixed;
  font: 400 var(--u-fs-md)/1.6 var(--u-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--u-fs-2xl); font-weight: 700; line-height: 1.2; color: var(--u-ink); letter-spacing: -0.01em; }
h1 em { font-style: normal; color: var(--u-orange); }
h2 { font-size: var(--u-fs-lg); font-weight: 700; color: var(--u-ink); letter-spacing: -0.005em; }
h3 { font-size: var(--u-fs-md); font-weight: 600; color: var(--u-ink); }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--u-orange-ring); outline-offset: 2px; border-radius: 6px; }

.u-container { max-width: var(--u-max); margin: 0 auto; padding: var(--u-s6) clamp(14px, 2.6vw, 40px) 56px; }
.u-eyebrow { font-size: var(--u-fs-xs); font-weight: 700; letter-spacing: var(--u-tracking-caps); text-transform: uppercase; color: var(--u-orange); }
.u-muted { color: var(--u-muted); font-size: var(--u-fs-sm); }
.u-num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
