/*
  Sales compact theme.
  Revert: remove/rename this file and the Sales layout returns to its previous styling.
*/
:root{
  --sales-bg:#f3f6fb;
  --sales-panel:#ffffff;
  --sales-panel-soft:rgba(255,255,255,.82);
  --sales-text:#101828;
  --sales-muted:#667085;
  --sales-line:#e6eaf2;
  --sales-primary:#4f46e5;
  --sales-primary-2:#14b8a6;
  --sales-dark:#111827;
  --sales-radius:18px;
  --sales-shadow:0 14px 34px rgba(15,23,42,.08);
  --sales-shadow-soft:0 8px 22px rgba(15,23,42,.06);
  --sales-sidebar-width:220px;
  --sales-sidebar-rail:68px;
  --sales-content-x:16px;
  --sales-content-y:14px;
  --sales-table-min:1080px;
  --sales-table-font:.8rem;
  --sales-button-height:40px;
  --sales-kpi-min:136px;
}

*{
  scrollbar-width:thin;
  scrollbar-color:#c9d2e3 transparent;
}

html{
  font-size:14px;
}

body{
  margin:0;
  min-height:100vh;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--sales-text);
  background:
    radial-gradient(circle at 12% 7%, rgba(99,102,241,.18), transparent 30%),
    radial-gradient(circle at 86% 9%, rgba(20,184,166,.17), transparent 27%),
    radial-gradient(circle at 78% 72%, rgba(251,146,60,.10), transparent 30%),
    linear-gradient(180deg,#f8f9ff 0%, var(--sales-bg) 48%, #eef7f6 100%);
  font-size:.88rem;
  letter-spacing:-.01em;
}

a{
  color:var(--sales-primary);
}

.app{
  min-height:100vh;
  display:flex;
}

.sidebar{
  position:fixed;
  inset:0 auto 0 0;
  z-index:1040;
  width:var(--sales-sidebar-width);
  display:flex;
  flex-direction:column;
  padding:20px 14px 14px;
  overflow:visible;
  color:#e5e7eb;
  background:
    radial-gradient(circle at 18% 12%, rgba(99,102,241,.28), transparent 34%),
    linear-gradient(165deg,#232946 0%, #36405f 50%, #1f2937 100%);
  box-shadow:18px 0 45px rgba(15,23,42,.18);
}

.sidebar-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-bottom:12px;
}

.sidebar-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:28px;
}

.sidebar .logo{
  display:flex;
  align-items:center;
  gap:9px;
}

.sidebar .logo div{
  color:#f8fafc;
  letter-spacing:-.02em;
}

.sidebar .logo .badge{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.12);
  color:#fff;
  border-radius:999px;
}

.side-close{
  display:none;
  border:0;
  color:#fff;
  background:rgba(255,255,255,.12);
  border-radius:12px;
  width:34px;
  height:34px;
}

.nav-title{
  margin:0 12px 10px;
  color:rgba(255,255,255,.58);
  text-transform:uppercase;
  font-weight:800;
}

.menu-dropdown{
  margin-bottom:3px;
}

.menu-item{
  min-height:38px;
  padding:8px 10px;
  margin:3px 0;
  color:rgba(255,255,255,.78);
  text-decoration:none;
  border-radius:16px;
  transition:background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.menu-item:hover,
.menu-item.active{
  color:#fff;
  background:linear-gradient(135deg, rgba(99,102,241,.42), rgba(20,184,166,.28));
  box-shadow:0 12px 26px rgba(31,41,55,.22);
  transform:translateX(2px);
}

.menu-item i:first-child{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:13px;
  color:#60a5fa;
  background:rgba(96,165,250,.14);
}

.menu-sub{
  border-left:1px solid rgba(255,255,255,.13);
  margin-left:8px;
}

.menu-sub-item{
  min-height:32px;
  margin:2px 0;
  padding-left:5px !important;
  padding-right:8px !important;
  border-radius:13px;
}

.menu-sub-item span{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.18;
}

.main{
  width:100%;
  min-width:0;
  margin-left:var(--sales-sidebar-width);
  transition:margin-left .2s ease;
}

.topbar{
  position:sticky;
  top:0;
  z-index:900;
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 24px;
  backdrop-filter:blur(18px);
  background:rgba(255,255,255,.72);
  border-bottom:1px solid rgba(226,232,240,.75);
}

.topbar .title{
  color:#3443a5;
  font-weight:800;
  letter-spacing:-.02em;
}

.menu-toggle{
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid var(--sales-line);
  border-radius:15px;
  background:#fff;
  box-shadow:var(--sales-shadow-soft);
  cursor:pointer;
}

.dropdown.user > a{
  min-height:42px;
  padding:8px 13px;
  color:#2563eb;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(226,232,240,.88);
  border-radius:999px;
  box-shadow:var(--sales-shadow-soft);
  font-weight:700;
}

.pulse-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:#54c86a;
  box-shadow:0 0 0 5px rgba(84,200,106,.14);
}

.content{
  padding:var(--sales-content-y) var(--sales-content-x) 38px;
}

.page-title,
.content h1,
.content h2{
  font-size:1.48rem;
  font-weight:850;
  letter-spacing:-.04em;
  margin-bottom:6px;
}

.content h3{
  font-size:1.16rem;
}

.content h4,
.content h5{
  font-weight:800;
  letter-spacing:-.025em;
}

.content p,
.text-muted,
.small{
  color:var(--sales-muted) !important;
}

.card-box,
.table-box,
.sales-report-card,
.sales-report-filter,
.sales-report-result{
  border:1px solid rgba(226,232,240,.86) !important;
  border-radius:var(--sales-radius) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.72)),
    radial-gradient(circle at top right, rgba(99,102,241,.08), transparent 36%);
  box-shadow:var(--sales-shadow);
  backdrop-filter:blur(14px);
}

.card-box{
  position:relative;
  overflow:hidden;
  padding:24px;
}

.sales-select-search{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.sales-select-search-input{
  min-height:34px;
}

.sales-select-search .form-select[size]{
  overflow:auto;
}

.sales-combobox{
  position:relative;
  display:inline-block;
  min-width:150px;
  vertical-align:middle;
}

.sales-native-select{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}

.sales-combobox-toggle{
  width:100%;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid #dbe3ef;
  border-radius:7px;
  color:#101828;
  background:#fff;
  padding:7px 10px;
  font-size:.84rem;
  font-weight:650;
  line-height:1.15;
}

.sales-combobox-value{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sales-combobox-toggle i{
  color:#64748b;
  font-size:.8rem;
  flex:0 0 auto;
}

.sales-combobox.open .sales-combobox-toggle{
  border-color:#93c5fd;
  box-shadow:0 0 0 .18rem rgba(37,99,235,.12);
}

.sales-combobox-menu{
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:0;
  z-index:1070;
  display:none;
  min-width:220px;
  max-height:310px;
  padding:7px;
  border:1px solid #d9e2ef;
  border-radius:8px;
  background:#fff;
  box-shadow:0 18px 42px rgba(15,23,42,.16);
}

.sales-combobox.open .sales-combobox-menu{
  display:block;
}

.sales-combobox-search{
  width:100%;
  min-height:34px;
  margin-bottom:6px;
  border:1px solid #dbe3ef;
  border-radius:6px;
  padding:6px 8px;
  color:#101828;
  font-size:.8rem;
  outline:0;
}

.sales-combobox-search:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 .14rem rgba(37,99,235,.11);
}

.sales-combobox-options{
  max-height:246px;
  overflow:auto;
}

.sales-combobox-option{
  width:100%;
  min-height:32px;
  display:block;
  border:0;
  border-radius:6px;
  margin:1px 0;
  padding:7px 8px;
  color:#334155;
  background:transparent;
  font-size:.8rem;
  font-weight:650;
  text-align:left;
}

.sales-combobox-option:hover,
.sales-combobox-option[aria-selected="true"]{
  color:#111827;
  background:#eef4ff;
}

.sales-combobox-option:disabled{
  color:#9ca3af;
  cursor:not-allowed;
}

.sales-combobox-empty{
  padding:12px 8px;
  color:#6b7280;
  font-size:.78rem;
  text-align:center;
}

.card-box::before,
.table-box::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,#6366f1,#14b8a6,#f59e0b);
  opacity:.92;
}

.table-box{
  position:relative;
  overflow:hidden;
  padding:22px;
}

.hover-lift{
  transition:transform .18s ease, box-shadow .18s ease;
}

.hover-lift:hover{
  transform:translateY(-2px);
  box-shadow:0 18px 40px rgba(15,23,42,.11);
}

.form-label{
  color:#344054;
  font-size:.78rem;
  font-weight:750;
  margin-bottom:5px;
}

.form-control,
.form-select{
  min-height:40px;
  border-color:#dbe3ef;
  border-radius:13px;
  color:#101828;
  font-size:.84rem;
  background-color:rgba(255,255,255,.92);
}

.form-control-sm,
.form-select-sm{
  min-height:33px;
  border-radius:11px;
  font-size:.78rem;
}

.form-control:focus,
.form-select:focus{
  border-color:#a5b4fc;
  box-shadow:0 0 0 .2rem rgba(79,70,229,.12);
}

textarea.form-control{
  min-height:auto;
}

.btn{
  border-radius:13px;
  font-size:.82rem;
  font-weight:750;
  padding:.48rem .82rem;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
  min-height:var(--sales-button-height);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  line-height:1.15;
}

.btn-sm{
  border-radius:11px;
  font-size:.76rem;
  padding:.34rem .62rem;
  min-height:34px;
}

.btn-primary{
  border-color:transparent;
  background:linear-gradient(135deg,var(--sales-primary),#2563eb);
  box-shadow:0 8px 18px rgba(79,70,229,.18);
}

.btn-dark{
  background:#101828;
}

.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger{
  background:rgba(255,255,255,.72);
}

.badge{
  border-radius:999px;
  font-weight:750;
  letter-spacing:-.01em;
  padding:.43em .72em;
  box-shadow:0 7px 16px rgba(15,23,42,.08);
}

.table-responsive{
  border-radius:16px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.table{
  margin-bottom:0;
  color:#172033;
  font-size:var(--sales-table-font);
}

.table > :not(caption) > * > *{
  padding:.68rem .78rem;
  border-bottom-color:#edf1f7;
  vertical-align:middle;
}

.table thead th{
  color:#24324f;
  background:linear-gradient(180deg,#f9fbff,#eef4ff);
  font-size:.76rem;
  font-weight:850;
  text-transform:none;
  white-space:nowrap;
}

.table tbody tr{
  transition:background .16s ease;
}

.table-hover tbody tr:hover{
  background:rgba(79,70,229,.045);
}

.modal-content{
  border:1px solid rgba(226,232,240,.9);
  border-radius:20px;
  box-shadow:0 24px 60px rgba(15,23,42,.2);
}

.modal-header,
.modal-footer{
  border-color:#edf1f7;
}

.dropdown-menu{
  border:1px solid rgba(226,232,240,.95);
  border-radius:16px;
  box-shadow:var(--sales-shadow);
  font-size:.84rem;
}

.dropdown-item{
  border-radius:10px;
}

.fs-3{
  font-size:1.45rem !important;
}

.sales-btn{
  min-width:94px;
}

.empty-state,
.empty-box{
  border:1px dashed #d6deeb;
  border-radius:18px;
  background:rgba(255,255,255,.66);
}

/* Richer sales pages: headings, stat cards, filters, statuses */
.sales-page{
  animation:salesPageIn .22s ease-out;
}

@keyframes salesPageIn{
  from{opacity:.72; transform:translateY(4px);}
  to{opacity:1; transform:translateY(0);}
}

.sales-head{
  padding:4px 2px 2px;
}

.sales-h1{
  font-size:1.72rem;
  line-height:1;
  font-weight:900;
  letter-spacing:-.055em;
  color:#111827;
}

.sales-sub{
  margin-top:8px;
  color:#667085;
  font-size:.86rem;
  font-weight:600;
}

.sales-stat{
  min-height:var(--sales-kpi-min);
  border:0 !important;
  color:#fff;
  isolation:isolate;
}

.sales-stat::before{
  height:100%;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,255,255,.42), transparent 20%),
    radial-gradient(circle at 18% 86%, rgba(255,255,255,.18), transparent 28%);
  opacity:1;
  z-index:-1;
}

.sales-stat::after{
  content:"";
  position:absolute;
  right:-28px;
  bottom:-34px;
  width:132px;
  height:132px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  z-index:-1;
}

.stat-all{
  background:linear-gradient(135deg,#4f46e5 0%, #7c3aed 54%, #2563eb 100%) !important;
}

.stat-active{
  background:linear-gradient(135deg,#059669 0%, #14b8a6 58%, #22c55e 100%) !important;
}

.stat-warning{
  background:linear-gradient(135deg,#d97706 0%, #f59e0b 55%, #f97316 100%) !important;
}

.stat-inactive{
  background:linear-gradient(135deg,#334155 0%, #0f172a 55%, #475569 100%) !important;
}

.stat-k{
  color:rgba(255,255,255,.78);
  font-size:.78rem;
  font-weight:850;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.stat-v{
  margin-top:6px;
  color:#fff;
  font-size:2.28rem;
  line-height:1;
  font-weight:950;
  letter-spacing:-.06em;
  text-shadow:0 8px 22px rgba(15,23,42,.18);
}

.stat-s{
  margin-top:9px;
  color:rgba(255,255,255,.82);
  font-size:.82rem;
  font-weight:650;
}

.stat-ic{
  display:grid;
  place-items:center;
  width:62px;
  height:62px;
  border-radius:24px;
  color:#fff;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.20), 0 16px 26px rgba(15,23,42,.12);
}

.stat-ic i{
  font-size:1.65rem;
}

.sales-search{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:40px;
  padding:0 13px;
  border:1px solid #dbe3ef;
  border-radius:15px;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.045);
}

.sales-search i{
  color:#64748b;
  font-size:1rem;
}

.sales-search input{
  width:100%;
  border:0;
  outline:0;
  color:#101828;
  background:transparent;
  font-size:.84rem;
  font-weight:650;
}

#searchForm.sales-search{
  flex-wrap:wrap;
  width:100%;
  max-width:100%;
  height:auto;
  row-gap:10px;
}

#searchForm.sales-search > input{
  flex:1 1 260px;
  width:auto;
  min-width:180px;
}

#searchForm.sales-search > .form-select,
#searchForm.sales-search > .sales-select-search{
  flex:1 1 170px;
  width:auto !important;
  min-width:150px;
  margin-left:0 !important;
}

#searchForm.sales-search > .sales-select-search .form-select{
  width:100% !important;
}

#searchForm.sales-search > .btn,
#searchForm.sales-search > .clear-btn{
  margin-left:0 !important;
}

.table-box form.row{
  align-items:center;
}

.table-box .form-control,
.table-box .form-select{
  min-height:40px;
  border-radius:14px;
}

.table-box .btn{
  min-height:40px;
}

.sales-search:focus-within{
  border-color:#a5b4fc;
  box-shadow:0 0 0 .2rem rgba(79,70,229,.12), 0 10px 22px rgba(15,23,42,.06);
}

.sales-table{
  border-collapse:separate;
  border-spacing:0;
}

.sales-table thead th:first-child{
  border-top-left-radius:14px;
}

.sales-table thead th:last-child{
  border-top-right-radius:14px;
}

.sales-table tbody td:first-child{
  border-left:1px solid #edf1f7;
}

.sales-table tbody td:last-child{
  border-right:1px solid #edf1f7;
}

.sales-table tbody tr:last-child td:first-child{
  border-bottom-left-radius:14px;
}

.sales-table tbody tr:last-child td:last-child{
  border-bottom-right-radius:14px;
}

.sales-row,
.sales-table tbody tr{
  background:rgba(255,255,255,.72);
}

.sales-iconbtn{
  display:inline-grid;
  place-items:center;
  min-width:34px;
  min-height:32px;
  padding:.36rem .5rem;
}

.btn-group .btn{
  margin:2px;
  border-radius:11px !important;
}

.bg-success,
.badge.bg-success{
  border:1px solid rgba(16,185,129,.26) !important;
  background:linear-gradient(135deg,#10b981,#059669) !important;
  color:#fff !important;
}

.bg-warning,
.badge.bg-warning{
  border:1px solid rgba(245,158,11,.28) !important;
  background:linear-gradient(135deg,#fde68a,#f59e0b) !important;
  color:#422006 !important;
}

.bg-danger,
.badge.bg-danger{
  border:1px solid rgba(239,68,68,.28) !important;
  background:linear-gradient(135deg,#fb7185,#dc2626) !important;
  color:#fff !important;
}

.bg-info,
.badge.bg-info{
  border:1px solid rgba(14,165,233,.26) !important;
  background:linear-gradient(135deg,#bae6fd,#38bdf8) !important;
  color:#0c4a6e !important;
}

.bg-dark,
.badge.bg-dark{
  border:1px solid rgba(15,23,42,.25) !important;
  background:linear-gradient(135deg,#334155,#0f172a) !important;
  color:#fff !important;
}

.bg-secondary,
.badge.bg-secondary{
  border:1px solid rgba(100,116,139,.22) !important;
  background:linear-gradient(135deg,#94a3b8,#64748b) !important;
  color:#fff !important;
}

.bg-light,
.badge.bg-light{
  background:linear-gradient(135deg,#ffffff,#eef2ff) !important;
  color:#344054 !important;
}

.empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:180px;
  color:#64748b;
  background:
    radial-gradient(circle at center, rgba(99,102,241,.08), transparent 38%),
    rgba(255,255,255,.68);
}

.empty-ic{
  display:grid;
  place-items:center;
  width:66px;
  height:66px;
  border-radius:24px;
  color:#4f46e5;
  background:linear-gradient(135deg,#eef2ff,#e0f2fe);
  box-shadow:0 14px 28px rgba(79,70,229,.12);
}

.empty-ic i{
  font-size:1.8rem;
}

.empty-t{
  color:#101828;
  font-size:1.06rem;
  font-weight:900;
  letter-spacing:-.03em;
}

.empty-s{
  font-weight:600;
}

.sales-pagination .page-link{
  margin:0 2px;
  border:0;
  border-radius:11px;
  color:#475467;
  background:rgba(255,255,255,.78);
  box-shadow:0 6px 14px rgba(15,23,42,.05);
}

.sales-pagination .active .page-link{
  color:#fff;
  background:linear-gradient(135deg,#4f46e5,#2563eb);
}

/* Screenshot polish: compact rows, visible statuses, horizontal actions */
.table-box{
  padding:18px;
}

.table-responsive{
  overflow-x:auto;
  border:1px solid #e8edf5;
  border-radius:18px;
  background:#fff;
}

.sales-table{
  min-width:1080px;
}

.sales-delivery-table{
  min-width:1320px;
}

.sales-table > :not(caption) > * > *{
  padding:.58rem .72rem;
  line-height:1.24;
}

.sales-table tbody td{
  height:auto;
  background:rgba(255,255,255,.86);
}

.sales-table tbody tr:nth-child(odd) td{
  background:rgba(248,250,252,.92);
}

.sales-table tbody tr:hover td{
  background:#f4f7ff;
}

.sales-table .fw-bold,
.sales-table .fw-semibold{
  line-height:1.18;
}

.sales-table .small{
  margin-top:3px !important;
  line-height:1.18;
}

.sales-table td.text-end{
  white-space:nowrap;
  min-width:190px;
}

.sales-table .btn-group{
  display:inline-flex !important;
  flex-wrap:nowrap !important;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
}

.sales-table .btn-group .btn{
  margin:0;
}

.sales-iconbtn{
  width:38px;
  height:38px;
  min-width:38px;
  min-height:38px;
  border-radius:14px !important;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

.sales-table .btn-primary{
  white-space:nowrap;
  min-height:38px;
}

.sales-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-width:86px;
  justify-content:center;
  padding:.46rem .78rem;
  font-size:.75rem;
}

.sales-badge.active{
  border:1px solid rgba(16,185,129,.26) !important;
  background:linear-gradient(135deg,#34d399,#059669) !important;
  color:#fff !important;
}

.sales-badge.inactive{
  border:1px solid rgba(100,116,139,.22) !important;
  background:linear-gradient(135deg,#cbd5e1,#64748b) !important;
  color:#fff !important;
}

.badge.rounded-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:28px;
}

.badge.bg-light.border,
.badge.text-dark.border{
  border-color:#d8e0ed !important;
  background:linear-gradient(135deg,#ffffff,#f1f5ff) !important;
  color:#334155 !important;
  box-shadow:0 6px 14px rgba(15,23,42,.05);
}

.sales-toolbar{
  padding:2px 0 10px;
}

.sales-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  padding:7px 11px;
  border:1px solid #dfe6f2;
  border-radius:999px;
  color:#344054;
  background:linear-gradient(135deg,#fff,#f4f7ff);
  font-size:.78rem;
  font-weight:750;
  box-shadow:0 7px 16px rgba(15,23,42,.045);
}

.avatar{
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  min-width:34px;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(135deg,#4f46e5,#14b8a6);
  font-size:.82rem;
  font-weight:900;
  box-shadow:0 8px 18px rgba(79,70,229,.18);
}

.min-w-0{
  min-width:0;
}

@media (min-width: 821px){
  body.sales-sidebar-collapsed .sidebar{
    width:var(--sales-sidebar-rail);
    padding-left:10px;
    padding-right:10px;
    overflow:visible;
  }

  body.sales-sidebar-collapsed .sidebar-scroll{
    overflow:visible;
  }

  body.sales-sidebar-collapsed .main{
    margin-left:var(--sales-sidebar-rail);
  }

  body.sales-sidebar-collapsed .sidebar-head{
    justify-content:center;
    margin-bottom:20px;
  }

  body.sales-sidebar-collapsed .sidebar .logo div,
  body.sales-sidebar-collapsed .sidebar .logo .badge,
  body.sales-sidebar-collapsed .nav-title,
  body.sales-sidebar-collapsed .menu-item span,
  body.sales-sidebar-collapsed .menu-caret{
    display:none !important;
  }

  body.sales-sidebar-collapsed .menu-item{
    justify-content:center;
    width:48px;
    min-height:48px;
    padding:7px;
    margin:6px auto;
    gap:0;
  }

  body.sales-sidebar-collapsed .menu-item i:first-child{
    width:34px;
    height:34px;
    min-width:34px;
  }

  body.sales-sidebar-collapsed .menu-dropdown{
    position:relative;
  }

  body.sales-sidebar-collapsed .menu-dropdown.open .menu-sub{
    display:none;
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover::before,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within::before{
    content:attr(data-menu-title);
    position:fixed;
    left:100%;
    top:var(--sales-flyout-top, 80px);
    z-index:1061;
    min-width:238px;
    padding:12px 14px 9px;
    border:1px solid #d9e2ef;
    border-bottom:0;
    border-radius:10px 10px 0 0;
    color:#111827;
    background:#fff;
    box-shadow:0 18px 38px rgba(15,23,42,.14);
    font-size:.82rem;
    font-weight:850;
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub{
    position:fixed;
    left:var(--sales-sidebar-rail);
    top:calc(var(--sales-flyout-top, 80px) + 36px);
    z-index:1060;
    display:block;
    width:238px;
    max-height:calc(100vh - var(--sales-flyout-top, 80px) - 52px);
    overflow:auto;
    margin:0;
    padding:7px;
    border:1px solid #d9e2ef;
    border-top:0;
    border-radius:0 0 10px 10px;
    background:#fff;
    box-shadow:0 24px 48px rgba(15,23,42,.16);
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub .menu-item{
    width:100%;
    min-height:36px;
    justify-content:flex-start;
    gap:9px;
    margin:2px 0;
    padding:8px 10px !important;
    color:#344054;
    background:transparent;
    box-shadow:none;
    transform:none;
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item:hover,
  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item.active,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub .menu-item:hover,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub .menu-item.active{
    color:#111827;
    background:#eef4ff;
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item i:first-child,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub .menu-item i:first-child{
    width:24px;
    height:24px;
    min-width:24px;
    border-radius:7px;
    color:#2563eb;
    background:#e9f0ff;
    font-size:12px;
  }

  body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item span,
  body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub .menu-item span{
    display:block !important;
    min-width:0;
    color:inherit;
    font-size:.78rem;
    font-weight:750;
  }

  body.sales-sidebar-collapsed .sidebar > a.menu-item{
    position:relative;
  }

  body.sales-sidebar-collapsed .sidebar > a.menu-item:hover::after,
  body.sales-sidebar-collapsed .sidebar > a.menu-item:focus::after{
    content:attr(data-menu-title);
    position:absolute;
    left:100%;
    top:50%;
    z-index:1062;
    transform:translateY(-50%);
    min-width:170px;
    padding:9px 11px;
    border:1px solid #d9e2ef;
    border-radius:9px;
    color:#111827;
    background:#fff;
    box-shadow:0 16px 34px rgba(15,23,42,.14);
    font-size:.8rem;
    font-weight:800;
    white-space:nowrap;
  }

}

/* Enterprise finish: restrained Odoo-like surfaces without changing behavior. */
body{
  background:#f4f6f8;
  letter-spacing:0;
}

.sidebar{
  background:#2f3a4a;
  box-shadow:8px 0 22px rgba(15,23,42,.12);
}

.sidebar .logo .badge,
.menu-item i:first-child{
  color:#60a5fa;
  background:rgba(96,165,250,.14);
}

.menu-item:hover i:first-child,
.menu-item.active i:first-child{
  color:#93c5fd;
  background:rgba(147,197,253,.20);
}

.menu-item{
  border-radius:8px;
}

.menu-item:hover,
.menu-item.active{
  background:#435266;
  box-shadow:none;
  transform:none;
}

.menu-sub{
  border-left-color:rgba(255,255,255,.16);
}

.menu-sub-item{
  border-radius:7px;
}

.topbar{
  min-height:58px;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}

.topbar .title{
  color:#1f2937;
  font-size:.96rem;
}

.card-box,
.table-box,
.sales-report-card,
.sales-report-filter,
.sales-report-result{
  border-color:#dfe5ee !important;
  border-radius:8px !important;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.055);
}

.card-box::before,
.table-box::before{
  height:0;
}

.content h1,
.content h2,
.page-title,
.sales-h1{
  color:#172033;
  letter-spacing:0;
}

.sales-sub{
  color:#6b7280;
}

.form-control,
.form-select,
.sales-search,
.dropdown.user > a,
.menu-toggle,
.sales-notify-btn{
  border-radius:7px;
  box-shadow:none;
}

.btn{
  border-radius:7px;
  box-shadow:none;
}

.btn-sm{
  border-radius:6px;
}

.btn-primary{
  background:#2563eb;
  box-shadow:none;
}

.btn-success{
  background:#16a34a;
}

.btn-warning{
  color:#111827;
  background:#f59e0b;
  border-color:#f59e0b;
}

.table-box{
  padding:16px;
}

.table-box .table-responsive{
  border:1px solid #d8dee8 !important;
  border-radius:8px;
}

.table thead th{
  color:#334155;
  background:#eef2f7;
  font-weight:850;
  border-color:#d8dee8 !important;
}

.table > :not(caption) > * > *{
  border-color:#d8dee8 !important;
  border-width:1px !important;
}

.sales-table tbody td:first-child,
.sales-table tbody td:last-child{
  border-color:#edf1f6;
}

.table-bordered,
.table-bordered > :not(caption) > * > *{
  border-color:#d8dee8 !important;
  border-width:1px !important;
}

.sales-table tbody td{
  background:#fff;
}

.sales-table tbody tr:nth-child(odd) td{
  background:#fbfcfe;
}

.sales-table tbody tr:hover td{
  background:#f1f6ff;
}

.sales-iconbtn{
  border-radius:6px !important;
}

.sales-stat{
  border:1px solid #dfe5ee !important;
  color:#172033;
  background:#fff !important;
}

.sales-stat::before,
.sales-stat::after{
  display:none;
}

.stat-k,
.stat-s{
  color:#6b7280;
  letter-spacing:0;
}

.stat-v{
  color:#172033;
  letter-spacing:0;
}

.stat-ic{
  color:#2563eb;
  background:#eff6ff;
}

.sales-stat.stat-all{
  border-left:4px solid #4f46e5 !important;
}

.sales-stat.stat-active,
.sales-stat.stat-success{
  border-left:4px solid #16a34a !important;
}

.sales-stat.stat-warning{
  border-left:4px solid #d97706 !important;
}

.sales-stat.stat-primary{
  border-left:4px solid #2563eb !important;
}

.sales-stat.stat-danger{
  border-left:4px solid #dc2626 !important;
}

.sales-stat.stat-active .stat-ic,
.sales-stat.stat-success .stat-ic{
  color:#15803d;
  background:#dcfce7;
}

.sales-stat.stat-warning .stat-ic{
  color:#b45309;
  background:#fef3c7;
}

.sales-stat.stat-primary .stat-ic,
.sales-stat.stat-all .stat-ic{
  color:#2563eb;
  background:#eff6ff;
}

.sales-stat.stat-danger .stat-ic{
  color:#b91c1c;
  background:#fee2e2;
}

.sales-topbar-erp{
  min-height:38px;
  padding:.42rem .72rem;
  white-space:nowrap;
}


.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.sales-notify{
  position:relative;
}

.sales-notify-btn{
  position:relative;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border:1px solid rgba(226,232,240,.88);
  border-radius:15px;
  color:#344054;
  background:rgba(255,255,255,.92);
  box-shadow:var(--sales-shadow-soft);
}

.sales-notify-btn.has-items{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(135deg,#4f46e5,#14b8a6);
}

.sales-notify-badge{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  display:none;
  place-items:center;
  padding:0 5px;
  border:2px solid #fff;
  border-radius:999px;
  color:#fff;
  background:#ef4444;
  font-size:10px;
  font-weight:900;
  line-height:1;
}

.sales-notify-btn.has-items .sales-notify-badge{
  display:grid;
}

.sales-notify-panel{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:1055;
  width:min(340px, calc(100vw - 24px));
  max-height:420px;
  overflow:auto;
  display:none;
  border:1px solid rgba(226,232,240,.95);
  border-radius:16px;
  background:#fff;
  box-shadow:0 24px 58px rgba(15,23,42,.18);
}

.sales-notify.open .sales-notify-panel{
  display:block;
}

.sales-notify-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 14px;
  border-bottom:1px solid #edf1f7;
}

.sales-notify-title{
  color:#101828;
  font-size:.88rem;
  font-weight:900;
}

.sales-notify-sub{
  color:#667085;
  font-size:.74rem;
  font-weight:650;
}

.sales-notify-list{
  padding:8px;
}

.sales-notify-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 11px;
  border-radius:12px;
  color:#172033;
  text-decoration:none;
}

.sales-notify-item:hover{
  color:#101828;
  background:#f4f7ff;
}

.sales-notify-item-count{
  min-width:28px;
  padding:4px 7px;
  border-radius:999px;
  color:#fff;
  background:#4f46e5;
  font-size:.72rem;
  font-weight:900;
  text-align:center;
}

.sales-notify-empty{
  padding:18px 12px;
  color:#667085;
  font-size:.82rem;
  text-align:center;
}

.sales-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1080;
  width:min(360px, calc(100vw - 28px));
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 14px;
  border:1px solid rgba(226,232,240,.92);
  border-radius:16px;
  color:#fff;
  background:linear-gradient(135deg,#111827,#334155);
  box-shadow:0 24px 58px rgba(15,23,42,.24);
}

.sales-toast.show{
  display:flex;
}

.sales-toast-title{
  font-size:.84rem;
  font-weight:900;
}

.sales-toast-sub{
  margin-top:2px;
  color:rgba(255,255,255,.78);
  font-size:.74rem;
  font-weight:650;
}

.sales-toast a{
  color:#fff;
  font-size:.78rem;
  font-weight:900;
  white-space:nowrap;
}

.sales-kpi-grid,
.sales-dashboard-page .row.g-3{
  align-items:stretch;
}

.sales-kpi,
.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box{
  min-height:126px;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .small{
  line-height:1.18;
  font-size:.72rem;
  font-weight:800;
  min-height:1.7rem;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .fs-3{
  margin-top:4px;
  font-size:1.62rem !important;
  line-height:1;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .btn{
  align-self:flex-start;
  white-space:nowrap;
  min-height:30px;
  padding:.28rem .54rem;
  font-size:.72rem;
}

.table-box .table-responsive{
  max-width:100%;
  border:1px solid #e8edf5;
  border-radius:16px;
}

.sales-table,
.table-box > .table-responsive > .table{
  min-width:var(--sales-table-min);
}

.table-box th,
.table-box td{
  overflow:hidden;
  text-overflow:ellipsis;
}

.table-box thead th{
  position:sticky;
  top:0;
  z-index:2;
}

.table-box td.text-end,
.table-box td:last-child:has(.btn),
.table-box td:last-child:has(form){
  white-space:nowrap;
}

.table-box .btn-group,
.table-box .sales-actions{
  display:inline-flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:6px;
}

.table-box .btn-group .btn,
.table-box .sales-actions .btn{
  flex:0 0 auto;
}

@media (min-width: 1440px){
  :root{
    --sales-content-x:18px;
    --sales-content-y:16px;
    --sales-table-min:1180px;
  }

  .content{
    max-width:1920px;
  }

  .sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .fs-3{
    font-size:1.72rem !important;
  }
}

@media (max-width: 820px){
  .sidebar{
    transform:translateX(-105%);
    transition:transform .22s ease;
  }

  .sidebar.open{
    transform:translateX(0);
  }

  .sidebar-overlay{
    display:none;
    position:fixed;
    inset:0;
    z-index:1035;
    background:rgba(15,23,42,.38);
    backdrop-filter:blur(4px);
  }

  .sidebar-overlay.show{
    display:block;
  }

  .side-close,
  .menu-toggle{
    display:grid;
  }

  .main{
    margin-left:0;
  }

  .topbar{
    padding:12px 16px;
  }

  .content{
    padding:12px 10px 22px;
  }

  .topbar-actions{
    margin-left:auto;
  }

  .table-box{
    padding:14px;
  }

  .sales-table,
  .table-box > .table-responsive > .table{
    min-width:960px;
  }
}

@media (max-width: 576px){
  html{
    font-size:13px;
  }

  .sidebar{
    width:286px;
  }

  .topbar .title{
    max-width:44vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .dropdown.user > a{
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .topbar{
    gap:8px;
  }

  .topbar-actions{
    gap:7px;
  }

  .sales-notify-btn,
  .menu-toggle{
    width:38px;
    height:38px;
    border-radius:13px;
  }

  .sales-topbar-erp{
    width:38px;
    min-width:38px;
    height:38px;
    padding:0;
  }

  .sales-topbar-erp span{
    display:none;
  }

  .sales-notify-panel{
    right:-56px;
  }

  .sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box{
    min-height:108px;
  }

  .sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .fs-3{
    font-size:1.42rem !important;
  }
}

@media print{
  body{
    background:#fff !important;
  }

  .sidebar,
  .topbar,
  .sidebar-overlay{
    display:none !important;
  }

  .main{
    margin-left:0 !important;
  }

  .content{
    padding:0 !important;
  }
}

/* Cloudflare-inspired console finish: compact, bright, sharp, high-scan UI. */
:root{
  --sales-bg:#f7f7f8;
  --sales-text:#1d1d1f;
  --sales-muted:#6b7280;
  --sales-line:#e5e7eb;
  --sales-primary:#f6821f;
  --sales-primary-2:#2563eb;
  --sales-radius:6px;
  --sales-shadow:0 1px 2px rgba(16,24,40,.06);
  --sales-shadow-soft:0 1px 2px rgba(16,24,40,.05);
  --sales-table-font:.78rem;
  --sales-button-height:36px;
}

html{
  font-size:14px;
}

body{
  color:#1f2937;
  background:#f7f7f8;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:.86rem;
  letter-spacing:0;
}

.sidebar{
  background:#eef1f5;
  border-right:1px solid #d7dde6;
  color:#263241;
  box-shadow:3px 0 12px rgba(16,24,40,.06);
}

.sidebar .logo div{
  color:#1f2937;
  font-size:.92rem;
  font-weight:800;
}

.sidebar .logo .badge{
  color:#c2410c;
  border-color:#fed7aa;
  background:#fff7ed;
}

.nav-title{
  color:#7b8492;
  font-size:.68rem;
}

.menu-item{
  min-height:38px;
  color:#263241;
  border-radius:6px;
  font-size:.82rem;
  font-weight:650;
}

.menu-item i:first-child,
.sidebar .logo .badge,
.menu-item i:first-child{
  color:#2563eb;
  background:transparent;
}

.menu-item:hover,
.menu-item.active{
  color:#111827;
  background:#ffffff;
  box-shadow:none;
}

.menu-item:hover i:first-child,
.menu-item.active i:first-child{
  color:#f6821f;
  background:transparent;
}

.menu-sub{
  border-left-color:#d7dde6;
}

.menu-sub-item{
  color:#374151;
  font-size:.76rem !important;
}

.topbar{
  min-height:48px;
  background:#fff;
  border-bottom:1px solid #e5e7eb;
  box-shadow:none;
}

.topbar .title,
.sales-h1,
.page-title,
.content h1,
.content h2{
  color:#111827;
  font-weight:750;
  letter-spacing:0;
}

.topbar .title{
  font-size:.92rem;
}

.sales-h1,
.page-title,
.content h1,
.content h2{
  font-size:1.28rem;
}

.sales-sub,
.content p,
.text-muted,
.small{
  color:#6b7280 !important;
}

.content{
  background:#f7f7f8;
}

.card-box,
.table-box,
.sales-report-card,
.sales-report-filter,
.sales-report-result{
  border:1px solid #e5e7eb !important;
  border-radius:6px !important;
  background:#fff !important;
  box-shadow:0 1px 2px rgba(16,24,40,.05);
}

.form-label{
  color:#374151;
  font-size:.72rem;
  font-weight:700;
}

.form-control,
.form-select,
.sales-combobox-toggle,
.sales-combobox-search{
  min-height:36px;
  border-color:#d1d5db;
  border-radius:5px;
  color:#111827;
  font-size:.8rem;
  background:#fff;
}

.form-control:focus,
.form-select:focus,
.sales-combobox.open .sales-combobox-toggle,
.sales-combobox-search:focus{
  border-color:#f6821f;
  box-shadow:0 0 0 2px rgba(246,130,31,.18);
}

.btn{
  min-height:36px;
  border-radius:5px;
  font-size:.78rem;
  font-weight:700;
  box-shadow:none;
}

.btn-sm{
  min-height:30px;
  border-radius:5px;
  font-size:.72rem;
}

.btn-primary{
  background:#f6821f;
  border-color:#f6821f;
  color:#fff;
}

.btn-primary:hover{
  background:#e26f13;
  border-color:#e26f13;
}

.btn-outline-primary{
  color:#f6821f;
  border-color:#f8b26a;
}

.btn-outline-primary:hover{
  color:#fff;
  background:#f6821f;
  border-color:#f6821f;
}

.table-box{
  padding:14px;
}

.table{
  color:#1f2937;
  font-size:.78rem;
}

.table > :not(caption) > * > *{
  padding:.48rem .58rem;
  border-color:#edf0f3 !important;
}

.table thead th{
  color:#374151;
  background:#f3f4f6;
  font-size:.72rem;
  font-weight:800;
}

.sales-table tbody tr:nth-child(odd) td{
  background:#fff;
}

.sales-table tbody tr:hover td{
  background:#fff7ed;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box{
  min-height:104px;
  position:relative;
  overflow:hidden;
  padding:12px 10px 36px;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .small{
  color:#6b7280 !important;
  min-height:auto;
  display:block;
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap !important;
  font-size:.62rem;
  line-height:1.1;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .fs-3,
.stat-v{
  color:#111827;
  font-size:1.32rem !important;
  font-weight:800;
  white-space:nowrap !important;
}

.sales-dashboard-page .row.g-3 > [class*="col-"] > .card-box .btn{
  position:absolute;
  left:8px;
  right:8px;
  bottom:8px;
  width:auto;
  justify-content:center;
  min-height:26px;
  padding:.2rem .34rem;
  font-size:.62rem;
  line-height:1;
  white-space:nowrap !important;
  overflow:visible;
  text-overflow:clip;
}

.stat-ic{
  color:#f6821f;
  background:#fff7ed;
}

.sales-notify-btn,
.menu-toggle,
.dropdown.user > a,
.sales-topbar-erp{
  border-color:#e5e7eb;
  border-radius:5px;
  background:#fff;
  box-shadow:none;
}

.menu-toggle,
.sales-notify-btn{
  width:36px;
  height:36px;
}

.dropdown.user > a,
.sales-topbar-erp{
  min-height:34px;
  padding:.34rem .62rem;
}

.sales-notify-btn.has-items{
  color:#fff;
  background:#f6821f;
}

.sales-combobox-menu,
.sales-notify-panel,
body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub,
body.sales-sidebar-collapsed .menu-dropdown:focus-within .menu-sub,
body.sales-sidebar-collapsed .menu-dropdown:hover::before,
body.sales-sidebar-collapsed .menu-dropdown:focus-within::before{
  border-color:#e5e7eb;
  border-radius:6px;
  box-shadow:0 12px 28px rgba(16,24,40,.13);
}

.sales-combobox-option:hover,
.sales-combobox-option[aria-selected="true"],
body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item:hover,
body.sales-sidebar-collapsed .menu-dropdown:hover .menu-sub .menu-item.active{
  background:#fff7ed;
}

/* Parent item ordering in Quote and Order entry tables. */
.item-sort-controls { display:inline-flex; gap:2px; margin-right:4px; white-space:nowrap; }
.item-drag-handle { cursor:grab; touch-action:none; }
.item-drag-handle:active { cursor:grabbing; }
.item-sequence-dragging { opacity:.45; }
.item-serial-number { font-variant-numeric:tabular-nums; }
@media print { .item-sort-controls { display:none !important; } }
