/* WFM Console theme — overrides Bootstrap 5.3's CSS custom properties rather
   than fighting its classes. Palette/type per the Phase 12 design plan:
   dark slate sidebar, warm-neutral content, muted teal accent (deliberately
   not Bootstrap-blue or the generic AI-assistant clay). */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --wfm-sidebar-bg: #16202a;
  --wfm-sidebar-text: #c3cdd6;
  --wfm-sidebar-text-active: #ffffff;
  --wfm-content-bg: #f5f6f4;
  --wfm-card-bg: #ffffff;
  --wfm-accent: #2a6f77;
  --wfm-accent-soft: #e4eeee;
  --wfm-alert: #c1502e;
  --wfm-alert-soft: #f7e5df;
  --wfm-success: #3c8558;
  --wfm-success-soft: #e3ede6;
  --wfm-border: #e2e5e3;
  --wfm-text-muted: #6b7680;

  --bs-font-sans-serif: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --bs-body-bg: var(--wfm-content-bg);
  --bs-body-color: #232a2f;
  --bs-primary: var(--wfm-accent);
  --bs-primary-rgb: 42, 111, 119;
  --bs-border-color: var(--wfm-border);
  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.375rem;
}

body {
  font-feature-settings: 'ss01' 1;
}

/* Numeric/data-table cells use the mono face — a small, deliberate signal that
   this is operational data, not prose. Applied via .wfm-num, not globally. */
.wfm-num {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* ---- App shell ---- */

.wfm-shell {
  display: flex;
  min-height: 100vh;
}

.wfm-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--wfm-sidebar-bg);
  color: var(--wfm-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.wfm-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wfm-sidebar-brand .wfm-brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--wfm-sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

.wfm-nav-group {
  padding: 0.9rem 0.75rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #7c8894;
}

.wfm-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  margin: 0 0.5rem;
  border-radius: 0.4rem;
  color: var(--wfm-sidebar-text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.wfm-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.wfm-nav-link.active {
  background: var(--wfm-accent);
  color: #fff;
}

.wfm-nav-link .bi {
  font-size: 1rem;
  opacity: 0.85;
  width: 1.1rem;
  text-align: center;
}

.wfm-topbar {
  background: var(--wfm-card-bg);
  border-bottom: 1px solid var(--wfm-border);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.wfm-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.wfm-content {
  padding: 1.5rem;
  flex: 1;
}

/* ---- Cards & tables ---- */

.wfm-card {
  background: var(--wfm-card-bg);
  border: 1px solid var(--wfm-border);
  border-radius: var(--bs-border-radius);
}

.wfm-kpi-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
}

.wfm-kpi-label {
  font-size: 0.78rem;
  color: var(--wfm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.table-wfm thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wfm-text-muted);
  font-weight: 600;
  border-bottom-width: 1px;
}

.table-wfm td, .table-wfm th {
  vertical-align: middle;
}

/* ---- Status badges ---- */

.wfm-badge-ok {
  background: var(--wfm-success-soft);
  color: var(--wfm-success);
}

.wfm-badge-alert {
  background: var(--wfm-alert-soft);
  color: var(--wfm-alert);
}

.wfm-badge-neutral {
  background: var(--wfm-accent-soft);
  color: var(--wfm-accent);
}

/* ---- Coverage pulse (signature element) ----
   A row of small segments reflecting coverage health at a glance. Used on the
   dashboard and, in miniature, in the topbar — nowhere else, deliberately. */

.wfm-pulse {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 28px;
}

.wfm-pulse-seg {
  width: 5px;
  border-radius: 2px 2px 0 0;
  background: var(--wfm-success);
  transition: height 0.2s ease;
}

.wfm-pulse-seg.is-low {
  background: var(--wfm-alert);
}

.wfm-pulse-seg.is-mid {
  background: #d9a441;
}

/* ---- Auth page ---- */

.wfm-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wfm-sidebar-bg);
}

.wfm-auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem;
}
