/* Modern UI skin — scoped under .ui-modern only. Classic Velzon remains untouched. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.ui-modern {
  --mui-bg: #fafafa;
  --mui-fg: #171717;
  --mui-card: #ffffff;
  --mui-muted: #f5f5f5;
  --mui-muted-fg: #737373;
  --mui-border: #e5e5e5;
  --mui-primary: #2563eb;
  --mui-success: #059669;
  --mui-sidebar: #111827;
  --mui-sidebar-border: #1f2937;
  --mui-sidebar-text: #d1d5db;
  --mui-sidebar-muted: #9ca3af;
  --mui-radius: 8px;
  --mui-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --vz-primary: #2563eb;
  --vz-primary-rgb: 37, 99, 235;
  --vz-body-bg: #fafafa;
  --vz-body-color: #171717;
  --vz-border-color: #e5e5e5;
  --vz-secondary-color: #737373;
  --vz-vertical-menu-width: 256px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ui-modern body,
body.ui-modern {
  background-color: var(--mui-bg) !important;
  color: var(--mui-fg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html.ui-modern,
html.ui-modern body {
  background-color: var(--mui-bg) !important;
}

/* —— Sidebar —— */
.ui-modern .app-menu.navbar-menu {
  background: var(--mui-sidebar) !important;
  border-right: 1px solid var(--mui-sidebar-border);
}

.ui-modern .simplebar-content .navbar-nav {
  padding: 0rem 1rem 0.75rem;
}

.ui-modern .navbar-menu .navbar-nav .nav-link {
  color: var(--mui-sidebar-text) !important;
  border-radius: 6px;
  margin: 2px 0px;
  padding: 10px 12px !important;
  font-weight: 500;
  font-size: 0.925rem;
}

.ui-modern .navbar-menu .navbar-nav .nav-link:hover {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #fff !important;
}

.ui-modern .navbar-menu .navbar-nav .nav-link.active {
  background: var(--mui-primary) !important;
  color: #fff !important;
}

.ui-modern .navbar-menu .navbar-nav .nav-sm {
  padding-left: 10px !important;
}

.ui-modern .navbar-menu .navbar-nav .nav-sm .nav-link {
  color: var(--mui-sidebar-muted) !important;
  padding: 8px 12px 8px 16px !important;
  font-weight: 400;
  font-size: 0.875rem;
}

.ui-modern .navbar-menu .navbar-nav .nav-sm .nav-link::before,
.ui-modern .navbar-menu .navbar-nav .nav-sm .nav-link:before {
  left: 5px;
}

.ui-modern .navbar-menu .navbar-nav .nav-sm .nav-link.active {
  background: rgba(37, 99, 235, 0.25) !important;
  color: #fff !important;
}

.ui-modern .navbar-brand-box {
  background: var(--mui-sidebar) !important;
  border-bottom: 1px solid var(--mui-sidebar-border);
  display: none !important;
}

/* Setting: sidebar_brand_display = logo | title (default title) */
html[data-sidebar-brand="logo"].ui-modern .navbar-brand-box,
body.ui-modern[data-sidebar-brand="logo"] .navbar-brand-box {
  display: block !important;
}

html[data-sidebar-brand="logo"].ui-modern .mui-sidebar-brand,
body.ui-modern[data-sidebar-brand="logo"] .mui-sidebar-brand {
  display: none !important;
}

html[data-sidebar-brand="title"].ui-modern .navbar-brand-box,
body.ui-modern[data-sidebar-brand="title"] .navbar-brand-box {
  display: none !important;
}

html[data-sidebar-brand="title"].ui-modern .mui-sidebar-brand,
body.ui-modern[data-sidebar-brand="title"] .mui-sidebar-brand {
  display: block;
}

.ui-modern .sidebar-user {
  display: none !important;
}

.ui-modern .mui-sidebar-brand {
  display: block;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--mui-sidebar-border);
  margin-bottom: 0.5rem;
}

.ui-modern .navbar-brand-box .logo img {
  max-height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.ui-modern .mui-sidebar-brand .mui-company {
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-modern .mui-sidebar-brand .mui-email {
  color: var(--mui-sidebar-muted);
  font-size: 0.75rem;
  margin: 0.15rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Colored section icons */
.ui-modern .navbar-menu .nav-link > i[data-mui-color="blue"] { color: #60a5fa !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="emerald"] { color: #34d399 !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="orange"] { color: #fb923c !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="sky"] { color: #38bdf8 !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="violet"] { color: #a78bfa !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="rose"] { color: #fb7185 !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="cyan"] { color: #22d3ee !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="indigo"] { color: #818cf8 !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="amber"] { color: #fbbf24 !important; }
.ui-modern .navbar-menu .nav-link > i[data-mui-color="slate"] { color: #94a3b8 !important; }
.ui-modern .navbar-menu .nav-link.active > i { color: #fff !important; }

/* —— Topbar —— */
.ui-modern #page-topbar,
.ui-modern #page-topbar .layout-width {
  background-color: #f7b84b !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

.ui-modern .navbar-header {
  min-height: 56px;
}

.ui-modern #page-topbar .navbar-header h3,
.ui-modern .navbar-header h3,
.ui-modern #page-topbar .logo h3,
.ui-modern #page-topbar .text-white,
.ui-modern #page-topbar .topbar-user .user-name-text,
.ui-modern #page-topbar .topbar-user .user-name-sub-text,
.ui-modern .topbar-user .user-name-text,
.ui-modern .topbar-user .user-name-sub-text,
.ui-modern #page-topbar .btn-ghost-secondary,
.ui-modern #page-topbar .dropdown-toggle,
.ui-modern #page-topbar .language-switcher,
.ui-modern #page-topbar .language-switcher span,
.ui-modern #page-topbar .language-switcher a,
.ui-modern #page-topbar [data-bs-toggle="dropdown"],
.ui-modern #page-topbar .topbar-user .fw-medium {
  color: #fff !important;
}

.ui-modern #page-topbar .mdi-menu::before,
.ui-modern #page-topbar .mdi-close::before,
.ui-modern #page-topbar .btn.rounded-circle i,
.ui-modern #page-topbar .btn-topbar i,
.ui-modern #page-topbar .btn-ghost-secondary i,
.ui-modern #page-topbar .light-dark-mode i,
.ui-modern #page-topbar .btn.light-dark-mode i,
.ui-modern #page-topbar .btn[data-toggle="fullscreen"] i,
.ui-modern #page-topbar .header-item i,
.ui-modern #page-topbar .vertical-menu-btn i,
.ui-modern #page-topbar .topbar-user i {
  color: #fff !important;
}

.ui-modern #page-topbar #admin-working-branch {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.ui-modern #page-topbar #admin-working-branch option {
  color: #212529;
  background: #fff;
}

/* Topbar logo always hidden; sidebar brand setting only affects sidebar */
.ui-modern .navbar-header .navbar-brand-box.horizontal-logo,
.ui-modern .navbar-brand-box.horizontal-logo {
  display: none !important;
}

.ui-modern #admin-dashboard-filter {
  background: #f3f3f9;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

/* —— Footer (override Classic teal) —— */
.ui-modern .footer {
  background: #fff !important;
  border-top: 1px solid var(--mui-border) !important;
  color: var(--mui-muted-fg) !important;
  box-shadow: none !important;
  padding: 0.75rem 0 !important;
  min-height: 60px;
}

.ui-modern .footer .container-fluid {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ui-modern .footer a,
.ui-modern .footer span,
.ui-modern .footer div {
  color: var(--mui-muted-fg) !important;
}

.ui-modern .footer a:hover {
  color: var(--mui-primary) !important;
}

/* —— Cards / page —— */
.ui-modern .page-content {
  margin-top: 70px !important;
  padding: 1.25rem 1.5rem calc(1.5rem + 60px);
}

.ui-modern .container-fluid {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.ui-modern .page-content .container-fluid > *:first-child {
  margin-top: 0 !important;
}

.ui-modern .page-content .container-fluid .row .card {
  margin-top: 0;
}

.ui-modern .page-content .container-fluid > .row + .row,
.ui-modern .page-content .container-fluid > form + .row,
.ui-modern .page-content .container-fluid > .row + form,
.ui-modern .page-content .container-fluid > #admin-owner-overview + #admin-full-dashboard,
.ui-modern .page-content .container-fluid > #admin-full-dashboard > form + .row {
  margin-top: 20px;
}

.ui-modern .card {
  background: var(--mui-card);
  border: 1px solid var(--mui-border) !important;
  border-radius: var(--mui-radius) !important;
  box-shadow: var(--mui-shadow) !important;
}

.ui-modern .card:not(.card-animate) .card-header {
  background: var(--mui-muted) !important;
  border-bottom: 1px solid var(--mui-border) !important;
}

.ui-modern .card:not(.card-animate) .card-header h3,
.ui-modern .card:not(.card-animate) .card-header h4,
.ui-modern .card:not(.card-animate) .card-header h5,
.ui-modern .card:not(.card-animate) .card-header .card-title {
  color: var(--mui-fg) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 1.3;
}

.ui-modern .card-header.d-flex {
  align-items: center;
}

.ui-modern .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--mui-border) !important;
  padding: 0.9rem 1.1rem;
}

.ui-modern .card-body {
  padding: 1.1rem;
}

.ui-modern .btn-primary {
  background-color: var(--mui-primary) !important;
  border-color: var(--mui-primary) !important;
}

.ui-modern .btn-success {
  background-color: var(--mui-success) !important;
  border-color: var(--mui-success) !important;
}

.ui-modern .form-control,
.ui-modern .form-select,
.ui-modern .selectize-input {
  border-radius: 8px !important;
  border-color: var(--mui-border) !important;
}

/*
 * Selectize copies Bootstrap's form-control onto the wrapper (.selectize-control)
 * AND keeps its own .selectize-input border — that creates the nested
 * "border on border" look next to plain warehouse/order-booker selects.
 * Flatten the wrapper; keep a single form-control-like face on .selectize-input.
 */
.ui-modern .selectize-control.form-control,
.ui-modern .selectize-control.form-select,
.ui-modern .form-group > .selectize-control,
.ui-modern .mb-3 > .selectize-control {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
  border-radius: 0 !important;
}

.ui-modern .selectize-control .selectize-input,
.ui-modern .selectize-control.single .selectize-input {
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem !important;
  line-height: 1.5;
  box-shadow: none !important;
  display: flex !important;
  align-items: center;
}

.ui-modern .selectize-control.single .selectize-input:after {
  right: 0.75rem;
}

.ui-modern .selectize-control .selectize-input.focus,
.ui-modern .selectize-control .selectize-input.input-active,
.ui-modern .selectize-control .selectize-input.dropdown-active {
  border-color: var(--mui-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.ui-modern .form-control:focus,
.ui-modern .form-select:focus {
  border-color: var(--mui-primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* —— Dashboard KPI cards: colorful light mode —— */
.ui-modern .card.card-animate {
  position: relative;
  overflow: hidden;
  border: none !important;
  transform: none !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(1) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(1) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(1) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(1) .card.card-animate {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(2) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(2) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(2) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(2) .card.card-animate {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(3) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(3) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(3) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(3) .card.card-animate {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(4) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(4) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(4) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(4) .card.card-animate {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(5) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(5) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(5) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(5) .card.card-animate {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(6) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(6) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(6) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(6) .card.card-animate {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(7) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(7) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(7) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(7) .card.card-animate {
  background: linear-gradient(135deg, #8360c3 0%, #2ebf91 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(8) .card.card-animate,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(8) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-xl-3:nth-child(8) .card.card-animate,
.ui-modern #admin-owner-overview #owner-ov-kpi-row > .col-md-6:nth-child(8) .card.card-animate {
  background: linear-gradient(135deg, #f093fb 0%, #4facfe 100%) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.ui-modern #admin-full-dashboard .card.card-animate:hover,
.ui-modern #admin-owner-overview .card.card-animate:hover,
.ui-modern #profit-overview-section .card.card-animate:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.ui-modern #admin-full-dashboard .card.card-animate .card-body,
.ui-modern #admin-full-dashboard .card.card-animate .card-body p,
.ui-modern #admin-full-dashboard .card.card-animate .card-body h4,
.ui-modern #admin-full-dashboard .card.card-animate .card-body h5,
.ui-modern #admin-full-dashboard .card.card-animate .card-body h6,
.ui-modern #admin-full-dashboard .card.card-animate .card-body a,
.ui-modern #admin-full-dashboard .card.card-animate .card-body span,
.ui-modern #admin-full-dashboard .card.card-animate .text-muted,
.ui-modern #admin-full-dashboard .card.card-animate .text-uppercase,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body p,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body h4,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body a,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body span,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .text-muted,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .text-uppercase {
  color: rgba(255, 255, 255, 0.92) !important;
}

.ui-modern #admin-full-dashboard .card.card-animate .card-body h4,
.ui-modern #admin-full-dashboard .card.card-animate .ff-secondary,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body h4,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .ff-secondary {
  color: #fff !important;
}

.ui-modern #admin-full-dashboard .card.card-animate .card-body a,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .card-body a {
  color: rgba(255, 255, 255, 0.95) !important;
}

.ui-modern #admin-full-dashboard .card.card-animate .avatar-title,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .avatar-title {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

.ui-modern #admin-full-dashboard .card.card-animate .avatar-title i,
.ui-modern #admin-full-dashboard .card.card-animate .avatar-title .bx,
.ui-modern #admin-full-dashboard .card.card-animate .avatar-title .ri,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .avatar-title i,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .avatar-title .bx,
.ui-modern #admin-owner-overview #owner-ov-kpi-row .card.card-animate .avatar-title .ri {
  color: #fff !important;
}

/* Soft accent bars on KPI cards (decorative, not replacing content) */
.ui-modern #admin-full-dashboard .card.card-animate::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--mui-primary);
  border-radius: 0 0 var(--mui-radius) var(--mui-radius);
  opacity: 0.85;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(4n+2) .card.card-animate::after,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(4n+2) .card.card-animate::after {
  background: #059669;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(4n+3) .card.card-animate::after,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(4n+3) .card.card-animate::after {
  background: #f59e0b;
}

.ui-modern #admin-full-dashboard .row > .col-xl-3:nth-child(4n+4) .card.card-animate::after,
.ui-modern #admin-full-dashboard .row > .col-md-6:nth-child(4n+4) .card.card-animate::after {
  background: #ef4444;
}

.ui-modern #admin-owner-overview .card {
  border-radius: var(--mui-radius);
}

/* —— Auth (New skin) —— */
.ui-modern.mui-auth,
body.ui-modern.mui-auth {
  background: #fff !important;
  min-height: 100vh;
  color: #171717;
}

.mui-auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.mui-auth-panel {
  flex: 1;
  background: #1e3a8a;
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background-image:
    linear-gradient(rgba(30, 58, 138, 0.92), rgba(30, 58, 138, 0.96)),
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(255,255,255,0.04) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(255,255,255,0.04) 20px);
}

.mui-auth-panel h1,
.mui-auth-panel strong,
.mui-auth-panel .fs-5 {
  color: #fff !important;
}

.mui-auth-panel h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.mui-auth-panel p.lead {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.mui-auth-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mui-auth-panel ul li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.95rem;
}

.mui-auth-panel ul li i {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #86efac;
  flex-shrink: 0;
}

.mui-auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #fff;
  color: #171717;
}

.mui-auth-form {
  width: 100%;
  max-width: 400px;
  color: #171717;
}

.mui-auth-form h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #171717 !important;
}

.mui-auth-form .mui-auth-sub {
  color: #737373 !important;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.mui-auth-form .form-label,
.mui-auth-form .form-check-label {
  color: #404040 !important;
}

.mui-auth-form .form-control {
  background: #fff !important;
  color: #171717 !important;
  border-color: #e5e5e5 !important;
}

.mui-auth-form .form-control::placeholder {
  color: #a3a3a3 !important;
}

.mui-auth-form .text-muted,
.mui-auth-form .password-addon,
.mui-auth-form .password-addon i {
  color: #737373 !important;
}

.mui-auth-form .language-switcher,
.mui-auth-form .language-switcher a,
.mui-auth-form .dropdown-toggle {
  color: #404040 !important;
}

.mui-auth-form .auth-page-credit,
.mui-auth-form .auth-page-credit a,
.mui-auth-form .auth-page-credit span {
  color: #737373 !important;
}

.mui-auth-form .btn-signin {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.65rem 1rem;
}

@media (max-width: 991.98px) {
  .mui-auth-panel {
    display: none;
  }

  .ui-modern .main-content {
    margin-left: 0;
  }
}

/* —— Content readability (light New) —— */
.ui-modern .page-title-box h4,
.ui-modern .page-title-right,
.ui-modern .breadcrumb-item,
.ui-modern .breadcrumb-item a {
  color: var(--mui-fg) !important;
}

.ui-modern .breadcrumb-item.active,
.ui-modern .text-muted {
  color: var(--mui-muted-fg) !important;
}

.ui-modern .card-header,
.ui-modern .card-title,
.ui-modern .card-header h4,
.ui-modern .card-header h5,
.ui-modern .card-header h6 {
  color: var(--mui-fg) !important;
}

.ui-modern .table,
.ui-modern .table > :not(caption) > * > * {
  color: var(--mui-fg);
  border-color: var(--mui-border);
}

.ui-modern .table thead th {
  color: var(--mui-muted-fg) !important;
  background: var(--mui-muted) !important;
}

.ui-modern .dropdown-menu {
  background: var(--mui-card) !important;
  border-color: var(--mui-border) !important;
}

.ui-modern .dropdown-item {
  color: var(--mui-fg) !important;
}

.ui-modern .dropdown-item:hover,
.ui-modern .dropdown-item:focus {
  background: var(--mui-muted) !important;
  color: var(--mui-fg) !important;
}

.ui-modern .form-label {
  color: var(--mui-fg);
}

.ui-modern .form-control,
.ui-modern .form-select,
.ui-modern .selectize-input {
  background-color: var(--mui-card) !important;
  color: var(--mui-fg) !important;
}

.ui-modern .selectize-dropdown {
  background: var(--mui-card) !important;
  border-color: var(--mui-border) !important;
  color: var(--mui-fg) !important;
}

.ui-modern .selectize-dropdown .option {
  color: var(--mui-fg) !important;
}

/* Dark mode under modern skin */
.ui-modern[data-bs-theme="dark"],
html.ui-modern[data-bs-theme="dark"],
html.ui-modern[data-bs-theme="dark"] body,
body.ui-modern[data-bs-theme="dark"] {
  --mui-bg: #0f172a;
  --mui-fg: #f1f5f9;
  --mui-card: #1e293b;
  --mui-muted: #334155;
  --mui-muted-fg: #94a3b8;
  --mui-border: #334155;
  --vz-body-bg: #0f172a;
  --vz-body-color: #f1f5f9;
  --vz-border-color: #334155;
  --vz-secondary-color: #94a3b8;
  background-color: #0f172a !important;
  color: #f1f5f9;
}

/* Amber brand topbar stays in dark mode too */
html.ui-modern[data-bs-theme="dark"] #page-topbar,
html.ui-modern[data-bs-theme="dark"] #page-topbar .layout-width,
.ui-modern[data-bs-theme="dark"] #page-topbar,
.ui-modern[data-bs-theme="dark"] #page-topbar .layout-width {
  background-color: #f7b84b !important;
  border-bottom: 0 !important;
}

html.ui-modern[data-bs-theme="dark"] #page-topbar .navbar-header h3,
html.ui-modern[data-bs-theme="dark"] .navbar-header h3,
html.ui-modern[data-bs-theme="dark"] #page-topbar .logo h3,
html.ui-modern[data-bs-theme="dark"] #page-topbar .text-white,
html.ui-modern[data-bs-theme="dark"] #page-topbar .topbar-user .user-name-text,
html.ui-modern[data-bs-theme="dark"] #page-topbar .topbar-user .user-name-sub-text,
html.ui-modern[data-bs-theme="dark"] #page-topbar .topbar-user .fw-medium,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn-ghost-secondary,
html.ui-modern[data-bs-theme="dark"] #page-topbar .dropdown-toggle,
html.ui-modern[data-bs-theme="dark"] #page-topbar .language-switcher,
html.ui-modern[data-bs-theme="dark"] #page-topbar .language-switcher span,
html.ui-modern[data-bs-theme="dark"] #page-topbar .language-switcher a,
.ui-modern[data-bs-theme="dark"] #page-topbar .navbar-header h3,
.ui-modern[data-bs-theme="dark"] .navbar-header h3 {
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] #page-topbar .mdi-menu::before,
html.ui-modern[data-bs-theme="dark"] #page-topbar .mdi-close::before,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn.rounded-circle i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn-topbar i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn-ghost-secondary i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .light-dark-mode i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn.light-dark-mode i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .btn[data-toggle="fullscreen"] i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .header-item i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .vertical-menu-btn i,
html.ui-modern[data-bs-theme="dark"] #page-topbar .topbar-user i,
.ui-modern[data-bs-theme="dark"] #page-topbar .btn.rounded-circle i,
.ui-modern[data-bs-theme="dark"] #page-topbar .header-item i {
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] #page-topbar #admin-working-branch {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

html.ui-modern[data-bs-theme="dark"] .footer,
.ui-modern[data-bs-theme="dark"] .footer {
  background: #1e293b !important;
  border-top-color: #334155 !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  padding: 0.75rem 0 !important;
}

html.ui-modern[data-bs-theme="dark"] .footer a,
html.ui-modern[data-bs-theme="dark"] .footer span,
html.ui-modern[data-bs-theme="dark"] .footer div,
.ui-modern[data-bs-theme="dark"] .footer a,
.ui-modern[data-bs-theme="dark"] .footer span,
.ui-modern[data-bs-theme="dark"] .footer div {
  color: #94a3b8 !important;
}

html.ui-modern[data-bs-theme="dark"] .footer a:hover {
  color: #93c5fd !important;
}

html.ui-modern[data-bs-theme="dark"] .card,
.ui-modern[data-bs-theme="dark"] .card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .card:not(.card-animate) .card-header {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}

html.ui-modern[data-bs-theme="dark"] .card:not(.card-animate) .card-header h3,
html.ui-modern[data-bs-theme="dark"] .card:not(.card-animate) .card-header h4,
html.ui-modern[data-bs-theme="dark"] .card:not(.card-animate) .card-header h5,
html.ui-modern[data-bs-theme="dark"] .card:not(.card-animate) .card-header .card-title {
  color: #f1f5f9 !important;
}

/* Dashboard KPI + P&L cards — uniform dark slate (beats light gradient specificity) */
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate,
.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate,
.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body p,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body h4,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body h5,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body h6,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body a,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body span,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .text-muted,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .text-uppercase,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body p,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body h4,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body a,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body span,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .text-muted,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .text-uppercase,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body p,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body h4,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body h5,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body h6,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body a,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .text-muted,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .card-body,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .text-muted,
.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .card-body,
.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .card-body {
  color: rgba(255, 255, 255, 0.92) !important;
}

html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate h4,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .ff-secondary,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate h4,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .ff-secondary,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate h4,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .ff-secondary,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate h4,
.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate h4,
.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate h4 {
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate a,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate a,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate a,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate a,
.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate a,
.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate a {
  color: rgba(255, 255, 255, 0.95) !important;
}

html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .avatar-title,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .avatar-title,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .avatar-title,
.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .avatar-title,
.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .avatar-title,
.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .avatar-title {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .avatar-title i,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .avatar-title .bx,
html.ui-modern[data-bs-theme="dark"] #admin-full-dashboard .card.card-animate .avatar-title .ri,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .avatar-title i,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .avatar-title .bx,
html.ui-modern[data-bs-theme="dark"] #admin-owner-overview .card.card-animate .avatar-title .ri,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .avatar-title i,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .avatar-title .bx,
html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .avatar-title .ri {
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .text-danger {
  color: #fca5a5 !important;
}

html.ui-modern[data-bs-theme="dark"] #profit-overview-section .card.card-animate .text-success {
  color: #86efac !important;
}

html.ui-modern[data-bs-theme="dark"] .card-header,
html.ui-modern[data-bs-theme="dark"] .card-title,
html.ui-modern[data-bs-theme="dark"] .card-header h4,
html.ui-modern[data-bs-theme="dark"] .card-header h5,
html.ui-modern[data-bs-theme="dark"] .card-header h6 {
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .text-muted,
.ui-modern[data-bs-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

html.ui-modern[data-bs-theme="dark"] .page-title-box h4,
html.ui-modern[data-bs-theme="dark"] .page-title-right,
html.ui-modern[data-bs-theme="dark"] .breadcrumb-item,
html.ui-modern[data-bs-theme="dark"] .breadcrumb-item a {
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #94a3b8 !important;
}

html.ui-modern[data-bs-theme="dark"] .table,
html.ui-modern[data-bs-theme="dark"] .table > :not(caption) > * > * {
  color: #f1f5f9 !important;
  border-color: #334155 !important;
  background-color: transparent;
}

html.ui-modern[data-bs-theme="dark"] .table thead th {
  color: #94a3b8 !important;
  background: #0f172a !important;
}

html.ui-modern[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(15, 23, 42, 0.45) !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .dropdown-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html.ui-modern[data-bs-theme="dark"] .dropdown-item {
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .dropdown-item:hover,
html.ui-modern[data-bs-theme="dark"] .dropdown-item:focus {
  background: #334155 !important;
  color: #fff !important;
}

html.ui-modern[data-bs-theme="dark"] .form-label {
  color: #e2e8f0 !important;
}

html.ui-modern[data-bs-theme="dark"] .form-control,
html.ui-modern[data-bs-theme="dark"] .form-select,
html.ui-modern[data-bs-theme="dark"] .selectize-input {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

html.ui-modern[data-bs-theme="dark"] .selectize-control.form-control,
html.ui-modern[data-bs-theme="dark"] .selectize-control.form-select,
html.ui-modern[data-bs-theme="dark"] .form-group > .selectize-control {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html.ui-modern[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
}

html.ui-modern[data-bs-theme="dark"] .selectize-dropdown {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .selectize-dropdown .option {
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .selectize-dropdown .option.active,
html.ui-modern[data-bs-theme="dark"] .selectize-dropdown .option:hover {
  background: #334155 !important;
}

html.ui-modern[data-bs-theme="dark"] .dataTables_wrapper,
html.ui-modern[data-bs-theme="dark"] .dataTables_info,
html.ui-modern[data-bs-theme="dark"] .dataTables_length label,
html.ui-modern[data-bs-theme="dark"] .dataTables_filter label {
  color: #94a3b8 !important;
}

html.ui-modern[data-bs-theme="dark"] .offcanvas,
html.ui-modern[data-bs-theme="dark"] .offcanvas-title {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .btn-soft-secondary,
html.ui-modern[data-bs-theme="dark"] .btn-ghost-secondary {
  color: #e2e8f0 !important;
}

html.ui-modern[data-bs-theme="dark"] .badge-soft-secondary,
html.ui-modern[data-bs-theme="dark"] .bg-soft-secondary {
  color: #e2e8f0 !important;
}

html.ui-modern[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
  color: #93c5fd;
}

html.ui-modern[data-bs-theme="dark"] .main-content,
html.ui-modern[data-bs-theme="dark"] .page-content {
  color: #f1f5f9;
}

/* Auth dark mode — form side readable when layout.js sets dark theme */
html.ui-modern[data-bs-theme="dark"] body.mui-auth,
html.ui-modern[data-bs-theme="dark"].mui-auth,
body.ui-modern.mui-auth[data-bs-theme="dark"] {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form-wrap,
html.ui-modern[data-bs-theme="dark"] body.mui-auth .mui-auth-form-wrap {
  background: #0f172a !important;
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form h2 {
  color: #f1f5f9 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form .mui-auth-sub,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .text-muted,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .password-addon,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .password-addon i,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .auth-page-credit,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .auth-page-credit a,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .auth-page-credit span {
  color: #94a3b8 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form .form-label,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .form-check-label {
  color: #e2e8f0 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form .form-control {
  background: #1e293b !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form .form-control::placeholder {
  color: #64748b !important;
}

html.ui-modern[data-bs-theme="dark"] .mui-auth-form .language-switcher,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .language-switcher a,
html.ui-modern[data-bs-theme="dark"] .mui-auth-form .dropdown-toggle {
  color: #e2e8f0 !important;
}

/* Marketing panel stays high-contrast in both themes */
html.ui-modern[data-bs-theme="dark"] .mui-auth-panel,
html.ui-modern[data-bs-theme="dark"] .mui-auth-panel h1,
html.ui-modern[data-bs-theme="dark"] .mui-auth-panel strong,
html.ui-modern[data-bs-theme="dark"] .mui-auth-panel ul li {
  color: #fff !important;
}

/* Hide classic-only chrome tweaks when modern */
.ui-classic .mui-sidebar-brand {
  display: none !important;
}

/* —— List page shell (Taajir-inspired) —— */
.ui-modern .mui-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.ui-modern .mui-page-header h1,
.ui-modern .mui-page-header .mui-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--mui-fg);
  margin: 0 0 0.2rem;
  line-height: 1.3;
}

.ui-modern .mui-page-header .mui-page-sub {
  margin: 0;
  font-size: 0.875rem;
  color: var(--mui-muted-fg);
}

.ui-modern .mui-page-header .mui-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ui-modern .mui-filter-bar,
.ui-modern form[id$="-filter"] {
  background: var(--mui-card);
  border: 1px solid var(--mui-border);
  border-radius: var(--mui-radius);
  box-shadow: var(--mui-shadow);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.ui-modern .mui-filter-bar .row,
.ui-modern form[id$="-filter"] > .row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.5rem;
}

.ui-modern .mui-filter-bar .input-group,
.ui-modern form[id$="-filter"] .input-group {
  margin-bottom: 0 !important;
}

.ui-modern .mui-filter-bar .input-group-text,
.ui-modern form[id$="-filter"] .input-group-text {
  background: var(--mui-muted);
  border-color: var(--mui-border);
  color: var(--mui-muted-fg);
  font-size: 0.8rem;
}

.ui-modern .mui-filter-bar .form-control,
.ui-modern .mui-filter-bar .form-select,
.ui-modern form[id$="-filter"] .form-control,
.ui-modern form[id$="-filter"] .form-select {
  border-color: var(--mui-border);
  font-size: 0.875rem;
}

.ui-modern .mui-filter-bar .btn,
.ui-modern form[id$="-filter"] .btn,
.ui-modern form[id$="-filter"] input[type="submit"] {
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 0 !important;
}

.ui-modern .mui-list-card,
.ui-modern .card.mui-list-card {
  border: 1px solid var(--mui-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.ui-modern .mui-list-card > .card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--mui-border) !important;
  padding: 1rem 1.15rem;
}

.ui-modern .mui-list-card > .card-body {
  padding: 1rem 1.15rem 1.25rem;
}

.ui-modern .dataTables_wrapper .dataTables_filter input,
.ui-modern .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--mui-border) !important;
  border-radius: 8px !important;
  background: var(--mui-card) !important;
  color: var(--mui-fg) !important;
}

.ui-modern .dataTables_wrapper .dataTables_info,
.ui-modern .dataTables_wrapper .dataTables_filter label,
.ui-modern .dataTables_wrapper .dataTables_length label {
  color: var(--mui-muted-fg);
}

/* Popup create (New theme) */
.ui-modern.mui-popup .page-content,
body.ui-modern.mui-popup .page-content {
  margin-top: 0 !important;
  padding: 1rem 1.25rem 2rem !important;
  background: var(--mui-bg);
  min-height: 100vh;
}

.ui-modern .mui-sale-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ui-modern .mui-sale-create-header h3 {
  margin: 0;
  font-weight: 700;
  color: var(--mui-fg);
}

/* POS shell */
.ui-modern .mui-pos-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}

@media (max-width: 1199.98px) {
  .ui-modern .mui-pos-shell {
    grid-template-columns: 1fr;
  }
}

.ui-modern .mui-pos-meta,
.ui-modern .mui-pos-products,
.ui-modern .mui-pos-cart {
  background: var(--mui-card);
  border: 1px solid var(--mui-border);
  border-radius: 12px;
  box-shadow: var(--mui-shadow);
  padding: 1rem;
}

.ui-modern .mui-pos-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.ui-modern .mui-pos-meta .form-group {
  margin-bottom: 0;
  min-width: 140px;
  flex: 1 1 160px;
}

.ui-modern .mui-pos-products-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.ui-modern .mui-pos-products-head .form-group {
  flex: 1;
  margin-bottom: 0;
}

.ui-modern .mui-pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.ui-modern .mui-pos-product-card {
  border: 1px solid var(--mui-border);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--mui-muted);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ui-modern .mui-pos-product-card:hover {
  border-color: var(--mui-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.ui-modern .mui-pos-product-card .mui-pos-product-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mui-fg);
  line-height: 1.25;
  margin: 0;
}

.ui-modern .mui-pos-product-card .mui-pos-product-stock {
  font-size: 0.7rem;
  color: var(--mui-muted-fg);
  margin: 0.25rem 0 0;
}

.ui-modern .mui-pos-toggles {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

.ui-modern .mui-pos-footer-actions {
  margin-top: 1rem;
}

html.ui-modern[data-bs-theme="dark"] .mui-filter-bar,
html.ui-modern[data-bs-theme="dark"] form[id$="-filter"],
html.ui-modern[data-bs-theme="dark"] .mui-pos-meta,
html.ui-modern[data-bs-theme="dark"] .mui-pos-products,
html.ui-modern[data-bs-theme="dark"] .mui-pos-cart {
  background: #1e293b;
  border-color: #334155;
}

html.ui-modern[data-bs-theme="dark"] .mui-filter-bar .input-group-text,
html.ui-modern[data-bs-theme="dark"] form[id$="-filter"] .input-group-text {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

html.ui-modern[data-bs-theme="dark"] .mui-pos-product-card {
  background: #0f172a;
  border-color: #334155;
}

html.ui-modern[data-bs-theme="dark"] .mui-page-header h1,
html.ui-modern[data-bs-theme="dark"] .mui-page-header .mui-page-title {
  color: #f1f5f9;
}

.page-content .nav-tabs {
  border-bottom: 1px solid var(--vz-border-color, #e9ebec);
}

.page-content .nav-tabs .nav-link {
  color: var(--vz-secondary-color, #878a99);
  background: transparent;
  border: 1px solid transparent;
}

.page-content .nav-tabs .nav-link:hover {
  isolation: isolate;
  color: var(--vz-primary, #405189);
  border-color: var(--vz-border-color, #e9ebec) var(--vz-border-color, #e9ebec) transparent;
}

.page-content .nav-tabs .nav-link.active {
  color: var(--vz-primary, #405189);
  background-color: var(--vz-secondary-bg, #fff);
  border-color: var(--vz-border-color, #e9ebec) var(--vz-border-color, #e9ebec) var(--vz-secondary-bg, #fff);
}

html.ui-modern[data-bs-theme="dark"] .page-content .nav-tabs {
  border-bottom-color: #334155;
}

html.ui-modern[data-bs-theme="dark"] .page-content .nav-tabs .nav-link {
  color: #94a3b8;
}

html.ui-modern[data-bs-theme="dark"] .page-content .nav-tabs .nav-link:hover,
html.ui-modern[data-bs-theme="dark"] .page-content .nav-tabs .nav-link.active {
  color: #e2e8f0;
  background-color: #1e293b;
  border-color: #334155 #334155 #1e293b;
}
