* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

/* Main layout */
.app-layout,
.wrapper,
.main-wrapper {
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  align-self: stretch;
  background: #ffffff;
  color: #111827;
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.08);
  border-right: 1px solid #e5e7eb;
  z-index: 10;
  transition: all 0.25s ease;
}

.wm-sidebar-brand {
  padding: 12px;
}

.wm-brand-toggle {
  width: 100%;
  min-height: 46px;
  border: 0;
  background: #f8fafc;
  color: #111827;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.wm-brand-toggle:hover,
.wm-brand-toggle:focus {
  background: #e9f2ff;
  color: #0d6efd;
  box-shadow: 0 2px 10px rgba(156, 163, 175, 0.30);
}

.wm-brand-icon {
  width: 22px;
  min-width: 22px;
  text-align: center;
  font-size: 1.18rem;
  line-height: 1;
}

.wm-brand-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wm-brand-title,
.wm-brand-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav {
  width: 100%;
}

.sidebar a.nav-link {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111827 !important;
  border-radius: 8px;
  margin-bottom: 4px;
  padding: 9px 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar a.nav-link:hover {
  background-color: #e5e7eb;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.25);
}

.sidebar a.nav-link.active {
  width: 100%;
  background-color: #e9f2ff;
  color: #0d6efd !important;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(156, 163, 175, 0.30);
}

.sidebar .wm-nav-icon {
  width: 22px;
  min-width: 22px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
}

.sidebar .wm-nav-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .nav-link,
.sidebar a {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Full page height sidebar fix */
.wm-app-shell {
  width: 100%;
  min-height: 100vh;
  align-items: stretch;
}

.wm-app-shell > .sidebar {
  height: 100vh;
  min-height: 100vh;
  align-self: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.wm-app-shell > main {
  min-height: 100vh;
}

/* Main content */
.main-content,
.content,
.page-content,
main {
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.container,
.container-fluid,
.card,
.card-body {
  max-width: 100%;
}

/* Cards */
.card {
  max-width: 100%;
}

.card-body {
  overflow-x: auto;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
}

.table th,
.table td {
  vertical-align: middle;
  white-space: nowrap;
}

.table-responsive,
.card-body,
.wm-page-scroll,
.wm-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Tables should keep columns in one row and allow horizontal scroll */
table,
.table {
  width: max-content;
  min-width: 100%;
}

.table th,
.table td {
  white-space: nowrap;
}

/* Prevent forms/buttons/input groups from forcing full body scroll */
form,
.input-group,
.row {
  max-width: 100%;
}

/* Forms */
.form-control,
.form-select,
.btn {
  max-width: 100%;
}

.input-group {
  flex-wrap: nowrap;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* Dashboard cards/grid */
.dashboard-card,
.stat-card {
  width: 100%;
}

.wm-logout-btn {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}

/* Collapsed sidebar: only icons visible */
.sidebar.wm-sidebar-collapsed {
  width: 72px;
  min-width: 72px;
}

.sidebar.wm-sidebar-collapsed .wm-sidebar-brand {
  padding: 10px 8px;
}

.sidebar.wm-sidebar-collapsed .wm-brand-toggle {
  justify-content: center;
  padding: 10px 0;
  background: #e9f2ff;
  color: #0d6efd;
}

.sidebar.wm-sidebar-collapsed .wm-brand-text-wrap,
.sidebar.wm-sidebar-collapsed .wm-nav-text,
.sidebar.wm-sidebar-collapsed .wm-active-branch {
  display: none !important;
}

.sidebar.wm-sidebar-collapsed .nav {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.sidebar.wm-sidebar-collapsed a.nav-link {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

.sidebar.wm-sidebar-collapsed .wm-logout-box {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.sidebar.wm-sidebar-collapsed .wm-logout-btn {
  padding-left: 0;
  padding-right: 0;
  gap: 0;
}

.wm-inline-cell {
  cursor: pointer;
}
.wm-editing {
  outline: 2px solid rgba(13,110,253,0.35);
  background: #fff;
}


@media (max-width: 992px) {
  .sidebar,
  .sidebar.wm-sidebar-collapsed {
    position: relative;
    width: 100%;
    min-width: 100%;
    height: auto;
    min-height: auto;
  }

  .sidebar.wm-sidebar-collapsed .wm-brand-text-wrap,
  .sidebar.wm-sidebar-collapsed .wm-nav-text,
  .sidebar.wm-sidebar-collapsed .wm-active-branch {
    display: initial !important;
  }

  .sidebar.wm-sidebar-collapsed a.nav-link,
  .sidebar.wm-sidebar-collapsed .wm-brand-toggle,
  .sidebar.wm-sidebar-collapsed .wm-logout-btn {
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
  }
}

/* =========================================================
   TABLET RESPONSIVE
========================================================= */
@media (max-width: 991.98px) {
  .sidebar {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
  }

  .sidebar .menu-text,
  .sidebar .brand-text,
  .sidebar span:not(.icon) {
    display: none !important;
  }

  .main-content,
  .content,
  .page-content {
    width: calc(100% - 72px);
  }

  .container,
  .container-fluid {
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .row {
    margin-left: -6px;
    margin-right: -6px;
  }

  .row > * {
    padding-left: 6px;
    padding-right: 6px;
  }

  h1,
  .h1 {
    font-size: 1.5rem;
  }

  h2,
  .h2 {
    font-size: 1.25rem;
  }
}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */
/* ===============================
   MOBILE SIDEBAR FIX
================================ */

@media (max-width: 767.98px) {

  body {
    overflow-x: hidden !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 100vh !important;
    z-index: 2000 !important;
    background: #fff !important;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .sidebar.sidebar-open,
  .sidebar.open {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    z-index: 3000 !important;
  }

  .main-content,
  .content,
  .page-content,
  main {
    width: calc(100% - 64px) !important;
    max-width: calc(100% - 64px) !important;
    margin-left: 64px !important;
    padding: 12px !important;
    overflow-x: auto !important;
  }

  .card-body {
    overflow-x: auto !important;
  }

  table,
  .table {
    width: max-content;
    min-width: 100%;
  }

  .sidebar.sidebar-open ~ .main-content,
  .sidebar.sidebar-open ~ .content,
  .sidebar.sidebar-open ~ .page-content,
  .sidebar.open ~ .main-content,
  .sidebar.open ~ .content,
  .sidebar.open ~ .page-content {
    margin-left: 64px !important;
  }

  .sidebar .menu-text,
  .sidebar .brand-text,
  .sidebar .nav-text {
    display: none !important;
  }

  .sidebar.sidebar-open .menu-text,
  .sidebar.sidebar-open .brand-text,
  .sidebar.sidebar-open .nav-text,
  .sidebar.open .menu-text,
  .sidebar.open .brand-text,
  .sidebar.open .nav-text {
    display: inline-block !important;
  }

  .sidebar-backdrop {
    display: none;
  }

  .sidebar.sidebar-open + .sidebar-backdrop,
  .sidebar.open + .sidebar-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2500;
  }

    body:not(.mechanic-role) .wm-app-shell {
    display: block !important;
    width: 100% !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    z-index: 3000 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: translateX(0) !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open {
    width: 245px !important;
    min-width: 245px !important;
    max-width: 245px !important;
    box-shadow: 8px 0 25px rgba(15, 23, 42, .25) !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar .wm-brand-text-wrap,
  body:not(.mechanic-role) #wmSidebar.sidebar .wm-nav-text,
  body:not(.mechanic-role) #wmSidebar.sidebar .wm-active-branch {
    display: none !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .wm-brand-text-wrap,
  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .wm-nav-text,
  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .wm-active-branch {
    display: block !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar .wm-brand-toggle,
  body:not(.mechanic-role) #wmSidebar.sidebar .nav-link,
  body:not(.mechanic-role) #wmSidebar.sidebar .wm-logout-btn {
    justify-content: center !important;
    gap: 0 !important;
  }

  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .wm-brand-toggle,
  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .nav-link,
  body:not(.mechanic-role) #wmSidebar.sidebar.wm-mobile-open .wm-logout-btn {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  body:not(.mechanic-role) main {
    width: calc(100% - 64px) !important;
    max-width: calc(100% - 64px) !important;
    margin-left: 64px !important;
    padding: 8px !important;
  }

  body:not(.mechanic-role) #sidebarBackdrop {
    display: none !important;
  }

  body:not(.mechanic-role) #sidebarBackdrop.wm-backdrop-show {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, .42) !important;
    z-index: 2500 !important;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */
@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .main-content,
  .content,
  .page-content {
    margin-left: 58px;
    padding: 8px !important;
  }

  .sidebar {
    width: 58px;
    min-width: 58px;
    max-width: 58px;
  }

  .sidebar.open {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
  }

  .sidebar.open ~ .main-content,
  .sidebar.open ~ .content,
  .sidebar.open ~ .page-content {
    margin-left: 210px;
  }

  h1,
  .h1,
  .h4 {
    font-size: 1.15rem;
  }

  .btn {
    width: auto;
  }

  .table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 5px;
  }
}

/* =========================================================
   PRINT SHOULD NOT BE AFFECTED
========================================================= */
@media print {
  .sidebar,
  .navbar,
  .no-print {
    display: none !important;
  }

  .main-content,
  .content,
  .page-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* LOGIN FORM WIDTH FIX */
.wm-login-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wm-login-card-wrap {
  width: 100%;
  max-width: 420px !important;
  margin: 0 auto !important;
}

.wm-login-card {
  width: 100%;
  border-radius: 14px;
}

/* Laptop */
@media (max-width: 1400px) {
  .wm-login-card-wrap {
    max-width: 420px !important;
  }
}

/* Tablet */
@media (max-width: 992px) {
  .wm-login-card-wrap {
    max-width: 400px !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .wm-login-page {
    padding: 14px !important;
  }

  .wm-login-card-wrap {
    max-width: 340px !important;
  }
}

@media (max-width: 767.98px) {
  .main-content:has(.wm-login-page),
  .content:has(.wm-login-page),
  .page-content:has(.wm-login-page),
  main:has(.wm-login-page) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .wm-login-page {
    width: 100vw !important;
    min-height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px !important;
    margin: 0 !important;
  }

  .wm-login-card-wrap {
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }
}
/* =========================================================
   LOGIN BACKGROUND ANIMATION - PROFESSIONAL LOOK
   Add-only CSS. Existing login form code remains unchanged.
========================================================= */
body:has(.wm-login-page) {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.24), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(16, 185, 129, 0.20), transparent 30%),
    radial-gradient(circle at 50% 92%, rgba(99, 102, 241, 0.18), transparent 32%),
    linear-gradient(135deg, #f8fafc 0%, #eef6ff 45%, #f7fffb 100%) !important;
}

.wm-login-page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.wm-login-page::before,
.wm-login-page::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  z-index: -2;
  filter: blur(2px);
  opacity: 0.65;
  animation: wm-login-float 9s ease-in-out infinite;
}

.wm-login-page::before {
  left: -120px;
  top: -95px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.10));
}

.wm-login-page::after {
  right: -130px;
  bottom: -120px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(59, 130, 246, 0.12));
  animation-delay: -3s;
}

.wm-login-card-wrap {
  position: relative;
  z-index: 1;
}

.wm-login-card-wrap::before {
  content: "";
  position: absolute;
  inset: -95px -80px;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle, #000 0%, transparent 72%);
  animation: wm-login-grid-move 18s linear infinite;
}

.wm-login-card {
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16) !important;
}

.wm-login-card::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, #2563eb, #22c55e, #0ea5e9);
  background-size: 220% 100%;
  animation: wm-login-line 4s ease-in-out infinite;
}

@keyframes wm-login-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(22px, 18px, 0) scale(1.07);
  }
}

@keyframes wm-login-grid-move {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 68px 68px, 68px 68px;
  }
}

@keyframes wm-login-line {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (max-width: 767.98px) {
  .wm-login-page::before,
  .wm-login-page::after {
    width: 240px;
    height: 240px;
  }

  .wm-login-card-wrap::before {
    inset: -55px -40px;
    background-size: 26px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wm-login-page::before,
  .wm-login-page::after,
  .wm-login-card-wrap::before,
  .wm-login-card::before {
    animation: none !important;
  }
}

/* =========================================================
   Login Page Professional Enhancement (Add-on only)
   - Keeps existing HTML/PHP/login logic unchanged
   - Adds premium animated background, card glow, and subtle UI polish
   ========================================================= */
.wm-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.20), transparent 32%),
    radial-gradient(circle at 82% 76%, rgba(34, 197, 94, 0.18), transparent 34%),
    linear-gradient(135deg, #f8fafc 0%, #eef6ff 45%, #f7fffb 100%) !important;
}

.wm-login-page > * {
  position: relative;
  z-index: 2;
}

.wm-login-page .container,
.wm-login-page .container-fluid {
  position: relative;
  z-index: 2;
}

.wm-login-page::before {
  box-shadow:
    0 0 90px rgba(37, 99, 235, 0.18),
    inset 0 0 70px rgba(255, 255, 255, 0.30);
}

.wm-login-page::after {
  box-shadow:
    0 0 95px rgba(34, 197, 94, 0.16),
    inset 0 0 70px rgba(255, 255, 255, 0.28);
}

.wm-login-card-wrap::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -70px;
  top: -60px;
  z-index: -1;
  pointer-events: none;
  border-radius: 40px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(34, 197, 94, 0.12));
  transform: rotate(18deg);
  filter: blur(0.2px);
  animation: wm-login-diamond 8s ease-in-out infinite;
}

.wm-login-card {
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.wm-login-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.18) !important;
  box-shadow: 0 30px 85px rgba(15, 23, 42, 0.20) !important;
}

.wm-login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 36%,
    rgba(255, 255, 255, 0.38) 46%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-130%);
  animation: wm-login-card-shine 7s ease-in-out infinite;
}

.wm-login-card .form-control,
.wm-login-card .form-select {
  border-color: rgba(148, 163, 184, 0.45);
  background-color: rgba(255, 255, 255, 0.82);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.wm-login-card .form-control:focus,
.wm-login-card .form-select:focus {
  border-color: rgba(37, 99, 235, 0.58);
  background-color: #ffffff;
  box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.12);
}

.wm-login-card .btn-primary,
.wm-login-card button[type="submit"] {
  position: relative;
  overflow: hidden;
  border: 0;
  background-image: linear-gradient(90deg, #2563eb, #0ea5e9, #22c55e) !important;
  background-size: 220% 100%;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-position 0.35s ease;
}

.wm-login-card .btn-primary:hover,
.wm-login-card button[type="submit"]:hover {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.wm-login-card .btn-primary:active,
.wm-login-card button[type="submit"]:active {
  transform: translateY(0);
}

.wm-login-card a {
  transition: color 0.18s ease, opacity 0.18s ease;
}

.wm-login-card a:hover {
  opacity: 0.82;
}

@keyframes wm-login-diamond {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(18deg) scale(1);
  }
  50% {
    transform: translate3d(-16px, 18px, 0) rotate(28deg) scale(1.05);
  }
}

@keyframes wm-login-card-shine {
  0%, 42% {
    transform: translateX(-130%);
  }
  62%, 100% {
    transform: translateX(130%);
  }
}

@media (max-width: 767.98px) {
  .wm-login-card-wrap::after {
    width: 115px;
    height: 115px;
    right: -35px;
    top: -35px;
  }

  .wm-login-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wm-login-card-wrap::after,
  .wm-login-card::after {
    animation: none !important;
  }

  .wm-login-card,
  .wm-login-card .btn-primary,
  .wm-login-card button[type="submit"],
  .wm-login-card .form-control,
  .wm-login-card .form-select {
    transition: none !important;
  }
}

/* =========================================================
   Premium light UI refresh
   Centralized design-only overrides for the admin workspace.
========================================================= */
:root {
  --wm-page-bg: #f8fbff;
  --wm-surface: #ffffff;
  --wm-surface-soft: #f3f7fb;
  --wm-border: #e3eaf3;
  --wm-border-strong: #d6e1ee;
  --wm-text: #172033;
  --wm-muted: #667085;
  --wm-primary: #3b82f6;
  --wm-primary-2: #2563eb;
  --wm-success: #10b981;
  --wm-warning: #f59e0b;
  --wm-danger: #ef4444;
  --wm-info: #06b6d4;
  --wm-radius: 14px;
  --wm-radius-sm: 10px;
  --wm-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --wm-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
  --wm-focus: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
}

html {
  background: var(--wm-page-bg);
}

body,
body.bg-light {
  color: var(--wm-text);
  background:
    linear-gradient(180deg, #ffffff 0%, var(--wm-page-bg) 380px),
    var(--wm-page-bg) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: #1d4ed8;
}

a:hover {
  color: #0f766e;
}

.text-muted {
  color: var(--wm-muted) !important;
}

.wm-app-shell > main {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 34rem),
    var(--wm-page-bg);
}

main > .container-fluid {
  padding: 8px 10px 22px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: #111827;
  letter-spacing: 0;
}

/* Sidebar */
.sidebar,
.sidebar.bg-white {
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f9fe 52%, #eef6ff 100%) !important;
  border-right: 1px solid rgba(214, 225, 238, 0.95);
  box-shadow: 10px 0 30px rgba(15, 23, 42, 0.07);
}

.wm-sidebar-brand {
  padding: 14px 12px;
  border-bottom-color: rgba(214, 225, 238, 0.9) !important;
}

.wm-brand-toggle {
  min-height: 52px;
  border: 1px solid rgba(214, 225, 238, 0.9);
  background: rgba(255, 255, 255, 0.86);
  color: #101828;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.wm-brand-toggle:hover,
.wm-brand-toggle:focus {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.13);
}

.wm-brand-icon,
.sidebar .wm-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wm-brand-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.wm-brand-title {
  color: #111827;
  line-height: 1.15;
}

.wm-brand-role {
  margin-top: 2px;
  color: #64748b !important;
}

.sidebar .nav {
  gap: 4px;
}

.sidebar a.nav-link {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #263143 !important;
  font-weight: 600;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.sidebar a.nav-link:hover {
  color: #1d4ed8 !important;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(191, 219, 254, 0.9);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.09);
  transform: translateX(2px);
}

.sidebar a.nav-link.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.sidebar a.nav-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 4px;
  height: 24px;
  border-radius: 999px;
  background: #22c55e;
  transform: translateY(-50%);
}

.sidebar .wm-nav-icon {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #2563eb;
  background: #eaf3ff;
}

.sidebar a.nav-link.active .wm-nav-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.wm-active-branch {
  margin: 10px 12px !important;
  padding: 10px 12px !important;
  color: #065f46 !important;
  background: linear-gradient(135deg, #dcfce7, #e0f2fe) !important;
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.wm-logout-btn {
  border: 1px solid #d7e2ef !important;
  color: #334155 !important;
  background: #ffffff !important;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.wm-logout-btn:hover {
  color: #b91c1c !important;
  background: #fff5f5 !important;
  border-color: #fecaca !important;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.11);
}

.sidebar.wm-sidebar-collapsed .wm-brand-toggle {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.sidebar.wm-sidebar-collapsed .wm-brand-icon {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

/* Cards, panels, and alerts */
.card {
  border: 1px solid var(--wm-border);
  border-radius: var(--wm-radius);
  background: var(--wm-surface);
  box-shadow: var(--wm-shadow-soft) !important;
}

.card:hover {
  box-shadow: var(--wm-shadow) !important;
}

.card-header,
.card-footer,
.card-header.bg-white,
.card-footer.bg-white {
  border-color: var(--wm-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.card-header {
  color: #172033;
  font-weight: 700;
}

.card-body {
  color: #263143;
}

.alert {
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.alert-info {
  color: #155e75;
  background: #ecfeff;
  border-color: #bae6fd;
}

.alert-success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.alert-warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.alert-danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Forms */
.form-label {
  color: #334155;
  font-weight: 650;
}

.form-text {
  color: #7b8797;
}

.form-control,
.form-select {
  border-color: #d9e4ef;
  border-radius: 10px;
  color: #1f2937;
  background-color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control-sm,
.form-select-sm {
  border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: var(--wm-focus);
}

.input-group-text {
  border-color: #d9e4ef;
  background: #f7faff;
  color: #475569;
  border-radius: 10px;
}

.form-check-input {
  border-color: #b8c6d8;
}

.form-check-input:checked {
  background-color: var(--wm-primary);
  border-color: var(--wm-primary);
}

/* Buttons */
.btn {
  border-radius: 10px;
  font-weight: 650;
  letter-spacing: 0;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-position 0.24s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover:not(:disabled):not(.disabled) {
  transform: translateY(-1px);
}

.btn:focus-visible {
  box-shadow: var(--wm-focus) !important;
}

.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
  border: 0;
  color: #ffffff;
  background-size: 220% 100%;
}

.btn-primary {
  background-image: linear-gradient(135deg, #2563eb, #0ea5e9, #22c55e);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-success {
  background-image: linear-gradient(135deg, #16a34a, #22c55e, #14b8a6);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.18);
}

.btn-info {
  background-image: linear-gradient(135deg, #0891b2, #06b6d4, #38bdf8);
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.17);
}

.btn-warning {
  color: #422006;
  background-image: linear-gradient(135deg, #facc15, #f59e0b, #fb923c);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.18);
}

.btn-danger {
  background-image: linear-gradient(135deg, #dc2626, #ef4444, #f97316);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.btn-primary:hover,
.btn-success:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-danger:hover {
  color: #ffffff;
  background-position: 100% 50%;
}

.btn-warning:hover {
  color: #422006;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-dark {
  background: #ffffff;
  border-color: #d7e2ef;
  color: #334155;
}

.btn-outline-primary:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.btn-outline-secondary:hover,
.btn-outline-dark:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #475569, #64748b);
  box-shadow: 0 10px 20px rgba(71, 85, 105, 0.16);
}

.btn-outline-success:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.16);
}

.btn-outline-info:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  box-shadow: 0 10px 20px rgba(8, 145, 178, 0.16);
}

.btn-outline-warning:hover {
  color: #422006;
  border-color: transparent;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.16);
}

.btn-outline-danger:hover {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.16);
}

.btn-sm {
  border-radius: 9px;
}

.btn.disabled,
.btn:disabled {
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.62;
}

/* Tables */
.table-responsive {
  border-radius: 12px;
}

.table {
  --bs-table-color: #263143;
  --bs-table-bg: #ffffff;
  --bs-table-border-color: #e3eaf3;
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.72rem 0.78rem;
  border-bottom-color: #e7eef7;
}

.table-sm > :not(caption) > * > * {
  padding: 0.52rem 0.62rem;
}

.table thead th,
.table-light th {
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%) !important;
  border-bottom: 1px solid #d8e5f3;
}

.table-hover tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.table-hover tbody tr:hover > * {
  background-color: #f5faff;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #fbfdff;
}

.table-bordered {
  border-color: #e3eaf3;
}

.wm-inline-cell:hover {
  background: #eff6ff;
  border-radius: 8px;
}

.wm-editing {
  border-radius: 8px;
  outline: 2px solid rgba(37, 99, 235, 0.25);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

/* Badges and compact status labels */
.badge {
  border-radius: 999px;
  padding: 0.42em 0.68em;
  font-weight: 750;
  letter-spacing: 0;
}

.badge.bg-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
}

.badge.bg-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
}

.badge.bg-secondary {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

/* Dashboard */
.dashboard-page > .d-flex:first-child {
  padding: 14px 16px;
  border: 1px solid var(--wm-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--wm-shadow-soft);
}

.dashboard-page .dashboard-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 140px;
  border: 0;
  border-radius: 18px;
  color: #ffffff;
  isolation: isolate;
}

.dashboard-page .dashboard-stat-card::before {
  content: "";
  position: absolute;
  inset: -35% -18% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  z-index: -1;
}

.dashboard-page .dashboard-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -54px auto;
  width: 132px;
  height: 132px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(18deg);
  z-index: -1;
}

.dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(1) .dashboard-stat-card {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(2) .dashboard-stat-card {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(3) .dashboard-stat-card {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.dashboard-page .dashboard-stat-card .text-muted,
.dashboard-page .dashboard-stat-card .display-6 {
  color: #ffffff !important;
}

.dashboard-page .dashboard-stat-card .text-muted {
  opacity: 0.86;
  font-weight: 700;
}

.dashboard-page .dashboard-stat-card .display-6 {
  text-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.dashboard-page .dashboard-stat-icon {
  width: 58px;
  min-width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 1.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.dashboard-page .quick-actions-grid {
  align-items: stretch;
}

.dashboard-page .quick-action-btn {
  min-height: 48px;
  align-items: center;
  border-radius: 13px;
  padding: 0.72rem 0.85rem;
  background: #ffffff;
}

.dashboard-page .quick-action-btn.completed-jobcard-btn {
  background: linear-gradient(135deg, #7c3aed, #5b21b6) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(124,58,237,0.30) !important;
}

.dashboard-page .quick-action-btn.completed-jobcard-btn i {
  background: rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}

.dashboard-page .quick-action-btn.completed-jobcard-btn:hover {
  background: linear-gradient(135deg, #6d28d9, #4c1d95) !important;
  transform: translateY(-2px);
}

.dashboard-page .quick-action-btn.def-btn{
    background: linear-gradient(135deg,#0f766e,#14b8a6) !important;
    color:#fff !important;
    box-shadow:0 8px 20px rgba(20,184,166,.30) !important;
    transition:all .25s ease;
}

.dashboard-page .quick-action-btn.def-btn i{
    background:rgba(255,255,255,.18) !important;
    color:#fff !important;
}

.dashboard-page .quick-action-btn.def-btn:hover{
    background:linear-gradient(135deg,#115e59,#0f766e) !important;
    color:#fff !important;
    transform:translateY(-2px);
    box-shadow:0 12px 24px rgba(15,118,110,.40) !important;
}

.dashboard-page .quick-action-btn.def-btn:focus{
    color:#fff !important;
}

.dashboard-page .quick-action-btn i {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #eff6ff;
  color: #2563eb;
}

.dashboard-page .quick-action-btn:hover i {
  color: inherit;
  background: rgba(255, 255, 255, 0.2);
}

.wm-analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--wm-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--wm-shadow-soft);
}

.wm-analytics-section {
  padding: 14px;
  border: 1px solid rgba(227, 234, 243, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.wm-analytics-section h3,
.wm-chart-section h2,
.wm-chart-card h3 {
  color: #172033;
  font-weight: 800;
}

.wm-analytics-card {
  position: relative;
  min-height: 124px;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 18px;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
  isolation: isolate;
}

.wm-analytics-card::before {
  content: "";
  position: absolute;
  right: -48px;
  top: -52px;
  width: 136px;
  height: 136px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  z-index: -1;
}

.wm-analytics-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(20deg);
  z-index: -1;
}

.wm-analytics-card-copy {
  min-width: 0;
}

.wm-analytics-label {
  font-size: 0.78rem;
  font-weight: 750;
  opacity: 0.88;
}

.wm-analytics-value {
  margin-top: 8px;
  font-size: 1.48rem;
  line-height: 1.12;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.wm-analytics-hint {
  margin-top: 7px;
  font-size: 0.75rem;
  opacity: 0.82;
}

.wm-analytics-icon {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.28rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.wm-tone-blue {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.wm-tone-cyan {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.wm-tone-green {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.wm-tone-amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.wm-tone-red {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.wm-tone-violet {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.wm-tone-slate {
  background: linear-gradient(135deg, #475569, #0f766e);
}

.wm-chart-card {
  min-height: 100%;
}

.wm-chart-card .card-body {
  overflow: hidden;
}

.wm-chart-card canvas {
  width: 100% !important;
  max-height: 320px;
}

/* Dropdown and autocomplete suggestion panels */
.wm-part-suggest-box,
.wm-problem-suggest-box,
.wm-vendor-suggest-box,
.wm-gate-vehicle-suggest-box {
  border-color: #d7e2ef !important;
  border-radius: 12px !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
}

.wm-part-suggest-item,
.wm-problem-suggest-item,
.wm-vendor-suggest-item,
.wm-gate-vehicle-suggest-item {
  border-bottom-color: #edf2f7 !important;
}

.wm-part-suggest-item:hover,
.wm-part-suggest-item.active,
.wm-problem-suggest-item:hover,
.wm-problem-suggest-item.active,
.wm-vendor-suggest-item:hover,
.wm-vendor-suggest-item.active,
.wm-gate-vehicle-suggest-item:hover {
  background: #eff6ff !important;
}

/* Public and mechanic-focused screens */
.outside-work-public-card,
.mechanic-detail-card,
.assigned-card,
.mechanic-breakdown-card {
  border-color: var(--wm-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--wm-shadow-soft) !important;
}

body.mechanic-role .mechanic-page,
body.mechanic-role .mechanic-breakdown-page {
  background:
    radial-gradient(circle at 8% 12%, rgba(37, 99, 235, 0.1), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.1), transparent 22rem),
    #f8fbff !important;
}

body.mechanic-role .mechanic-title {
  color: #111827 !important;
  border-bottom-color: var(--wm-border) !important;
}

body.mechanic-role .mechanic-card {
  border: 1px solid var(--wm-border) !important;
  border-radius: 22px !important;
  background: #ffffff !important;
  box-shadow: var(--wm-shadow-soft) !important;
}

body.mechanic-role .mechanic-card:hover {
  box-shadow: var(--wm-shadow) !important;
  transform: translateY(-3px);
}

body.mechanic-role .mechanic-icon {
  color: #ffffff !important;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.14);
}

body.mechanic-role .mechanic-icon.blue {
  background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
}

body.mechanic-role .mechanic-icon.green {
  background: linear-gradient(135deg, #16a34a, #14b8a6) !important;
}

body.mechanic-role .mechanic-icon.yellow {
  background: linear-gradient(135deg, #facc15, #f59e0b) !important;
  color: #422006 !important;
}

body.mechanic-role .mechanic-icon.gray {
  background: linear-gradient(135deg, #64748b, #334155) !important;
}

body.mechanic-role .mechanic-card-title {
  color: #111827 !important;
}

body.mechanic-role .mechanic-card-subtitle {
  color: #64748b !important;
}

.mechanic-breakdown-card {
  background: #ffffff !important;
}

.mechanic-action-row .btn {
  white-space: nowrap;
}

/* Modal polish */
.modal-content {
  border: 1px solid var(--wm-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.modal-header,
.modal-footer {
  border-color: var(--wm-border);
}

/* Responsive refinements */
@media (min-width: 1200px) {
  main > .container-fluid {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 991.98px) {
  .wm-app-shell {
    display: block !important;
  }

  .sidebar,
  .sidebar.wm-sidebar-collapsed {
    position: sticky;
    top: 0;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    min-height: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--wm-border);
  }

  .sidebar .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px !important;
  }

  .sidebar a.nav-link {
    margin-bottom: 0;
  }

  .sidebar .wm-brand-text-wrap,
  .sidebar .wm-nav-text,
  .sidebar.wm-sidebar-collapsed .wm-brand-text-wrap,
  .sidebar.wm-sidebar-collapsed .wm-nav-text,
  .sidebar.wm-sidebar-collapsed .wm-active-branch {
    display: flex !important;
  }

  .sidebar .wm-nav-text,
  .sidebar.wm-sidebar-collapsed .wm-nav-text {
    display: inline !important;
  }

  .sidebar.wm-sidebar-collapsed .nav {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .sidebar.wm-sidebar-collapsed a.nav-link,
  .sidebar.wm-sidebar-collapsed .wm-brand-toggle,
  .sidebar.wm-sidebar-collapsed .wm-logout-btn {
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
  }

  .main-content,
  .content,
  .page-content,
  main {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding: 12px !important;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: 14px;
  }

  main > .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar,
  .sidebar.wm-sidebar-collapsed {
    position: relative !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    z-index: 20 !important;
    overflow: visible !important;
  }

  .sidebar .nav {
    grid-template-columns: 1fr;
    max-height: 46vh;
    overflow-y: auto;
  }

  .sidebar .menu-text,
  .sidebar .brand-text,
  .sidebar .nav-text,
  .sidebar span:not(.icon),
  .sidebar .wm-brand-text-wrap,
  .sidebar .wm-nav-text {
    display: flex !important;
  }

  .sidebar .wm-nav-text {
    display: inline !important;
  }

  .sidebar-backdrop {
    display: none !important;
  }

  .dashboard-page > .d-flex:first-child {
    padding: 12px;
  }

  .dashboard-page .dashboard-stat-card {
    min-height: 118px;
  }

  .dashboard-page .dashboard-stat-icon {
    width: 46px;
    min-width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 1.28rem;
  }

  .wm-analytics-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .wm-analytics-section {
    padding: 12px;
    border-radius: 15px;
  }

  .wm-analytics-card {
    min-height: 112px;
    padding: 14px;
    border-radius: 15px;
  }

  .wm-analytics-value {
    font-size: 1.28rem;
  }

  .wm-analytics-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.08rem;
  }

  .wm-chart-card canvas {
    max-height: 260px;
  }

  .card {
    border-radius: 13px;
  }

  .card-body {
    padding: 14px;
  }

  .table > :not(caption) > * > * {
    padding: 0.54rem 0.58rem;
  }

  .btn,
  .form-control,
  .form-select {
    min-height: 40px;
  }

  .btn-sm,
  .form-control-sm,
  .form-select-sm {
    min-height: 34px;
  }

  .d-flex.flex-wrap.justify-content-between,
  .d-flex.flex-column.flex-md-row,
  .d-flex.flex-column.flex-lg-row {
    gap: 0.65rem !important;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .dashboard-page .display-6 {
    font-size: 1.75rem;
  }

  .sidebar .nav {
    max-height: 52vh;
  }
}

@media (max-width: 991.98px) {
  .sidebar span:not(.icon) {
    display: initial !important;
  }

  .sidebar .wm-brand-text-wrap,
  .sidebar.wm-sidebar-collapsed .wm-brand-text-wrap {
    display: flex !important;
  }

  .sidebar .wm-brand-title,
  .sidebar .wm-brand-role {
    display: block !important;
  }

  .sidebar .wm-nav-text,
  .sidebar.wm-sidebar-collapsed .wm-nav-text {
    display: inline !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  .sidebar a.nav-link,
  .wm-brand-toggle {
    transition: none !important;
  }

  .btn:hover:not(:disabled):not(.disabled),
  .sidebar a.nav-link:hover,
  body.mechanic-role .mechanic-card:hover {
    transform: none !important;
  }
}

/* Jobcard admin/superwiser popup action buttons */
.wm-jobcard-action-panel {
  border-top: 4px solid #2563eb !important;
}
.wm-action-btn {
  border: 0;
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px;
  padding: .55rem 1rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
.wm-action-trial { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.wm-action-parts { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.wm-action-labour { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.wm-action-vendor { background: linear-gradient(135deg, #059669, #84cc16); }
.wm-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}
.wm-action-estimate-print {
  color: #fff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #111827, #475569);
  box-shadow: 0 6px 14px rgba(17, 24, 39, .22);
}

.wm-action-estimate-print:hover {
  color: #fff !important;
  transform: translateY(-1px);
}

.wm-action-part-print{
    background: #0d6efd;
    color: #fff !important;
    border: 1px solid #0d6efd;
}

.wm-action-part-print:hover{
    background: #0b5ed7;
    color: #fff !important;
    border-color: #0a58ca;
}

@media (max-width: 575.98px) {
  .wm-action-btn {
    width: 100%;
    padding: .75rem 1rem;
    font-size: .92rem;
  }
}

/* Hide duplicate inline add sections when admin/super_wiser popup buttons are active */
.wm-modal-only-section {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Hide only inline add forms */
.wm-modal-only-section > form:not(.modal form),
.wm-modal-only-section > .collapse,
.wm-modal-only-section > .text-muted.small {
  display: none !important;
}

/* KEEP DATA TABLES VISIBLE */
.wm-modal-only-section > .table-responsive {
  display: block !important;
}

/* Admin / Superwiser separate sidebar + page scroll */
@media (min-width: 992px) {
  body.role-admin,
  body.role-super-wiser,
  body.role-superwiser {
    height: 100vh;
    overflow: hidden !important;
  }

  body.role-admin .wm-app-shell,
  body.role-super-wiser .wm-app-shell,
  body.role-superwiser .wm-app-shell {
    height: 100vh;
    overflow: hidden !important;
  }

  body.role-admin #wmSidebar,
  body.role-super-wiser #wmSidebar,
  body.role-superwiser #wmSidebar {
    height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: sticky;
    top: 0;
    flex-shrink: 0;
  }

  body.role-admin .wm-app-shell > main,
  body.role-super-wiser .wm-app-shell > main,
  body.role-superwiser .wm-app-shell > main {
    height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.role-admin #wmSidebar::-webkit-scrollbar,
  body.role-super-wiser #wmSidebar::-webkit-scrollbar,
  body.role-superwiser #wmSidebar::-webkit-scrollbar {
    width: 6px;
  }

  body.role-admin #wmSidebar::-webkit-scrollbar-thumb,
  body.role-super-wiser #wmSidebar::-webkit-scrollbar-thumb,
  body.role-superwiser #wmSidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
  }
}

/* Highlight currently opened jobcard row */
.wm-active-jobcard-row {
  background: linear-gradient(90deg, #e0f2fe 0%, #f8fafc 100%) !important;
  border-top: 4px solid #2563eb !important;
  box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.06);
}

.wm-active-jobcard-row td {
  background: transparent !important;
  font-weight: 600;
}

.wm-active-jobcard-row td:first-child a {
  color: #1d4ed8 !important;
  font-weight: 800;
  text-decoration: none;
}

.wm-active-jobcard-row td:first-child::before {
  content: "OPEN";
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

/* Jobcard action data sections - clean left color strip only */
.wm-jobcard-action-data-card {
  position: relative;
  border: 1px solid #e3eaf3 !important;
  border-top-width: 4px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  padding: 16px !important;
  margin-bottom: 18px !important;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Trial Token - same button color */
.wm-trial-token-section {
  border-top-color: #f59e0b !important;
}

/* Product / Part - same button color */
.wm-product-part-section {
  border-top-color: #de5cffd7 !important;
}

/* Labour / Helper - same button color */
/* .wm-labour-helper-section {
  border-top-color: #7c3aed !important;
} */

/* Outside Work / Vendor Bills - same button color */
.wm-outside-vendor-section {
  border-top-color: #059669 !important;
}


/* Keep table normal, no heavy full border */
.wm-jobcard-action-data-card .table-responsive {
  border: 0 !important;
  border-radius: 14px !important;
  overflow-x: auto !important;
}

.wm-jobcard-action-data-card .table-responsive {
  border-radius: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  overflow-x: auto !important;
}

.wm-trial-token-section .table-responsive {
  border-color: rgba(245, 158, 11, 0.45) !important;
}

.wm-labour-helper-section .table-responsive {
  border-color: rgba(124, 58, 237, 0.45) !important;
}

.wm-outside-vendor-section .table-responsive {
  border-color: rgba(5, 150, 105, 0.45) !important;
}

.wm-product-part-section .table-responsive {
  border-color: rgba(37, 99, 235, 0.45) !important;
}

/* Sidebar scroll should stay inside sidebar, not reset to top after route click */
#wmSidebar {
  scrollbar-width: thin;
}

/* =========================================================
   Premium light UI redesign
   Design-only override layer. Layout, PHP, JS, and markup remain unchanged.
========================================================= */
@media screen {
  :root {
    --wm-page-bg: #f8fbff;
    --wm-surface: #ffffff;
    --wm-surface-soft: #f3f7fb;
    --wm-surface-hover: #eef6ff;
    --wm-border: #e3eaf3;
    --wm-border-strong: #d6e1ee;
    --wm-text: #172033;
    --wm-muted: #667085;
    --wm-muted-soft: #64748b;
    --wm-primary: #3b82f6;
    --wm-primary-2: #2563eb;
    --wm-success: #10b981;
    --wm-warning: #f59e0b;
    --wm-danger: #ef4444;
    --wm-info: #06b6d4;
    --wm-radius: 16px;
    --wm-radius-sm: 10px;
    --wm-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --wm-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --wm-focus: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
  }

  html,
  body,
  body.bg-light {
    background: #f8fbff !important;
    color: #172033;
    color-scheme: light;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }

  body {
    background:
      radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.08), transparent 34rem),
      radial-gradient(circle at 0% 95%, rgba(16, 185, 129, 0.06), transparent 30rem),
      #f8fbff !important;
  }

  .wm-app-shell > main,
  body:not(.mechanic-role) .wm-app-shell > main {
    background:
      radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 40rem),
      radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.045), transparent 34rem),
      #f8fbff !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .h1,
  .h2,
  .h3,
  .h4,
  .h5,
  .h6,
  .fw-bold,
  .fw-semibold {
    color: #ffffff;
  }

  a {
    color: #60a5fa;
  }

  a:hover {
    color: #93c5fd;
  }

  .text-dark,
  .text-body,
  .card .text-dark {
    color: #f1f5f9 !important;
  }

  .text-muted,
  .form-text,
  .small.text-muted {
    color: #94a3b8 !important;
  }

  .bg-white,
  .bg-light {
    background-color: #111827 !important;
  }

  .border,
  .border-bottom,
  .border-top,
  .border-start,
  .border-end,
  .border-primary {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* Sidebar */
  .sidebar,
  .sidebar.bg-white,
  body:not(.mechanic-role) #wmSidebar.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.5) !important;
    color: #f1f5f9 !important;
  }

  .wm-sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }

  .wm-brand-toggle {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #f1f5f9 !important;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
  }

  .wm-brand-toggle:hover,
  .wm-brand-toggle:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    color: #ffffff !important;
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.18) inset !important;
  }

  .wm-brand-icon {
    background: linear-gradient(135deg, #2563eb, #0ea5e9) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.5) !important;
  }

  .wm-brand-title {
    color: #f1f5f9 !important;
  }

  .wm-brand-role {
    color: #64748b !important;
  }

  .sidebar a.nav-link {
    color: #94a3b8 !important;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
  }

  .sidebar a.nav-link:hover {
    color: #f1f5f9 !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    transform: translateX(3px);
  }

  .sidebar a.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45) !important;
  }

  .sidebar a.nav-link.active::before {
    background: #10b981 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
  }

  .sidebar .wm-nav-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #60a5fa !important;
    border-radius: 9px;
  }

  .sidebar a.nav-link.active .wm-nav-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
  }

  .wm-active-branch {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(6, 182, 212, 0.12)) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  .wm-logout-btn {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3) !important;
  }

  .wm-logout-btn:hover {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
  }

  body.role-admin #wmSidebar::-webkit-scrollbar-thumb,
  body.role-super-wiser #wmSidebar::-webkit-scrollbar-thumb,
  body.role-superwiser #wmSidebar::-webkit-scrollbar-thumb {
    background: #334155;
  }

  /* Cards and panels */
  .card,
  .dropdown-menu,
  .list-group-item,
  .offcanvas {
    background: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
  }

  .card {
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  .card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
  }

  .card-header,
  .card-footer,
  .card-header.bg-white,
  .card-footer.bg-white {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f1f5f9 !important;
  }

  .card-body {
    color: #cbd5e1;
  }

  .shadow-sm {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  }

  /* Buttons */
  .btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    position: relative;
  }

  .btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-2px);
  }

  .btn:active {
    transform: translateY(1px) !important;
  }

  .btn-primary,
  .btn-success,
  .btn-danger,
  .btn-warning,
  .btn-info,
  .btn-secondary,
  .btn-dark {
    border: 0 !important;
  }

  .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 60%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 -2px 0 rgba(0, 0, 0, 0.3) inset,
      0 8px 20px rgba(37, 99, 235, 0.45),
      0 2px 4px rgba(0, 0, 0, 0.3) !important;
  }

  .btn-primary:hover {
    color: #ffffff !important;
    filter: brightness(1.08);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.18) inset,
      0 -2px 0 rgba(0, 0, 0, 0.3) inset,
      0 14px 28px rgba(37, 99, 235, 0.55),
      0 4px 8px rgba(0, 0, 0, 0.4) !important;
  }

  .btn-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 -2px 0 rgba(0, 0, 0, 0.3) inset,
      0 8px 20px rgba(5, 150, 105, 0.45) !important;
  }

  .btn-success:hover {
    color: #ffffff !important;
    filter: brightness(1.08);
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.55) !important;
  }

  .btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 -2px 0 rgba(0, 0, 0, 0.3) inset,
      0 8px 20px rgba(220, 38, 38, 0.45) !important;
  }

  .btn-danger:hover {
    color: #ffffff !important;
    filter: brightness(1.08);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.55) !important;
  }

  .btn-warning {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
    color: #1c0a00 !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 -2px 0 rgba(0, 0, 0, 0.3) inset,
      0 8px 20px rgba(217, 119, 6, 0.45) !important;
  }

  .btn-warning:hover {
    color: #1c0a00 !important;
    filter: brightness(1.08);
  }

  .btn-info {
    background: linear-gradient(135deg, #0891b2, #06b6d4) !important;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.15) inset,
      0 8px 20px rgba(8, 145, 178, 0.45) !important;
  }

  .btn-info:hover {
    color: #ffffff !important;
    filter: brightness(1.08);
  }

  .btn-secondary,
  .btn-dark {
    background: linear-gradient(135deg, #334155, #475569) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
  }

  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-success,
  .btn-outline-info,
  .btn-outline-warning,
  .btn-outline-danger,
  .btn-outline-dark,
  .btn-outline-light {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
  }

  .btn-outline-primary:hover {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4) !important;
  }

  .btn-outline-secondary:hover,
  .btn-outline-dark:hover,
  .btn-outline-light:hover {
    background: linear-gradient(135deg, #334155, #475569) !important;
    border-color: transparent !important;
    color: #ffffff !important;
  }

  .btn-outline-success:hover {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4) !important;
  }

  .btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border-color: transparent !important;
    color: #ffffff !important;
  }

  .btn-outline-warning:hover {
    background: linear-gradient(135deg, #d97706, #f59e0b) !important;
    border-color: transparent !important;
    color: #1c0a00 !important;
  }

  .btn-outline-info:hover {
    background: linear-gradient(135deg, #0891b2, #06b6d4) !important;
    border-color: transparent !important;
    color: #ffffff !important;
  }

  .btn-link {
    color: #60a5fa !important;
  }

  .btn-sm {
    border-radius: 8px;
  }

  /* Forms */
  .form-label {
    color: #94a3b8;
    font-weight: 600;
  }

  .form-control,
  .form-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px;
    color: #f1f5f9 !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
  }

  .form-control::placeholder {
    color: #64748b;
    opacity: 1;
  }

  .form-control:focus,
  .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.7) !important;
    color: #f1f5f9 !important;
    box-shadow: 0 0 0 0.22rem rgba(59, 130, 246, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  }

  .form-select option {
    background: #f3f7fb;
    color: #f1f5f9;
  }

  .input-group-text {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94a3b8 !important;
  }

  .form-check-input {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
  }

  input[type="date"]::-webkit-calendar-picker-indicator,
  input[type="datetime-local"]::-webkit-calendar-picker-indicator,
  input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.82);
  }

  /* Tables */
  .table-responsive {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(17, 24, 39, 0.76);
  }

  .table {
    --bs-table-color: #cbd5e1;
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(255, 255, 255, 0.07);
    color: #cbd5e1 !important;
    background: transparent !important;
  }

  .table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
  }

  .table thead th,
  .table-light th {
    background: linear-gradient(180deg, #1a2236 0%, #151e30 100%) !important;
    color: #94a3b8 !important;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .table-hover tbody tr:hover > * {
    background-color: rgba(59, 130, 246, 0.07) !important;
    color: #f1f5f9 !important;
  }

  .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-bg-type: rgba(255, 255, 255, 0.02);
  }

  .table-bordered {
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  .wm-inline-cell:hover {
    background: rgba(59, 130, 246, 0.12) !important;
  }

  .wm-editing {
    background: #f3f7fb !important;
    outline: 2px solid rgba(59, 130, 246, 0.45) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14) !important;
  }

  /* Badges and alerts */
  .badge {
    border-radius: 999px;
    font-weight: 750;
  }

  .badge.bg-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
  }

  .badge.bg-success {
    background: linear-gradient(135deg, #059669, #10b981) !important;
  }

  .badge.bg-warning {
    background: rgba(245, 158, 11, 0.18) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  .badge.bg-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  }

  .badge.bg-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #94a3b8 !important;
  }

  .bg-primary-subtle,
  .bg-info-subtle,
  .bg-success-subtle,
  .bg-warning-subtle,
  .bg-danger-subtle {
    background-color: rgba(59, 130, 246, 0.14) !important;
  }

  .text-primary {
    color: #60a5fa !important;
  }

  .alert {
    border-radius: 14px;
    border: 1px solid transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  }

  .alert-info {
    background: rgba(6, 182, 212, 0.1) !important;
    border-color: rgba(6, 182, 212, 0.25) !important;
    color: #67e8f9 !important;
  }

  .alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
  }

  .alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #fcd34d !important;
  }

  .alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
  }

  /* Modals */
  .modal-content,
  .swal2-popup {
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7) !important;
    color: #f1f5f9 !important;
  }

  .modal-header,
  .modal-footer {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.02) !important;
  }

  .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
  }

  .swal2-title {
    color: #ffffff !important;
  }

  .swal2-html-container {
    color: #cbd5e1 !important;
  }

  /* Login */
  body:has(.wm-login-page) {
    background:
      radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.2), transparent 30%),
      radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.15), transparent 30%),
      #f8fbff !important;
  }

  .wm-login-page {
    background:
      radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.16), transparent 32%),
      radial-gradient(circle at 82% 76%, rgba(16, 185, 129, 0.12), transparent 34%),
      transparent !important;
  }

  .wm-login-card {
    background: rgba(17, 24, 39, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65) !important;
  }

  .wm-login-card:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 30px 85px rgba(0, 0, 0, 0.75), 0 0 32px rgba(37, 99, 235, 0.16) !important;
  }

  .wm-login-card::before {
    background: linear-gradient(90deg, #2563eb, #10b981, #06b6d4) !important;
  }

  .wm-login-card::after {
    background: linear-gradient(115deg, transparent 0%, transparent 36%, rgba(255, 255, 255, 0.14) 46%, transparent 58%, transparent 100%) !important;
  }

  .wm-login-card .form-control,
  .wm-login-card .form-select {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f1f5f9 !important;
  }

  .wm-login-card .form-control:focus,
  .wm-login-card .form-select:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 0 0 0.22rem rgba(59, 130, 246, 0.2) !important;
    color: #f1f5f9 !important;
  }

  .wm-login-card .form-label {
    color: #94a3b8 !important;
  }

  .wm-login-card .btn-primary,
  .wm-login-card button[type="submit"] {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5) !important;
  }

  .wm-login-card a {
    color: #60a5fa !important;
  }

  /* Dashboard */
  .dashboard-page > .d-flex:first-child,
  .wm-analytics-header,
  .wm-analytics-section {
    background: rgba(17, 24, 39, 0.82) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
  }

  .dashboard-page .dashboard-stat-card {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5) !important;
  }

  .dashboard-page .dashboard-stat-card .text-muted,
  .dashboard-page .dashboard-stat-card .display-6 {
    color: #ffffff !important;
  }

  .dashboard-page .quick-action-btn {
    background: #f3f7fb !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
  }

  .dashboard-page .quick-action-btn:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #f1f5f9 !important;
  }

  .dashboard-page .quick-action-btn i {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
  }

  .wm-analytics-section h3,
  .wm-chart-section h2,
  .wm-chart-card h3 {
    color: #ffffff !important;
  }

  .wm-analytics-card {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
  }

  /* Suggestion boxes */
  .wm-part-suggest-box,
  .wm-problem-suggest-box,
  .wm-vendor-suggest-box,
  .wm-gate-vehicle-suggest-box {
    background: #f3f7fb !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6) !important;
    color: #cbd5e1 !important;
  }

  .wm-part-suggest-item,
  .wm-problem-suggest-item,
  .wm-vendor-suggest-item,
  .wm-gate-vehicle-suggest-item {
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
    color: #cbd5e1 !important;
  }

  .wm-part-suggest-item:hover,
  .wm-part-suggest-item.active,
  .wm-problem-suggest-item:hover,
  .wm-problem-suggest-item.active,
  .wm-vendor-suggest-item:hover,
  .wm-vendor-suggest-item.active,
  .wm-gate-vehicle-suggest-item:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #f1f5f9 !important;
  }

  .wm-part-suggest-number,
  .wm-vendor-suggest-name {
    color: #f1f5f9 !important;
  }

  .wm-part-suggest-name,
  .wm-vendor-suggest-meta {
    color: #94a3b8 !important;
  }

  /* Jobcard highlights */
  #wmJobcardsTable tbody tr {
    background: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease, box-shadow 0.15s ease;
  }

  #wmJobcardsTable tbody tr:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: inset 3px 0 0 #3b82f6;
  }

  .wm-active-jobcard-row {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.12) 0%, rgba(17, 24, 39, 0.95) 100%) !important;
    border-top: 3px solid #3b82f6 !important;
    box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.06) !important;
  }

  .wm-active-jobcard-row td {
    background: transparent !important;
    font-weight: 600;
    color: #f1f5f9 !important;
  }

  .wm-active-jobcard-row td:first-child a {
    color: #60a5fa !important;
    font-weight: 800;
  }

  .wm-active-jobcard-row td:first-child::before {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
  }

  .wm-jobcard-action-panel {
    background: #ffffff !important;
    border-top: 4px solid #3b82f6 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
  }

  .wm-jobcard-action-data-card {
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top-width: 4px !important;
    border-radius: 18px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5) !important;
  }

  .wm-trial-token-section {
    border-top-color: #f59e0b !important;
  }

  .wm-product-part-section {
    border-top-color: #8b5cf6 !important;
  }

  .wm-labour-helper-section {
    border-top-color: #7c3aed !important;
  }

  .wm-outside-vendor-section {
    border-top-color: #10b981 !important;
  }

  .wm-jobcard-action-data-card .table-responsive {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .wm-action-btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.55rem 1.1rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  }

  .wm-action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
  }

  .wm-action-trial {
    background: linear-gradient(135deg, #d97706, #ef4444) !important;
  }

  .wm-action-parts {
    background: linear-gradient(135deg, #7c3aed, #3b82f6) !important;
  }

  .wm-action-labour {
    background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  }

  .wm-action-vendor {
    background: linear-gradient(135deg, #059669, #84cc16) !important;
  }

  .wm-action-estimate-print {
    background: linear-gradient(135deg, #1e293b, #334155) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5) !important;
  }

  /* Mechanic-focused screens */
  body.mechanic-role .mechanic-page,
  body.mechanic-role .mechanic-breakdown-page {
    background:
      radial-gradient(circle at 8% 12%, rgba(59, 130, 246, 0.08), transparent 24rem),
      radial-gradient(circle at 88% 8%, rgba(16, 185, 129, 0.07), transparent 22rem),
      #f8fbff !important;
  }

  body.mechanic-role .mechanic-title,
  body.mechanic-role .mechanic-card-title {
    color: #f1f5f9 !important;
  }

  body.mechanic-role .mechanic-card {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: #ffffff !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.42) !important;
  }

  body.mechanic-role .mechanic-card-subtitle {
    color: #94a3b8 !important;
  }
}

/* =========================================================
   No dark page background correction
   Keeps the premium styling, but all page/surface backgrounds stay light.
========================================================= */
@media screen {
  :root {
    --wm-page-bg: #f8fbff;
    --wm-surface: #ffffff;
    --wm-surface-soft: #f3f7fb;
    --wm-surface-hover: #eef6ff;
    --wm-border: #e3eaf3;
    --wm-border-strong: #d6e1ee;
    --wm-text: #172033;
    --wm-muted: #667085;
    --wm-muted-soft: #64748b;
    --wm-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --wm-shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.06);
    --wm-focus: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
  }

  html,
  body,
  body.bg-light {
    background:
      radial-gradient(circle at 92% 0%, rgba(59, 130, 246, 0.08), transparent 34rem),
      radial-gradient(circle at 0% 95%, rgba(16, 185, 129, 0.06), transparent 30rem),
      #f8fbff !important;
    color: #172033 !important;
    color-scheme: light;
  }

  .wm-app-shell > main,
  body:not(.mechanic-role) .wm-app-shell > main {
    background:
      radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 34rem),
      linear-gradient(180deg, #ffffff 0%, #f8fbff 420px),
      #f8fbff !important;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .h1,
  .h2,
  .h3,
  .h4,
  .h5,
  .h6,
  .fw-bold,
  .fw-semibold,
  .text-dark,
  .text-body {
    color: #111827 !important;
  }

  a {
    color: #1d4ed8;
  }

  a:hover {
    color: #0f766e;
  }

  .text-muted,
  .form-text,
  .small.text-muted {
    color: #667085 !important;
  }

  .bg-white,
  .bg-light {
    background-color: #ffffff !important;
  }

  .border,
  .border-bottom,
  .border-top,
  .border-start,
  .border-end,
  .border-primary {
    border-color: #e3eaf3 !important;
  }

  .sidebar,
  .sidebar.bg-white,
  body:not(.mechanic-role) #wmSidebar.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fe 55%, #eef6ff 100%) !important;
    border-right: 1px solid rgba(214, 225, 238, 0.95) !important;
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.07) !important;
    color: #172033 !important;
  }

  .wm-sidebar-brand {
    border-bottom-color: rgba(214, 225, 238, 0.9) !important;
  }

  .wm-brand-toggle,
  .wm-logout-btn {
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid #d7e2ef !important;
    color: #172033 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06) !important;
  }

  .wm-brand-title {
    color: #111827 !important;
  }

  .wm-brand-role {
    color: #64748b !important;
  }

  .sidebar a.nav-link {
    color: #263143 !important;
  }

  .sidebar a.nav-link:hover {
    color: #1d4ed8 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(191, 219, 254, 0.9) !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.09) !important;
  }

  .sidebar .wm-nav-icon {
    background: #eaf3ff !important;
    color: #2563eb !important;
  }

  .sidebar a.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24) !important;
  }

  .sidebar a.nav-link.active .wm-nav-icon {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
  }

  .wm-active-branch {
    background: linear-gradient(135deg, #dcfce7, #e0f2fe) !important;
    color: #065f46 !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
  }

  .wm-logout-btn:hover {
    color: #b91c1c !important;
    background: #fff5f5 !important;
    border-color: #fecaca !important;
  }

  .card,
  .dropdown-menu,
  .list-group-item,
  .offcanvas,
  .modal-content,
  .swal2-popup {
    background: #ffffff !important;
    border-color: #e3eaf3 !important;
    color: #263143 !important;
  }

  .card {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  }

  .card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
  }

  .card-header,
  .card-footer,
  .card-header.bg-white,
  .card-footer.bg-white,
  .modal-header,
  .modal-footer {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border-color: #e3eaf3 !important;
    color: #172033 !important;
  }

  .card-body {
    color: #263143;
  }

  .form-label {
    color: #334155 !important;
  }

  .form-control,
  .form-select {
    background-color: #ffffff !important;
    border-color: #d9e4ef !important;
    color: #1f2937 !important;
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02) !important;
  }

  .form-control::placeholder {
    color: #94a3b8;
  }

  .form-control:focus,
  .form-select:focus {
    background-color: #ffffff !important;
    border-color: rgba(37, 99, 235, 0.7) !important;
    color: #1f2937 !important;
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.14) !important;
  }

  .form-select option {
    background: #ffffff;
    color: #1f2937;
  }

  .input-group-text {
    background: #f7faff !important;
    border-color: #d9e4ef !important;
    color: #475569 !important;
  }

  .table-responsive {
    background: #ffffff !important;
    border: 1px solid #e3eaf3 !important;
  }

  .table {
    --bs-table-color: #263143;
    --bs-table-bg: #ffffff;
    --bs-table-border-color: #e3eaf3;
    color: #263143 !important;
    background: #ffffff !important;
  }

  .table > :not(caption) > * > * {
    background-color: transparent !important;
    border-bottom-color: #e7eef7 !important;
    color: #263143 !important;
  }

  .table thead th,
  .table-light th {
    background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%) !important;
    color: #334155 !important;
    border-bottom: 1px solid #d8e5f3 !important;
  }

  .table-hover tbody tr:hover > *,
  .table tbody tr:hover > * {
    background-color: #f5faff !important;
    color: #172033 !important;
  }

  .wm-inline-cell:hover {
    background: #eff6ff !important;
  }

  .wm-editing {
    background: #ffffff !important;
    outline: 2px solid rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08) !important;
  }

  body:has(.wm-login-page) {
    background:
      radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.14), transparent 30%),
      radial-gradient(circle at 85% 80%, rgba(16, 185, 129, 0.10), transparent 30%),
      #f8fbff !important;
  }

  .wm-login-page {
    background:
      radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.12), transparent 32%),
      radial-gradient(circle at 82% 76%, rgba(16, 185, 129, 0.10), transparent 34%),
      transparent !important;
  }

  .wm-login-card {
    background: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16) !important;
  }

  .wm-login-card .form-control,
  .wm-login-card .form-select {
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(148, 163, 184, 0.45) !important;
    color: #1f2937 !important;
  }

  .wm-login-card .form-control:focus,
  .wm-login-card .form-select:focus {
    background: #ffffff !important;
    color: #1f2937 !important;
  }

  .wm-login-card .form-label {
    color: #334155 !important;
  }

  .dashboard-page > .d-flex:first-child,
  .wm-analytics-header,
  .wm-analytics-section {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid #e3eaf3 !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  }

  .dashboard-page .quick-action-btn {
    background: #ffffff !important;
    border: 1px solid #d7e2ef !important;
    color: #334155 !important;
  }

  .dashboard-page .quick-action-btn:hover {
    background: #eff6ff !important;
    border-color: rgba(37, 99, 235, 0.3) !important;
    color: #1d4ed8 !important;
  }

  .dashboard-page .quick-action-btn i {
    background: #eff6ff !important;
    color: #2563eb !important;
  }

  .wm-analytics-section h3,
  .wm-chart-section h2,
  .wm-chart-card h3 {
    color: #172033 !important;
  }

  .wm-part-suggest-box,
  .wm-problem-suggest-box,
  .wm-vendor-suggest-box,
  .wm-gate-vehicle-suggest-box {
    background: #ffffff !important;
    border: 1px solid #d7e2ef !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
    color: #263143 !important;
  }

  .wm-part-suggest-item,
  .wm-problem-suggest-item,
  .wm-vendor-suggest-item,
  .wm-gate-vehicle-suggest-item {
    border-bottom-color: #edf2f7 !important;
    color: #263143 !important;
  }

  .wm-part-suggest-item:hover,
  .wm-part-suggest-item.active,
  .wm-problem-suggest-item:hover,
  .wm-problem-suggest-item.active,
  .wm-vendor-suggest-item:hover,
  .wm-vendor-suggest-item.active,
  .wm-gate-vehicle-suggest-item:hover {
    background: #eff6ff !important;
    color: #172033 !important;
  }

  .wm-part-suggest-number,
  .wm-vendor-suggest-name {
    color: #212529 !important;
  }

  .wm-part-suggest-name,
  .wm-vendor-suggest-meta {
    color: #6c757d !important;
  }

  #wmJobcardsTable tbody tr {
    background: #ffffff !important;
    border-bottom: 1px solid #e7eef7 !important;
  }

  #wmJobcardsTable tbody tr:hover {
    background: #eff6ff !important;
    box-shadow: inset 3px 0 0 #3b82f6;
  }

  .wm-active-jobcard-row {
    background: linear-gradient(90deg, #e0f2fe 0%, #f8fafc 100%) !important;
    border-top: 3px solid #3b82f6 !important;
    box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.06) !important;
  }

  .wm-active-jobcard-row td {
    color: #172033 !important;
  }

  .wm-active-jobcard-row td:first-child a {
    color: #1d4ed8 !important;
  }

  .wm-jobcard-action-panel,
  .wm-jobcard-action-data-card {
    background: #ffffff !important;
    border-color: #e3eaf3 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
  }

  .wm-jobcard-action-data-card .table-responsive {
    border-color: #d7e2ef !important;
  }

  body.mechanic-role .mechanic-page,
  body.mechanic-role .mechanic-breakdown-page {
    background:
      radial-gradient(circle at 8% 12%, rgba(37, 99, 235, 0.1), transparent 24rem),
      radial-gradient(circle at 88% 8%, rgba(34, 197, 94, 0.1), transparent 22rem),
      #f8fbff !important;
  }

  body.mechanic-role .mechanic-title,
  body.mechanic-role .mechanic-card-title {
    color: #111827 !important;
  }

  body.mechanic-role .mechanic-card {
    background: #ffffff !important;
    border: 1px solid #e3eaf3 !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06) !important;
  }

  body.mechanic-role .mechanic-card-subtitle {
    color: #64748b !important;
  }
}

/* =========================================================
   Final visibility fixes
   Dashboard stats, filled outline buttons, and AMC/Warranty notice.
========================================================= */
@media screen {
  .dashboard-page .dashboard-stat-card.card {
    border: 0 !important;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.20) inset,
      0 -3px 0 rgba(0, 0, 0, 0.16) inset,
      0 14px 30px rgba(15, 23, 42, 0.18) !important;
  }

  .dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(1) .dashboard-stat-card.card {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 62%, #06b6d4 100%) !important;
  }

  .dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(2) .dashboard-stat-card.card {
    background: linear-gradient(135deg, #059669 0%, #10b981 62%, #14b8a6 100%) !important;
  }

  .dashboard-page .row.g-3.mb-3 > [class*="col-"]:nth-child(3) .dashboard-stat-card.card {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 54%, #ef4444 100%) !important;
  }

  .dashboard-page .dashboard-stat-card.card .card-body,
  .dashboard-page .dashboard-stat-card.card .text-muted,
  .dashboard-page .dashboard-stat-card.card .display-6,
  .dashboard-page .dashboard-stat-card.card .fw-semibold {
    color: #ffffff !important;
  }

  .dashboard-page .dashboard-stat-card.card .text-muted {
    opacity: 0.92;
    font-weight: 800;
  }

  .dashboard-page .dashboard-stat-card.card .display-6 {
    text-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  }

  .dashboard-page .dashboard-stat-icon {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.20) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30) !important;
  }

  .btn-outline-primary,
  .btn-outline-secondary,
  .btn-outline-success,
  .btn-outline-info,
  .btn-outline-warning,
  .btn-outline-danger,
  .btn-outline-dark,
  .btn-outline-light {
    border: 0 !important;
    font-weight: 800;
    color: #ffffff !important;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.16) inset,
      0 -2px 0 rgba(0, 0, 0, 0.22) inset,
      0 8px 18px rgba(15, 23, 42, 0.20) !important;
  }

  .btn-outline-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 58%, #06b6d4 100%) !important;
  }

  .btn-outline-secondary,
  .btn-outline-dark,
  .btn-outline-light {
    background: linear-gradient(135deg, #334155 0%, #475569 58%, #64748b 100%) !important;
  }

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

  .btn-outline-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 64%, #38bdf8 100%) !important;
  }

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

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

  .btn-outline-primary:hover,
  .btn-outline-secondary:hover,
  .btn-outline-success:hover,
  .btn-outline-info:hover,
  .btn-outline-warning:hover,
  .btn-outline-danger:hover,
  .btn-outline-dark:hover,
  .btn-outline-light:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.20) inset,
      0 -2px 0 rgba(0, 0, 0, 0.22) inset,
      0 13px 26px rgba(15, 23, 42, 0.26) !important;
  }

  .btn-outline-primary:active,
  .btn-outline-secondary:active,
  .btn-outline-success:active,
  .btn-outline-info:active,
  .btn-outline-warning:active,
  .btn-outline-danger:active,
  .btn-outline-dark:active,
  .btn-outline-light:active {
    transform: translateY(1px) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18) !important;
  }

  .btn-outline-primary.disabled,
  .btn-outline-primary:disabled,
  .btn-outline-secondary.disabled,
  .btn-outline-secondary:disabled,
  .btn-outline-success.disabled,
  .btn-outline-success:disabled,
  .btn-outline-info.disabled,
  .btn-outline-info:disabled,
  .btn-outline-warning.disabled,
  .btn-outline-warning:disabled,
  .btn-outline-danger.disabled,
  .btn-outline-danger:disabled,
  .btn-outline-dark.disabled,
  .btn-outline-dark:disabled,
  .btn-outline-light.disabled,
  .btn-outline-light:disabled {
    opacity: 0.52;
    filter: grayscale(0.25);
    transform: none !important;
  }

  .dashboard-page .quick-action-btn {
    color: #ffffff !important;
  }

  .dashboard-page .quick-action-btn.btn-outline-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 58%, #06b6d4 100%) !important;
    border: 0 !important;
  }

  .dashboard-page .quick-action-btn.btn-outline-secondary,
  .dashboard-page .quick-action-btn.btn-outline-dark {
    background: linear-gradient(135deg, #334155 0%, #475569 58%, #64748b 100%) !important;
    border: 0 !important;
  }

  .dashboard-page .quick-action-btn.btn-outline-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 64%, #22c55e 100%) !important;
    border: 0 !important;
  }

  .dashboard-page .quick-action-btn.btn-outline-warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 64%, #fbbf24 100%) !important;
    color: #1c0a00 !important;
    border: 0 !important;
  }

  .dashboard-page .quick-action-btn.btn-outline-info {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 64%, #38bdf8 100%) !important;
    border: 0 !important;
  }

  .dashboard-page .quick-action-btn i {
    background: rgba(255, 255, 255, 0.22) !important;
    color: inherit !important;
  }

  .dashboard-page .quick-action-btn:hover {
    color: #ffffff !important;
  }

  .alert.alert-info.py-2.d-flex > span {
    color: #0f172a !important;
    font-weight: 800;
  }

  .alert.alert-info.py-2.d-flex {
    background: linear-gradient(135deg, #e0f2fe 0%, #ecfeff 100%) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.14) !important;
  }
}

/* Login mobile fit + password eye */
.wm-password-wrap {
  position: relative;
}

.wm-password-wrap .form-control {
  padding-right: 48px !important;
}

.wm-password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.wm-password-toggle:hover {
  color: #2563eb;
}

@media (max-width: 767.98px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body:has(.wm-login-page) {
    margin: 0 !important;
    padding: 0 !important;
  }

  .wm-login-page {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    padding: 12px !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .wm-login-card-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .wm-login-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px !important;
  }

  .wm-login-card .card-body {
    padding: 22px 18px !important;
  }

  .wm-login-card .form-control,
  .wm-login-card .form-select,
  .wm-login-card .btn {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* FINAL LOGIN MOBILE FIX */
html.wm-login-html,
html.wm-login-html body,
body.wm-login-body {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

body.wm-login-body .wm-app-shell,
body.wm-login-body main,
body.wm-login-body .main-content,
body.wm-login-body .content,
body.wm-login-body .page-content {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

body.wm-login-body .sidebar,
body.wm-login-body #wmSidebar,
body.wm-login-body #sidebarBackdrop {
  display: none !important;
}

.wm-password-toggle{
    position:absolute;
    right:14px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:none;
    font-size:20px;
    cursor:pointer;
    z-index:999;
}

@media (max-width: 767.98px) {
  body.wm-login-body .wm-login-page {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100dvh !important;
    padding: 12px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-x: hidden !important;
  }

  body.wm-login-body .wm-login-card-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.wm-login-body .wm-login-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.wm-login-body .wm-login-card .card-body {
    padding: 20px 16px !important;
    overflow-x: hidden !important;
  }
}
/* Global table row/column lines - apply on all pages */
.table,
table {
  border-collapse: collapse !important;
}

.table th,
.table td,
table th,
table td {
  border: 1px solid #cbd5e1 !important;
}

.table thead th,
table thead th {
  border: 1px solid #94a3b8 !important;
}

.table-responsive {
  border: 1px solid #cbd5e1 !important;
}
.status-requested{
  background:#fef3c7;
  color:#92400e;
  padding:4px 10px;
  border-radius:6px;
  font-weight:600;
}

.status-in_progress{
  background:#dbeafe;
  color:#1d4ed8;
  padding:4px 10px;
  border-radius:6px;
  font-weight:600;
}

.status-accountant_pending{
  background:#fde68a;
  color:#b45309;
  padding:4px 10px;
  border-radius:6px;
  font-weight:600;
}

.status-completed,
.status-final_closed{
  background:#dcfce7;
  color:#166534;
  padding:4px 10px;
  border-radius:6px;
  font-weight:600;
}

.wm-sidebar-dd-btn {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.wm-sidebar-dd-btn:hover {
  background: #f3f4f6;
}

.wm-sidebar-dd {
  margin: 8px 0 10px 0;
  padding: 10px;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe, #93c5fd);
  border: 1px solid #60a5fa;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.14);
}

.wm-sidebar-dd .nav-link {
  font-size: 16px;
  padding: 10px 12px !important;
  margin-bottom: 6px;
  border-radius: 10px;
  border-left: none !important;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(219,234,254,.9);
  color: #1e293b !important;
  font-weight: 600;
  transition: all .22s ease;
}

.wm-sidebar-dd .nav-link:last-child {
  margin-bottom: 0;
}

.wm-sidebar-dd .nav-link:hover {
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border-color: #93c5fd;
  color: #2563eb !important;
  transform: translateX(3px);
  box-shadow: 0 6px 14px rgba(37,99,235,.10);
}

.wm-sidebar-dd .nav-link.active {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  border-color: #60a5fa;
  color: #1d4ed8 !important;
  box-shadow: 0 6px 14px rgba(37,99,235,.12);
}

.wm-sidebar-dd-btn .wm-dd-arrow {
  transition: transform .2s ease;
  font-size: 12px;
}

.wm-sidebar-dd-btn:not(.collapsed) .wm-dd-arrow {
  transform: rotate(180deg);
}

.sidebar.wm-sidebar-collapsed .wm-sidebar-dd,
.sidebar.wm-sidebar-collapsed .wm-dd-arrow {
  display: none !important;
}

.wm-sidebar-flyout {
  position: fixed;
  left: 78px;
  min-width: 240px;
  max-width: 290px;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe, #93c5fd);
  border: 1px solid #60a5fa;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.25);
  padding: 12px;
  z-index: 99999;
  backdrop-filter: blur(10px);
  animation: wmFlyoutIn .2s ease-out;
}

.wm-sidebar-flyout::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -10px;
  width: 20px;
  height: 20px;
  background: #bfdbfe;
  border-left: 1px solid #60a5fa;
  border-bottom: 1px solid #60a5fa;
  transform: rotate(45deg);
}

.wm-sidebar-flyout .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px !important;
  border-radius: 14px;
  color: #1e293b !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,.9);
  transition: all .22s ease;
}

.wm-sidebar-flyout .nav-link:last-child {
  margin-bottom: 0;
}

.wm-sidebar-flyout .nav-link i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-size: 15px;
  transition: all .22s ease;
}

.wm-sidebar-flyout .nav-link:hover {
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  border-color: #93c5fd;
  transform: translateX(4px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.wm-sidebar-flyout .nav-link:hover i {
  transform: scale(1.08);
  box-shadow: 0 4px 10px rgba(37, 99, 235, .25);
}

.wm-sidebar-flyout .nav-link.active {
  background: linear-gradient(145deg, #ffffff, #dbeafe);
  border-color: #2563eb;
  color: #1d4ed8 !important;
}

@keyframes wmFlyoutIn {
  from {
    opacity: 0;
    transform: translateX(-8px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@media (max-width: 767.98px) {
  .wm-sidebar-flyout {
    left: 70px !important;
    min-width: 225px;
    max-width: calc(100vw - 85px);
  }
}

/* MOBILE: Jobcard popup always above sidebar */
@media (max-width: 767.98px) {
  body:not(.mechanic-role) #wmSidebar.sidebar {
    z-index: 3000 !important;
  }

  body:not(.mechanic-role) #sidebarBackdrop.wm-backdrop-show {
    z-index: 2500 !important;
  }

  .modal-backdrop {
    z-index: 90000 !important;
  }

  .modal,
  .modal.show {
    z-index: 91000 !important;
  }

  .swal2-container {
    z-index: 95000 !important;
  }

  .jobcard-popup,
  .jobcard-modal,
  .wm-popup,
  .wm-modal,
  .popup-overlay,
  .trial-token-modal,
  .add-product-modal,
  .add-labour-modal,
  .outside-work-modal {
    position: fixed !important;
    z-index: 92000 !important;
  }
}