/* Modern Bootstrap 5 Overrides */
:root {
  --bs-primary: #ea3e3a;
  --bs-secondary: #f59c34;
  --bs-success: #10b981;
  --bs-danger: #ef4444;
  --bs-warning: #f59e0b;
  --bs-info: #3b82f6;
  --bs-light: #f3f4f6;
  --bs-dark: #1f2937;
  --bs-body-color: #1f2937;
  --bs-body-bg: #ffffff;
  --bs-border-color: #e5e7eb;
  --bs-border-radius: 0.75rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 1rem;
}

/* Typography */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  color: #1f2937 !important;
  background-color: #f9fafb;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #1f2937 !important;
  margin-bottom: 1rem;
}

/* Override legacy gray text utilities from old theme (for light UI) */
.text-gray-100,
.text-gray-200,
.text-gray-300 {
  color: #1f2937 !important;
}

.text-gray-400 {
  color: #374151 !important;
}

.text-gray-500 {
  color: #4b5563 !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

.text-gray-700 {
  color: #374151 !important;
}

.text-gray-800 {
  color: #1f2937 !important;
}

.text-gray-900 {
  color: #111827 !important;
}

/* Cards */
.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  background-color: #ffffff;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 2px solid #e5e7eb;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: #1f2937 !important;
}

.card-body {
  padding: 1.5rem;
  color: #1f2937 !important;
}

.card-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
}

/* Buttons */
.btn {
  border-radius: 0.75rem;
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  border: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Icon buttons */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
}

.btn-icon .fa, .btn-icon .fas, .btn-icon .far {
  font-size: 0.9rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #d63632 0%, #e38b2d 100%);
  color: #ffffff !important;
}

.btn-secondary {
  background: linear-gradient(135deg, #f59c34 0%, #fbbf24 100%);
  color: #ffffff !important;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #e38b2d 0%, #f59e0b 100%);
  color: #ffffff !important;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff !important;
}

.btn-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff !important;
}

.btn-info:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff !important;
}

.btn-light {
  background-color: #f3f4f6;
  color: #1f2937 !important;
  border: 1px solid #e5e7eb;
}

.btn-light:hover {
  background-color: #e5e7eb;
  color: #1f2937 !important;
}

.btn-dark {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #ffffff !important;
}

.btn-dark:hover {
  background: linear-gradient(135deg, #111827 0%, #030712 100%);
  color: #ffffff !important;
}

.btn-outline-primary {
  border: 2px solid #ea3e3a;
  color: #ea3e3a !important;
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: #ea3e3a;
  color: #ffffff !important;
  border-color: #ea3e3a;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  border-radius: 1rem;
}

/* Tables */
.table {
  color: #1f2937 !important;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #1f2937 !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.table tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
  color: #1f2937 !important;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f9fafb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f9fafb;
}

.table-bordered {
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

/* Compact/Comfort density helpers */
.table.table-compact tbody td, .table.table-compact thead th {
  padding: 0.5rem 0.75rem;
}

.table.table-comfort tbody td, .table.table-comfort thead th {
  padding: 1rem 1.25rem;
}

/* Inputs density */
.form-control.form-control-compact {
  padding: 0.5rem 0.75rem;
}

.form-control.form-control-lg {
  padding: 0.875rem 1.125rem;
}

/* Navbar & Topbar */
.topbar.navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.topbar .nav-link {
  color: #1f2937 !important;
}

.topbar .nav-link:hover {
  color: #ea3e3a !important;
}

/* Sidebar (light) */
.sidebar.sidebar-light {
  background: #ffffff;
}

.sidebar.sidebar-light .nav-item .nav-link {
  color: #374151 !important;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin: 0.125rem 0.75rem;
}

.sidebar.sidebar-light .nav-item .nav-link:hover {
  background-color: rgba(234, 62, 58, 0.06);
  color: #ea3e3a !important;
}

.sidebar.sidebar-light .nav-item.active > .nav-link,
.sidebar.sidebar-light .nav-link.active {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(234, 62, 58, 0.2);
}

.sidebar .sidebar-brand {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar .sidebar-brand .lw-logo-img {
  max-height: 28px;
  margin-left: 0.5rem;
}

.sidebar .sidebar-divider {
  border-color: #e5e7eb !important;
}

/* Utilities */
.shadow-soft {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.rounded-xl {
  border-radius: 1rem !important;
}

.rounded-2xl {
  border-radius: 1.25rem !important;
}

.rounded-3xl {
  border-radius: 1.5rem !important;
}

/* Headings spacing */
.page-heading, .card-title, h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.2px;
}

/* Chips / Pills */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: #f3f4f6;
  color: #1f2937;
  font-weight: 500;
}

.chip .avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Avatars */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-sm {
  width: 28px;
  height: 28px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
}

/* Form Controls */
.form-control,
.form-select {
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #1f2937 !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #ea3e3a;
  box-shadow: 0 0 0 4px rgba(234, 62, 58, 0.1);
  outline: none;
  background-color: #ffffff !important;
}

.form-control::placeholder {
  color: #9ca3af !important;
}

.form-label {
  font-weight: 500;
  color: #1f2937 !important;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.input-group-text {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border: 2px solid #e5e7eb;
  color: #1f2937 !important;
  font-weight: 500;
}

/* Form groups & spacing */
.form-group {
  margin-bottom: 1rem;
}

.form-text {
  color: #6b7280 !important;
}

/* Checkboxes & Radios (Bootstrap 4 compatibility + 5) */
.form-check-input:checked {
  background-color: #ea3e3a;
  border-color: #ea3e3a;
}

.form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(234, 62, 58, 0.15);
  border-color: #ea3e3a;
}

.custom-control-input:checked ~ .custom-control-label::before {
  color: #fff;
  border-color: #ea3e3a;
  background-color: #ea3e3a;
}

.custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 4px rgba(234, 62, 58, 0.15);
}

.custom-control-input:active ~ .custom-control-label::before {
  background-color: rgba(234, 62, 58, 0.1);
  border-color: #ea3e3a;
}

/* Input groups */
.input-group .form-control {
  border-right: 0;
}

.input-group .form-control + .form-control {
  border-left: 1px solid #e5e7eb;
}

.input-group .input-group-text {
  background-color: #f9fafb;
}

.input-group .btn {
  border-radius: 0.5rem;
}

/* Selectize & legacy selects */
.selectize-control .selectize-input,
.selectize-dropdown {
  border: 2px solid #e5e7eb !important;
  border-radius: 0.75rem !important;
  background-color: #ffffff !important;
  color: #1f2937 !important;
}

.selectize-control .selectize-input.focus {
  border-color: #ea3e3a !important;
  box-shadow: 0 0 0 4px rgba(234, 62, 58, 0.1) !important;
}

/* DataTables overrides */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #ffffff;
  color: #1f2937;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: none !important;
  padding: 0.5rem 0.75rem;
  margin: 0 0.15rem;
  border-radius: 0.5rem;
  background: #ffffff !important;
  color: #1f2937 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(234, 62, 58, 0.2);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #f9fafb !important;
  color: #ea3e3a !important;
}

.dataTables_wrapper .dataTables_info {
  color: #6b7280;
}

.dataTables_wrapper .dataTables_filter label {
  color: #6b7280;
}

.dataTables_wrapper .dataTables_length label {
  color: #6b7280;
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.025em;
}

.badge-primary {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
}

.badge-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
}

.badge-info {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff !important;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.alert-primary {
  background-color: #fef2f2;
  border-left-color: #ea3e3a;
  color: #991b1b !important;
}

.alert-success {
  background-color: #ecfdf5;
  border-left-color: #10b981;
  color: #065f46 !important;
}

.alert-danger {
  background-color: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b !important;
}

.alert-warning {
  background-color: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e !important;
}

.alert-info {
  background-color: #eff6ff;
  border-left-color: #3b82f6;
  color: #1e40af !important;
}

/* Modals */
.modal-content {
  border: none;
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  background-color: #ffffff;
  color: #1f2937 !important;
}

.modal-header {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-bottom: 2px solid #e5e7eb;
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 600;
  font-size: 1.25rem;
  color: #1f2937 !important;
}

.modal-body {
  padding: 2rem;
  color: #1f2937 !important;
}

.modal-footer {
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 1.25rem 2rem;
}

/* Dropdowns */
.dropdown-menu {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 0.75rem;
  background-color: #ffffff;
}

.dropdown-item {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  color: #1f2937 !important;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.dropdown-item:hover {
  background-color: rgba(234, 62, 58, 0.05);
  color: #ea3e3a !important;
}

.dropdown-item.active {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
}

/* Pagination */
.pagination {
  gap: 0.5rem;
}

.page-item .page-link {
  border: none;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  color: #1f2937 !important;
  background-color: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  margin: 0 0.25rem;
  transition: all 0.2s ease;
}

.page-item .page-link:hover {
  background-color: #f9fafb;
  color: #ea3e3a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(234, 62, 58, 0.2);
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 1rem 0;
}

.breadcrumb-item {
  color: #6b7280 !important;
}

.breadcrumb-item.active {
  color: #1f2937 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #9ca3af !important;
}

/* List Group */
.list-group-item {
  border: 1px solid #e5e7eb;
  padding: 1rem 1.25rem;
  color: #1f2937 !important;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: #f9fafb;
  border-color: #ea3e3a;
}

.list-group-item.active {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  border-color: #ea3e3a;
  color: #ffffff !important;
}

/* Progress */
.progress {
  height: 1.25rem;
  border-radius: 1rem;
  background-color: #f3f4f6;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #ea3e3a 0%, #f59c34 100%);
  border-radius: 1rem;
}

/* Nav Tabs */
.nav-tabs {
  border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #6b7280 !important;
  padding: 1rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: #ea3e3a !important;
  border-bottom-color: rgba(234, 62, 58, 0.3);
}

.nav-tabs .nav-link.active {
  color: #ea3e3a !important;
  border-bottom-color: #ea3e3a;
  background-color: transparent;
}

/* Nav Pills */
.nav-pills .nav-link {
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #1f2937 !important;
  transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: rgba(234, 62, 58, 0.05);
  color: #ea3e3a !important;
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, #ea3e3a 0%, #f59c34 100%);
  color: #ffffff !important;
}

/* Accordion */
.accordion-item {
  border: 1px solid #e5e7eb;
  border-radius: 1rem !important;
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-button {
  background-color: #ffffff;
  color: #1f2937 !important;
  font-weight: 500;
  padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  color: #ea3e3a !important;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 4px rgba(234, 62, 58, 0.1);
}

.accordion-body {
  padding: 1.5rem;
  color: #1f2937 !important;
}

/* Tooltips */
.tooltip-inner {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

/* Spinners */
.spinner-border {
  color: #ea3e3a;
}

/* Shadows */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.shadow {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/*# sourceMappingURL=modern-bootstrap.css.map */
