/* Labforce Design System — shared web tokens and primitives.
 * This file is intentionally dependency-free and is published by each web surface.
 */
:root {
  color-scheme: dark;
  --lf-ink-0: #f7f9fc;
  --lf-ink-1: #dce3ec;
  --lf-ink-2: #a8b3c1;
  --lf-ink-3: #738196;
  --lf-bg-0: #070a0f;
  --lf-bg-1: #0a0f17;
  --lf-bg-2: #0d141f;
  --lf-surface-1: #101925;
  --lf-surface-2: #131e2c;
  --lf-surface-3: #172333;
  --lf-border-subtle: rgba(185, 205, 231, .10);
  --lf-border: rgba(185, 205, 231, .17);
  --lf-border-strong: rgba(103, 184, 255, .38);
  --lf-accent: #4eb7ff;
  --lf-accent-strong: #2389ff;
  --lf-indigo: #766cff;
  --lf-cyan: #4bd8cd;
  --lf-success: #62d59b;
  --lf-warning: #e9bb65;
  --lf-danger: #f27d91;
  --lf-info: #6dbfff;

  --lf-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --lf-font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --lf-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --lf-text-xs: .72rem;
  --lf-text-sm: .82rem;
  --lf-text-md: .94rem;
  --lf-text-lg: 1.08rem;
  --lf-text-xl: clamp(1.7rem, 2.4vw, 2.35rem);
  --lf-text-2xl: clamp(2.5rem, 5vw, 4.8rem);

  --lf-space-1: .25rem;
  --lf-space-2: .5rem;
  --lf-space-3: .75rem;
  --lf-space-4: 1rem;
  --lf-space-5: 1.5rem;
  --lf-space-6: 2rem;
  --lf-space-7: 3rem;
  --lf-space-8: 4.5rem;

  --lf-radius-sm: 7px;
  --lf-radius-md: 10px;
  --lf-radius-lg: 14px;
  --lf-radius-xl: 20px;
  --lf-shadow-float: 0 18px 55px rgba(0, 0, 0, .28);
  --lf-shadow-focus: 0 0 0 3px rgba(78, 183, 255, .17);
  --lf-duration-fast: 140ms;
  --lf-duration: 220ms;
  --lf-ease: cubic-bezier(.2, .72, .2, 1);
  --lf-content: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { accent-color: var(--lf-accent); }
body { font-family: var(--lf-font-body); }

::selection { background: rgba(78, 183, 255, .28); color: var(--lf-ink-0); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--lf-accent);
  outline-offset: 3px;
  box-shadow: var(--lf-shadow-focus);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.lf-icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -.15em;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lf-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--lf-accent);
  font: 700 var(--lf-text-xs)/1 var(--lf-font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.lf-kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .72;
}

.lf-context-rail {
  position: relative;
  display: flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  color: var(--lf-ink-3);
  font: 600 var(--lf-text-xs)/1.2 var(--lf-font-mono);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.lf-context-rail::-webkit-scrollbar { display: none; }
.lf-context-rail::before {
  content: "";
  width: 22px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--lf-accent);
  box-shadow: 0 0 10px rgba(78,183,255,.35);
}
.lf-context-rail [aria-current="page"],
.lf-context-rail .current { color: var(--lf-ink-1); }
.lf-context-rail .sep { color: #4a5869; padding: 0 .12rem; }

.lf-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 0 .95rem;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-md);
  background: transparent;
  color: var(--lf-ink-1);
  font: 700 var(--lf-text-sm)/1 var(--lf-font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--lf-duration-fast) var(--lf-ease), border-color var(--lf-duration-fast) var(--lf-ease), color var(--lf-duration-fast) var(--lf-ease), transform var(--lf-duration-fast) var(--lf-ease);
}
.lf-button:hover:not(:disabled) {
  border-color: var(--lf-border-strong);
  background: rgba(255,255,255,.035);
  color: var(--lf-ink-0);
}
.lf-button:active:not(:disabled) { transform: translateY(1px); }
.lf-button:disabled { opacity: .45; cursor: not-allowed; }
.lf-button.primary {
  color: #06111d;
  border-color: #72c7ff;
  background: #72c7ff;
}
.lf-button.primary:hover:not(:disabled) {
  color: #02070d;
  border-color: #9ad7ff;
  background: #8fd3ff;
}
.lf-button.danger { color: #ff9aab; border-color: rgba(242,125,145,.28); }
.lf-button.compact { min-height: 34px; padding-inline: .72rem; font-size: var(--lf-text-xs); }

.lf-field {
  display: grid;
  gap: .45rem;
  color: var(--lf-ink-2);
  font-size: var(--lf-text-sm);
}
.lf-field > span:first-child { font-weight: 650; color: var(--lf-ink-1); }
.lf-field :where(input, select, textarea) {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--lf-border);
  border-radius: var(--lf-radius-md);
  background: var(--lf-bg-1);
  color: var(--lf-ink-0);
  padding: .72rem .82rem;
  transition: border-color var(--lf-duration-fast) var(--lf-ease), background var(--lf-duration-fast) var(--lf-ease);
}
.lf-field :where(input, select, textarea):hover { border-color: rgba(185,205,231,.25); }
.lf-field :where(input, select, textarea):focus { border-color: var(--lf-accent); background: var(--lf-bg-0); }
.lf-field small { color: var(--lf-ink-3); line-height: 1.45; }

.lf-badge {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-height: 24px;
  padding: 0 .55rem;
  border-radius: 999px;
  border: 1px solid var(--lf-border-subtle);
  color: var(--lf-ink-2);
  background: rgba(255,255,255,.025);
  font: 700 .68rem/1 var(--lf-font-mono);
  letter-spacing: .035em;
}
.lf-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.lf-badge.success { color: var(--lf-success); }
.lf-badge.warning { color: var(--lf-warning); }
.lf-badge.danger { color: var(--lf-danger); }
.lf-badge.info { color: var(--lf-info); }

.lf-divider { height: 1px; background: var(--lf-border-subtle); border: 0; }

.lf-surface {
  border: 1px solid var(--lf-border-subtle);
  border-radius: var(--lf-radius-lg);
  background: var(--lf-surface-1);
}

.lf-data-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-block: 1px solid var(--lf-border-subtle);
}
.lf-data-strip > * {
  min-width: 0;
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--lf-border-subtle);
}
.lf-data-strip > *:last-child { border-right: 0; }
.lf-data-strip small {
  display: block;
  margin-bottom: .45rem;
  color: var(--lf-ink-3);
  font: 700 .65rem/1.2 var(--lf-font-mono);
  letter-spacing: .055em;
  text-transform: uppercase;
}
.lf-data-strip strong { color: var(--lf-ink-0); font-size: 1.1rem; letter-spacing: -.025em; }

.lf-table-wrap { width: 100%; overflow-x: auto; border-block: 1px solid var(--lf-border-subtle); }
.lf-table { width: 100%; border-collapse: collapse; font-size: var(--lf-text-sm); }
.lf-table th {
  padding: .78rem 1rem;
  color: var(--lf-ink-3);
  font: 700 .66rem/1.2 var(--lf-font-mono);
  letter-spacing: .055em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 1px solid var(--lf-border-subtle);
}
.lf-table td { padding: .9rem 1rem; color: var(--lf-ink-2); border-bottom: 1px solid rgba(185,205,231,.065); }
.lf-table tbody tr { transition: background var(--lf-duration-fast) var(--lf-ease); }
.lf-table tbody tr:hover { background: rgba(255,255,255,.025); }
.lf-table tbody tr:last-child td { border-bottom: 0; }

.lf-empty {
  min-height: 190px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .45rem;
  padding: 2rem;
  text-align: center;
  color: var(--lf-ink-3);
}
.lf-empty strong { color: var(--lf-ink-1); font-size: var(--lf-text-md); }
.lf-empty p { max-width: 440px; margin: 0; font-size: var(--lf-text-sm); line-height: 1.6; }

.lf-skeleton {
  position: relative;
  overflow: hidden;
  min-height: .9rem;
  border-radius: var(--lf-radius-sm);
  background: rgba(255,255,255,.055);
}
.lf-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.065), transparent);
  animation: lf-skeleton 1.35s infinite;
}
@keyframes lf-skeleton { to { transform: translateX(100%); } }

.lf-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lf-ink-3); box-shadow: 0 0 0 3px rgba(255,255,255,.025); }
.lf-status-dot.success { background: var(--lf-success); }
.lf-status-dot.warning { background: var(--lf-warning); }
.lf-status-dot.danger { background: var(--lf-danger); }
.lf-status-dot.info { background: var(--lf-info); }

.lf-command-hint {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  color: var(--lf-ink-3);
  font: 650 .7rem/1 var(--lf-font-mono);
}
.lf-command-hint kbd {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding-inline: .35rem;
  border: 1px solid var(--lf-border);
  border-bottom-color: rgba(185,205,231,.28);
  border-radius: 5px;
  background: var(--lf-bg-1);
  color: var(--lf-ink-2);
  box-shadow: inset 0 -1px rgba(255,255,255,.025);
}

@media (max-width: 720px) {
  .lf-data-strip { grid-template-columns: 1fr 1fr; }
  .lf-data-strip > *:nth-child(2n) { border-right: 0; }
}

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