/* Phoenix Custom Additions for BM Coach Portal */

.text-stats-circle-primary {
  color: #3874ff !important;
}

[data-bs-theme="dark"] .text-stats-circle-primary {
  color: #528bfe !important;
}

.text-stats-circle-info {
  color: #0097eb !important;
}

[data-bs-theme="dark"] .text-stats-circle-info {
  color: #25b0f5 !important;
}

/* Ensure navbar vertical text matches Phoenix font weights */
.navbar-vertical .nav-link-text {
  font-weight: 600;
}

.navbar-vertical .nav-link.active .nav-link-text {
  font-weight: 700;
}

/* Progress bar transitions */
.progress-sm {
  border-radius: 4px;
  background-color: var(--phoenix-gray-200, #eff2f6);
}

[data-bs-theme="dark"] .progress-sm {
  background-color: var(--phoenix-gray-900, #1b2031);
}

/* MUI DataGrid integration with Phoenix styling */
.MuiDataGrid-root {
  border: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  border-radius: 0.5rem !important;
  font-family: inherit !important;
  background-color: var(--phoenix-card-bg, #ffffff) !important;
}

.MuiDataGrid-columnHeaders {
  background-color: var(--phoenix-body-highlight-bg, #f5f7fa) !important;
  border-bottom: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}

.MuiDataGrid-cell {
  border-bottom: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  font-size: 0.8125rem !important;
}

.MuiDataGrid-row:hover {
  background-color: var(--phoenix-gray-100, #f5f7fa) !important;
}

/* Smooth transitions for theme toggle */
body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* MUI Dialog integration with Phoenix Modal styling */
.MuiDialog-paper {
  background-color: var(--phoenix-card-bg, #ffffff) !important;
  color: var(--phoenix-body-color, #31374a) !important;
  border: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
}

.MuiDialogTitle-root {
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  color: var(--phoenix-body-emphasis, #141824) !important;
  border-bottom: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  padding: 1rem 1.5rem !important;
}

.MuiDialogContent-root {
  padding: 1.5rem !important;
  color: var(--phoenix-body-color, #31374a) !important;
}

.MuiDialogActions-root {
  border-top: 1px solid var(--phoenix-border-color, #e3e6ed) !important;
  padding: 1rem 1.5rem !important;
  gap: 0.5rem !important;
}

/* Search box icon alignment */
.search-box-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--phoenix-body-color);
  opacity: 0.6;
  font-size: 0.8125rem;
  pointer-events: none;
}

.search-box .search-input {
  padding-left: 32px !important;
}

/* Interactive card hover */
.hover-lift {
  transition: border-color 0.2s ease;
}

/* Flat: the border darkens instead of the card floating on a shadow */
.hover-lift:hover {
  box-shadow: none !important;
  border-color: #cfd2f1 !important;
}

/* ==========================================================================
   Side Menu Item Collapse & Expand Smooth Transition
   ========================================================================== */
html:not(.navbar-vertical-collapsed) .navbar-vertical .parent-wrapper {
  display: grid !important;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

html:not(.navbar-vertical-collapsed) .navbar-vertical .parent-wrapper.show,
html:not(.navbar-vertical-collapsed) .navbar-vertical .parent-wrapper:has(> .collapse.show) {
  grid-template-rows: 1fr;
}

html:not(.navbar-vertical-collapsed) .navbar-vertical .parent-wrapper > .parent {
  min-height: 0;
  overflow: hidden;
  display: block !important;
}

.navbar-vertical .dropdown-indicator .dropdown-indicator-icon-wrapper .dropdown-indicator-icon {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.navbar-vertical .dropdown-indicator[aria-expanded="true"] .dropdown-indicator-icon-wrapper .dropdown-indicator-icon {
  transform: rotate(90deg) scale(0.85) !important;
}

/* ==========================================================================
   BM Coach Light Mode Color Theme
   Primary: White (#FFFFFF) - canvas, card, bars
   Secondary: #5BA951 (BM Coach vibrant green)
   Tertiary: #2E308D (BM Coach royal navy)
   ========================================================================== */

/* Light values must not match <html data-bs-theme="dark">, or they override the dark palette below */
:root:not([data-bs-theme="dark"]),
[data-bs-theme="light"],
html[data-bs-theme="light"] {
  /* Surfaces & Canvas - Primary: White */
  --phoenix-body-bg: #ffffff;
  --phoenix-body-bg-rgb: 255, 255, 255;
  --phoenix-card-bg: #ffffff;
  --phoenix-emphasis-bg: #ffffff;
  --phoenix-body-highlight-bg: #ffffff;
  --phoenix-navbar-top-bg-color: #ffffff;
  --phoenix-navbar-vertical-bg-color: #ffffff;
  --phoenix-navbar-vertical-collapsed-menu-bg: #ffffff;
  --phoenix-border-color: #e3e6ed;
  --phoenix-border-color-translucent: #e3e6ed;

  /* Tertiary Brand Actions: #2E308D */
  --phoenix-primary: #2E308D;
  --phoenix-primary-rgb: 46, 48, 141;
  --phoenix-primary-text-emphasis: #2E308D;
  --phoenix-primary-bg-subtle: #eeeff9;
  --phoenix-primary-border-subtle: #cfd2f1;
  --phoenix-navbar-vertical-link-active-color: #2E308D;
  --phoenix-navbar-top-link-active-color: #2E308D;

  /* Secondary Brand Accents: #5BA951 */
  --phoenix-secondary: #5BA951;
  --phoenix-secondary-rgb: 91, 169, 81;
  --phoenix-success: #5BA951;
  --phoenix-success-rgb: 91, 169, 81;
  --phoenix-secondary-text-emphasis: #387630;
  --phoenix-secondary-bg-subtle: #edf7eb;
  --phoenix-secondary-border-subtle: #c4e6be;
  --phoenix-success-text-emphasis: #387630;
  --phoenix-success-bg-subtle: #edf7eb;
  --phoenix-success-border-subtle: #c4e6be;
}

/* Light mode surface enforcement */
[data-bs-theme="light"] body,
[data-bs-theme="light"] .navbar-top,
[data-bs-theme="light"] .navbar-vertical {
  background-color: #ffffff !important;
}

[data-bs-theme="light"] .navbar-top {
  border-bottom: 1px solid #e3e6ed;
}

[data-bs-theme="light"] .navbar-vertical {
  border-right: 1px solid #e3e6ed;
}

/* Primary Button (#2E308D) */
[data-bs-theme="light"] .btn-primary {
  background-color: #2E308D !important;
  border-color: #2E308D !important;
  color: #ffffff !important;
}

[data-bs-theme="light"] .btn-primary:hover,
[data-bs-theme="light"] .btn-primary:focus,
[data-bs-theme="light"] .btn-primary:active,
[data-bs-theme="light"] .btn-primary.active {
  background-color: #252774 !important;
  border-color: #252774 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="light"] .btn-phoenix-primary {
  color: #2E308D !important;
  background-color: #eeeff9 !important;
  border-color: transparent !important;
}

[data-bs-theme="light"] .btn-phoenix-primary:hover {
  color: #ffffff !important;
  background-color: #2E308D !important;
}

/* Secondary Button (#5BA951) */
[data-bs-theme="light"] .btn-secondary,
[data-bs-theme="light"] .btn-success {
  background-color: #5BA951 !important;
  border-color: #5BA951 !important;
  color: #ffffff !important;
}

[data-bs-theme="light"] .btn-secondary:hover,
[data-bs-theme="light"] .btn-secondary:focus,
[data-bs-theme="light"] .btn-secondary:active,
[data-bs-theme="light"] .btn-success:hover,
[data-bs-theme="light"] .btn-success:focus,
[data-bs-theme="light"] .btn-success:active {
  background-color: #4c8f43 !important;
  border-color: #4c8f43 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="light"] .btn-phoenix-secondary,
[data-bs-theme="light"] .btn-phoenix-success {
  color: #387630 !important;
  background-color: #edf7eb !important;
  border-color: transparent !important;
}

[data-bs-theme="light"] .btn-phoenix-secondary:hover,
[data-bs-theme="light"] .btn-phoenix-success:hover {
  color: #ffffff !important;
  background-color: #5BA951 !important;
}

/* Outlined buttons */
[data-bs-theme="light"] .btn-outline-primary {
  color: #2E308D !important;
  border-color: #2E308D !important;
}

[data-bs-theme="light"] .btn-outline-primary:hover {
  color: #ffffff !important;
  background-color: #2E308D !important;
}

[data-bs-theme="light"] .btn-outline-secondary,
[data-bs-theme="light"] .btn-outline-success {
  color: #5BA951 !important;
  border-color: #5BA951 !important;
}

[data-bs-theme="light"] .btn-outline-secondary:hover,
[data-bs-theme="light"] .btn-outline-success:hover {
  color: #ffffff !important;
  background-color: #5BA951 !important;
}

/* Sidebar navigation colors in light mode */
[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link.active {
  color: #2E308D !important;
  background-color: #eeeff9 !important;
  border-radius: 6px;
}

[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link.active .nav-link-icon,
[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link.active .nav-link-text {
  color: #2E308D !important;
  font-weight: 700;
}

[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) {
  color: #5BA951 !important;
  background-color: #f4faf2 !important;
}

[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) .nav-link-icon,
[data-bs-theme="light"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) .nav-link-text {
  color: #5BA951 !important;
}

[data-bs-theme="light"] .navbar-vertical .dropdown-indicator:hover {
  color: #5BA951 !important;
}

[data-bs-theme="light"] .navbar-vertical .dropdown-indicator:hover .dropdown-indicator-icon-wrapper {
  color: #5BA951 !important;
}

/* Badges */
[data-bs-theme="light"] .badge-phoenix-primary {
  color: #2E308D !important;
  background-color: #eeeff9 !important;
}

[data-bs-theme="light"] .badge-phoenix-secondary,
[data-bs-theme="light"] .badge-phoenix-success {
  color: #387630 !important;
  background-color: #edf7eb !important;
}

/* Text colors */
[data-bs-theme="light"] .text-primary {
  color: #2E308D !important;
}

[data-bs-theme="light"] .text-secondary {
  color: #5BA951 !important;
}

[data-bs-theme="light"] a {
  color: #2E308D;
  transition: color 0.15s ease-in-out;
}

[data-bs-theme="light"] a:hover {
  color: #5BA951;
}

/* Form controls focus */
[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
  border-color: #2E308D !important;
  box-shadow: 0 0 0 0.2rem #cfd2f1 !important;
}

/* Checkbox and switch in light mode */
[data-bs-theme="light"] .form-check-input:checked {
  background-color: #2E308D !important;
  border-color: #2E308D !important;
}

/* DataGrid selection & hover in light mode */
[data-bs-theme="light"] .MuiDataGrid-row.Mui-selected {
  background-color: #eeeff9 !important;
}

[data-bs-theme="light"] .MuiDataGrid-row:hover {
  background-color: #f4faf2 !important;
}

/* Pagination active item */
[data-bs-theme="light"] .pagination .page-item.active .page-link {
  background-color: #2E308D !important;
  border-color: #2E308D !important;
  color: #ffffff !important;
}
/* ==========================================================================
   BM Coach Dark Mode Color Theme
   Night indigo surfaces, flat (no glows). Brand colours are lifted so they
   stay readable on dark: indigo #8D8CF5 for links/active, green #7DC86F.
   Buttons keep a solid indigo fill with white text.
   ========================================================================== */

html[data-bs-theme="dark"] {
  /* Surfaces */
  --phoenix-body-bg: #0e1020;
  --phoenix-body-bg-rgb: 14, 16, 32;
  --phoenix-emphasis-bg: #161a2e;
  --phoenix-emphasis-bg-rgb: 22, 26, 46;
  --phoenix-card-bg: #161a2e;
  --phoenix-body-highlight-bg: #1c2038;
  --phoenix-body-highlight-bg-rgb: 28, 32, 56;
  --phoenix-tertiary-bg: #1c2038;
  --phoenix-tertiary-bg-rgb: 28, 32, 56;
  --phoenix-navbar-top-bg-color: #12152a;
  --phoenix-navbar-vertical-bg-color: #12152a;
  --phoenix-navbar-vertical-collapsed-menu-bg: #161a2e;
  --phoenix-gray-50: #0e1020;
  --phoenix-gray-100: #1c2038;
  --phoenix-gray-200: #262b47;
  --phoenix-gray-300: #2e3454;

  /* Lines */
  --phoenix-border-color: #2a3050;
  --phoenix-border-color-translucent: #2a3050;
  --phoenix-navbar-top-border-color: #2a3050;
  --phoenix-navbar-vertical-border-color: #2a3050;
  --phoenix-navbar-footer-border-color: #2a3050;

  /* Text (all pass WCAG AA on #161a2e) */
  --phoenix-emphasis-color: #f2f3fa;
  --phoenix-emphasis-color-rgb: 242, 243, 250;
  --phoenix-body-color: #b4bad0;
  --phoenix-body-color-rgb: 180, 186, 208;
  --phoenix-secondary-color: #a3a9c2;
  --phoenix-tertiary-color: #959cb6;
  --phoenix-tertiary-color-rgb: 149, 156, 182;
  --phoenix-body-highlight-color: #d6d9e8;

  /* Primary: BM Coach indigo, lifted for dark */
  --phoenix-primary: #8d8cf5;
  --phoenix-primary-rgb: 141, 140, 245;
  --phoenix-primary-text-emphasis: #a9a8f7;
  --phoenix-primary-bg-subtle: #22234a;
  --phoenix-primary-border-subtle: #3a3b78;
  --phoenix-link-color: #a9a8f7;
  --phoenix-link-color-rgb: 169, 168, 247;
  --phoenix-link-hover-color: #9bd88f;

  /* Secondary / success: BM Coach green */
  --phoenix-secondary: #7dc86f;
  --phoenix-secondary-rgb: 125, 200, 111;
  --phoenix-success: #7dc86f;
  --phoenix-success-rgb: 125, 200, 111;
  --phoenix-secondary-text-emphasis: #9bd88f;
  --phoenix-secondary-bg-subtle: #1a2b22;
  --phoenix-secondary-border-subtle: #2f4a33;
  --phoenix-success-text-emphasis: #9bd88f;
  --phoenix-success-bg-subtle: #1a2b22;
  --phoenix-success-border-subtle: #2f4a33;

  /* Sidebar links */
  --phoenix-navbar-vertical-link-color: #b4bad0;
  --phoenix-navbar-vertical-link-hover-color: #f2f3fa;
  --phoenix-navbar-vertical-link-hover-bg: #1c2038;
  --phoenix-navbar-vertical-link-active-color: #a9a8f7;
  --phoenix-navbar-top-link-active-color: #a9a8f7;
}

/* Surfaces and bars */
[data-bs-theme="dark"] body {
  background-color: #0e1020 !important;
}

/* The work area is see-through so the brand background (BrandBackground.tsx) shows behind every screen */
.main > .content {
  background-color: transparent !important;
}

[data-bs-theme="dark"] .navbar-top,
[data-bs-theme="dark"] .navbar-vertical {
  background-color: #12152a !important;
}

[data-bs-theme="dark"] .navbar-top {
  border-bottom: 1px solid #2a3050;
}

[data-bs-theme="dark"] .navbar-vertical {
  border-right: 1px solid #2a3050;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .modal-content {
  background-color: #161a2e;
  border-color: #2a3050 !important;
}

[data-bs-theme="dark"] .hover-lift:hover {
  box-shadow: none !important;
  border-color: #3a3b78 !important;
}

/* Inputs sit one step darker than the card so their edges read */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #12152a;
  border-color: #2e3454;
  color: #f2f3fa;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #8a91ad;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #12152a;
  border-color: #8d8cf5 !important;
  box-shadow: 0 0 0 0.2rem #3a3b78 !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
  background-color: #4342b5 !important;
  border-color: #4342b5 !important;
}

/* Tables */
[data-bs-theme="dark"] .table {
  --phoenix-table-bg: transparent;
  --phoenix-table-color: #b4bad0;
  --phoenix-table-border-color: #2a3050;
  --phoenix-table-hover-bg: #1c2038;
  --phoenix-table-hover-color: #f2f3fa;
  --phoenix-table-striped-bg: #1a1e35;
}

[data-bs-theme="dark"] .table thead th {
  background-color: transparent;
  color: #f2f3fa;
}

/* Primary buttons: solid indigo, white text */
[data-bs-theme="dark"] .btn-primary {
  background-color: #4342b5 !important;
  border-color: #4342b5 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] .btn-primary:focus,
[data-bs-theme="dark"] .btn-primary:active,
[data-bs-theme="dark"] .btn-primary.active {
  background-color: #5251c9 !important;
  border-color: #5251c9 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .btn-phoenix-primary {
  color: #a9a8f7 !important;
  background-color: #22234a !important;
  border-color: transparent !important;
}

[data-bs-theme="dark"] .btn-phoenix-primary:hover {
  color: #ffffff !important;
  background-color: #4342b5 !important;
}

/* Secondary buttons: solid green */
[data-bs-theme="dark"] .btn-secondary,
[data-bs-theme="dark"] .btn-success {
  background-color: #3e8e35 !important;
  border-color: #3e8e35 !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-secondary:hover,
[data-bs-theme="dark"] .btn-secondary:focus,
[data-bs-theme="dark"] .btn-secondary:active,
[data-bs-theme="dark"] .btn-success:hover,
[data-bs-theme="dark"] .btn-success:focus,
[data-bs-theme="dark"] .btn-success:active {
  background-color: #4ba141 !important;
  border-color: #4ba141 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .btn-phoenix-secondary,
[data-bs-theme="dark"] .btn-phoenix-success {
  color: #d6d9e8 !important;
  background-color: #1c2038 !important;
  border-color: #2e3454 !important;
}

[data-bs-theme="dark"] .btn-phoenix-secondary:hover,
[data-bs-theme="dark"] .btn-phoenix-success:hover {
  color: #ffffff !important;
  background-color: #262b47 !important;
}

/* Outlined buttons */
[data-bs-theme="dark"] .btn-outline-primary {
  color: #a9a8f7 !important;
  border-color: #5251c9 !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover {
  color: #ffffff !important;
  background-color: #4342b5 !important;
}

[data-bs-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-success {
  color: #d6d9e8 !important;
  border-color: #2e3454 !important;
  background-color: #12152a;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-success:hover {
  color: #ffffff !important;
  background-color: #1c2038 !important;
}

/* Sidebar */
[data-bs-theme="dark"] .navbar-vertical .navbar-vertical-label {
  color: #8a91ad;
}

[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link.active {
  color: #a9a8f7 !important;
  background-color: #22234a !important;
  border-radius: 6px;
}

[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link.active .nav-link-icon,
[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link.active .nav-link-text {
  color: #a9a8f7 !important;
  font-weight: 700;
}

[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) {
  color: #9bd88f !important;
  background-color: #1a2b22 !important;
}

[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) .nav-link-icon,
[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link:hover:not(.active) .nav-link-text,
[data-bs-theme="dark"] .navbar-vertical .dropdown-indicator:hover,
[data-bs-theme="dark"] .navbar-vertical .dropdown-indicator:hover .dropdown-indicator-icon-wrapper {
  color: #9bd88f !important;
}

/* Badges */
[data-bs-theme="dark"] .badge-phoenix-primary {
  color: #a9a8f7 !important;
  background-color: #22234a !important;
  border-color: #3a3b78 !important;
}

[data-bs-theme="dark"] .badge-phoenix-secondary,
[data-bs-theme="dark"] .badge-phoenix-success {
  color: #9bd88f !important;
  background-color: #1a2b22 !important;
  border-color: #2f4a33 !important;
}

/* Text and links */
[data-bs-theme="dark"] .text-primary {
  color: #a9a8f7 !important;
}

[data-bs-theme="dark"] .text-secondary {
  color: #9bd88f !important;
}

[data-bs-theme="dark"] a {
  color: #a9a8f7;
  transition: color 0.15s ease-in-out;
}

[data-bs-theme="dark"] a:hover {
  color: #9bd88f;
}

/* MUI DataGrid */
[data-bs-theme="dark"] .MuiDataGrid-root {
  color: #b4bad0 !important;
}

[data-bs-theme="dark"] .MuiDataGrid-row.Mui-selected {
  background-color: #22234a !important;
}

[data-bs-theme="dark"] .MuiDataGrid-row:hover {
  background-color: #1c2038 !important;
}

/* Pagination */
[data-bs-theme="dark"] .pagination .page-link {
  background-color: #161a2e;
  border-color: #2a3050;
  color: #b4bad0;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
  background-color: #4342b5 !important;
  border-color: #4342b5 !important;
  color: #ffffff !important;
}

/* MUI dialogs follow the dark surfaces */
[data-bs-theme="dark"] .MuiDialog-paper {
  box-shadow: none !important;
}

/* An open group shows its active child; the parent row stays text-only */
[data-bs-theme="dark"] .navbar-vertical .nav-item-wrapper .nav-link.dropdown-indicator.active {
  background-color: transparent !important;
}

/* The logo artwork has a white ground, so give it a tidy white plate */
[data-bs-theme="dark"] .navbar-top .navbar-brand img {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 2px 6px;
}

/* ==========================================================================
   Flat finish (both modes): no glassmorphism.
   No blur, no frosted or translucent surfaces, no drop or glow shadows.
   Every surface and line is a solid colour.
   ========================================================================== */

*,
*::before,
*::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.shadow,
.shadow-sm,
.shadow-lg,
.card,
.dropdown-menu,
.offcanvas,
.modal-content,
.navbar-top,
.navbar-vertical,
.setting-toggle,
.btn,
.btn:hover,
.btn:focus,
.btn:active,
.MuiPaper-root,
.MuiPopover-paper,
.MuiMenu-paper {
  box-shadow: none !important;
}

/* Translucent lines become solid */
.border-translucent {
  border-color: var(--phoenix-border-color) !important;
}

/* Overlays dim the page with a plain solid scrim, never a frosted layer */
.offcanvas-backdrop.show,
.modal-backdrop.show {
  background-color: #141824;
  opacity: 0.5;
}

[data-bs-theme="dark"] .offcanvas-backdrop.show,
[data-bs-theme="dark"] .modal-backdrop.show {
  background-color: #05060d;
  opacity: 0.7;
}

/* Solid fills for the last translucent bits */
.theme-control-toggle .theme-control-toggle-label {
  background-color: #fdf3e1 !important;
  color: #8a5a00 !important;
}

[data-bs-theme="dark"] .theme-control-toggle .theme-control-toggle-label {
  background-color: #22234a !important;
  color: #a9a8f7 !important;
}

[data-bs-theme="dark"] .navbar-toggle-icon .toggle-line {
  background-color: #b4bad0 !important;
}

.MuiDataGrid-overlay {
  background-color: var(--phoenix-card-bg) !important;
}

/* ==========================================================================
   Medium and small screens: the menu opens as a left drawer under the top
   bar, above the dimmed page (backdrop z-index 1015 in AppShell.tsx).
   ========================================================================== */
@media (max-width: 991.98px) {
  .navbar-vertical.show {
    width: 280px;
    max-width: 85vw;
    bottom: 0;
    z-index: 1035;
    border-right: 1px solid var(--phoenix-border-color);
    background-color: var(--phoenix-navbar-vertical-bg-color);
  }

  .navbar-vertical.show .navbar-collapse,
  .navbar-vertical.show .navbar-vertical-content {
    background-color: var(--phoenix-navbar-vertical-bg-color);
  }
}

/* Neutral status badge (inactive, completed, expired…): grey, because
   "secondary" is BM green in this theme and would read as good news */
.badge-phoenix-neutral {
  color: #525b75 !important;
  background-color: #eff2f6 !important;
  border: 1px solid #dce0e8 !important;
}

[data-bs-theme="dark"] .badge-phoenix-neutral {
  color: #b4bad0 !important;
  background-color: #1c2038 !important;
  border-color: #2e3454 !important;
}
