/* ============================================================
   WH-UNIFORM.CSS  -  Design uniformity layer (v1)
   Loaded AFTER main.css. Wins via specificity + !important
   where the legacy stylesheet would otherwise create drift.
   Goal: consistent buttons, tables, cards, forms, badges,
         spacing across every module.
   ============================================================ */

:root {
  --whu-radius: 10px;
  --whu-radius-sm: 6px;
  --whu-radius-pill: 999px;
  --whu-border: #e5e7eb;
  --whu-border-strong: #cbd5e0;
  --whu-text: #0f172a;
  --whu-muted: #64748b;
  --whu-surface: #ffffff;
  --whu-surface-soft: #f8fafc;
  --whu-surface-hover: #f1f5f9;
  --whu-shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --whu-shadow:    0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --whu-shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --whu-control-h: 42px;
  --whu-btn-h: 42px;
  --whu-btn-h-sm: 34px;
  --whu-brand: #ff6b35;
  --whu-brand-dark: #d73d2d;
  --whu-brand-soft: #fff1e9;
}

/* ============================================================
   1. PAGE CONTAINERS - keep content from breaking at full width
   ============================================================ */
.wh-main,
.wh-page,
main {
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.container-fluid {
  max-width: 1440px;
}

/* ============================================================
   2. HEADINGS - uniform scale
   ============================================================ */
h1, .h1 { font-size: 1.625rem; font-weight: 700; letter-spacing: -0.01em; }
h2, .h2 { font-size: 1.25rem;  font-weight: 700; letter-spacing: -0.005em; }
h3, .h3 { font-size: 1.0625rem; font-weight: 600; }
h4, .h4 { font-size: 0.9375rem; font-weight: 600; }
h5, .h5 { font-size: 0.875rem; font-weight: 600; }

/* ============================================================
   3. BUTTONS - one shape, one size, no click-grow
   Covers: Bootstrap .btn-*, custom .wh-btn-*
   ============================================================ */
.btn,
.wh-btn-primary,
.wh-btn-secondary,
.wh-btn-outline {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  height: var(--whu-btn-h) !important;
  min-height: var(--whu-btn-h) !important;
  padding: 0 1.125rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: var(--whu-radius) !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  letter-spacing: 0.1px !important;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease !important;
  /* no transform-based grow */
  transform: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.btn-sm,
.wh-btn-small {
  height: var(--whu-btn-h-sm) !important;
  min-height: var(--whu-btn-h-sm) !important;
  padding: 0 0.875rem !important;
  font-size: 0.8125rem !important;
  border-radius: var(--whu-radius-sm) !important;
}

.btn-lg { height: 48px !important; min-height: 48px !important; padding: 0 1.25rem !important; font-size: 1rem !important; }

/* Kill all click-grow / hover-jump animations on every button variant */
.btn:hover,
.btn:focus,
.btn:active,
.btn.active,
.wh-btn-primary:hover,
.wh-btn-primary:focus,
.wh-btn-primary:active,
.wh-btn-secondary:hover,
.wh-btn-secondary:focus,
.wh-btn-secondary:active {
  transform: none !important;
  animation: none !important;
}

/* Focus ring - consistent for keyboard a11y */
.btn:focus-visible,
.wh-btn-primary:focus-visible,
.wh-btn-secondary:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.30) !important;
}

/* PRIMARY (brand orange) */
.btn-primary,
.wh-btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #d73d2d 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(215,61,45,.20) !important;
}
.btn-primary:hover,
.wh-btn-primary:hover {
  background: linear-gradient(135deg, #ff5a25 0%, #c5331f 100%) !important;
  box-shadow: 0 2px 6px rgba(215,61,45,.30) !important;
}
.btn-primary:active,
.wh-btn-primary:active {
  background: linear-gradient(135deg, #e85825 0%, #b62d1c 100%) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.30) !important;
}
.btn-primary:disabled,
.wh-btn-primary:disabled,
.btn-primary.disabled,
.wh-btn-primary.disabled {
  background: #ffb59a !important;
  color: #ffffff !important;
  opacity: 0.7 !important;
  cursor: not-allowed;
}

/* SECONDARY (outlined, brand-tinted) */
.btn-secondary,
.wh-btn-secondary {
  background: #ffffff !important;
  color: var(--whu-brand-dark) !important;
  border: 1px solid var(--whu-brand) !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04) !important;
}
.btn-secondary:hover,
.wh-btn-secondary:hover {
  background: var(--whu-brand-soft) !important;
  color: var(--whu-brand-dark) !important;
  border-color: var(--whu-brand-dark) !important;
}
.btn-secondary:active,
.wh-btn-secondary:active {
  background: #ffe1d2 !important;
  border-color: var(--whu-brand-dark) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.25) !important;
}

/* Other Bootstrap variants made coherent */
.btn-success { background: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-success:hover { background: #047857 !important; border-color: #047857 !important; }
.btn-warning { background: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }
.btn-warning:hover { background: #b45309 !important; border-color: #b45309 !important; }
.btn-danger  { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.btn-danger:hover  { background: #b91c1c !important; border-color: #b91c1c !important; }
.btn-info    { background: #2563eb !important; border-color: #2563eb !important; color: #fff !important; }
.btn-info:hover    { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }
.btn-light   { background: #f8fafc !important; border-color: var(--whu-border) !important; color: var(--whu-text) !important; }
.btn-light:hover { background: var(--whu-surface-hover) !important; }
.btn-dark    { background: #1e293b !important; border-color: #1e293b !important; color: #fff !important; }
.btn-dark:hover { background: #0f172a !important; }

/* Outline variants - keep uniform border weight */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-info {
  background: #ffffff !important;
  border-width: 1px !important;
}
.btn-outline-primary  { color: var(--whu-brand-dark) !important; border-color: var(--whu-brand) !important; }
.btn-outline-primary:hover { background: var(--whu-brand-soft) !important; color: var(--whu-brand-dark) !important; }

/* ============================================================
   4. AUTH PAGE FIX  - the reported bug
   Sign-in / Hive Now buttons stay identical size, never grow
   on click, fold cleanly on mobile.
   ============================================================ */
.wh-auth-actions {
  display: flex !important;
  gap: 0.75rem !important;
  margin-top: 1.5rem !important;
  align-items: stretch !important;
}
.wh-auth-actions > a,
.wh-auth-actions > button,
.wh-auth-actions .btn,
.wh-auth-actions .wh-btn-primary,
.wh-auth-actions .wh-btn-secondary {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 1rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  transform: none !important;
}

/* ============================================================
   5. FORM CONTROLS  - one height, one shape
   ============================================================ */
.form-control,
.form-select,
input.form-control,
textarea.form-control,
select.form-select,
.wh-input,
.wh-select {
  height: var(--whu-control-h);
  min-height: var(--whu-control-h);
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--whu-text);
  background-color: var(--whu-surface);
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius-sm);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea.form-control,
.wh-textarea {
  height: auto;
  min-height: 96px;
}

.form-control:focus,
.form-select:focus,
.wh-input:focus,
.wh-select:focus {
  outline: none;
  border-color: var(--whu-brand);
  box-shadow: 0 0 0 3px rgba(255,107,53,.15);
}

.form-control::placeholder { color: #94a3b8; }

.form-label,
.wh-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--whu-text);
  margin-bottom: 0.375rem;
  display: inline-block;
}

.form-check-input:checked {
  background-color: var(--whu-brand);
  border-color: var(--whu-brand);
}
.form-check-input:focus {
  border-color: var(--whu-brand);
  box-shadow: 0 0 0 3px rgba(255,107,53,.15);
}

/* ============================================================
   6. TABLES  - clean structure, color-coded headers, hover row
   ============================================================ */
.table,
.wh-table,
table.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--whu-surface);
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius);
  overflow: hidden;
  font-size: 0.9rem;
}

.table thead th,
.wh-table thead th,
.table > thead > tr > th {
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%) !important;
  color: var(--whu-text) !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem !important;
  border-bottom: 1px solid var(--whu-border) !important;
  border-top: none !important;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.table tbody td,
.wh-table tbody td,
.table > tbody > tr > td {
  padding: 0.7rem 0.9rem !important;
  border-top: 1px solid var(--whu-border) !important;
  border-bottom: none !important;
  vertical-align: middle;
  color: var(--whu-text);
}

.table tbody tr:first-child td { border-top: none !important; }

.table-hover tbody tr:hover,
.wh-table tbody tr:hover {
  background-color: var(--whu-surface-soft) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #fbfcfd !important;
  --bs-table-accent-bg: transparent;
  color: var(--whu-text);
}

.table-light,
.table thead.table-light th {
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%) !important;
  color: var(--whu-text) !important;
}

/* Responsive table scroller */
.table-responsive {
  border-radius: var(--whu-radius);
  border: 1px solid var(--whu-border);
  background: var(--whu-surface);
}
.table-responsive > .table,
.table-responsive > .wh-table {
  border: none;
  border-radius: 0;
}

/* ============================================================
   7. CARDS  - uniform elevation, radius, spacing
   ============================================================ */
.card,
.wh-card,
.wh-stat-card,
.wh-panel {
  background: var(--whu-surface);
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius);
  box-shadow: var(--whu-shadow);
  overflow: hidden;
}

.card-header,
.wh-card-header {
  background: var(--whu-surface-soft) !important;
  border-bottom: 1px solid var(--whu-border) !important;
  padding: 0.875rem 1.125rem !important;
  font-weight: 600;
  color: var(--whu-text);
}

.card-body,
.wh-card-body {
  padding: 1.125rem !important;
}

.card-footer,
.wh-card-footer {
  background: var(--whu-surface-soft) !important;
  border-top: 1px solid var(--whu-border) !important;
  padding: 0.75rem 1.125rem !important;
}

/* ============================================================
   8. BADGES  - color-coded, pill shape, readable
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.6rem !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  border-radius: var(--whu-radius-pill) !important;
  line-height: 1;
  border: 1px solid transparent;
  vertical-align: middle;
}

.badge.bg-primary,
.badge.bg-primary-subtle {
  background: var(--whu-brand-soft) !important;
  color: var(--whu-brand-dark) !important;
  border-color: #fcd0bd;
}

.badge.bg-success,
.badge.bg-success-subtle {
  background: #d1fae5 !important;
  color: #065f46 !important;
  border-color: #a7f3d0;
}

.badge.bg-warning,
.badge.bg-warning-subtle {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a;
}

.badge.bg-danger,
.badge.bg-danger-subtle {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border-color: #fecaca;
}

.badge.bg-info,
.badge.bg-info-subtle {
  background: #dbeafe !important;
  color: #1e40af !important;
  border-color: #bfdbfe;
}

.badge.bg-secondary,
.badge.bg-secondary-subtle {
  background: #e2e8f0 !important;
  color: #334155 !important;
  border-color: #cbd5e0;
}

.badge.bg-light,
.badge.bg-light-subtle {
  background: #f8fafc !important;
  color: var(--whu-text) !important;
  border-color: var(--whu-border);
}

.badge.bg-dark {
  background: #1e293b !important;
  color: #ffffff !important;
}

/* ============================================================
   9. ALERTS  - cleaner color blocks
   ============================================================ */
.alert {
  border-radius: var(--whu-radius);
  border: 1px solid transparent;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ============================================================
   10. MODALS / DROPDOWNS  - radius + shadow uniformity
   ============================================================ */
.modal-content {
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius);
  box-shadow: 0 20px 50px rgba(15,23,42,.18);
}
.modal-header,
.modal-footer {
  border-color: var(--whu-border);
}

.dropdown-menu {
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius);
  box-shadow: var(--whu-shadow-md);
  padding: 0.375rem;
}
.dropdown-item {
  border-radius: var(--whu-radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--whu-surface-hover);
  color: var(--whu-text);
}
.dropdown-item.active,
.dropdown-item:active {
  background: var(--whu-brand-soft);
  color: var(--whu-brand-dark);
}

/* ============================================================
   11. PAGINATION
   ============================================================ */
.page-link {
  color: var(--whu-brand-dark);
  border-color: var(--whu-border);
}
.page-item.active .page-link {
  background: var(--whu-brand);
  border-color: var(--whu-brand);
  color: #fff;
}
.page-link:hover {
  background: var(--whu-brand-soft);
  color: var(--whu-brand-dark);
  border-color: var(--whu-border);
}

/* ============================================================
   12. NAV TABS / PILLS
   ============================================================ */
.nav-tabs {
  border-bottom: 1px solid var(--whu-border);
}
.nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: var(--whu-radius-sm) var(--whu-radius-sm) 0 0;
  color: var(--whu-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 0.95rem;
}
.nav-tabs .nav-link.active {
  background: var(--whu-surface);
  border-color: var(--whu-border) var(--whu-border) var(--whu-surface);
  color: var(--whu-brand-dark);
}
.nav-pills .nav-link {
  border-radius: var(--whu-radius-pill);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--whu-muted);
  padding: 0.4rem 0.9rem;
}
.nav-pills .nav-link.active {
  background: var(--whu-brand);
  color: #fff;
}

/* ============================================================
   13. STATUS PILL helpers (works with text content)
   ============================================================ */
.wh-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: var(--whu-radius-pill);
  border: 1px solid transparent;
}
.wh-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.wh-status-approved,  .wh-status-active,    .wh-status-completed { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.wh-status-pending,   .wh-status-in-progress { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.wh-status-rejected,  .wh-status-failed,    .wh-status-cancelled { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.wh-status-draft,     .wh-status-new        { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.wh-status-archived,  .wh-status-inactive   { background: #e2e8f0; color: #334155; border-color: #cbd5e0; }

/* ============================================================
   14. EMPTY STATES
   ============================================================ */
.wh-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--whu-muted);
  font-size: 0.95rem;
}
.wh-empty i {
  font-size: 2rem;
  opacity: 0.4;
  display: block;
  margin-bottom: 0.5rem;
}

/* ============================================================
   15. UTILITIES - spacing, dividers, muted text
   ============================================================ */
.wh-divider {
  height: 1px;
  background: var(--whu-border);
  margin: 1.25rem 0;
}
.text-muted, .wh-muted {
  color: var(--whu-muted) !important;
}

/* Section header used across modules */
.wh-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--whu-text);
  margin: 0 0 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   16. RESPONSIVE - mobile rules
   ============================================================ */
@media (max-width: 768px) {
  h1, .h1 { font-size: 1.375rem; }
  h2, .h2 { font-size: 1.125rem; }

  .wh-auth-actions {
    flex-direction: column !important;
  }
  .wh-auth-actions > a,
  .wh-auth-actions > button,
  .wh-auth-actions .btn,
  .wh-auth-actions .wh-btn-primary,
  .wh-auth-actions .wh-btn-secondary {
    width: 100% !important;
    flex: 0 0 auto !important;
  }

  .table,
  .wh-table {
    font-size: 0.8125rem;
  }
  .table thead th,
  .wh-table thead th { padding: 0.6rem 0.5rem !important; font-size: 0.7rem !important; }
  .table tbody td,
  .wh-table tbody td { padding: 0.55rem 0.5rem !important; }

  .card-body,
  .wh-card-body { padding: 0.875rem !important; }
}

@media (max-width: 480px) {
  .btn, .wh-btn-primary, .wh-btn-secondary { font-size: 0.875rem !important; }
}

/* ============================================================
   17. PRINT
   ============================================================ */
@media print {
  .btn, .wh-btn-primary, .wh-btn-secondary, .wh-filter-bar,
  .wh-sidebar, .wh-topbar { display: none !important; }
  .card, .wh-card, .table, .wh-table { box-shadow: none !important; }
}

/* ============================================================
   ============================================================
   v2 POLISH LAYER  -  page-level cohesion
   ============================================================
   18. DASHBOARD + KPI CARDS
   ============================================================ */

.wh-page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem !important;
  padding-bottom: 0.875rem !important;
  border-bottom: 1px solid var(--whu-border) !important;
}
.wh-page-heading h1,
.wh-page-heading h2 {
  margin: 0 !important;
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  color: var(--whu-text) !important;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.wh-page-heading h1 i,
.wh-page-heading h2 i {
  color: var(--whu-brand);
  font-size: 1.25rem;
}
.wh-page-heading p {
  margin: 0.25rem 0 0 !important;
  font-size: 0.875rem;
  color: var(--whu-muted);
}

.wh-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 1rem !important;
  margin-bottom: 1.5rem !important;
}

.wh-kpi-card {
  padding: 1rem 1.125rem !important;
  border: 1px solid var(--whu-border) !important;
  border-radius: var(--whu-radius) !important;
  box-shadow: var(--whu-shadow) !important;
  background: var(--whu-surface) !important;
  position: relative;
  transition: box-shadow .15s ease, border-color .15s ease !important;
  /* keep fade-in, remove animation that distorts numbers */
}
.wh-kpi-card::before {
  width: 3px !important;
  background: linear-gradient(180deg, var(--whu-brand) 0%, var(--whu-brand-dark) 100%) !important;
  opacity: 0.85;
}
.wh-kpi-card:hover {
  box-shadow: var(--whu-shadow-md) !important;
  border-color: var(--whu-brand-soft) !important;
  transform: none !important;
}
.wh-kpi-card:hover::before { width: 3px !important; }

.wh-kpi-label {
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  color: var(--whu-muted) !important;
  margin-bottom: 0.4rem !important;
  display: block;
}
.wh-kpi-value {
  /* Stop the jarring scale-from-0.5 count-up; use the page fade only */
  animation: none !important;
  font-size: 1.625rem !important;
  font-weight: 700 !important;
  font-family: var(--font-family, inherit) !important;
  color: var(--whu-text) !important;
  line-height: 1.1 !important;
  margin-bottom: 0.35rem !important;
}
.wh-kpi-value .badge { font-size: 0.78rem !important; vertical-align: middle; }
.wh-kpi-sub {
  font-size: 0.8125rem !important;
  color: var(--whu-muted) !important;
}
.wh-kpi-alert {
  border-color: #fecaca !important;
  background: #fff7f5 !important;
}
.wh-kpi-alert .wh-kpi-value { color: #b91c1c !important; }

.wh-kpi-icon-circle {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.wh-kpi-icon-circle.primary { background: var(--whu-brand-soft) !important; color: var(--whu-brand-dark) !important; }

/* ============================================================
   19. SIDEBAR  -  denser, sharper active state
   ============================================================ */
.wh-sidebar {
  border-right: 1px solid var(--whu-border);
}
.wh-sidebar-section-label {
  padding: 1rem 1.25rem 0.4rem !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.1em !important;
  color: #94a3b8 !important;
}
.wh-sidebar-link {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #475569 !important;
  border-left: 3px solid transparent !important;
  gap: 0.7rem !important;
  transition: background-color .12s ease, color .12s ease !important;
}
.wh-sidebar-link i {
  font-size: 1.05rem !important;
  color: #94a3b8;
  transition: color .12s ease;
}
.wh-sidebar-link:hover {
  background: #f8fafc !important;
  color: var(--whu-text) !important;
}
.wh-sidebar-link:hover i { color: var(--whu-brand-dark); }
.wh-sidebar-link.active {
  background: linear-gradient(90deg, var(--whu-brand-soft) 0%, rgba(255,241,233,0) 100%) !important;
  color: var(--whu-brand-dark) !important;
  border-left-color: var(--whu-brand) !important;
  font-weight: 600 !important;
}
.wh-sidebar-link.active i { color: var(--whu-brand-dark) !important; }

.wh-sidebar-brand {
  border-bottom: 1px solid var(--whu-border);
}
.wh-sidebar-footer {
  border-top: 1px solid var(--whu-border) !important;
  background: #fafbfc;
}
.wh-sidebar-user-name { font-size: 0.875rem; font-weight: 600; }
.wh-sidebar-user-role {
  font-size: 0.72rem;
  color: var(--whu-muted);
  text-transform: capitalize;
}

/* ============================================================
   20. TOPBAR  -  cleaner hovers, notification badge
   ============================================================ */
.wh-topbar {
  height: 56px !important;
  border-bottom: 1px solid var(--whu-border) !important;
  backdrop-filter: saturate(180%) blur(6px);
  background: rgba(255,255,255,0.95) !important;
}

.wh-topbar-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  position: relative;
}
.wh-topbar-icon:hover {
  background: var(--whu-brand-soft) !important;
  color: var(--whu-brand-dark) !important;
}

.wh-notif-badge {
  background: var(--whu-brand-dark) !important;
  box-shadow: 0 0 0 2px #fff;
  font-size: 0.625rem !important;
  font-weight: 800 !important;
  min-width: 16px !important;
  height: 16px !important;
  top: 3px !important;
  right: 3px !important;
}
.wh-notif-badge:not(.d-none) {
  animation: whu-pulse 2.4s ease-in-out infinite;
}
@keyframes whu-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(215,61,45,.4); }
  50%      { box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(215,61,45,0); }
}

.wh-topbar-user {
  border-radius: 10px !important;
  padding: 0.3rem 0.7rem !important;
  font-size: 0.875rem !important;
}
.wh-topbar-user:hover { background: var(--whu-surface-hover) !important; }
.wh-topbar-user i:first-child {
  color: var(--whu-brand-dark);
  background: var(--whu-brand-soft);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem !important;
}

.wh-sidebar-toggle {
  border-radius: 10px !important;
}
.wh-sidebar-toggle:hover {
  background: var(--whu-brand-soft) !important;
  color: var(--whu-brand-dark) !important;
}

/* Ticker: less shouty, slightly thinner */
.wh-ticker {
  font-size: 0.8125rem;
  padding: 0.4rem 0 !important;
}

/* ============================================================
   21. FILTER BAR  -  tighten and reduce double-border feel
   ============================================================ */
.wh-filter-bar {
  border: 1px solid var(--whu-border) !important;
  border-radius: var(--whu-radius) !important;
  box-shadow: var(--whu-shadow-sm) !important;
  padding: 1rem !important;
  gap: 0.875rem !important;
  margin-bottom: 1.25rem !important;
  background: var(--whu-surface) !important;
}
.wh-filter-group { min-width: 160px !important; gap: 0.3rem !important; }
.wh-filter-group label {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--whu-muted) !important;
}

/* ============================================================
   22. BREADCRUMBS  -  quieter
   ============================================================ */
.breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 0.875rem !important;
  font-size: 0.8125rem;
}
.breadcrumb-item a {
  color: var(--whu-brand-dark);
  text-decoration: none;
}
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--whu-muted); }
.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--whu-muted);
  padding: 0 0.4rem;
}

/* ============================================================
   23. REPORTS LANDING TILES  -  uniform icon + hover
   ============================================================ */
.card.h-100 .card-body .fs-2 {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--whu-brand-soft);
  font-size: 1.25rem !important;
}
.card.h-100 .card-body .text-info { color: #1e40af !important; background: #dbeafe; }
.card.h-100 .card-body .text-danger { color: #991b1b !important; background: #fee2e2; }
.card.h-100 .card-body .text-success { color: #065f46 !important; background: #d1fae5; }
.card.h-100 .card-body .text-warning { color: #92400e !important; background: #fef3c7; }
.card.h-100:hover {
  border-color: var(--whu-brand-soft) !important;
  box-shadow: var(--whu-shadow-md) !important;
}

/* ============================================================
   24. PROFILE PAGE  -  kill purple gradient, refine avatar
   ============================================================ */
/* Override the inline purple gradient on the avatar fallback */
.card-body .rounded-circle.bg-gradient,
.card-body div.rounded-circle[style*="linear-gradient"] {
  background: linear-gradient(135deg, var(--whu-brand) 0%, var(--whu-brand-dark) 100%) !important;
  box-shadow: 0 6px 18px rgba(215,61,45,.25) !important;
}

.card-body img.rounded-circle {
  border: 3px solid var(--whu-surface) !important;
  box-shadow: 0 6px 18px rgba(15,23,42,.12) !important;
}

/* Profile role badge: respect color-coded badges from section 8 */
.card-body .badge.text-capitalize {
  text-transform: capitalize;
}

/* ============================================================
   25. STAT TILE helper (generic reusable)
   ============================================================ */
.wh-stat-tile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.125rem;
  background: var(--whu-surface);
  border: 1px solid var(--whu-border);
  border-radius: var(--whu-radius);
  box-shadow: var(--whu-shadow);
  position: relative;
  overflow: hidden;
}
.wh-stat-tile .wh-stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--whu-muted);
}
.wh-stat-tile .wh-stat-value {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--whu-text);
  line-height: 1.1;
}
.wh-stat-tile .wh-stat-delta {
  font-size: 0.8125rem;
  font-weight: 600;
}
.wh-stat-tile.is-success .wh-stat-value { color: #065f46; }
.wh-stat-tile.is-warning .wh-stat-value { color: #92400e; }
.wh-stat-tile.is-danger  .wh-stat-value { color: #991b1b; }
.wh-stat-tile.is-info    .wh-stat-value { color: #1e40af; }

/* ============================================================
   26. SCROLLBARS  -  subtle brand tint
   ============================================================ */
* { scrollbar-width: thin; scrollbar-color: #cbd5e0 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--whu-brand); background-clip: padding-box; }

/* ============================================================
   27. RESPONSIVE  -  v2 mobile bits
   ============================================================ */
@media (max-width: 768px) {
  .wh-page-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .wh-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .wh-filter-bar { padding: 0.75rem !important; gap: 0.6rem !important; }
  .wh-filter-group { width: 100% !important; min-width: 0 !important; }
  .wh-sidebar-link { padding: 0.625rem 1.25rem !important; }
}
