/* Critical Font Fixes - Immediate Solutions */

/* ===== SECOND SIDEBAR FONT FIXES ===== */
.floating-module-menu,
.floating-module-menu * {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.floating-module-menu .module-name {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

.floating-module-menu .section-label {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
}

.floating-module-menu .page-title {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

.floating-module-menu .search-input {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

.floating-module-menu .search-input::placeholder {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

/* ===== HEADER/TOPBAR FONT FIXES ===== */
.navbar,
.navbar * {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

.navbar-brand .brand-text {
  font-size: 1rem !important; /* Reduced from larger */
  font-weight: 600 !important;
}

.navbar .user-name {
  font-size: 0.875rem !important; /* Reduced from larger */
  font-weight: 500 !important;
}

.navbar .dropdown-item {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.navbar .dropdown-header {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
}

/* ===== COUNTER NUMBERS - MAJOR FIX ===== */
.card-sm .font-weight-medium,
.card .fs-3,
.fs-3,
.dashboard-stats .font-weight-medium,
.statistics-card .font-weight-medium {
  font-size: 1.25rem !important; /* Further reduced from 1.5rem */
  font-weight: 500 !important; /* Reduced from 600 to make less bold */
  line-height: 1.2 !important;
}

/* Counter numbers on mobile - even smaller */
@media (max-width: 768px) {
  .card-sm .font-weight-medium,
  .card .fs-3,
  .fs-3 {
    font-size: 1.125rem !important; /* 18px on mobile */
    font-weight: 500 !important;
  }
}

/* ===== PAGE HEADERS - BIG FONT FIX ===== */
.page-header h1,
.page-title,
h1.page-title,
.dashboard-header h1,
.dashboard-title {
  font-size: 1.375rem !important; /* Reduced from 1.5rem+ */
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

/* Page subtitles and descriptions */
.page-subtitle,
.page-description,
.dashboard-subtitle {
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

/* ===== CARD TITLES - SIZE FIX ===== */
.card-title,
.card-header h3,
.card-header .h3 {
  font-size: 0.9375rem !important; /* 15px - smaller than before */
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

/* ===== TEXT HIERARCHY FIXES ===== */
.text-muted,
.card-body .text-muted,
.small,
small {
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 400 !important;
}

/* ===== BUTTON FONT FIXES ===== */
.btn {
  font-size: 0.875rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

.btn-sm {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
}

.btn-lg {
  font-size: 1rem !important;
  font-weight: 500 !important;
}

/* ===== TABLE FONT FIXES ===== */
.table th {
  font-size: 0.8125rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table td {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* ===== FORM ELEMENT FIXES ===== */
.form-label,
label {
  font-size: 0.875rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

.form-control,
.form-select {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* ===== NAVIGATION FIXES ===== */
.nav-link {
  font-size: 0.875rem !important;
  font-weight: 400 !important; /* Reduced from 500 */
}

.nav-link.active {
  font-weight: 500 !important; /* Reduced from 600 */
}

.sidebar .nav-link {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.sidebar .nav-link.active {
  font-weight: 500 !important; /* Reduced from 600 */
}

/* ===== BREADCRUMB FIXES ===== */
.breadcrumb-item {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.breadcrumb-item.active {
  font-weight: 500 !important;
}

/* ===== MODAL FIXES ===== */
.modal-title {
  font-size: 1.125rem !important; /* Reduced from 1.25rem */
  font-weight: 600 !important;
}

.modal-body {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* ===== ALERT FIXES ===== */
.alert {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.alert-heading {
  font-size: 1rem !important;
  font-weight: 600 !important;
}

/* ===== BADGE FIXES ===== */
.badge {
  font-size: 0.75rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

/* ===== DROPDOWN FIXES ===== */
.dropdown-item {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.dropdown-header {
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
}

/* ===== FONT SIZE UTILITY OVERRIDES ===== */
.fs-1 { font-size: 1.75rem !important; font-weight: 600 !important; }
.fs-2 { font-size: 1.5rem !important; font-weight: 600 !important; }
.fs-3 { font-size: 1.25rem !important; font-weight: 500 !important; } /* Key fix */
.fs-4 { font-size: 1.125rem !important; font-weight: 500 !important; }
.fs-5 { font-size: 1rem !important; font-weight: 500 !important; }
.fs-6 { font-size: 0.875rem !important; font-weight: 400 !important; }

/* ===== FONT WEIGHT UTILITY OVERRIDES ===== */
.fw-bold,
.font-weight-bold,
strong,
b {
  font-weight: 500 !important; /* Much lighter than 600/700 */
}

.fw-semibold,
.font-weight-semibold {
  font-weight: 500 !important;
}

.fw-medium,
.font-weight-medium {
  font-weight: 500 !important; /* Consistent medium weight */
}

.fw-normal,
.font-weight-normal {
  font-weight: 400 !important;
}

.fw-light,
.font-weight-light {
  font-weight: 300 !important;
}

/* ===== SPECIFIC DASHBOARD FIXES ===== */
.dashboard-stats .card-sm .font-weight-medium {
  font-size: 1.25rem !important;
  font-weight: 500 !important;
}

.dashboard-stats .text-muted {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
}

/* Quick actions section */
.btn-list .btn {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

/* Card footer links */
.card-footer a {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .page-header h1,
  .page-title {
    font-size: 1.25rem !important;
  }
  
  .navbar-brand .brand-text {
    font-size: 0.9375rem !important;
  }
  
  .card-title {
    font-size: 0.875rem !important;
  }
}

/* ===== GLOBAL FONT WEIGHT REDUCTION ===== */
/* This ensures no element is too bold */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600 !important; /* Maximum weight for headings */
}

/* Ensure all other elements don't exceed medium weight */
* {
  font-weight: inherit;
}

/* Override any remaining heavy weights */
[style*="font-weight: 700"],
[style*="font-weight: bold"],
[style*="font-weight: 800"],
[style*="font-weight: 900"] {
  font-weight: 500 !important;
}