/* Shree Chamunda Laundry - Modern Clean Theme */
/* Primary Brand Red: #FF3E1D */

:root {
  --bs-primary: #FF3E1D;
  --bs-primary-rgb: 255, 62, 29;
}

/* Primary color overrides */
.bg-primary {
  background-color: #FF3E1D !important;
}

.btn-primary {
  background-color: #FF3E1D !important;
  border-color: #FF3E1D !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #E63518 !important;
  border-color: #E63518 !important;
}

.text-primary {
  color: #FF3E1D !important;
}

/* Active menu items */
.menu-item.active > .menu-link {
  background-color: #FF3E1D !important;
  color: #FFFFFF !important;
}

.menu-item.active > .menu-link .menu-icon {
  color: #FFFFFF !important;
}

/* Badges */
.badge.bg-label-primary {
  background-color: rgba(255, 62, 29, 0.12) !important;
  color: #FF3E1D !important;
}

/* Links */
a {
  color: #FF3E1D;
}

a:hover {
  color: #E63518;
}

/* Form controls focus */
.form-control:focus,
.form-select:focus {
  border-color: #FF3E1D !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 62, 29, 0.25) !important;
}

/* Fix merged input group focus - remove internal separator "red line" */
.input-group-merge:focus-within .input-group-text,
.input-group-merge:focus-within .form-control {
  border-color: #FF3E1D !important;
}

.input-group-merge:focus-within {
  box-shadow: 0 0 0 0.2rem rgba(255, 62, 29, 0.25) !important;
  border-radius: 0.375rem;
}

.input-group-merge .form-control:focus {
  box-shadow: none !important; /* Managed by the group parent */
}

/* Checkbox and radio */
.form-check-input:checked {
  background-color: #FF3E1D !important;
  border-color: #FF3E1D !important;
}

/* Cards with primary header */
.card-header.bg-primary {
  background-color: #FF3E1D !important;
}

.card-header.bg-warning {
  background-color: #FFC107 !important;
}

/* Ensure white backgrounds remain clean */
body {
  background-color: #FFFFFF;
}

.layout-navbar,
.layout-menu {
  background-color: #FFFFFF !important;
}

/* Logo styling fixes */
.app-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
}

  .app-brand-logo img {
    max-width: 100%;
    max-height: 80px; /* Reduced from 140px to prevent overlap */
    height: auto;
    width: auto;
    object-fit: contain;
  }

/* Ensure logo container doesn't overflow and has background to prevent overlap */
.app-brand {
  padding: 0.75rem 1.5rem;
  min-height: 100px; /* Reduced from 140px */
  display: flex;
  align-items: center;
  overflow: visible; /* Ensure it doesn't clip if slightly over */
  background-color: #FFFFFF !important; /* Fix overlap issue */
  z-index: 9; /* Ensure on top of scrolling menu */
  position: sticky;
  top: 0;
}

.app-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Font Size Preferences */
html.font-size-small, html.font-size-small body, html.font-size-small .menu-link, html.font-size-small .form-control {
  font-size: 0.8rem !important;
}

html.font-size-medium, html.font-size-medium body, html.font-size-medium .menu-link, html.font-size-medium .form-control {
  font-size: 0.9375rem !important; /* Default */
}

html.font-size-large, html.font-size-large body, html.font-size-large .menu-link, html.font-size-large .form-control {
  font-size: 1.1rem !important;
}

html.font-size-extra-large, html.font-size-extra-large body, html.font-size-extra-large .menu-link, html.font-size-extra-large .form-control {
  font-size: 1.25rem !important;
}

/* Premium Dark Mode Overrides */
[data-bs-theme="dark"] body {
  background-color: #232333 !important;
  color: #E2E2EB !important; /* Brighter off-white */
}

[data-bs-theme="dark"] .layout-navbar,
[data-bs-theme="dark"] .layout-menu,
[data-bs-theme="dark"] .card {
  background-color: #2b2c40 !important;
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3, 
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6 {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] small.text-muted {
  color: #A3A3C2 !important; /* Lighter grey for better visibility in dark mode */
}

[data-bs-theme="dark"] .text-body-secondary {
  color: #b0acc7 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #232333 !important;
  color: #eaeaff !important;
  border-color: #444564 !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: #2b2c40 !important;
  border-color: #444564 !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #eaeaff !important;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background-color: rgba(255, 62, 29, 0.12) !important;
}

/* Sidebar Menu Dark Mode */
[data-bs-theme="dark"] .layout-menu .menu-link {
  color: #E2E2EB !important; /* High-contrast off-white for inactive state */
}

[data-bs-theme="dark"] .layout-menu .menu-link:hover {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .layout-menu .menu-link .menu-icon {
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .app-brand {
  background-color: #2b2c40 !important; /* Fix overlap issue in dark mode */
}

[data-bs-theme="dark"] .layout-menu .menu-item.active > .menu-link {
  background-color: var(--bs-primary) !important;
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .layout-menu .menu-item.active > .menu-link .menu-icon {
  color: #FFFFFF !important;
}

/* Pagination Overrides for Dark Mode */
[data-bs-theme="dark"] .pagination .page-link {
  background-color: #323249 !important;
  border-color: #444564 !important;
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .pagination .page-link i {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
  background-color: #2b2c40 !important;
  color: #6a6a8a !important;
  opacity: 0.6;
}

/* Dashboard Recent Activity Hover Fix */
[data-bs-theme="dark"] .list-group-item {
    background-color: transparent !important;
    color: #E2E2EB !important;
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #FFFFFF !important;
}

/* Dashboard Specific Dark Mode Fixes */
[data-bs-theme="dark"] .bg-label-primary { background-color: rgba(105, 108, 255, 0.16) !important; color: #e7e7ff !important; }
[data-bs-theme="dark"] .bg-label-info { background-color: rgba(3, 195, 236, 0.16) !important; color: #dcf6fd !important; }
[data-bs-theme="dark"] .bg-label-success { background-color: rgba(113, 221, 55, 0.16) !important; color: #e8fadf !important; }
[data-bs-theme="dark"] .bg-label-secondary { background-color: rgba(133, 146, 163, 0.16) !important; color: #ebeef1 !important; }
[data-bs-theme="dark"] .bg-label-danger { background-color: rgba(255, 62, 29, 0.16) !important; color: #ffe5e0 !important; }
[data-bs-theme="dark"] .bg-label-warning { background-color: rgba(255, 171, 0, 0.16) !important; color: #fff2d6 !important; }

[data-bs-theme="dark"] .bg-light {
  background-color: #323249 !important;
}

[data-bs-theme="dark"] .table thead th {
  color: #FFFFFF !important;
  background-color: #323249 !important;
}

/* Select2 Dark Mode Support */
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
  background-color: #2b2c40 !important;
  border-color: #444564 !important;
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .select2-dropdown {
  background-color: #2b2c40 !important;
  border-color: #444564 !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
  background-color: #232333 !important;
  color: #E2E2EB !important;
  border-color: #444564 !important;
}

[data-bs-theme="dark"] .select2-results__option {
  color: #E2E2EB !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
  background-color: rgba(255, 62, 29, 0.16) !important;
  color: #FFFFFF !important;
}

/* User Settings Custom Options Theme Support */
.custom-option-icon .custom-option-body,
.custom-option-basic .custom-option-content {
  border: 1px solid var(--bs-border-color) !important;
}

[data-bs-theme="dark"] .custom-option.checked .custom-option-body,
[data-bs-theme="dark"] .custom-option.checked .custom-option-content {
  background-color: rgba(var(--bs-primary-rgb), 0.12) !important;
}

/* Active State Enhancements */
[data-bs-theme="dark"] .nav-pills .nav-link.active,
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background-color: var(--bs-primary) !important;
  color: #FFFFFF !important;
}

/* Footer Dark Mode */
[data-bs-theme="dark"] .content-footer {
  background-color: #2b2c40 !important;
  color: #E2E2EB !important;
}

/* Global Font Contrast Improvements */
.fw-bold {
    color: inherit !important;
}

[data-bs-theme="dark"] .fw-bold {
    color: #FFFFFF !important;
}

/* Card Improvements */
.card-header {
    font-weight: 700 !important;
}

/* Responsive Tiles in User Settings */
@media (max-width: 768px) {
  .custom-option-icon .custom-option-body {
    padding: 1rem !important;
  }
  .custom-option-icon i {
    font-size: 2rem !important;
  }
}
