/* Final Polish Fixes - Page Titles, Text Muted, and Button Fonts */

/* ===== PAGE TITLE COMPREHENSIVE FIXES ===== */
.page-title,
.page-header .page-title,
.page-header h1,
.page-header .h1,
h1.page-title,
.dashboard-title,
.dashboard-header h1,
.dashboard-header .h1,
.content-header h1,
.content-header .h1 {
  font-size: 1.25rem !important; /* Further reduced from 1.375rem */
  font-weight: 500 !important; /* Reduced from 600 to medium */
  line-height: 1.3 !important;
  letter-spacing: -0.01em !important;
  margin-bottom: 0.5rem !important;
}

/* Page subtitles and descriptions */
.page-subtitle,
.page-description,
.page-header .page-subtitle,
.page-header .page-description,
.dashboard-subtitle,
.dashboard-description {
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #6b7280 !important;
  margin-top: 0.25rem !important;
}

/* ===== TEXT-MUTED COMPREHENSIVE FIXES ===== */
.text-muted,
.text-muted.mt-1,
.text-muted.mt-2,
.text-muted.mt-3,
.card-body .text-muted,
.card-footer .text-muted,
.list-group-item .text-muted,
.table .text-muted,
.form-text,
.form-text.text-muted,
.help-text,
.description-text,
.subtitle-text,
.secondary-text {
  font-size: 0.8125rem !important; /* 13px - consistent small size */
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #6b7280 !important;
}

/* Smaller muted text variants */
.text-muted.small,
.small.text-muted,
small.text-muted {
  font-size: 0.75rem !important; /* 12px for very small muted text */
  font-weight: 400 !important;
}

/* ===== BUTTON FONT COMPREHENSIVE FIXES ===== */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark,
.btn-link {
  font-size: 0.875rem !important; /* 14px */
  font-weight: 400 !important; /* Normal weight, not bold */
  line-height: 1.4 !important;
  letter-spacing: 0.01em !important;
}

/* Button size variants */
.btn-sm,
.btn-group-sm > .btn {
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 400 !important;
}

.btn-lg,
.btn-group-lg > .btn {
  font-size: 1rem !important; /* 16px */
  font-weight: 400 !important;
}

/* Button list fixes */
.btn-list .btn {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* Dropdown toggle buttons */
.dropdown-toggle {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* ===== CARD COMPONENT FIXES ===== */
.card-title,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .h1,
.card-header .h2,
.card-header .h3,
.card-header .h4,
.card-header .h5,
.card-header .h6 {
  font-size: 0.9375rem !important; /* 15px */
  font-weight: 500 !important; /* Medium weight */
  line-height: 1.3 !important;
  margin-bottom: 0.25rem !important;
}

.card-subtitle {
  font-size: 0.8125rem !important;
  font-weight: 400 !important;
  color: #6b7280 !important;
}

.card-text {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

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

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

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

/* ===== TABLE FIXES ===== */
.table th {
  font-size: 0.8125rem !important; /* 13px */
  font-weight: 400 !important; /* Normal weight, not bold */
  text-transform: uppercase;
  letter-spacing: 0.05em !important;
}

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

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

.nav-link.active {
  font-weight: 500 !important; /* Slightly bolder for active state */
}

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

.nav-tabs .nav-link.active {
  font-weight: 500 !important;
}

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

.breadcrumb-item.active {
  font-weight: 400 !important; /* Keep same weight for active */
}

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

.alert-heading {
  font-size: 1rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

/* ===== BADGE FIXES ===== */
.badge {
  font-size: 0.75rem !important;
  font-weight: 400 !important; /* Normal weight, not bold */
  letter-spacing: 0.02em !important;
}

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

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

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

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

.dropdown-header {
  font-size: 0.8125rem !important;
  font-weight: 400 !important; /* Reduced from 500 */
}

/* ===== LIST GROUP FIXES ===== */
.list-group-item {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.list-group-item.active {
  font-weight: 400 !important; /* Keep same weight */
}

/* ===== PAGINATION FIXES ===== */
.page-link {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

/* ===== TOAST FIXES ===== */
.toast-header {
  font-size: 0.875rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

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

/* ===== ACCORDION FIXES ===== */
.accordion-button {
  font-size: 0.875rem !important;
  font-weight: 400 !important; /* Reduced from 500 */
}

/* ===== OFFCANVAS FIXES ===== */
.offcanvas-title {
  font-size: 1.125rem !important;
  font-weight: 500 !important; /* Reduced from 600 */
}

/* ===== GLOBAL FONT WEIGHT OVERRIDES ===== */
.fw-bold,
.font-weight-bold,
strong,
b {
  font-weight: 400 !important; /* Normal weight instead of bold */
}

.fw-semibold,
.font-weight-semibold {
  font-weight: 400 !important; /* Normal weight */
}

.fw-medium,
.font-weight-medium {
  font-weight: 400 !important; /* Normal weight */
}

/* ===== HEADING OVERRIDES ===== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 500 !important; /* Maximum weight for any heading */
}

/* ===== SPECIFIC PAGE ELEMENT FIXES ===== */
.page-header {
  margin-bottom: 1rem !important;
}

.page-header .page-title {
  margin-bottom: 0.25rem !important;
}

.page-header .text-muted {
  margin-top: 0.25rem !important;
  font-size: 0.8125rem !important;
}

/* Dashboard specific fixes */
.dashboard-stats .card-title {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

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

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .page-title,
  .page-header h1 {
    font-size: 1.125rem !important; /* 18px on mobile */
    font-weight: 500 !important;
  }
  
  .btn {
    font-size: 0.8125rem !important;
  }
  
  .card-title {
    font-size: 0.875rem !important;
  }
}

/* ===== UTILITY CLASS OVERRIDES ===== */
.fs-1 { font-size: 1.5rem !important; font-weight: 500 !important; }
.fs-2 { font-size: 1.375rem !important; font-weight: 500 !important; }
.fs-3 { font-size: 1.25rem !important; font-weight: 400 !important; }
.fs-4 { font-size: 1.125rem !important; font-weight: 400 !important; }
.fs-5 { font-size: 1rem !important; font-weight: 400 !important; }
.fs-6 { font-size: 0.875rem !important; font-weight: 400 !important; }

/* ===== FINAL CATCH-ALL RULES ===== */
/* Ensure no element has excessive font weight */
* {
  font-weight: inherit !important;
}

/* Override any inline styles that might be too bold */
[style*="font-weight: 600"],
[style*="font-weight: 700"],
[style*="font-weight: bold"],
[style*="font-weight: 800"],
[style*="font-weight: 900"] {
  font-weight: 400 !important;
}