/* UI standardization fixes for LR/payment pages */

:root {
  --app-font-family: "Plus Jakarta Sans", "Noto Sans Tamil", "Noto Sans", sans-serif;
  --ui-fs-caption: 0.75rem;
  --ui-fs-label: 0.8rem;
  --ui-fs-body: 0.9rem;
  --ui-fs-body-lg: 0.96rem;
  --ui-fs-heading-sm: 0.98rem;
  --ui-fs-heading-md: 1.12rem;
  --ui-fs-heading-lg: 1.3rem;
  --ui-color-accent: #60a5fa;
  --ui-color-accent-soft: #93c5fd;
  --ui-color-surface-soft: rgba(148, 163, 184, 0.1);
  --ui-color-border: rgba(148, 163, 184, 0.35);
  --ui-color-text-strong: #f8fafc;
  --ui-color-text-normal: #e2e8f0;
  --ui-color-text-muted: #a8b6cc;
}

body,
.main-wrapper,
.sidebar-wrapper,
.top-header .navbar,
.card,
.btn,
.form-control,
.form-select,
.dropdown-menu,
.table,
.modal-content,
.page-breadcrumb,
.breadcrumb,
.menu-title,
.menu-label {
  font-family: var(--app-font-family) !important;
  letter-spacing: 0.2px;
}

.main-wrapper h1,
.main-wrapper h2,
.main-wrapper h3,
.main-wrapper h4,
.main-wrapper h5,
.main-wrapper h6,
.card-title,
.page-breadcrumb .breadcrumb-title {
  font-family: var(--app-font-family) !important;
  letter-spacing: 0.25px;
}

.main-wrapper {
  font-size: var(--ui-fs-body);
}

.main-wrapper p,
.main-wrapper li,
.main-wrapper td,
.main-wrapper th,
.main-wrapper .form-control,
.main-wrapper .form-select,
.main-wrapper .btn,
.main-wrapper .dropdown-item,
.main-wrapper .nav-link,
.main-wrapper .modal-body {
  font-size: var(--ui-fs-body);
}

.main-wrapper h1 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.main-wrapper h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
}

.main-wrapper h3 {
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
}

.main-wrapper h4,
.main-wrapper .card-title,
.main-wrapper .modal-title {
  font-size: var(--ui-fs-heading-md);
  font-weight: 700;
}

.main-wrapper h5,
.main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: var(--ui-fs-heading-sm);
  font-weight: 700;
}

.main-wrapper h6 {
  font-size: var(--ui-fs-body-lg);
  font-weight: 700;
}

.main-wrapper small,
.main-wrapper .small,
.main-wrapper .form-text {
  font-size: var(--ui-fs-caption);
}

.main-wrapper .form-label,
.main-wrapper label {
  font-size: var(--ui-fs-label);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.main-wrapper .form-control,
.main-wrapper .form-select {
  min-height: 2.45rem;
  border-radius: 0.5rem;
}

.main-wrapper .btn {
  font-weight: 600;
  border-radius: 0.5rem;
  letter-spacing: 0.02em;
}

.main-wrapper .btn-sm,
.main-wrapper .btn-group-sm > .btn {
  font-size: var(--ui-fs-caption);
}

.main-wrapper .card-header {
  font-size: var(--ui-fs-body-lg);
  font-weight: 700;
}

.main-wrapper .table thead th {
  font-size: var(--ui-fs-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-wrapper .table td {
  font-size: var(--ui-fs-body);
}

.main-wrapper .badge {
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.38em 0.66em;
  letter-spacing: 0.02em;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper {
  background: linear-gradient(180deg, #050a25 0%, #0b1640 52%, #0a1233 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.3) !important;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35), inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-header {
  background: linear-gradient(180deg, rgba(8, 13, 38, 0.95) 0%, rgba(8, 13, 38, 0.8) 100%) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(8px);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-logo-frame {
  max-height: 50px;
  background: linear-gradient(160deg, #f8fafc 0%, #dbeafe 100%);
  padding: 6px 10px;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.25);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-close {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav {
  background: transparent !important;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .menu-label {
  color: #94a3b8 !important;
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 14px 16px 8px 16px;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a {
  margin: 3px 10px;
  border-radius: 12px;
  padding: 10px 12px;
  color: #cbd5e1 !important;
  border: 1px solid transparent;
  transition: all 0.22s ease;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a .parent-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.14);
  color: #bfdbfe;
  margin-right: 10px;
  transition: all 0.22s ease;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a .menu-title {
  font-weight: 600;
  letter-spacing: 0.2px;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a:hover,
[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a:focus {
  color: #f8fafc !important;
  background: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.45);
  transform: translateX(2px);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a:hover .parent-icon,
[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a:focus .parent-icon {
  background: rgba(96, 165, 250, 0.35);
  color: #e0f2fe;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu .mm-active > a {
  color: #f8fafc !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(56, 189, 248, 0.78) 100%) !important;
  border-color: rgba(125, 211, 252, 0.75);
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.35);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu .mm-active > a .parent-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu ul {
  background: transparent !important;
  margin-left: 18px;
  border-left: 1px dashed rgba(148, 163, 184, 0.35);
  padding-left: 4px;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu ul a {
  color: #94a3b8 !important;
  font-size: 13px;
  font-weight: 500;
  margin: 2px 8px;
  border-radius: 9px;
  padding: 7px 10px 7px 8px;
  transition: all 0.2s ease;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu ul a i {
  color: #60a5fa;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu ul a:hover,
[data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu ul a:focus {
  color: #f8fafc !important;
  background: rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .metismenu .has-arrow:after {
  border-color: rgba(191, 219, 254, 0.9);
}

[data-bs-theme=blue-theme] body .sidebar-wrapper .simplebar-scrollbar:before {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.65) 0%, rgba(14, 165, 233, 0.6) 100%) !important;
}

@media (max-width: 1199.98px) {
  [data-bs-theme=blue-theme] body .sidebar-wrapper .sidebar-nav .metismenu > li > a {
    margin: 3px 8px;
  }
}

@media (min-width: 1200px) {
  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper {
    width: 84px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-header {
    width: 84px;
    padding: 0 8px;
    justify-content: center;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .top-header .navbar {
    left: 84px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .main-wrapper {
    margin-left: 84px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .page-footer {
    left: 84px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-logo-frame {
    max-height: 32px;
    min-width: 48px;
    padding: 3px 6px;
    border-radius: 10px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-close {
    display: none !important;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav {
    padding-top: 8px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu {
    padding: 0;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .menu-label {
    display: none !important;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > a {
    width: 52px;
    height: 52px;
    min-height: 52px;
    margin: 7px auto;
    padding: 0 !important;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > a .parent-icon {
    width: 38px;
    height: 38px;
    margin-right: 0;
    border-radius: 12px;
    font-size: 1.35rem;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > a .menu-title,
  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu .has-arrow:after {
    display: none !important;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > ul {
    display: none !important;
  }

  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > a:hover,
  [data-bs-theme=blue-theme] body.toggled:not(.sidebar-hovered) .sidebar-wrapper .sidebar-nav .metismenu > li > a:focus {
    transform: none;
  }
}

[data-bs-theme=blue-theme] body .top-header .navbar {
  background-color: rgba(9, 14, 38, 0.9) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.28) !important;
  backdrop-filter: blur(6px);
  z-index: 1030 !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar.header-nav-shell {
  min-height: 70px;
  padding: 0 1rem !important;
  gap: 0.75rem;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-left-zone {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-identity-title {
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-identity-subtitle {
  color: #94a3b8;
  font-size: 0.74rem;
  line-height: 1.2;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-right-zone {
  margin-left: auto;
  gap: 0.3rem;
}

[data-bs-theme=blue-theme] body .top-header .navbar .header-icon-link,
[data-bs-theme=blue-theme] body .top-header .navbar .profile-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-avatar-sm {
  border-color: rgba(191, 219, 254, 0.45) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

[data-bs-theme=blue-theme] body .top-header .navbar .dropdown-menu::after {
  display: none !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .dropdown-menu.dropdown-notify,
[data-bs-theme=blue-theme] body .top-header .navbar .dropdown-menu.profile-dropdown-menu {
  margin-top: 10px !important;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: linear-gradient(180deg, #0a1338 0%, #101b4a 100%);
  color: #e2e8f0;
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.45) !important;
  z-index: 2000 !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu {
  min-width: 285px;
  overflow: hidden;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.28) 0%, rgba(15, 23, 42, 0.08) 100%);
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-avatar-lg {
  border: 2px solid rgba(191, 219, 254, 0.4);
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-name {
  max-width: 245px;
  margin: 0 auto;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-phone,
[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-branch {
  color: #cbd5e1 !important;
  font-size: 0.84rem;
  line-height: 1.3;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-inline-icon {
  font-size: 14px;
  vertical-align: middle;
  margin-right: 4px;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-role-badge {
  font-size: 0.78rem;
  padding: 0.38rem 0.62rem;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-menu-links {
  padding: 8px;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .dropdown-item {
  color: #e2e8f0;
  border-radius: 10px;
  margin-bottom: 2px;
}

[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .dropdown-item:hover,
[data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .dropdown-item:focus {
  color: #ffffff;
  background-color: rgba(59, 130, 246, 0.22);
}

[data-bs-theme=blue-theme] body .top-header .navbar .btn-toggle a,
[data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links .nav-link {
  color: #e2e8f0 !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .btn-toggle a:hover,
[data-bs-theme=blue-theme] body .top-header .navbar .btn-toggle a:focus,
[data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links .nav-link:hover,
[data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links .nav-link:focus {
  color: #ffffff !important;
  background-color: rgba(148, 163, 184, 0.18) !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .search-control,
[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .mobile-search-control {
  color: #f8fafc !important;
  background-color: rgba(15, 23, 42, 0.78) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .search-control::placeholder,
[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .mobile-search-control::placeholder {
  color: rgba(191, 219, 254, 0.9) !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .position-relative > .material-icons-outlined {
  color: #bfdbfe !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .search-control:focus,
[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .mobile-search-control:focus {
  border-color: rgba(96, 165, 250, 0.95) !important;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme=blue-theme] body .top-header .navbar .nav-item .badge-notify {
  box-shadow: 0 0 0 2px rgba(9, 14, 38, 0.9);
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar {
  min-width: 0;
}

[data-bs-theme=blue-theme] body .top-header .navbar .search-bar .search-control {
  width: 100%;
}

@media (max-width: 1199.98px) {
  [data-bs-theme=blue-theme] body .top-header .navbar {
    padding: 0 0.9rem !important;
    gap: 0.75rem !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .search-bar .search-control {
    font-size: 0.95rem;
    padding-left: 2.6rem !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links {
    gap: 0.25rem !important;
  }
}

@media (max-width: 991.98px) {
  [data-bs-theme=blue-theme] body .top-header .navbar {
    padding: 0 0.65rem !important;
    gap: 0.5rem !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .search-bar {
    display: none !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .btn-toggle a,
  [data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links .nav-link {
    width: 40px;
    height: 40px;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .dropdown-toggle img {
    width: 40px !important;
    height: 40px !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .nav-item .badge-notify {
    width: 18px;
    height: 18px;
    font-size: 10px;
    top: 0;
    right: 0;
  }
}

@media (max-width: 575.98px) {
  [data-bs-theme=blue-theme] body .top-header .navbar {
    padding: 0 0.5rem !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .btn-toggle a,
  [data-bs-theme=blue-theme] body .top-header .navbar .nav-right-links .nav-link {
    width: 36px;
    height: 36px;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .dropdown-toggle img {
    width: 36px !important;
    height: 36px !important;
  }

  /* Keep profile menu compact on mobile so it doesn't cover the whole page */
  [data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu {
    min-width: 0;
    width: min(280px, calc(100vw - 14px));
    max-height: 72vh;
    overflow-y: auto;
    margin-top: 8px !important;
    right: 0;
    left: auto;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-dropdown-header {
    padding: 10px 12px;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-avatar-lg {
    width: 62px !important;
    height: 62px !important;
    margin-bottom: 0.35rem !important;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-name {
    font-size: 1.05rem;
  }

  [data-bs-theme=blue-theme] body .top-header .navbar .profile-dropdown-menu .profile-menu-links {
    padding: 6px;
  }
}

.main-wrapper .card,
.main-wrapper .card-body,
.main-wrapper .card-header,
.main-wrapper .page-breadcrumb,
.main-wrapper .breadcrumb-item,
.main-wrapper .breadcrumb-item a,
.main-wrapper .table,
.main-wrapper .table th,
.main-wrapper .table td,
.main-wrapper .form-label,
.main-wrapper .form-control,
.main-wrapper .form-select {
  color: var(--bs-body-color);
}

/* Ensure autocomplete dropdown text remains readable in dark/blue theme */
[data-bs-theme=blue-theme] body .autocomplete-dropdown:not(.goods-type-dropdown) .autocomplete-item {
  color: #e2e8f0 !important;
}

[data-bs-theme=blue-theme] body .autocomplete-dropdown:not(.goods-type-dropdown) .autocomplete-item strong {
  color: #f8fafc !important;
}

[data-bs-theme=blue-theme] body .autocomplete-dropdown:not(.goods-type-dropdown) .autocomplete-item small,
[data-bs-theme=blue-theme] body .autocomplete-dropdown:not(.goods-type-dropdown) .autocomplete-item .text-muted {
  color: #cbd5e1 !important;
  opacity: 1 !important;
}

/* Goods-type dropdown is intentionally white; keep text dark for contrast. */
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown {
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
}

[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .autocomplete-item,
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .suggestion-item,
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .autocomplete-item strong,
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .suggestion-item strong {
  color: #0f172a !important;
}

[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .autocomplete-item small,
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .suggestion-item small,
[data-bs-theme=blue-theme] body .autocomplete-dropdown.goods-type-dropdown .text-muted {
  color: #475569 !important;
  opacity: 1 !important;
}

.main-wrapper .card h1,
.main-wrapper .card h2,
.main-wrapper .card h3,
.main-wrapper .card h4,
.main-wrapper .card h5,
.main-wrapper .card h6 {
  color: var(--bs-body-color);
}

.main-wrapper .text-muted,
.main-wrapper small.text-muted {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

.main-wrapper .form-control::placeholder,
.main-wrapper input::placeholder,
.main-wrapper textarea::placeholder {
  color: rgba(148, 163, 184, 0.95) !important;
  opacity: 1 !important;
}

.main-wrapper .text-white-50 {
  color: rgba(248, 250, 252, 0.88) !important;
  opacity: 1 !important;
}

.main-wrapper .form-control,
.main-wrapper .form-select,
.main-wrapper textarea.form-control {
  background-color: rgba(15, 23, 42, 0.28);
  border-color: rgba(148, 163, 184, 0.45);
}

.main-wrapper .form-control:focus,
.main-wrapper .form-select:focus,
.main-wrapper textarea.form-control:focus {
  color: var(--bs-body-color);
  background-color: rgba(15, 23, 42, 0.35);
  border-color: rgba(96, 165, 250, 0.95);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2);
}

.main-wrapper .form-control:disabled,
.main-wrapper .form-select:disabled {
  color: rgba(203, 213, 225, 0.85);
  background-color: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.28);
}

.main-wrapper .input-group-text {
  color: var(--bs-body-color);
  background-color: rgba(15, 23, 42, 0.38);
  border-color: rgba(148, 163, 184, 0.45);
}

.main-wrapper .form-check-label,
.main-wrapper .form-text {
  color: var(--bs-secondary-color);
}

.main-wrapper .btn-outline-dark {
  color: var(--bs-body-color);
  border-color: rgba(148, 163, 184, 0.55);
  background-color: rgba(148, 163, 184, 0.08);
}

.main-wrapper .btn-outline-dark:hover {
  color: #0f172a;
  background-color: #94a3b8;
  border-color: #94a3b8;
}

.main-wrapper .btn:disabled,
.main-wrapper .btn.disabled {
  opacity: 0.55;
}

.main-wrapper .table > :not(caption) > * > * {
  border-color: rgba(148, 163, 184, 0.28);
}

.main-wrapper .table td,
.main-wrapper .table td a:not(.btn),
.main-wrapper .table td span:not(.badge) {
  color: var(--bs-body-color);
}

.main-wrapper .table,
.main-wrapper table.dataTable {
  --bs-table-striped-bg: rgba(148, 163, 184, 0.08);
  --bs-table-striped-color: var(--bs-body-color);
  --bs-table-hover-bg: rgba(37, 99, 235, 0.26);
  --bs-table-hover-color: #f8fafc;
}

.main-wrapper .table-hover > tbody > tr:hover > *,
.main-wrapper table.dataTable > tbody > tr:hover > * {
  color: #f8fafc !important;
  background-color: rgba(37, 99, 235, 0.26) !important;
}

.main-wrapper table.dataTable > tbody > tr:hover a,
.main-wrapper .table-hover > tbody > tr:hover a {
  color: #bfdbfe !important;
}

.main-wrapper .dataTables_wrapper .dataTables_filter label,
.main-wrapper .dataTables_wrapper .dataTables_length label,
.main-wrapper .dataTables_wrapper .dataTables_info,
.main-wrapper .dataTables_wrapper .dataTables_processing {
  color: var(--bs-body-color) !important;
}

.main-wrapper .dataTables_wrapper .dataTables_filter input,
.main-wrapper .dataTables_wrapper .dataTables_length select {
  color: var(--bs-body-color) !important;
  background-color: rgba(15, 23, 42, 0.28) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
}

.main-wrapper .dataTables_wrapper .dataTables_paginate .page-link {
  color: var(--bs-body-color) !important;
  background-color: rgba(15, 23, 42, 0.28) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

.main-wrapper .dataTables_wrapper .dataTables_paginate .page-link:hover {
  color: #f8fafc !important;
  background-color: rgba(37, 99, 235, 0.35) !important;
}

.main-wrapper .dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  color: #f8fafc !important;
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.main-wrapper .table thead th {
  font-weight: 600;
}

.main-wrapper .tooltip .tooltip-inner {
  color: #f8fafc;
  background-color: #0f172a;
}

.main-wrapper .badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

[data-bs-theme=blue-theme] .main-wrapper .badge.bg-primary,
[data-bs-theme=blue-theme] .main-wrapper .badge.bg-secondary,
[data-bs-theme=blue-theme] .main-wrapper .badge.bg-success,
[data-bs-theme=blue-theme] .main-wrapper .badge.bg-info,
[data-bs-theme=blue-theme] .main-wrapper .badge.bg-danger {
  color: #f8fafc !important;
}

[data-bs-theme=blue-theme] .main-wrapper .badge.bg-warning,
[data-bs-theme=blue-theme] .main-wrapper .badge.bg-light {
  color: #111827 !important;
}

/* Outrank blue-theme.css card badge override that sets secondary badge text dark */
[data-bs-theme=blue-theme] body .main-wrapper .card .badge.bg-secondary,
[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-secondary {
  color: #f8fafc !important;
}

.main-wrapper .lr-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.main-wrapper .lr-action-buttons .btn {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-width: 1.5px;
}

.main-wrapper .lr-action-buttons .btn .material-icons-outlined {
  font-size: 18px;
  line-height: 1;
}

.main-wrapper .lr-action-buttons .btn-outline-secondary {
  color: #cbd5e1;
  border-color: #94a3b8;
  background-color: rgba(148, 163, 184, 0.08);
}

.main-wrapper .lr-action-buttons .btn-outline-secondary:hover {
  color: #0f172a;
  background-color: #94a3b8;
}

.main-wrapper .lr-action-buttons .btn-outline-warning {
  color: #f59e0b;
  border-color: #f59e0b;
  background-color: rgba(245, 158, 11, 0.08);
}

.main-wrapper .lr-action-buttons .btn-outline-warning:hover {
  color: #111827;
  background-color: #f59e0b;
}

.main-wrapper .lr-action-buttons .btn-outline-success {
  color: #22c55e;
  border-color: #22c55e;
  background-color: rgba(34, 197, 94, 0.08);
}

.main-wrapper .lr-action-buttons .btn-outline-success:hover {
  color: #052e16;
  background-color: #22c55e;
}

.main-wrapper .timeline-with-icons {
  border-left: 3px solid rgba(13, 110, 253, 0.45);
  position: relative;
  list-style: none;
  padding-left: 0;
  margin-left: 20px;
}

.main-wrapper .timeline-with-icons .timeline-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.main-wrapper .timeline-with-icons .timeline-item:last-child {
  margin-bottom: 0;
}

.main-wrapper .timeline-with-icons .timeline-icon {
  position: absolute;
  left: -22px;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.main-wrapper .timeline-with-icons .timeline-icon i {
  font-size: 20px !important;
}

.main-wrapper .timeline-with-icons .timeline-item h5,
.main-wrapper .timeline .timeline-item strong {
  color: var(--bs-body-color) !important;
}

.main-wrapper .timeline-with-icons .timeline-item .timeline-date,
.main-wrapper .timeline-with-icons .timeline-item .timeline-desc,
.main-wrapper .timeline .timeline-item .text-muted {
  color: var(--bs-secondary-color) !important;
}

.main-wrapper .timeline-icon.status-booked,
.main-wrapper .timeline-icon.status-created {
  background-color: #0d6efd;
  color: #fff;
}

.main-wrapper .timeline-icon.status-arrived {
  background-color: #17a2b8;
  color: #fff;
}

.main-wrapper .timeline-icon.status-out_for_delivery,
.main-wrapper .timeline-icon.status-payment_partial {
  background-color: #ffc107;
  color: #212529;
}

.main-wrapper .timeline-icon.status-delivered,
.main-wrapper .timeline-icon.status-payment_received {
  background-color: #28a745;
  color: #fff;
}

.main-wrapper .timeline-icon.status-cancelled {
  background-color: #dc3545;
  color: #fff;
}

.main-wrapper .timeline-icon.status-payment_unpaid,
.main-wrapper .timeline-icon.status-payment_update {
  background-color: #6c757d;
  color: #fff;
}

/* Global color standardization for content pages */
[data-bs-theme=blue-theme] body .main-wrapper,
[data-bs-theme=blue-theme] body .main-wrapper .card,
[data-bs-theme=blue-theme] body .main-wrapper .modal-content {
  color: var(--ui-color-text-normal);
}

[data-bs-theme=blue-theme] body .main-wrapper .text-muted,
[data-bs-theme=blue-theme] body .main-wrapper small.text-muted,
[data-bs-theme=blue-theme] body .main-wrapper .form-text {
  color: var(--ui-color-text-muted) !important;
}

[data-bs-theme=blue-theme] body .main-wrapper a:not(.btn):not(.dropdown-item) {
  color: var(--ui-color-accent);
}

[data-bs-theme=blue-theme] body .main-wrapper a:not(.btn):not(.dropdown-item):hover,
[data-bs-theme=blue-theme] body .main-wrapper a:not(.btn):not(.dropdown-item):focus {
  color: var(--ui-color-accent-soft);
}

[data-bs-theme=blue-theme] body .main-wrapper .card {
  border: 1px solid var(--ui-color-border);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.2);
}

[data-bs-theme=blue-theme] body .main-wrapper .card-header,
[data-bs-theme=blue-theme] body .main-wrapper .modal-header,
[data-bs-theme=blue-theme] body .main-wrapper .offcanvas-header {
  border-bottom-color: var(--ui-color-border);
}

[data-bs-theme=blue-theme] body .main-wrapper .table > :not(caption) > * > * {
  border-color: rgba(148, 163, 184, 0.24);
}

[data-bs-theme=blue-theme] body .main-wrapper .table-dark {
  --bs-table-bg: rgba(15, 23, 42, 0.92);
  --bs-table-border-color: rgba(148, 163, 184, 0.3);
  --bs-table-color: #f8fafc;
}

[data-bs-theme=blue-theme] body .main-wrapper .table-secondary,
[data-bs-theme=blue-theme] body .main-wrapper .table-light {
  --bs-table-bg: rgba(148, 163, 184, 0.18);
  --bs-table-color: var(--ui-color-text-normal);
}

[data-bs-theme=blue-theme] body .main-wrapper .form-control,
[data-bs-theme=blue-theme] body .main-wrapper .form-select,
[data-bs-theme=blue-theme] body .main-wrapper textarea.form-control {
  color: var(--ui-color-text-normal) !important;
  border-color: var(--ui-color-border) !important;
  background-color: rgba(15, 23, 42, 0.26) !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .form-select option {
  color: #111827 !important;
  background-color: #f8fafc !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .form-select option:disabled {
  color: #6b7280 !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .form-control::placeholder,
[data-bs-theme=blue-theme] body .main-wrapper textarea::placeholder {
  color: #9fb0c8 !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .form-control:focus,
[data-bs-theme=blue-theme] body .main-wrapper .form-select:focus {
  border-color: rgba(96, 165, 250, 0.95) !important;
  box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.22);
}

[data-bs-theme=blue-theme] body .main-wrapper .bg-light,
[data-bs-theme=blue-theme] body .main-wrapper .text-bg-light {
  background-color: rgba(148, 163, 184, 0.16) !important;
  color: var(--ui-color-text-normal) !important;
}

/* Badge palette normalization (important for status readability) */
[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-secondary,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-secondary {
  background-color: #334155 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-success,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-success {
  background-color: #16a34a !important;
  color: #f0fdf4 !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-danger,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-danger {
  background-color: #dc2626 !important;
  color: #fef2f2 !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-warning,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-warning {
  background-color: #f59e0b !important;
  color: #1f2937 !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-info,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-info {
  background-color: #0284c7 !important;
  color: #ecfeff !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .badge.bg-primary,
[data-bs-theme=blue-theme] body .main-wrapper .badge.text-bg-primary {
  background-color: #2563eb !important;
  color: #eff6ff !important;
}

[data-bs-theme=blue-theme] body .main-wrapper .alert {
  border-width: 1px;
  border-color: var(--ui-color-border);
}

@media (max-width: 991.98px) {
  .main-wrapper {
    font-size: 0.9rem;
  }

  .main-wrapper .card-header,
  .main-wrapper h5 {
    font-size: 0.95rem;
  }
}

/* Reports module standardization */
body.reports-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.reports-ui .main-wrapper .card {
  border-radius: 12px;
}

body.reports-ui .main-wrapper .card-header {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

body.reports-ui .main-wrapper .summary-card,
body.reports-ui .main-wrapper .stat-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: 0 8px 16px rgba(2, 6, 23, 0.18);
}

body.reports-ui .main-wrapper .btn-xs {
  font-size: 0.74rem !important;
  padding: 0.2rem 0.46rem !important;
  border-radius: 0.45rem !important;
}

body.reports-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
}

body.reports-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.reports-ui .main-wrapper .table tfoot th,
body.reports-ui .main-wrapper .table tfoot td {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.3) !important;
  font-weight: 700;
}

body.reports-ui .main-wrapper .report-grand-total-row td,
body.reports-ui .main-wrapper .report-grand-total-row th,
body.reports-ui .main-wrapper .report-subtotal-row td,
body.reports-ui .main-wrapper .report-subtotal-row th,
body.reports-ui .main-wrapper .report-foot-row td,
body.reports-ui .main-wrapper .report-foot-row th {
  background: rgba(148, 163, 184, 0.2) !important;
  color: #f8fafc !important;
}

body.reports-ui .main-wrapper .report-total-positive {
  color: #22c55e !important;
}

body.reports-ui .main-wrapper .report-total-negative {
  color: #ef4444 !important;
}

body.reports-ui .main-wrapper i.material-icons-outlined[style*="font-size:12px"],
body.reports-ui .main-wrapper i.material-icons-outlined[style*="font-size:14px"],
body.reports-ui .main-wrapper i.material-icons-outlined[style*="font-size:16px"] {
  font-size: 16px !important;
  vertical-align: middle !important;
}

body.reports-ui .main-wrapper [style*="cursor:pointer"] {
  transition: background-color 0.15s ease;
}

body.reports-ui .main-wrapper [style*="cursor:pointer"]:hover {
  background-color: rgba(59, 130, 246, 0.12) !important;
}

body.reports-ui .main-wrapper .text-muted {
  color: #b7c3d7 !important;
}

body.reports-ui .main-wrapper .badge.bg-secondary {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.reports-ui .main-wrapper .badge.bg-warning {
  color: #111827 !important;
}

@media (max-width: 767.98px) {
  body.reports-ui .main-wrapper .table tbody td,
  body.reports-ui .main-wrapper .table thead th {
    font-size: 0.82rem;
  }

  body.reports-ui .main-wrapper .card-header h5 {
    font-size: 0.92rem;
  }
}

/* Operations module standardization */
body.operations-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.operations-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.2);
}

body.operations-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

body.operations-ui .main-wrapper .card-header h5,
body.operations-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.operations-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.operations-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.operations-ui .main-wrapper .btn {
  min-height: 2.38rem;
}

body.operations-ui .main-wrapper .btn-sm,
body.operations-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.operations-ui .main-wrapper .form-control,
body.operations-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

/* Light surface components used in operations pages */
body.operations-ui .main-wrapper .trip-type-card,
body.operations-ui .main-wrapper .lr-item,
body.operations-ui .main-wrapper .filter-card,
body.operations-ui .main-wrapper .section-card,
body.operations-ui .main-wrapper .request-card,
body.operations-ui .main-wrapper .trip-card,
body.operations-ui .main-wrapper .ewb-card,
body.operations-ui .main-wrapper .transport-mode-card,
body.operations-ui .main-wrapper .trip-sheet-tab,
body.operations-ui .main-wrapper .add-trip-sheet-btn,
body.operations-ui .main-wrapper .threshold-table,
body.operations-ui .main-wrapper .validation-rules {
  border-radius: 12px !important;
}

body.operations-ui .main-wrapper .trip-type-card,
body.operations-ui .main-wrapper .lr-item,
body.operations-ui .main-wrapper .filter-card,
body.operations-ui .main-wrapper .section-card,
body.operations-ui .main-wrapper .request-card,
body.operations-ui .main-wrapper .trip-card,
body.operations-ui .main-wrapper .transport-mode-card,
body.operations-ui .main-wrapper .trip-sheet-tab,
body.operations-ui .main-wrapper .add-trip-sheet-btn,
body.operations-ui .main-wrapper .threshold-table,
body.operations-ui .main-wrapper .validation-rules,
body.operations-ui .main-wrapper .section-header,
body.operations-ui .main-wrapper .section-body,
body.operations-ui .main-wrapper .lr-table,
body.operations-ui .main-wrapper .lr-table th,
body.operations-ui .main-wrapper .lr-table td {
  color: #0f172a !important;
}

body.operations-ui .main-wrapper .trip-type-card,
body.operations-ui .main-wrapper .lr-item,
body.operations-ui .main-wrapper .filter-card,
body.operations-ui .main-wrapper .section-card,
body.operations-ui .main-wrapper .request-card,
body.operations-ui .main-wrapper .trip-card,
body.operations-ui .main-wrapper .transport-mode-card,
body.operations-ui .main-wrapper .trip-sheet-tab,
body.operations-ui .main-wrapper .add-trip-sheet-btn,
body.operations-ui .main-wrapper .threshold-table,
body.operations-ui .main-wrapper .validation-rules,
body.operations-ui .main-wrapper .section-header,
body.operations-ui .main-wrapper .section-body,
body.operations-ui .main-wrapper .lr-table,
body.operations-ui .main-wrapper .lr-table th,
body.operations-ui .main-wrapper .lr-table td {
  border-color: rgba(148, 163, 184, 0.4) !important;
}

body.operations-ui .main-wrapper .trip-type-card,
body.operations-ui .main-wrapper .lr-item,
body.operations-ui .main-wrapper .request-card,
body.operations-ui .main-wrapper .trip-card,
body.operations-ui .main-wrapper .transport-mode-card,
body.operations-ui .main-wrapper .trip-sheet-tab,
body.operations-ui .main-wrapper .add-trip-sheet-btn {
  background: #f8fafc !important;
}

body.operations-ui .main-wrapper .filter-card,
body.operations-ui .main-wrapper .section-header {
  background: #eef2ff !important;
}

body.operations-ui .main-wrapper .section-body,
body.operations-ui .main-wrapper .lr-table th {
  background: #ffffff !important;
}

body.operations-ui .main-wrapper .trip-type-card.selected,
body.operations-ui .main-wrapper .transport-mode-card.selected {
  background: #dbeafe !important;
  border-color: rgba(37, 99, 235, 0.55) !important;
}

body.operations-ui .main-wrapper .lr-item.selected,
body.operations-ui .main-wrapper .lr-table tr.selected,
body.operations-ui .main-wrapper .lr-table tr.selected td {
  background: #dbeafe !important;
  color: #0f172a !important;
}

body.operations-ui .main-wrapper .lr-item.postponed,
body.operations-ui .main-wrapper .lr-table tr.table-warning,
body.operations-ui .main-wrapper .select-all-row {
  background: #fef3c7 !important;
  color: #78350f !important;
}

body.operations-ui .main-wrapper .lr-table tr:hover,
body.operations-ui .main-wrapper .trip-card:hover,
body.operations-ui .main-wrapper .request-card:hover,
body.operations-ui .main-wrapper .trip-type-card:hover,
body.operations-ui .main-wrapper .lr-item:hover {
  background-color: #eff6ff !important;
  color: #0f172a !important;
}

body.operations-ui .main-wrapper .trip-summary {
  border-radius: 12px !important;
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.2);
}

body.operations-ui .main-wrapper .status-pending {
  background-color: #f59e0b !important;
  color: #111827 !important;
}

body.operations-ui .main-wrapper .status-approved,
body.operations-ui .main-wrapper .status-completed {
  background-color: #16a34a !important;
  color: #f0fdf4 !important;
}

body.operations-ui .main-wrapper .status-rejected,
body.operations-ui .main-wrapper .status-cancelled {
  background-color: #dc2626 !important;
  color: #fef2f2 !important;
}

body.operations-ui .main-wrapper .status-loading,
body.operations-ui .main-wrapper .status-loaded,
body.operations-ui .main-wrapper .status-in_transit,
body.operations-ui .main-wrapper .status-in_progress,
body.operations-ui .main-wrapper .status-departed,
body.operations-ui .main-wrapper .status-scheduled {
  color: #f8fafc !important;
}

/* Operations modals: readable light content with consistent controls */
body.operations-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.operations-ui .modal-content .modal-body,
body.operations-ui .modal-content .modal-footer,
body.operations-ui .modal-content .modal-body p,
body.operations-ui .modal-content .modal-body div,
body.operations-ui .modal-content .modal-body span,
body.operations-ui .modal-content .modal-body td,
body.operations-ui .modal-content .modal-body th,
body.operations-ui .modal-content .modal-body label {
  color: #0f172a !important;
}

body.operations-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.operations-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

/* Godown tab visibility */
body.operations-ui .main-wrapper .nav-tabs .nav-link {
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

body.operations-ui .main-wrapper .nav-tabs .nav-link.active {
  color: #f8fafc !important;
  background-color: rgba(59, 130, 246, 0.18) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
}

@media (max-width: 767.98px) {
  body.operations-ui .main-wrapper .page-breadcrumb {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
  }

  body.operations-ui .main-wrapper .page-breadcrumb .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  body.operations-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.operations-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group {
    width: 100%;
  }

  body.operations-ui .main-wrapper .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.operations-ui .main-wrapper .card-header .d-flex > * {
    width: 100%;
  }

  body.operations-ui .main-wrapper .card-header .d-flex .btn,
  body.operations-ui .main-wrapper .card-header .d-flex .form-select {
    width: 100% !important;
  }

  body.operations-ui .main-wrapper .trip-type-card .icon {
    font-size: 36px !important;
  }

  body.operations-ui .main-wrapper .action-btn {
    min-width: auto !important;
    width: 100% !important;
  }
}

/* LR module standardization */
body.lr-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.lr-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.18);
}

body.lr-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

body.lr-ui .main-wrapper .card-header h5,
body.lr-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.lr-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.lr-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.lr-ui .main-wrapper .btn {
  min-height: 2.38rem;
}

body.lr-ui .main-wrapper .btn-sm,
body.lr-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.lr-ui .main-wrapper .form-control,
body.lr-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

/* LR pages use many local helper cards and timeline widgets */
body.lr-ui .main-wrapper .lr-card,
body.lr-ui .main-wrapper .request-card,
body.lr-ui .main-wrapper .trip-card,
body.lr-ui .main-wrapper .section-row > .card,
body.lr-ui .main-wrapper .items-card,
body.lr-ui .main-wrapper .bottom-row .card,
body.lr-ui .main-wrapper .compact-form .card,
body.lr-ui .main-wrapper .compact-form .card-header,
body.lr-ui .main-wrapper .compact-form .card-body,
body.lr-ui .main-wrapper .compact-form .table th,
body.lr-ui .main-wrapper .compact-form .table td,
body.lr-ui .main-wrapper .tracking-timeline,
body.lr-ui .main-wrapper .timeline-with-icons {
  border-radius: 12px !important;
}

body.lr-ui .main-wrapper .compact-form .form-label,
body.lr-ui .main-wrapper .compact-form .card-header h6,
body.lr-ui .main-wrapper .compact-form .table th,
body.lr-ui .main-wrapper .compact-form .table td,
body.lr-ui .main-wrapper .request-card,
body.lr-ui .main-wrapper .trip-card,
body.lr-ui .main-wrapper .lr-card {
  color: var(--ui-color-text-normal) !important;
}

body.lr-ui .main-wrapper .compact-form .form-control,
body.lr-ui .main-wrapper .compact-form .form-select,
body.lr-ui .main-wrapper .compact-form .table input,
body.lr-ui .main-wrapper .compact-form .table select {
  background-color: rgba(15, 23, 42, 0.28) !important;
  color: var(--ui-color-text-normal) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

body.lr-ui .main-wrapper .compact-form .form-control::placeholder,
body.lr-ui .main-wrapper .compact-form input::placeholder {
  color: #9fb0c8 !important;
  opacity: 1 !important;
}

body.lr-ui .main-wrapper .compact-form .card-header.bg-light {
  background: rgba(148, 163, 184, 0.14) !important;
}

body.lr-ui .main-wrapper .compact-form .table-light,
body.lr-ui .main-wrapper .compact-form .table-light th {
  background: rgba(148, 163, 184, 0.16) !important;
  color: var(--ui-color-text-normal) !important;
}

body.lr-ui .main-wrapper .compact-form .form-control[readonly],
body.lr-ui .main-wrapper .compact-form input[readonly] {
  background: rgba(148, 163, 184, 0.2) !important;
  color: var(--ui-color-text-normal) !important;
}

body.lr-ui .main-wrapper .total-box {
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.28);
}

body.lr-ui .main-wrapper .delivery-badge {
  font-size: 1.35rem !important;
}

body.lr-ui .main-wrapper .lr-number,
body.lr-ui .main-wrapper .trip-header,
body.lr-ui .main-wrapper .discount-amount {
  color: #60a5fa !important;
}

body.lr-ui .main-wrapper .from-branch {
  color: #f97316 !important;
}

body.lr-ui .main-wrapper .to-branch {
  color: #22c55e !important;
}

body.lr-ui .main-wrapper .lr-card:hover,
body.lr-ui .main-wrapper .trip-card:hover,
body.lr-ui .main-wrapper .request-card:hover {
  background-color: rgba(59, 130, 246, 0.08) !important;
}

body.lr-ui .main-wrapper .lr-card.selected,
body.lr-ui .main-wrapper .trip-card.selected,
body.lr-ui .main-wrapper tr.table-primary {
  background: rgba(59, 130, 246, 0.22) !important;
}

body.lr-ui .main-wrapper tr.table-warning {
  background: rgba(245, 158, 11, 0.26) !important;
}

body.lr-ui .main-wrapper .nav-tabs .nav-link,
body.lr-ui .main-wrapper .nav-pills .nav-link {
  color: #dbeafe !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

body.lr-ui .main-wrapper .nav-tabs .nav-link.active,
body.lr-ui .main-wrapper .nav-pills .nav-link.active {
  color: #f8fafc !important;
  background-color: rgba(59, 130, 246, 0.2) !important;
  border-color: rgba(96, 165, 250, 0.5) !important;
}

/* Ensure LR action icons/buttons remain visible on dark cards */
body.lr-ui .main-wrapper .btn i.material-icons-outlined,
body.lr-ui .main-wrapper .btn i.bx,
body.lr-ui .main-wrapper a.btn i.material-icons-outlined {
  vertical-align: middle;
}

body.lr-ui .main-wrapper .btn-outline-secondary {
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
  background: rgba(148, 163, 184, 0.1) !important;
}

body.lr-ui .main-wrapper .btn-outline-secondary:hover {
  color: #f8fafc !important;
  background: rgba(59, 130, 246, 0.34) !important;
  border-color: rgba(96, 165, 250, 0.78) !important;
}

/* LR modals: readable content with proper contrast */
body.lr-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.lr-ui .modal-content .modal-body,
body.lr-ui .modal-content .modal-footer,
body.lr-ui .modal-content .modal-body p,
body.lr-ui .modal-content .modal-body div,
body.lr-ui .modal-content .modal-body span,
body.lr-ui .modal-content .modal-body td,
body.lr-ui .modal-content .modal-body th,
body.lr-ui .modal-content .modal-body label,
body.lr-ui .modal-content .modal-title {
  color: #0f172a !important;
}

body.lr-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.lr-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

/* Tracking timeline readability */
body.lr-ui .main-wrapper .timeline-with-icons .timeline-item h5,
body.lr-ui .main-wrapper .timeline-with-icons .timeline-item .timeline-date,
body.lr-ui .main-wrapper .timeline-with-icons .timeline-item .timeline-desc {
  color: var(--ui-color-text-normal) !important;
}

body.lr-ui .main-wrapper .timeline-with-icons .timeline-item .timeline-icon {
  background: rgba(59, 130, 246, 0.18) !important;
  color: #dbeafe !important;
}

@media (max-width: 991.98px) {
  body.lr-ui .main-wrapper .compact-form .main-content {
    height: auto !important;
    min-height: auto !important;
  }
}

@media (max-width: 767.98px) {
  body.lr-ui .main-wrapper .page-breadcrumb {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
  }

  body.lr-ui .main-wrapper .page-breadcrumb .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  body.lr-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.lr-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group {
    width: 100%;
  }

  body.lr-ui .main-wrapper .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.lr-ui .main-wrapper .card-header .d-flex > * {
    width: 100%;
  }

  body.lr-ui .main-wrapper .card-header .d-flex .btn,
  body.lr-ui .main-wrapper .card-header .d-flex .form-select {
    width: 100% !important;
  }

  body.lr-ui .main-wrapper .delivery-badge {
    font-size: 1.2rem !important;
  }
}

/* Payments module standardization */
body.payments-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.payments-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
}

body.payments-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

body.payments-ui .main-wrapper .card-header h5,
body.payments-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.payments-ui .main-wrapper .summary-card,
body.payments-ui .main-wrapper .collection-card,
body.payments-ui .main-wrapper .reconcile-card,
body.payments-ui .main-wrapper .stats-card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body.payments-ui .main-wrapper .summary-card .text-muted,
body.payments-ui .main-wrapper .collection-card .text-muted,
body.payments-ui .main-wrapper .reconcile-card .text-muted {
  color: rgba(255, 255, 255, 0.86) !important;
}

body.payments-ui .main-wrapper .collection-card.total .text-muted,
body.payments-ui .main-wrapper .card.bg-light .text-muted,
body.payments-ui .main-wrapper .alert .text-muted {
  color: #64748b !important;
}

body.payments-ui .main-wrapper .form-control,
body.payments-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

body.payments-ui .main-wrapper .form-control-sm,
body.payments-ui .main-wrapper .form-select-sm {
  min-height: 2.05rem;
}

body.payments-ui .main-wrapper .btn {
  min-height: 2.36rem;
}

body.payments-ui .main-wrapper .btn-sm,
body.payments-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.payments-ui .main-wrapper .btn i.material-icons,
body.payments-ui .main-wrapper .btn i.material-icons-outlined,
body.payments-ui .main-wrapper .btn i.bx {
  vertical-align: middle;
}

body.payments-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.payments-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.payments-ui .main-wrapper .table thead.table-dark th,
body.payments-ui .main-wrapper .table thead.table-dark td {
  background: rgba(30, 58, 138, 0.9) !important;
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
}

body.payments-ui .main-wrapper .table thead.table-light th,
body.payments-ui .main-wrapper .table thead.table-light td {
  background: rgba(226, 232, 240, 0.95) !important;
  color: #0f172a !important;
}

body.payments-ui .main-wrapper .payment-method-badge,
body.payments-ui .main-wrapper .status-badge {
  font-size: 0.74rem !important;
  border-radius: 999px;
  padding: 0.35em 0.68em;
  font-weight: 700;
}

body.payments-ui .main-wrapper .badge[style*="background-color:#6f42c1"] {
  background-color: #6d28d9 !important;
  color: #f5f3ff !important;
}

body.payments-ui .main-wrapper .badge[style*="background-color:#0f766e"] {
  background-color: #0f766e !important;
  color: #ecfeff !important;
}

body.payments-ui .main-wrapper .nav-tabs .nav-link,
body.payments-ui .main-wrapper .nav-pills .nav-link {
  color: #dbeafe !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

body.payments-ui .main-wrapper .nav-tabs .nav-link.active,
body.payments-ui .main-wrapper .nav-pills .nav-link.active {
  color: #f8fafc !important;
  background: rgba(59, 130, 246, 0.22) !important;
  border-color: rgba(96, 165, 250, 0.52) !important;
}

body.payments-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.payments-ui .modal-content .modal-body,
body.payments-ui .modal-content .modal-footer,
body.payments-ui .modal-content .modal-body p,
body.payments-ui .modal-content .modal-body div,
body.payments-ui .modal-content .modal-body span,
body.payments-ui .modal-content .modal-body td,
body.payments-ui .modal-content .modal-body th,
body.payments-ui .modal-content .modal-body label,
body.payments-ui .modal-content .modal-title {
  color: #0f172a !important;
}

body.payments-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.payments-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body.payments-ui .status-card,
body.payments-ui .payment-info-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

body.payments-ui .qr-container {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 45px rgba(30, 41, 59, 0.35);
}

body.payments-ui .qr-mode-btn {
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.payments-ui .qr-mode-btn.active {
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.22);
}

body.payments-ui .online-receipt-page .receipt-toolbar,
body.payments-ui .online-receipt-page .receipt-card {
  border: 1px solid rgba(148, 163, 184, 0.3);
}

@media (max-width: 767.98px) {
  body.payments-ui .main-wrapper .page-breadcrumb {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
  }

  body.payments-ui .main-wrapper .page-breadcrumb .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  body.payments-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.payments-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group {
    width: 100%;
  }

  body.payments-ui .main-wrapper .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.payments-ui .main-wrapper .card-header .d-flex > * {
    width: 100%;
  }

  body.payments-ui .main-wrapper .card-header .d-flex .btn,
  body.payments-ui .main-wrapper .card-header .d-flex .form-select {
    width: 100% !important;
  }

  body.payments-ui .main-wrapper .table tbody td,
  body.payments-ui .main-wrapper .table thead th {
    font-size: 0.82rem;
  }

  body.payments-ui .main-wrapper .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  body.payments-ui .status-shell {
    margin: 18px auto;
  }

  body.payments-ui .status-body {
    padding: 20px;
  }

  body.payments-ui .status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  body.payments-ui .status-value {
    text-align: left;
  }

  body.payments-ui .qr-container {
    border-radius: 16px;
    padding: 20px;
  }

  body.payments-ui .payment-amount {
    font-size: 2rem;
  }

  body.payments-ui .upi-apps {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Accounts module standardization */
body.accounts-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.accounts-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
}

body.accounts-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

body.accounts-ui .main-wrapper .card-header h5,
body.accounts-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.accounts-ui .main-wrapper .summary-card,
body.accounts-ui .main-wrapper .account-header {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

body.accounts-ui .main-wrapper .summary-card .text-muted {
  color: rgba(255, 255, 255, 0.86) !important;
}

body.accounts-ui .main-wrapper .form-control,
body.accounts-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

body.accounts-ui .main-wrapper .form-control-sm,
body.accounts-ui .main-wrapper .form-select-sm {
  min-height: 2.05rem;
}

body.accounts-ui .main-wrapper .btn {
  min-height: 2.36rem;
}

body.accounts-ui .main-wrapper .btn-sm,
body.accounts-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.accounts-ui .main-wrapper .btn i.material-icons,
body.accounts-ui .main-wrapper .btn i.material-icons-outlined,
body.accounts-ui .main-wrapper .btn i.bx {
  vertical-align: middle;
}

body.accounts-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.accounts-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.accounts-ui .main-wrapper .table thead.table-dark th,
body.accounts-ui .main-wrapper .table thead.table-dark td {
  background: rgba(30, 58, 138, 0.9) !important;
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
}

body.accounts-ui .main-wrapper .table tfoot.table-secondary th,
body.accounts-ui .main-wrapper .table tfoot.table-secondary td {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

body.accounts-ui .main-wrapper .table tfoot.table-dark th,
body.accounts-ui .main-wrapper .table tfoot.table-dark td {
  background: rgba(30, 58, 138, 0.9) !important;
  color: #eff6ff !important;
}

body.accounts-ui .main-wrapper .account-type-badge,
body.accounts-ui .main-wrapper .voucher-type-badge {
  font-size: 0.74rem !important;
  border-radius: 999px;
  padding: 0.35em 0.68em;
  font-weight: 700;
}

body.accounts-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.accounts-ui .modal-content .modal-body,
body.accounts-ui .modal-content .modal-footer,
body.accounts-ui .modal-content .modal-body p,
body.accounts-ui .modal-content .modal-body div,
body.accounts-ui .modal-content .modal-body span,
body.accounts-ui .modal-content .modal-body td,
body.accounts-ui .modal-content .modal-body th,
body.accounts-ui .modal-content .modal-body label,
body.accounts-ui .modal-content .modal-title {
  color: #0f172a !important;
}

body.accounts-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.accounts-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

/* Masters module standardization */
body.masters-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.masters-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.16);
}

body.masters-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

body.masters-ui .main-wrapper .card-header h5,
body.masters-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.masters-ui .main-wrapper .form-control,
body.masters-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

body.masters-ui .main-wrapper .form-control-sm,
body.masters-ui .main-wrapper .form-select-sm {
  min-height: 2.05rem;
}

body.masters-ui .main-wrapper .btn {
  min-height: 2.36rem;
}

body.masters-ui .main-wrapper .btn-sm,
body.masters-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.masters-ui .main-wrapper .btn i.material-icons,
body.masters-ui .main-wrapper .btn i.material-icons-outlined,
body.masters-ui .main-wrapper .btn i.bx {
  vertical-align: middle;
}

body.masters-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.masters-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.masters-ui .main-wrapper .table thead.table-dark th,
body.masters-ui .main-wrapper .table thead.table-dark td {
  background: rgba(30, 58, 138, 0.9) !important;
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
}

body.masters-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.masters-ui .modal-content .modal-body,
body.masters-ui .modal-content .modal-footer,
body.masters-ui .modal-content .modal-body p,
body.masters-ui .modal-content .modal-body div,
body.masters-ui .modal-content .modal-body span,
body.masters-ui .modal-content .modal-body td,
body.masters-ui .modal-content .modal-body th,
body.masters-ui .modal-content .modal-body label,
body.masters-ui .modal-content .modal-title {
  color: #0f172a !important;
}

body.masters-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.masters-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

body.masters-ui .main-wrapper #searchInput[style*="width: 200px"] {
  width: min(220px, 100%) !important;
}

@media (max-width: 767.98px) {
  body.accounts-ui .main-wrapper .page-breadcrumb,
  body.masters-ui .main-wrapper .page-breadcrumb {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
  }

  body.accounts-ui .main-wrapper .page-breadcrumb .ms-auto,
  body.masters-ui .main-wrapper .page-breadcrumb .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  body.accounts-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.accounts-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group,
  body.masters-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.masters-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group {
    width: 100%;
  }

  body.accounts-ui .main-wrapper .card-header .d-flex,
  body.masters-ui .main-wrapper .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.accounts-ui .main-wrapper .card-header .d-flex > *,
  body.masters-ui .main-wrapper .card-header .d-flex > * {
    width: 100%;
  }

  body.accounts-ui .main-wrapper .card-header .d-flex .btn,
  body.accounts-ui .main-wrapper .card-header .d-flex .form-select,
  body.masters-ui .main-wrapper .card-header .d-flex .btn,
  body.masters-ui .main-wrapper .card-header .d-flex .form-select {
    width: 100% !important;
  }

  body.accounts-ui .main-wrapper .table tbody td,
  body.accounts-ui .main-wrapper .table thead th,
  body.masters-ui .main-wrapper .table tbody td,
  body.masters-ui .main-wrapper .table thead th {
    font-size: 0.82rem;
  }

  body.masters-ui .main-wrapper #searchInput[style*="width: 200px"] {
    width: 100% !important;
  }
}

/* Settings module standardization */
body.settings-ui .main-wrapper .page-breadcrumb .breadcrumb-title {
  font-size: 1rem;
  font-weight: 700;
}

body.settings-ui .main-wrapper .card {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 10px 18px rgba(2, 6, 23, 0.16);
}

body.settings-ui .main-wrapper .card-header {
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

body.settings-ui .main-wrapper .card-header h5,
body.settings-ui .main-wrapper .card-header h6 {
  font-size: 0.97rem;
  font-weight: 700;
}

body.settings-ui .main-wrapper .form-control,
body.settings-ui .main-wrapper .form-select {
  min-height: 2.42rem;
}

body.settings-ui .main-wrapper .form-control-sm,
body.settings-ui .main-wrapper .form-select-sm {
  min-height: 2.05rem;
}

body.settings-ui .main-wrapper .btn {
  min-height: 2.36rem;
}

body.settings-ui .main-wrapper .btn-sm,
body.settings-ui .main-wrapper .btn-group-sm > .btn {
  min-height: 2rem;
}

body.settings-ui .main-wrapper .btn i.material-icons,
body.settings-ui .main-wrapper .btn i.material-icons-outlined,
body.settings-ui .main-wrapper .btn i.bx {
  vertical-align: middle;
}

body.settings-ui .main-wrapper .table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

body.settings-ui .main-wrapper .table tbody td {
  font-size: 0.86rem;
  vertical-align: middle;
}

body.settings-ui .main-wrapper .table thead.table-dark th,
body.settings-ui .main-wrapper .table thead.table-dark td {
  background: rgba(30, 58, 138, 0.9) !important;
  color: #eff6ff !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
}

body.settings-ui .main-wrapper .nav-tabs .nav-link,
body.settings-ui .main-wrapper .nav-pills .nav-link {
  color: #dbeafe !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

body.settings-ui .main-wrapper .nav-tabs .nav-link.active,
body.settings-ui .main-wrapper .nav-pills .nav-link.active {
  color: #f8fafc !important;
  background: rgba(59, 130, 246, 0.22) !important;
  border-color: rgba(96, 165, 250, 0.52) !important;
}

body.settings-ui .main-wrapper .list-group-item {
  background: rgba(15, 23, 42, 0.26) !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

body.settings-ui .main-wrapper .list-group-item.active {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%) !important;
  border-color: rgba(125, 211, 252, 0.6) !important;
  color: #f8fafc !important;
}

body.settings-ui .main-wrapper .badge {
  font-size: 0.74rem !important;
}

body.settings-ui .main-wrapper .text-muted,
body.settings-ui .main-wrapper small.text-muted,
body.settings-ui .main-wrapper .small.text-muted {
  color: #b7c3d7 !important;
}

body.settings-ui .main-wrapper .card.bg-light,
body.settings-ui .main-wrapper .bg-light {
  color: #0f172a !important;
}

body.settings-ui .main-wrapper .card.bg-light .text-muted,
body.settings-ui .main-wrapper .bg-light .text-muted {
  color: #64748b !important;
}

body.settings-ui .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
}

body.settings-ui .modal-content .modal-body,
body.settings-ui .modal-content .modal-footer,
body.settings-ui .modal-content .modal-body p,
body.settings-ui .modal-content .modal-body div,
body.settings-ui .modal-content .modal-body span,
body.settings-ui .modal-content .modal-body td,
body.settings-ui .modal-content .modal-body th,
body.settings-ui .modal-content .modal-body label,
body.settings-ui .modal-content .modal-title {
  color: #0f172a !important;
}

body.settings-ui .modal-content .text-muted {
  color: #64748b !important;
}

body.settings-ui .modal-content .form-control,
body.settings-ui .modal-content .form-select,
body.settings-ui .modal-content textarea.form-control {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
}

body.settings-ui .modal-content .form-control::placeholder,
body.settings-ui .modal-content textarea.form-control::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

body.settings-ui .modal-content .form-control:focus,
body.settings-ui .modal-content .form-select:focus,
body.settings-ui .modal-content textarea.form-control:focus {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.18) !important;
}

body.settings-ui .modal-content .form-control:disabled,
body.settings-ui .modal-content .form-select:disabled {
  color: #64748b !important;
  background-color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

body.settings-ui .modal-content .form-select option {
  color: #0f172a !important;
  background-color: #ffffff !important;
}

/* Modal form controls: shared contrast normalization across modules */
body.reports-ui .modal-content .form-control,
body.reports-ui .modal-content .form-select,
body.reports-ui .modal-content textarea.form-control,
body.operations-ui .modal-content .form-control,
body.operations-ui .modal-content .form-select,
body.operations-ui .modal-content textarea.form-control,
body.lr-ui .modal-content .form-control,
body.lr-ui .modal-content .form-select,
body.lr-ui .modal-content textarea.form-control,
body.payments-ui .modal-content .form-control,
body.payments-ui .modal-content .form-select,
body.payments-ui .modal-content textarea.form-control,
body.accounts-ui .modal-content .form-control,
body.accounts-ui .modal-content .form-select,
body.accounts-ui .modal-content textarea.form-control,
body.masters-ui .modal-content .form-control,
body.masters-ui .modal-content .form-select,
body.masters-ui .modal-content textarea.form-control,
body.settings-ui .modal-content .form-control,
body.settings-ui .modal-content .form-select,
body.settings-ui .modal-content textarea.form-control {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
}

body.reports-ui .modal-content .form-control::placeholder,
body.reports-ui .modal-content textarea.form-control::placeholder,
body.operations-ui .modal-content .form-control::placeholder,
body.operations-ui .modal-content textarea.form-control::placeholder,
body.lr-ui .modal-content .form-control::placeholder,
body.lr-ui .modal-content textarea.form-control::placeholder,
body.payments-ui .modal-content .form-control::placeholder,
body.payments-ui .modal-content textarea.form-control::placeholder,
body.accounts-ui .modal-content .form-control::placeholder,
body.accounts-ui .modal-content textarea.form-control::placeholder,
body.masters-ui .modal-content .form-control::placeholder,
body.masters-ui .modal-content textarea.form-control::placeholder,
body.settings-ui .modal-content .form-control::placeholder,
body.settings-ui .modal-content textarea.form-control::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

body.reports-ui .modal-content .form-control:focus,
body.reports-ui .modal-content .form-select:focus,
body.reports-ui .modal-content textarea.form-control:focus,
body.operations-ui .modal-content .form-control:focus,
body.operations-ui .modal-content .form-select:focus,
body.operations-ui .modal-content textarea.form-control:focus,
body.lr-ui .modal-content .form-control:focus,
body.lr-ui .modal-content .form-select:focus,
body.lr-ui .modal-content textarea.form-control:focus,
body.payments-ui .modal-content .form-control:focus,
body.payments-ui .modal-content .form-select:focus,
body.payments-ui .modal-content textarea.form-control:focus,
body.accounts-ui .modal-content .form-control:focus,
body.accounts-ui .modal-content .form-select:focus,
body.accounts-ui .modal-content textarea.form-control:focus,
body.masters-ui .modal-content .form-control:focus,
body.masters-ui .modal-content .form-select:focus,
body.masters-ui .modal-content textarea.form-control:focus,
body.settings-ui .modal-content .form-control:focus,
body.settings-ui .modal-content .form-select:focus,
body.settings-ui .modal-content textarea.form-control:focus {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.18) !important;
}

body.reports-ui .modal-content .form-control:disabled,
body.reports-ui .modal-content .form-select:disabled,
body.operations-ui .modal-content .form-control:disabled,
body.operations-ui .modal-content .form-select:disabled,
body.lr-ui .modal-content .form-control:disabled,
body.lr-ui .modal-content .form-select:disabled,
body.payments-ui .modal-content .form-control:disabled,
body.payments-ui .modal-content .form-select:disabled,
body.accounts-ui .modal-content .form-control:disabled,
body.accounts-ui .modal-content .form-select:disabled,
body.masters-ui .modal-content .form-control:disabled,
body.masters-ui .modal-content .form-select:disabled,
body.settings-ui .modal-content .form-control:disabled,
body.settings-ui .modal-content .form-select:disabled {
  color: #64748b !important;
  background-color: #f1f5f9 !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
}

body.reports-ui .modal-content .form-select option,
body.operations-ui .modal-content .form-select option,
body.lr-ui .modal-content .form-select option,
body.payments-ui .modal-content .form-select option,
body.accounts-ui .modal-content .form-select option,
body.masters-ui .modal-content .form-select option,
body.settings-ui .modal-content .form-select option {
  color: #0f172a !important;
  background-color: #ffffff !important;
}

body.settings-ui .modal-content .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid rgba(148, 163, 184, 0.35) !important;
}

@media (max-width: 767.98px) {
  body.settings-ui .main-wrapper .page-breadcrumb {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
    gap: 0.45rem;
  }

  body.settings-ui .main-wrapper .page-breadcrumb .ms-auto {
    margin-left: 0 !important;
    width: 100%;
  }

  body.settings-ui .main-wrapper .page-breadcrumb .ms-auto .btn,
  body.settings-ui .main-wrapper .page-breadcrumb .ms-auto .btn-group {
    width: 100%;
  }

  body.settings-ui .main-wrapper .card-header .d-flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.settings-ui .main-wrapper .card-header .d-flex > * {
    width: 100%;
  }

  body.settings-ui .main-wrapper .card-header .d-flex .btn,
  body.settings-ui .main-wrapper .card-header .d-flex .form-select {
    width: 100% !important;
  }

  body.settings-ui .main-wrapper .table tbody td,
  body.settings-ui .main-wrapper .table thead th {
    font-size: 0.82rem;
  }
}
