/*  Enfinity HCM design tokens + base.
    Source of truth: Visual Direction.html + Design System.html
    in the project root memory note. Do not introduce ad-hoc colors,
    spacing values, or shadow definitions outside this file.       */

:root {
  /* Brand */
  --deep-blue:       #0B4A8B;
  --interactive:     #0E67C7;
  --interactive-12:  rgb(14 103 199 / 0.12);
  --interactive-18:  rgb(14 103 199 / 0.18);
  --cyan:            #00BBE6;
  --bg:              #F4F7FB;
  --ink-primary:     #1A2A3A;
  --ink-secondary:   #5B687C;

  /* Neutrals — cool */
  --white:           #FFFFFF;
  --paper:           #FAFBFD;
  --surface:         #FFFFFF;
  --line-100:        #ECEFF4;
  --line-200:        #DDE3EC;
  --line-300:        #C7D0DC;
  --ink-50:          #8A95A6;
  --ink-30:          #B4BCC9;

  /* Semantic — oklch, same chroma family as cyan */
  --success:         oklch(0.66 0.14 152);
  --success-ink:     oklch(0.35 0.14 152);
  --success-bg:      color-mix(in oklab, oklch(0.66 0.14 152) 12%, white);
  --warning:         oklch(0.78 0.14 78);
  --warning-ink:     oklch(0.4 0.14 78);
  --warning-bg:      color-mix(in oklab, oklch(0.78 0.14 78) 18%, white);
  --danger:          oklch(0.62 0.18 27);
  --danger-ink:      oklch(0.42 0.18 27);
  --danger-bg:       color-mix(in oklab, oklch(0.62 0.18 27) 12%, white);

  /* Elevation — blue-tinted */
  --shadow-xs:  0 1px 2px -1px rgb(11 74 139 / 0.06), 0 1px 1px rgb(11 74 139 / 0.04);
  --shadow-sm:  0 2px 6px -2px rgb(11 74 139 / 0.08), 0 1px 2px rgb(11 74 139 / 0.04);
  --shadow-md:  0 8px 20px -8px rgb(11 74 139 / 0.12), 0 2px 6px -2px rgb(11 74 139 / 0.05);
  --shadow-lg:  0 20px 40px -20px rgb(11 74 139 / 0.18), 0 6px 12px -6px rgb(11 74 139 / 0.06);
  --shadow-focus: 0 0 0 4px var(--interactive-18);

  /* Radii */
  --r-2: 4px;   --r-3: 6px;   --r-4: 8px;
  --r-5: 10px;  --r-6: 12px;  --r-8: 16px;
  --r-pill: 999px;

  /* Spacing — 4pt */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* Type */
  --font-sans:  "Geist", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --font-mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
body {
  font-family: var(--font-sans);
  color: var(--ink-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--interactive-18); color: var(--deep-blue); }

a { color: var(--interactive); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.02em; margin: 0; color: var(--ink-primary); }
h1 { font-size: 40px; line-height: 1.1;  letter-spacing: -0.028em; }
h2 { font-size: 28px; line-height: 1.18; letter-spacing: -0.022em; }
h3 { font-size: 18px; line-height: 1.35; letter-spacing: -0.012em; }

p { margin: 0; }

/* ----- Type utilities ----- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-50);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgb(0 187 230 / 0.18); }
.lede  { font-size: 19px; line-height: 1.55; color: var(--ink-secondary); max-width: 620px; }
.body  { font-size: 14.5px; line-height: 1.6; color: var(--ink-secondary); }
.small { font-size: 12.5px; color: var(--ink-secondary); }
.mono  { font-family: var(--font-mono); font-size: 12px; color: var(--ink-50); letter-spacing: 0.01em; }

/* ----- Card ----- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-100);
  border-radius: var(--r-6);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.card:hover { border-color: var(--line-200); box-shadow: var(--shadow-sm); }
.card-pad  { padding: var(--s-6); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line-100);
}
.card-head .title { font-size: 14px; font-weight: 500; }
.card-head .sub   { font-family: var(--font-mono); font-size: 11px; color: var(--ink-50); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r-4);
  font: 500 13.5px/1 var(--font-sans);
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}
.btn:active        { transform: translateY(0.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn-primary       { background: var(--ink-primary); color: var(--white); }
.btn-primary:hover { background: #0d1b29; }
.btn-brand         { background: var(--interactive); color: var(--white); box-shadow: 0 1px 0 rgb(11 74 139 / 0.3) inset, var(--shadow-xs); }
.btn-brand:hover   { background: #0a58b3; }
.btn-secondary     { background: var(--surface); color: var(--ink-primary); border-color: var(--line-200); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--line-300); background: var(--paper); }
.btn-ghost         { background: transparent; color: var(--ink-primary); }
.btn-ghost:hover   { background: var(--paper); }
.btn-sm            { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: var(--r-3); }
.btn-lg            { height: 44px; padding: 0 18px; font-size: 14.5px; border-radius: var(--r-5); }
.btn .kbd          { font: 400 10.5px/1 var(--font-mono); color: rgb(255 255 255 / 0.7); border: 1px solid rgb(255 255 255 / 0.2); padding: 1px 5px; border-radius: var(--r-2); }
.btn-secondary .kbd, .btn-ghost .kbd { color: var(--ink-50); border-color: var(--line-200); }

/* ----- Inputs ----- */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field .lbl { font-size: 12px; font-weight: 500; color: var(--ink-primary); }
.input {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-4);
  border: 1px solid var(--line-200);
  background: var(--surface);
  font: 400 14px/1 var(--font-sans);
  color: var(--ink-primary);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.input::placeholder { color: var(--ink-30); }
.input:focus { outline: none; border-color: var(--interactive); box-shadow: var(--shadow-focus); }

.search-wrap { position: relative; display: inline-block; width: 100%; max-width: 420px; }
.search-wrap .input { width: 100%; padding-left: 36px; padding-right: 60px; height: 40px; }
.search-wrap .ico   { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-50); pointer-events: none; }
.search-wrap .hint  { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 400 10.5px/1 var(--font-mono); color: var(--ink-50); border: 1px solid var(--line-200); padding: 2px 6px; border-radius: var(--r-3); background: var(--paper); }

/* ----- Pills ----- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font: 400 11px/1.4 var(--font-mono);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.pill .dt { width: 6px; height: 6px; border-radius: 50%; }
.pill.success { background: var(--success-bg); color: var(--success-ink); border-color: color-mix(in oklab, var(--success) 22%, transparent); }
.pill.success .dt { background: var(--success); }
.pill.warn    { background: var(--warning-bg); color: var(--warning-ink); border-color: color-mix(in oklab, var(--warning) 28%, transparent); }
.pill.warn .dt    { background: var(--warning); }
.pill.info    { background: var(--interactive-12); color: var(--deep-blue); border-color: var(--interactive-18); }
.pill.info .dt    { background: var(--interactive); }
.pill.neutral { background: var(--paper); color: var(--ink-secondary); border-color: var(--line-200); }
.pill.neutral .dt { background: var(--ink-30); }
.pill.danger  { background: var(--danger-bg); color: var(--danger-ink); border-color: color-mix(in oklab, var(--danger) 22%, transparent); }
.pill.danger .dt  { background: var(--danger); }

/* ----- Avatar ----- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white); font: 500 12px/1 var(--font-sans); letter-spacing: 0.02em;
  background: linear-gradient(140deg, var(--deep-blue), var(--interactive));
}
.avatar.b { background: linear-gradient(140deg, var(--interactive), var(--cyan)); }
.avatar.c { background: linear-gradient(140deg, #2c3e50, #4a6379); }
.avatar.d { background: linear-gradient(140deg, #324b6e, var(--deep-blue)); }

/* ----- People-list row ----- */
.people-list { display: flex; flex-direction: column; }
.person {
  display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s-4);
  align-items: center;
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--line-100);
  transition: background 160ms ease;
}
.person:first-child { border-top: 0; }
.person:hover { background: var(--paper); }
.person .name { font-size: 13.5px; color: var(--ink-primary); font-weight: 450; }
.person .role { font-size: 12px; color: var(--ink-secondary); margin-top: 1px; }
.person .meta { font: 400 11px/1.4 var(--font-mono); color: var(--ink-50); }

/* ----- Stack utilities ----- */
.stack-2 > * + * { margin-top: var(--s-2); }
.stack-3 > * + * { margin-top: var(--s-3); }
.stack-4 > * + * { margin-top: var(--s-4); }
.stack-5 > * + * { margin-top: var(--s-5); }
.stack-6 > * + * { margin-top: var(--s-6); }
.row     { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }

/* ----- Blazor connection error UI ----- */
#blazor-error-ui {
  background: var(--ink-primary); color: var(--white);
  bottom: 0; box-shadow: var(--shadow-lg); display: none;
  left: 0; padding: var(--s-3) var(--s-4); position: fixed; width: 100%; z-index: 1000;
  font: 400 13px/1.5 var(--font-sans);
}
#blazor-error-ui .dismiss {
  cursor: pointer; position: absolute; right: var(--s-4); top: var(--s-3);
  color: var(--cyan);
}
