/* Product-wide foundation. Served by both Razor hosts; page CSS may compose these primitives but
   must not redefine the visual language. */
:root {
  --k-bg: #0b1018;
  --k-surface: #121a25;
  --k-surface-2: #17212e;
  --k-surface-3: #1e2a38;
  --k-border: #2a394b;
  --k-border-strong: #41546b;
  --k-text: #edf3fa;
  --k-text-muted: #a6b5c7;
  --k-text-faint: #8495aa;
  --k-primary: #3d6f9f;
  --k-primary-hover: #4b7eae;
  --k-primary-active: #315d88;
  --k-primary-bright: #9ec4e6;
  --k-primary-soft: rgba(93, 142, 187, .18);
  --k-success: #4bbf91;
  --k-warning: #e0a64a;
  --k-danger: #e36d76;
  --k-radius-sm: 6px;
  --k-radius: 8px;
  --k-radius-lg: 12px;
  --k-shadow-sm: 0 1px 2px rgba(0, 0, 0, .22);
  --k-shadow: 0 8px 22px rgba(0, 0, 0, .20);
}

html { font-size: 16px; }
body { background: var(--k-bg); color: var(--k-text); font-size: .9375rem; line-height: 1.5; }
body, button, input, select, textarea { font-family: var(--sans, system-ui, sans-serif); }
body { background-image: none; }
.rail, .rail-brand, .admin-sidebar, .sidebar-brand-mark, .auth-brand-mark, .sidebar-user-avatar,
.stat-card::before { background-image: none !important; }
.rail { background-color: var(--k-surface) !important; }
.rail-brand { background-color: var(--k-surface-2) !important; box-shadow: none !important; }
.rail-link.active::before, .dot { box-shadow: none !important; }
.page-header-title, h1 { font-size: clamp(1.4rem, 2vw, 1.8rem); letter-spacing: -.015em; }
.page-header-eyebrow, .sidebar-section, .table > thead > tr > th { font-family: inherit; }
.card, .modal-content { box-shadow: var(--k-shadow-sm); }
.btn-primary { box-shadow: none; }
.btn-primary:hover { box-shadow: none; }
.admin-sidebar { background-color: var(--k-surface) !important; }
.sidebar-link.active { background-color: var(--k-primary-soft) !important; }
.auth-page { background-color: var(--k-bg) !important; }
.stat-card::before { width: 3px; background-color: var(--k-primary) !important; }
.k-status, .k-badge, .badge { border-radius: var(--k-radius-sm); }
.k-status, .k-state { align-items: center; display: inline-flex; gap: .4rem; font-size: .8125rem; }
.k-live-indicator { color: var(--k-text-muted); font-size: .8125rem; white-space: nowrap; }
.k-timestamp { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.k-state--empty, .k-state--loading, .k-state--error { background: var(--k-surface-2); border: 1px dashed var(--k-border-strong); border-radius: var(--k-radius-lg); color: var(--k-text-muted); padding: 1.25rem; text-align: center; }
.k-state--error { border-color: color-mix(in srgb, var(--k-danger) 55%, var(--k-border)); color: var(--k-danger); }
.table > :not(caption) > * > * { vertical-align: middle; }
.form-label { font-size: .8125rem; font-weight: 600; }
.modal-header, .modal-footer { padding: 1rem 1.25rem; }
@media (max-width: 839.98px) {
  .btn:not(.btn-close), .form-control, .form-select { min-height: 42px; }
}
.k-summary-label {
  align-items: center;
  color: var(--k-text-muted);
  display: flex;
  font-size: .875rem;
  font-weight: 600;
  gap: .4375rem;
  margin: 0;
}

.k-summary-label .k-icon { color: var(--k-primary-bright); }
