/* NHEIS design tokens + GovTech UI layer */
:root {
  --ncheis-navy-900: #0b1f3a;
  --ncheis-navy-800: #142f52;
  --ncheis-navy-700: #1c3b66;
  --ncheis-slate-900: #111827;
  --ncheis-slate-700: #374151;
  --ncheis-slate-500: #6b7280;
  --ncheis-slate-300: #cbd5e1;
  --ncheis-border: #d6dde6;
  --ncheis-bg: #f4f6f9;
  --ncheis-surface: #ffffff;
  --ncheis-accent: #2f6f7e;
  --ncheis-success: #0f766e;
  --ncheis-warning: #9a6b2f;
  --ncheis-danger: #b42318;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 2.5rem;
  --space-8: 3rem;

  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 1rem;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
}

html, body {
  margin: 0;
  padding: 0;
}

body.ncheis-app {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--ncheis-bg);
  color: var(--ncheis-slate-900);
}
a {
  color: var(--ncheis-navy-800);
}

a:hover {
  color: var(--ncheis-navy-900);
}

.ncheis-app {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .app-shell {
    flex-direction: row;
  }
}

.app-sidebar {
  background: var(--ncheis-navy-900);
  color: #f8fafc;
  padding: var(--space-5) var(--space-4);
}

@media (min-width: 992px) {
  .app-sidebar {
    width: 260px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.auth-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.sidebar-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-xs);
  margin-top: 0.25rem;
}

.sidebar-user {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin: var(--space-4) 0;
}

.sidebar-user .user-name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.sidebar-user .user-role {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.65);
}

.nav-section-title {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}

.app-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-content {
  flex: 1 1 auto;
}

.app-footer {
  margin-top: auto;
}


.app-topbar {
  background: var(--ncheis-surface);
  border-bottom: 1px solid var(--ncheis-border);
}

.topbar-title {
  font-weight: 600;
}

.topbar-subtitle {
  font-size: var(--text-xs);
  color: var(--ncheis-slate-500);
}

.topbar-search .form-control,
.topbar-search .input-group-text {
  border-color: var(--ncheis-border);
}

.app-content {
  padding: var(--space-5);
}

.app-footer {
  border-top: 1px solid var(--ncheis-border);
  background: var(--ncheis-surface);
}

.page-header .help-text {
  color: var(--ncheis-slate-500);
  font-size: var(--text-sm);
}

.card {
  border: 1px solid var(--ncheis-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--ncheis-border);
  font-weight: 600;
}

.kpi-card {
  border-left: 4px solid var(--ncheis-navy-800);
}

.kpi-card .kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
}


.app-sidebar .sidebar-badge {
  color: #ffffff;
}
.badge-soft-success {
  background: rgba(15, 118, 110, 0.12);
  color: var(--ncheis-success);
}

.badge-soft-warning {
  background: rgba(154, 107, 47, 0.15);
  color: var(--ncheis-warning);
}

.badge-soft-danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--ncheis-danger);
}

.badge-soft-info {
  background: rgba(47, 111, 126, 0.12);
  color: var(--ncheis-accent);
}

.table thead th {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: var(--ncheis-slate-500);
  background: #f8fafc;
}

.table td {
  vertical-align: middle;
}

.btn-primary {
  background: var(--ncheis-navy-800);
  border-color: var(--ncheis-navy-800);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ncheis-navy-900);
  border-color: var(--ncheis-navy-900);
}

.btn-outline-primary {
  color: var(--ncheis-navy-800);
  border-color: var(--ncheis-navy-800);
}

.btn-outline-primary:hover {
  background: var(--ncheis-navy-800);
  color: #ffffff;
}

.form-control,
.form-select {
  border-color: var(--ncheis-border);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ncheis-navy-700);
  box-shadow: 0 0 0 0.2rem rgba(28, 59, 102, 0.15);
}

.form-text {
  color: var(--ncheis-slate-500);
}

.required-indicator {
  color: var(--ncheis-danger);
}

.empty-state {
  border: 1px dashed var(--ncheis-border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.empty-state .empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 47, 82, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ncheis-navy-800);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
  border-radius: 6px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.timeline {
  border-left: 2px solid var(--ncheis-border);
  padding-left: var(--space-4);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-4);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 0.25rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--ncheis-navy-800);
}

.audit-log {
  background: #f8fafc;
  border: 1px solid var(--ncheis-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.ncheis-auth {
  background: linear-gradient(180deg, #eef2f7 0%, #ffffff 100%);
  min-height: 100vh;
}

.auth-card {
  border-radius: var(--radius-lg);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--ncheis-navy-900);
  text-align: left;
}







