:root {
  --maguva-primary: #6f42c1;
  --maguva-primary-dark: #5a32a3;
  --maguva-accent: #d63384;
  --maguva-chrome-purple: #6f42c1;
  --maguva-chrome-pink: #d63384;
  --maguva-chrome-deep: #5a32a3;
  --maguva-chrome-nav-grad: linear-gradient(
    90deg,
    var(--maguva-chrome-purple) 0%,
    var(--maguva-chrome-purple) 25%,
    #8e4ec6 40%,
    var(--maguva-chrome-pink) 100%
  );
  --maguva-chrome-side-grad: linear-gradient(180deg, var(--maguva-chrome-purple) 0%, var(--maguva-chrome-deep) 70%, #4a2885 100%);
  --maguva-surface: #ffffff;
  --maguva-surface-muted: #f7f8fc;
  --maguva-page-bg: #eef1f6;
  --maguva-radius-lg: 1rem;
  --maguva-radius-md: 0.75rem;
  --maguva-shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.06);
  --maguva-shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --maguva-shadow-glow: 0 8px 28px rgba(111, 66, 193, 0.18);
  --maguva-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background: var(--maguva-page-bg);
  font-family: var(--maguva-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-primary { color: var(--maguva-primary) !important; }
.btn-primary {
  --bs-btn-bg: var(--maguva-primary);
  --bs-btn-border-color: var(--maguva-primary);
  --bs-btn-hover-bg: var(--maguva-primary-dark);
  --bs-btn-hover-border-color: var(--maguva-primary-dark);
  background: linear-gradient(135deg, var(--maguva-primary) 0%, #7c51c9 48%, var(--maguva-accent) 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(111, 66, 193, 0.28);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--maguva-primary-dark) 0%, #6a3fb8 48%, #c22570 100%);
  box-shadow: 0 6px 20px rgba(111, 66, 193, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.25);
}

.btn-outline-primary {
  --bs-btn-color: var(--maguva-primary);
  --bs-btn-border-color: rgba(111, 66, 193, 0.45);
  --bs-btn-hover-bg: rgba(111, 66, 193, 0.08);
  --bs-btn-hover-border-color: var(--maguva-primary);
  font-weight: 600;
}

.navbar-maguva {
  background: var(--maguva-chrome-nav-grad);
  border-bottom: none;
  border-radius: 0;
  box-shadow: 0 4px 20px rgba(74, 40, 133, 0.25);
  margin-bottom: 0 !important;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(8px);
}

@media (min-width: 768px) {
  :root {
    --maguva-chrome-nav-grad: linear-gradient(
      90deg,
      var(--maguva-chrome-purple) 0%,
      var(--maguva-chrome-purple) 25%,
      #8e4ec6 42%,
      var(--maguva-chrome-pink) 100%
    );
  }

  .navbar-maguva {
    box-shadow: none;
    backdrop-filter: none;
  }

  .maguva-app-nav {
    border-top: none;
  }
}

@media (min-width: 992px) {
  :root {
    --maguva-chrome-nav-grad: linear-gradient(
      90deg,
      var(--maguva-chrome-purple) 0%,
      var(--maguva-chrome-purple) 16.6667%,
      #8e4ec6 36%,
      var(--maguva-chrome-pink) 100%
    );
  }
}

.maguva-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.maguva-brand-logo {
  height: 2.15rem;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.maguva-brand-word {
  line-height: 1.1;
}

.maguva-login-logo {
  max-width: min(100%, 6.5rem);
  width: auto;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: var(--maguva-radius-md);
  box-shadow: var(--maguva-shadow-glow);
}

.maguva-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 1.05rem;
}

.maguva-brand-mark--login {
  width: 3rem;
  height: 3rem;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--maguva-primary), var(--maguva-accent));
  color: #fff;
  box-shadow: var(--maguva-shadow-glow);
}

.maguva-chrome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.maguva-chrome > .maguva-app-shell {
  flex: 1;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (min-width: 768px) {
  .sidebar {
    min-height: 0;
  }
}
.variant-row { background: #f8f9fa; border-radius: 0.375rem; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.qty-stepper-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
  font-size: 1.125rem;
  font-weight: 600;
}

.qty-stepper-value {
  min-width: 2rem;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.variant-grid-table td:last-child {
  width: 9rem;
}

.inventory-photo-upload-foot {
  margin: 0.75rem 0 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.375rem;
  background: #f8f9fa;
  border: 1px solid #eceff3;
}

.inventory-photo-upload-foot-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.inventory-photo-upload-foot-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.inventory-photo-upload-foot-msg {
  flex: 1 1 12rem;
  line-height: 1.35;
  color: #6c757d !important;
}

.inventory-photo-upload-retry {
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
}

.inventory-photo-upload-foot-track {
  margin-top: 0.4rem;
  height: 3px;
  border-radius: 99px;
  background: #e9ecef;
  overflow: hidden;
}

.inventory-photo-upload-foot-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: rgba(111, 66, 193, 0.55);
  transition: width 0.2s ease;
}

.employee-page { max-width: 720px; width: 100%; }

/* App chrome — boxy sidebar joined to top navbar (purple theme) */
.maguva-app-shell {
  --maguva-shell-gap: 0;
  --maguva-nav-grad: var(--maguva-chrome-side-grad);
}

.maguva-app-shell.employee-shell {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (min-width: 768px) {
  .maguva-app-shell.container-fluid {
    padding: 0;
    max-width: 100%;
  }

  .maguva-app-shell > .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-height: calc(100vh - 56px);
    background: var(--maguva-nav-grad);
    border-top: none;
    margin-top: 0;
  }

  .maguva-app-shell > .row > .maguva-app-nav,
  .maguva-app-shell > .row > main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .maguva-app-shell > .row > main {
    background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
    border-radius: 0;
    box-shadow: none;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    min-height: calc(100vh - 56px);
    margin-top: 0;
    padding: 1.25rem 1.5rem 1.5rem !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .maguva-app-nav {
    padding-top: 0.85rem !important;
    flex: 0 0 auto;
    align-self: stretch;
    border-right: none;
  }
}

.maguva-app-nav {
  background: var(--maguva-nav-grad);
  border-bottom: none;
}

@media (min-width: 768px) {
  .maguva-app-nav {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 56px;
    align-self: stretch;
    z-index: 50;
    border-radius: 0;
    box-shadow: none;
    border-right: none;
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  }

  .maguva-app-shell > .row > main {
    position: relative;
    z-index: 0;
  }

  .maguva-app-nav::-webkit-scrollbar {
    width: 5px;
  }

  .maguva-app-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
  }
}

.maguva-nav-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.maguva-nav-section {
  list-style: none;
}

.maguva-nav-pills {
  gap: 0.35rem;
}

.maguva-app-nav .maguva-nav-pills {
  gap: 0;
}

#adminTabs.maguva-nav-pending > .nav-item,
#adminTabs.maguva-nav-pending > .maguva-nav-group,
#adminTabs.maguva-nav-pending > .maguva-nav-section {
  display: none !important;
}

html.maguva-shell-boot #adminTabs:not(.maguva-nav-pending) > .nav-item,
html.maguva-shell-boot #adminTabs:not(.maguva-nav-pending) > .maguva-nav-group,
html.maguva-shell-boot #adminTabs:not(.maguva-nav-pending) > .maguva-nav-section {
  visibility: hidden;
}

html.maguva-nav-ready #adminTabs > .nav-item,
html.maguva-nav-ready #adminTabs > .maguva-nav-group,
html.maguva-nav-ready #adminTabs > .maguva-nav-section {
  visibility: visible;
}

#adminTabs.maguva-nav-pending::before {
  content: 'Loading menu…';
  display: block;
  padding: 0.75rem 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
}

.maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.maguva-app-nav .maguva-nav-pills > .nav-item:last-child > .nav-link {
  border-bottom: none;
}

.maguva-nav-group > .nav-link {
  border-bottom: none;
}

.maguva-nav-pills .nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  font-weight: 500;
  color: #495057;
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  touch-action: manipulation;
  text-align: left;
  flex-wrap: nowrap;
}

.maguva-app-nav .maguva-nav-pills .nav-link {
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border-radius: 0;
  border-left: none;
  padding: 0.65rem 1rem 0.65rem 1.1rem;
  position: relative;
  font-weight: 500;
  min-height: 2.75rem;
}

.maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link[data-admin-tab].active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  background: #ffc107;
  border-radius: 0 3px 3px 0;
}

.maguva-nav-pills .nav-link i {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.maguva-app-nav .maguva-nav-pills .nav-link i {
  opacity: 0.9;
}

.maguva-nav-pills .nav-link .maguva-nav-label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  text-align: left;
  font-weight: inherit;
  font-size: 0.8125rem;
}

@media (min-width: 768px) {
  .maguva-app-nav .maguva-nav-pills > .nav-item {
    width: 100%;
  }

  .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link {
    align-items: center;
  }

  .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link i {
    margin-top: 0;
  }
}

.maguva-nav-pills .nav-link:hover:not(.active) {
  background: rgba(111, 66, 193, 0.08);
  color: var(--maguva-primary);
}

.maguva-app-nav .maguva-nav-pills .nav-link:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.maguva-nav-pills .nav-link.active {
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(111, 66, 193, 0.28);
}

.maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link[data-admin-tab].active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  font-weight: 500;
}

.maguva-app-nav .maguva-nav-pills .nav-link.active i {
  opacity: 1;
  color: #fff;
}

.maguva-nav-pills .nav-link.active i {
  opacity: 1;
}

.maguva-nav-pills .maguva-tab-badge {
  margin-left: auto;
  background: #ffc107;
  color: #212529;
  font-size: 0.7rem;
  min-width: 1.35rem;
}

.maguva-app-nav .maguva-nav-pills .maguva-tab-badge {
  background: rgba(255, 255, 255, 0.92);
  color: #5a32a3;
}

/* Sidebar sub-tabs — always visible under their parent section */
.maguva-nav-group .maguva-nav-sub {
  list-style: none;
  padding: 0.1rem 0 0.35rem 0;
  margin: 0;
  display: block;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.maguva-nav-sub .nav-item {
  width: 100%;
}

.maguva-nav-sub .nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.55rem 1rem 0.55rem 2.35rem !important;
  color: rgba(255, 255, 255, 0.68) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.maguva-nav-sub .nav-link::before {
  display: none !important;
}

.maguva-nav-sub .nav-link:hover:not(.active) {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.maguva-nav-sub .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  font-weight: 500;
  box-shadow: inset 3px 0 0 #ffc107 !important;
}

.maguva-nav-pills--segment {
  background: rgba(111, 66, 193, 0.06);
  border-radius: 99px;
  padding: 0.25rem;
  border: 1px solid rgba(111, 66, 193, 0.1);
}

.maguva-nav-pills--segment .nav-link {
  border-radius: 99px;
  font-weight: 600;
  justify-content: center;
  min-height: 2.75rem;
}

.maguva-nav-pills--segment .nav-link.active {
  background: linear-gradient(135deg, var(--maguva-primary), var(--maguva-accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(111, 66, 193, 0.28);
}

.maguva-main-content {
  padding: 1rem !important;
}

@media (min-width: 768px) {
  .maguva-main-content {
    padding: 1rem 1.25rem 1.25rem !important;
  }
}

.maguva-tab-bar .card-body {
  padding: 0.35rem !important;
}

.maguva-tab-pane.tab-pane.active {
  animation: maguva-tab-in 0.2s ease-out;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

#adminMainTabContent,
#employeeMainTabContent,
#foMainTabContent {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

/* Main tab panes — only one visible at a time (avoids Bootstrap nested tab conflicts) */
#adminMainTabContent > .tab-pane,
#employeeMainTabContent > .tab-pane,
#foMainTabContent > .tab-pane {
  display: none !important;
}

#adminMainTabContent > .tab-pane.active,
#employeeMainTabContent > .tab-pane.active,
#foMainTabContent > .tab-pane.active {
  display: block !important;
}

.maguva-tab-pane-host {
  position: relative;
}

.maguva-pane-busy-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Never block content on inactive panes — safety if hide was missed */
.maguva-tab-pane:not(.active) .maguva-pane-busy-overlay,
.maguva-tab-pane:not(.active).maguva-pane-busy {
  pointer-events: none;
}

.maguva-tab-pane:not(.active) .maguva-pane-busy-overlay {
  display: none !important;
}

.maguva-tab-pane:not(.active).maguva-pane-busy {
  /* allow inactive pane to stay hidden even if busy class stuck */
}

.maguva-pane-busy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 16rem;
}

.maguva-pane-busy-label {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.maguva-app-nav {
  pointer-events: auto;
}

.maguva-app-nav .nav-link {
  pointer-events: auto;
}

/* Nested sidebar-driven sub-panes (not Bootstrap tabs) */
.maguva-subtab-panes > .maguva-subtab-pane {
  display: none;
}

.maguva-subtab-panes > .maguva-subtab-pane.active {
  display: block;
}

@keyframes maguva-tab-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  body:has(.maguva-chrome) {
    background: #fff;
    --maguva-mobile-page-x: 0.9rem;
  }

  /* Content column is white; navbar + bottom tabs keep the purple chrome */
  .maguva-chrome {
    background: #fff;
    gap: 0;
  }

  .maguva-chrome > .maguva-app-shell.container-fluid {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .maguva-chrome > .maguva-app-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .maguva-app-shell > .row {
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    width: 100%;
    min-height: calc(100dvh - 56px);
    background: #fff;
  }

  .maguva-app-shell > .row > .maguva-app-nav,
  .maguva-app-shell > .row > main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100%;
    flex: 0 0 auto;
    width: 100%;
  }

  .maguva-app-shell > .row > .maguva-app-nav.sidebar {
    min-height: 0 !important;
    max-height: none !important;
    height: auto;
    flex: 0 0 auto;
  }

  .maguva-app-shell > .row > main {
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
    background: #fff !important;
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h, 4.35rem));
  }

  .maguva-app-shell {
    padding-left: 0;
    padding-right: 0;
  }

  .navbar-maguva {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    box-shadow: none !important;
    border-radius: 0;
  }

  .maguva-chrome > .navbar-maguva {
    padding-top: env(safe-area-inset-top, 0px);
  }

  .maguva-app-nav {
    position: sticky;
    top: 56px;
    z-index: 1020;
    background: var(--maguva-nav-grad);
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 0;
    margin-bottom: 0;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .maguva-app-nav .maguva-nav-pills {
    flex-direction: row !important;
    flex-wrap: wrap;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
    gap: 0.15rem;
  }

  .maguva-app-nav .maguva-nav-pills > .nav-item:not(.maguva-nav-group) {
    flex: 0 0 auto;
  }

  .maguva-nav-section {
    flex: 1 1 100%;
    width: 100%;
  }

  .maguva-nav-group {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .maguva-nav-group > .nav-link {
    width: 100%;
  }

  .maguva-nav-group .maguva-nav-sub {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0;
    padding: 0.25rem 0.5rem 0.35rem;
    margin: 0;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .maguva-nav-sub .nav-item {
    flex: 0 0 auto;
  }

  .maguva-nav-sub .nav-link {
    white-space: nowrap;
    padding: 0.45rem 0.85rem 0.45rem 0.85rem !important;
    font-size: 0.78rem;
    box-shadow: none !important;
  }

  .maguva-nav-sub .nav-link.active {
    box-shadow: inset 0 -2px 0 #ffc107 !important;
  }

  .maguva-app-nav .maguva-nav-pills::-webkit-scrollbar {
    display: none;
  }

  .maguva-app-nav .maguva-nav-pills .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-left: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
  }

  .maguva-app-nav .maguva-nav-pills .nav-link.active {
    border-left: none;
    border-bottom-color: #d63384;
    background: rgba(255, 255, 255, 0.08);
  }

  .maguva-app-nav .maguva-nav-pills .nav-link span {
    display: inline;
  }

  .maguva-app-nav .maguva-nav-pills .maguva-tab-badge {
    margin-left: 0.35rem;
  }

  .maguva-app-shell > .row > main {
    background: #fff !important;
    border-radius: 0;
    box-shadow: none;
    border-top: none;
    flex: 1 1 auto;
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h, 4.35rem));
    width: 100%;
  }

  .maguva-app-shell #adminMainTabContent > .tab-pane.active,
  .maguva-app-shell #employeeMainTabContent > .tab-pane.active,
  .maguva-app-shell #foMainTabContent > .tab-pane.active {
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h, 4.35rem));
    background: #fff;
  }

  .maguva-app-shell .shell-pane-loading {
    min-height: 8rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Unified admin shell — compact horizontal tab strip on mobile */
@media (max-width: 767.98px) {
  body[data-maguva-unified-shell="1"] .maguva-app-nav {
    padding: 0;
    margin-top: 0;
  }

  body[data-maguva-unified-shell="1"] .maguva-chrome {
    background: #fff;
  }

  body[data-maguva-unified-shell="1"] .maguva-app-shell > .row > main {
    border-top: none;
  }

  body[data-maguva-unified-shell="1"] #adminTabs.maguva-nav-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0.5rem;
    scrollbar-width: none;
    padding: 0.35rem 0.5rem 0.4rem;
    gap: 0.3rem;
  }

  body[data-maguva-unified-shell="1"] #adminTabs.maguva-nav-pills::-webkit-scrollbar {
    display: none;
  }

  body[data-maguva-unified-shell="1"] #adminTabs.maguva-nav-pending::before {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body[data-maguva-unified-shell="1"] #adminTabs > .maguva-nav-section {
    display: none !important;
  }

  body[data-maguva-unified-shell="1"] #adminTabs > .nav-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: auto;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    width: auto;
    min-width: 3.25rem;
    max-width: 4.75rem;
    padding: 0.42rem 0.35rem;
    min-height: 3.35rem;
    border-radius: 0.55rem;
    border-bottom: none !important;
    white-space: normal;
    text-align: center;
    position: relative;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link[data-admin-tab].active::before {
    display: none;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 -2px 0 #ffc107;
    border-bottom-color: transparent;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link i {
    font-size: 1.15rem;
    width: auto;
    margin: 0;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link .maguva-nav-label {
    flex: none;
    display: block;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    opacity: 0.88;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .nav-link.active .maguva-nav-label {
    opacity: 1;
  }

  body[data-maguva-unified-shell="1"] #adminTabs .maguva-tab-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.1rem;
    margin-left: 0;
    font-size: 0.55rem;
    padding: 0.15em 0.4em;
  }

  body[data-maguva-unified-shell="1"] .maguva-app-shell > .row {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }

  body[data-maguva-unified-shell="1"] .maguva-app-shell > .row > main {
    background: #fff !important;
    flex: 1 1 auto;
    width: 100%;
    min-height: calc(100vh - 56px - 4.25rem);
    min-height: calc(100dvh - 56px - 4.25rem);
  }

  body[data-maguva-unified-shell="1"] #adminMainTabContent {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }

  body[data-maguva-unified-shell="1"] #adminMainTabContent > .tab-pane.active {
    background: #fff !important;
    min-height: calc(100vh - 56px - 4.25rem);
    min-height: calc(100dvh - 56px - 4.25rem);
    padding: 0;
    box-sizing: border-box;
  }

  body[data-maguva-unified-shell="1"] #adminMainTabContent > .tab-pane.active:not(:has(
    .dashboard-summary-head,
    .billing-total-hero
  )) {
    padding: 0.75rem max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-left, 0px));
    padding-right: max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-right, 0px));
  }

  body[data-maguva-unified-shell="1"] #tab-emp-add.active .shell-pane-loading,
  body[data-maguva-unified-shell="1"] #tab-emp-add.active #empAddCatalogLoading {
    color: #6c757d;
    background: #fff;
    min-height: 12rem;
  }

  body[data-maguva-unified-shell="1"] #tab-emp-add.active .employee-page {
    width: 100%;
    min-height: 12rem;
  }

  /* Front office — stock audit first in the mobile scroll strip */
  body[data-maguva-unified-shell="1"].maguva-role-front-office #adminTabs > .nav-item:has(#tab-audit-btn) {
    order: -1000;
  }
}

.employee-shell .employee-tabs .nav-link .maguva-nav-label {
  line-height: 1.2;
}

.employee-shell .employee-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.employee-shell .employee-tabs::-webkit-scrollbar {
  display: none;
}

.employee-shell .employee-tabs .nav-item {
  flex: 0 0 auto;
}

/* Employee / front-office mobile tabs — 3×2 grid (all tabs visible including Billing) */
@media (max-width: 767.98px) {
  .employee-shell .employee-tabs--fo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 0.2rem;
    padding: 0.35rem 0.25rem;
    overflow-x: visible;
    width: 100%;
  }

  .employee-shell .employee-tabs--fo .maguva-nav-group {
    display: contents;
  }

  .employee-shell .employee-tabs--fo #tab-audit-btn {
    grid-column: 1;
    grid-row: 1;
  }

  .employee-shell .employee-tabs--fo #tab-billing-btn {
    grid-column: 2;
    grid-row: 1;
  }

  .employee-shell .employee-tabs--fo #tab-bills-btn {
    grid-column: 3;
    grid-row: 1;
  }

  .employee-shell .employee-tabs--fo #tab-inventory-btn {
    grid-column: 1;
    grid-row: 2;
  }

  .employee-shell .employee-tabs--fo #tab-offers-btn {
    grid-column: 2;
    grid-row: 2;
  }

  .employee-shell .employee-tabs--fo #tab-incentives-btn {
    grid-column: 3;
    grid-row: 2;
  }

  .employee-shell .employee-tabs--fo .maguva-nav-sub {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
    padding: 0.2rem 0.25rem 0.3rem;
  }

  .employee-shell .employee-tabs {
    overflow-x: visible;
    gap: 0.2rem;
    padding: 0.25rem;
  }

  .employee-shell .employee-tabs:not(.employee-tabs--fo) .nav-item {
    flex: 1 1 0;
    min-width: 0;
  }

  .employee-shell .employee-tabs--fo .nav-item {
    min-width: 0;
  }

  .employee-shell .employee-tabs .nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.45rem 0.15rem;
    min-height: 3.85rem;
    border-radius: 0.55rem;
    text-align: center;
    line-height: 1.1;
  }

  .employee-shell .employee-tabs .nav-link i {
    font-size: 1.2rem;
    width: auto;
    margin: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
  }

  .employee-shell .employee-tabs .nav-link.active i {
    transform: scale(1.06);
  }

  .employee-shell .employee-tabs .nav-link .maguva-nav-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    max-width: 100%;
    padding: 0 0.1rem;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    opacity: 0.9;
  }

  .employee-shell .employee-tabs--fo .nav-link .maguva-nav-label {
    font-size: 0.55rem;
    letter-spacing: 0.01em;
  }

  .employee-shell .employee-tabs .nav-link:not(.active) .maguva-nav-label {
    color: rgba(255, 255, 255, 0.72);
  }

  .employee-shell .employee-tabs .maguva-nav-group {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .employee-shell .employee-tabs--fo .maguva-nav-group {
    display: contents;
  }

  .employee-shell .employee-tabs .maguva-nav-sub .nav-link {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-height: 0;
    font-size: 0.62rem;
    padding: 0.3rem 0.45rem !important;
  }

  .employee-shell .employee-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    border-bottom: 3px solid #ffc107;
    border-radius: 0;
  }

  .employee-shell .employee-tabs .nav-link.active .maguva-nav-label {
    opacity: 1;
    color: #fff;
  }
}

@media (min-width: 768px) {
  .employee-shell .employee-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .employee-shell .employee-tabs .nav-item {
    flex: 1 1 100%;
    width: 100%;
  }

  .employee-shell .employee-tabs .nav-link {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    min-height: 2.75rem;
    border-radius: 0;
    border-left: none;
    border-bottom: none;
    padding: 0.65rem 1rem 0.65rem 1.1rem;
    position: relative;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
  }

  .employee-shell .employee-tabs .nav-link:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
  }

  .employee-shell .employee-tabs .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    background: #ffc107;
    border-radius: 0 3px 3px 0;
  }

  .employee-shell .employee-tabs .nav-link.active {
    border-left: none;
    border-bottom: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
    font-weight: 500;
  }

  .employee-shell .employee-tabs .nav-link .maguva-nav-label {
    font-size: 0.8125rem;
    font-weight: inherit;
    line-height: 1.2;
    white-space: normal;
  }
}

.pending-pricing-card {
  background: #fff;
  border: 1px solid rgba(111, 66, 193, 0.12);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 0.875rem;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pending-pricing-card:has(.pending-select:checked) {
  border-color: rgba(111, 66, 193, 0.45);
  box-shadow: 0 4px 14px rgba(111, 66, 193, 0.12);
}

.pending-pricing-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.pending-pricing-card-photo .inv-thumb,
.pending-pricing-card-photo .inv-thumb-placeholder {
  width: 56px;
  height: 56px;
}

.pending-pricing-card-detail {
  line-height: 1.4;
  word-break: break-word;
}

.pending-pricing-card-detail + .pending-pricing-card-detail {
  margin-top: 0.25rem;
}

.pending-pricing-mrp-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: #f8f9fa;
  border-radius: 0.35rem;
}

.pending-pricing-mrp-row .pending-mrp {
  color: var(--maguva-primary);
}

/* Pending pricing page */
.pending-pricing-page {
  max-width: 100%;
}

.pending-pricing-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0.875rem;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.1) 0%, rgba(214, 51, 132, 0.08) 100%);
  border: 1px solid rgba(111, 66, 193, 0.14);
}

.pending-pricing-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.pending-pricing-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  background: var(--maguva-chrome-nav-grad);
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(111, 66, 193, 0.25);
}

.pending-pricing-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: #2d2640;
}

.pending-pricing-subtitle {
  font-size: 0.9rem;
  color: #5c5470;
}

.pending-pricing-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--maguva-primary);
  background: #fff;
  border: 1px solid rgba(111, 66, 193, 0.2);
  white-space: nowrap;
}

.pending-pricing-count-badge--empty {
  color: #198754;
  border-color: rgba(25, 135, 84, 0.25);
}

.pending-pricing-hint {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid #e8ecf1;
  font-size: 0.8125rem;
  color: #5c6470;
  line-height: 1.5;
}

.pending-pricing-hint > i {
  color: #e6a817;
  font-size: 1.1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.pending-pricing-bulk-card {
  border: 1px solid rgba(111, 66, 193, 0.15);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(111, 66, 193, 0.07);
}

.pending-pricing-bulk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: #fff;
  border: none;
}

.pending-pricing-bulk-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.pending-pricing-selected-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.pending-pricing-bulk-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pending-pricing-bulk-section {
  padding-bottom: 1.25rem;
  border-bottom: 1px dashed #e4e8ee;
}

.pending-pricing-bulk-section:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pending-pricing-bulk-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--maguva-primary);
  margin: 0 0 0.75rem;
}

.pending-pricing-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  background: #f1f3f5;
  vertical-align: middle;
}

.pending-pricing-readonly {
  background: #f4f2f8 !important;
  color: #495057;
  font-weight: 600;
  cursor: default;
}

.pending-pricing-helper-input {
  background: #faf9fc;
  border-color: #e2dce8;
}

.pending-pricing-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef1f5;
}

.pending-pricing-bulk-preview {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  color: #495057;
  background: #f8f9fb;
  border: 1px solid #e9ecef;
  min-height: 0;
}

.pending-pricing-bulk-preview:empty {
  display: none;
}

.pending-pricing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 0.65rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.pending-pricing-select-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #3d4450;
}

.pending-pricing-save-btn {
  font-weight: 600;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  box-shadow: 0 2px 8px rgba(25, 135, 84, 0.25);
}

.pending-pricing-table-card {
  border: 1px solid rgba(111, 66, 193, 0.1);
}

.pending-pricing-table-wrap .pending-pricing-col-groups th {
  background: rgba(90, 50, 163, 0.92);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-color: #5a32a3;
  text-align: center;
}

.pending-pricing-table-wrap .pending-pricing-th-helper {
  font-size: 0.72rem;
  opacity: 0.92;
}

.pending-pricing-table tbody td {
  vertical-align: middle;
}

.pending-pricing-table .pending-pricing-helper-input,
.pending-pricing-table .pending-mrp-input,
.pending-pricing-table .pending-discounted-mrp {
  background: #faf9fc;
  border-color: #e2dce8;
  max-width: 6.5rem;
  margin-left: auto;
}

.pending-pricing-table .pending-effective-margin,
.pending-pricing-table .pending-pricing-post-disc {
  max-width: 5rem;
  margin-left: auto;
  background: #f0ebf8 !important;
  border-color: #d8cce8;
  font-weight: 600;
  color: #5a32a3;
}

.pending-pricing-th-post-disc {
  background: rgba(214, 51, 132, 0.85) !important;
}

.pending-pricing-variant-chip {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #5a32a3;
  background: rgba(111, 66, 193, 0.08);
  border: 1px solid rgba(111, 66, 193, 0.12);
}

.pending-pricing-row-actions {
  min-width: 5.5rem;
}

.pending-pricing-row-save {
  font-weight: 600;
  width: 100%;
}

.pending-pricing-pager {
  padding: 0.65rem 1rem;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 0.65rem;
}

.pending-pricing-pager-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pending-pricing-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6c757d;
  background: #fff;
  border: 1px dashed #dee2e6;
  border-radius: 0.65rem;
}

.pending-pricing-card-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.pending-pricing-card-section {
  padding: 0.75rem;
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  background: #f8f9fb;
  border: 1px solid #eef1f5;
}

.pending-pricing-card-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.employee-recent-pane {
  width: 100%;
  max-width: none;
}

.employee-scan-page {
  max-width: 520px;
}

.scan-reader-card {
  overflow: hidden;
  border-radius: 0.75rem;
}

.scan-reader-wrap {
  width: 100%;
  max-width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #111;
}

.scan-reader-wrap [id$="__scan_region"],
.scan-reader-wrap [id$="__dashboard"] {
  width: 100% !important;
}

.scan-reader-wrap [id$="__scan_region"] {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.employee-billing-page,
.employee-bills-page {
  max-width: 760px;
}

.billing-total-hero {
  position: sticky;
  top: 0.5rem;
  z-index: 20;
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 55%, #5a9fd4 100%);
  color: #fff;
  border-radius: var(--maguva-radius-lg);
  box-shadow: var(--maguva-shadow-glow);
}

.billing-total-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.billing-total-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.billing-item-badge {
  font-size: 0.8rem;
  color: #333 !important;
}

.billing-hero-exchange-stats .billing-hero-stat {
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  min-height: 5.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.billing-hero-stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #343a40;
}
.billing-hero-stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0.15rem 0;
  color: #212529;
}
.billing-hero-stat-hint {
  font-size: 0.68rem;
  color: #495057;
}
/* Return credit — dark teal on mint tile (WCAG-friendly on white/mint) */
.billing-hero-stat--credit {
  background: #e6f4ea;
  border-left: 4px solid #1e7e34;
}
.billing-hero-stat--credit .billing-hero-stat-label {
  color: #0d3d22;
}
.billing-hero-stat--credit .billing-hero-stat-value {
  color: #0a2e1a;
}
.billing-hero-stat--credit .billing-hero-stat-hint {
  color: #1e5c36;
}
.billing-hero-stat--credit.is-active {
  background: #cce8d4;
  border-left-color: #157347;
  box-shadow: 0 0 0 2px #157347, 0 2px 10px rgba(0, 0, 0, 0.12);
}
.billing-hero-stat--credit.is-active .billing-hero-stat-value {
  color: #052e16;
}
/* Collect now — neutral default, strong amber when payment due */
.billing-hero-stat--collect {
  background: #f8f9fa;
  border-left: 4px solid #adb5bd;
}
.billing-hero-stat--collect .billing-hero-stat-value {
  color: #212529;
}
.billing-hero-stat--collect.is-due {
  background: #fff3cd;
  border-left: 4px solid #e8590c;
  box-shadow: 0 0 0 2px #e8590c, 0 2px 10px rgba(0, 0, 0, 0.12);
}
.billing-hero-stat--collect.is-due .billing-hero-stat-label {
  color: #7c2d12;
}
.billing-hero-stat--collect.is-due .billing-hero-stat-value {
  color: #9a3412;
  font-size: 1.85rem;
}
.billing-hero-stat--collect.is-due .billing-hero-stat-hint {
  color: #c2410c;
}
.billing-hero-stat--new {
  background: #eef2ff;
  border-left: 4px solid #4f46e5;
}
.billing-hero-stat--new .billing-hero-stat-label {
  color: #312e81;
}
.billing-hero-stat--new .billing-hero-stat-value {
  color: #1e1b4b;
}
.billing-hero-stat--new .billing-hero-stat-hint {
  color: #4338ca;
}
.billing-hero-stat--new.is-active {
  background: #e0e7ff;
  border-left-color: #4338ca;
  box-shadow: 0 0 0 2px #6366f1, 0 2px 10px rgba(0, 0, 0, 0.12);
}
.billing-hero-stat--collect.is-refund {
  background: #dbeafe;
  border-left: 4px solid #2563eb;
  box-shadow: 0 0 0 2px #2563eb, 0 2px 10px rgba(0, 0, 0, 0.12);
}
.billing-hero-stat--collect.is-refund .billing-hero-stat-label {
  color: #1e3a8a;
}
.billing-hero-stat--collect.is-refund .billing-hero-stat-value {
  color: #1d4ed8;
  font-size: 1.85rem;
}
.billing-hero-stat--collect.is-refund .billing-hero-stat-hint {
  color: #1d4ed8;
}
.billing-hero-revised {
  font-size: 0.8rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.billing-hero-revised strong {
  color: #fff;
  font-weight: 800;
}
.billing-hero-orig-paid {
  color: rgba(255, 255, 255, 0.92);
}

.billing-customer-top {
  animation: billingFadeIn 0.2s ease-out;
}

.billing-customer-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.billing-customer-card .form-label {
  color: #6c757d;
  font-weight: 600;
}

.discount-offers-section {
  padding-top: 0.25rem;
}

.discount-offers-section + .discount-offers-section {
  border-top: 1px solid #e9ecef;
  padding-top: 1.5rem;
}

.billing-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #fff 0%, #f8f5ff 100%);
  border-radius: var(--maguva-radius-lg);
  border: 1px solid rgba(111, 66, 193, 0.1);
  box-shadow: var(--maguva-shadow-sm);
}

.billing-step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #adb5bd;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.billing-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  font-size: 0.72rem;
}

.billing-step-active {
  color: #6f42c1;
}

.billing-step-active .billing-step-num {
  background: linear-gradient(135deg, #6f42c1, #d63384);
  color: #fff;
}

.billing-step-done {
  color: #198754;
}

.billing-step-done .billing-step-num {
  background: #d1e7dd;
  color: #198754;
}

.billing-step-line {
  flex: 1;
  height: 2px;
  background: #e9ecef;
  min-width: 0.5rem;
}

.billing-step-card kbd {
  font-size: 0.75em;
  padding: 0.1rem 0.35rem;
}

.billing-card .card-header h2 {
  color: #212529;
}

.billing-scan-group .input-group-text {
  color: #6f42c1;
  border-color: #dee2e6;
}

.billing-scan-input {
  letter-spacing: 0.05em;
  border-color: #dee2e6;
}

.billing-scan-input:focus {
  border-color: #6f42c1;
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}

.billing-confirm-modal .modal-body {
  padding-top: 0.5rem;
}

.billing-confirm-modal-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  min-height: 12rem;
}

.billing-confirm-modal-photo {
  display: block;
  max-width: min(100%, 420px);
  max-height: min(62vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #f8f9fa;
}

.billing-confirm-modal-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(100%, 420px);
  min-height: 220px;
  border-radius: 0.5rem;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.9rem;
}

.billing-confirm-modal-photo-placeholder i {
  font-size: 2rem;
  opacity: 0.45;
}

.billing-confirm-modal-meta {
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  background: #f8f9fa;
}

@media (min-width: 576px) {
  .billing-confirm-modal-photo {
    max-width: min(100%, 480px);
    max-height: min(68vh, 560px);
  }
}

.billing-confirm-photo {
  width: 120px;
  height: 160px;
  object-fit: cover;
}

@media (min-width: 576px) {
  .billing-confirm-photo {
    width: 140px;
    height: 180px;
  }
}

.billing-confirm-card {
  animation: billingFadeIn 0.2s ease-out;
}

@keyframes billingFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.billing-empty-state {
  color: #6c757d;
}

.billing-cart-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  white-space: nowrap;
}

.billing-remove-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
}

.billing-pay-tile {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.billing-pay-tile:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.billing-pay-tile--refund {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), 0 0.35rem 1rem rgba(37, 99, 235, 0.18);
}

.billing-pay-tile--refund .form-label {
  color: #1e3a8a;
  font-weight: 700;
}

.billing-refund-amount {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1d4ed8;
  line-height: 1.1;
}

.billing-refund-hint {
  color: #1e40af;
  margin-top: 0.15rem;
}

.bills-filter-card {
  background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
  border-radius: 0.85rem;
}

.bills-hero {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 55%, #5a9fd4 100%);
  color: #fff;
  border-radius: 0.85rem;
}

.bills-hero-sub {
  color: rgba(255, 255, 255, 0.82);
}

.bills-summary-count {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.bills-summary-total {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}

.bills-period-select {
  min-width: 9rem;
  border-color: #dee2e6;
}

.bills-period-select:focus {
  border-color: #6f42c1;
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.12);
}

.bills-list .min-width-0 {
  min-width: 0;
}

.bills-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bills-card {
  border-radius: 0.85rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: billingFadeIn 0.25s ease-out;
}

.bills-returns-summary .bills-returns-period {
  background: #f8fafc;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.bills-returns-period-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.35rem;
}
.bills-returns-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-right: 0.35rem;
}
.bills-returns-stat-lbl {
  font-size: 0.75rem;
  color: #6c757d;
}
.bills-returns-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.bills-returns-reason {
  font-size: 0.8rem;
}
.billing-return-reason-select {
  max-width: 9rem;
  font-size: 0.75rem;
}
.bills-card-clickable { cursor: pointer; }
.bills-card-clickable:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.billing-line-removed { opacity: 0.75; background: #fff5f5 !important; }
.billing-line-removed td { color: #6c757d; }
.billing-line-added { background: #ecfdf5 !important; }
.billing-line-added td { background: inherit; }
.bill-detail-thumb { width: 64px; height: 64px; object-fit: cover; flex-shrink: 0; }
.bill-detail-thumb--empty { background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%); border: 1px dashed rgba(111, 66, 193, 0.2); }

/* Clickable bill numbers */
.bill-id-link {
  color: #6f42c1;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0.3rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.bill-id-link:hover,
.bill-id-link:focus {
  color: #d63384;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bill-id-link.btn-link {
  font-weight: 600;
  vertical-align: baseline;
}
.bills-card-billno.bill-id-link {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.08), rgba(214, 51, 132, 0.06));
  border: 1px solid rgba(111, 66, 193, 0.15);
  text-decoration: none;
}
.bills-card-billno.bill-id-link:hover,
.bills-card-billno.bill-id-link:focus {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.14), rgba(214, 51, 132, 0.1));
  text-decoration: none;
  color: #5a32a3;
}

/* Bill detail modal — purple/pink theme */
.bill-detail-popup .modal-dialog {
  max-width: min(820px, calc(100vw - 1.5rem));
}
.bill-detail-popup .modal-content {
  border-radius: 0.85rem;
  overflow: hidden;
}
.bill-detail-popup.show ~ .modal-backdrop {
  opacity: 0.55;
}
.bill-detail-modal-header {
  background: linear-gradient(135deg, #6f42c1 0%, #9b4dca 45%, #d63384 100%);
  color: #fff;
  padding: 1.1rem 1.25rem;
  align-items: flex-start;
}
.bill-detail-modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.bill-detail-modal-title-wrap {
  flex: 1;
  min-width: 0;
}
.bill-detail-id-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin-bottom: 0.35rem;
}
.bill-detail-id-value {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.bill-detail-modal-subtitle {
  font-size: 0.82rem;
  opacity: 0.88;
  margin-top: 0.35rem;
}
.bill-detail-modal-body {
  background: linear-gradient(180deg, #f8f5ff 0%, #fff 35%, #fff5f9 100%);
  padding: 1rem 1.15rem 1.25rem;
}
.bill-detail-loading {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.bill-detail-summary {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgba(111, 66, 193, 0.12);
  padding: 0.85rem 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.bill-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.bill-detail-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(111, 66, 193, 0.08);
  color: #6f42c1;
  border: 1px solid rgba(111, 66, 193, 0.12);
}
.bill-detail-meta-chip--parent .bill-id-link {
  color: inherit;
  font-size: inherit;
}
.bill-detail-meta-chip--credit {
  background: rgba(25, 135, 84, 0.1);
  color: #198754;
  border-color: rgba(25, 135, 84, 0.15);
}
.bill-detail-meta-chip--returned {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.bill-detail-meta-chip--muted {
  background: #f1f3f5;
  color: #6c757d;
  border-color: #dee2e6;
}
.bill-detail-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}
.bill-detail-badge--sale {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.15), rgba(214, 51, 132, 0.12));
  color: #6f42c1;
}
.bill-detail-badge--exchange {
  background: rgba(13, 202, 240, 0.15);
  color: #087990;
}
.bill-detail-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.bill-detail-total-card {
  min-width: 8rem;
}
.bill-detail-total-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
}
.bill-detail-total-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, #6f42c1, #d63384);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bill-detail-section {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid rgba(111, 66, 193, 0.1);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.bill-detail-section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.08), rgba(214, 51, 132, 0.04));
  border-bottom: 1px solid rgba(111, 66, 193, 0.08);
}
.bill-detail-section-icon {
  color: #6f42c1;
  font-size: 0.95rem;
}
.bill-detail-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #495057;
}
.bill-detail-section-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6f42c1;
  background: rgba(111, 66, 193, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.bill-detail-lines {
  padding: 0.65rem;
}
.bill-detail-line {
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
}
.bill-detail-line--kept {
  background: #fff !important;
  border: 1px solid rgba(111, 66, 193, 0.08) !important;
}
.bill-detail-line--added {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%) !important;
  border: 1px solid rgba(25, 135, 84, 0.2) !important;
}
.bill-detail-line--removed {
  background: linear-gradient(135deg, #fff5f5 0%, #fef2f2 100%) !important;
  border: 1px solid rgba(220, 53, 69, 0.15) !important;
  opacity: 0.9;
}
.bill-detail-line-id {
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.bill-detail-line-meta {
  color: #6c757d;
  font-size: 0.78rem;
}
.bill-detail-line-category {
  color: #868e96;
  font-size: 0.75rem;
}
.bill-detail-line-price {
  font-weight: 700;
  color: #212529;
  margin-top: 0.2rem;
}
.bill-detail-line-tag {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.2rem;
}
.bill-detail-line-tag--added { color: #198754; }
.bill-detail-line-tag--removed { color: #dc3545; }
.bill-detail-footer {
  border-top: 1px solid rgba(111, 66, 193, 0.1);
}
.bill-detail-btn-pdf {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 100%);
  border: none;
  color: #fff;
  font-weight: 600;
}
.bill-detail-btn-pdf:hover,
.bill-detail-btn-pdf:focus {
  background: linear-gradient(135deg, #5a32a3 0%, #c22575 100%);
  color: #fff;
}
.bill-detail-parent-link.bill-id-link {
  color: inherit;
  font-size: inherit;
  font-weight: 700;
}
.bills-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(111, 66, 193, 0.12) !important;
}

.bills-card-avatar {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #6f42c1;
  background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
  border: 2px solid rgba(111, 66, 193, 0.15);
}

.bills-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: #212529;
  line-height: 1.2;
}

.bills-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #6c757d;
}

.bills-card-phone,
.bills-card-date,
.bills-card-soldby {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.bills-card-no-phone {
  color: #adb5bd;
  font-style: italic;
}

.bills-card-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #6f42c1;
  line-height: 1.1;
}

.bills-card-returned {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
}

.bills-card-qty {
  font-size: 0.68rem;
  margin-top: 0.2rem;
}

.bills-card-footer-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.bills-card-billno {
  font-size: 0.75rem;
  font-weight: 600;
  color: #495057;
  background: #f8f9fa;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  border: 1px solid #e9ecef;
}

.bills-card-soldby {
  font-size: 0.72rem;
  color: #868e96;
}

.bills-pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bills-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.bills-pay-cash {
  background: #d1e7dd;
  color: #0f5132;
}

.bills-pay-card {
  background: #cff4fc;
  color: #055160;
}

.bills-pay-upi {
  background: #fff3cd;
  color: #664d03;
}

.bills-pay-muted {
  background: #e9ecef;
  color: #6c757d;
}

.bills-view-btn {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.bills-empty-state {
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
}

.bills-empty-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #adb5bd;
  background: #f1f3f5;
}

.bills-loading {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bills-skeleton {
  height: 6.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(90deg, #f1f3f5 25%, #e9ecef 50%, #f1f3f5 75%);
  background-size: 200% 100%;
  animation: billsShimmer 1.2s ease-in-out infinite;
}

@keyframes billsShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 575.98px) {
  .bills-card .card-body {
    padding: 0.85rem !important;
  }

  .bills-card-footer-left,
  .bills-card .d-flex.flex-wrap.align-items-center.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
  }

  .bills-pay-chips {
    justify-content: flex-start;
  }

  .bills-view-btn {
    width: 100%;
  }

  .bills-summary-total {
    font-size: 1.35rem;
  }
}

.orders-view-tabs .nav-link,
.orders-section-tabs .nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: #6c757d;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

.orders-view-tabs .nav-link.active,
.orders-section-tabs .nav-link.active {
  background: linear-gradient(135deg, #6f42c1, #d63384);
  color: #fff;
}

.orders-section-tabs {
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  background: #f8f9fa;
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.orders-section-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.4rem;
  background: #f8f9fa;
  border-radius: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.orders-section-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #495057;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.orders-section-jump-link:hover {
  color: #6f42c1;
  border-color: rgba(111, 66, 193, 0.25);
  background: rgba(111, 66, 193, 0.06);
}

.orders-page-section {
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
}

.orders-page-section-marker {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(111, 66, 193, 0.15);
}

.orders-page-section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #4a2d8a;
  margin-bottom: 0;
}

.orders-section-panels {
  min-height: 0;
}

.orders-section {
  margin-bottom: 1.75rem;
}

.orders-section:last-child {
  margin-bottom: 0;
}

.orders-section-head {
  margin-bottom: 0.85rem;
}

.orders-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.15rem;
}

.orders-section-desc {
  font-size: 0.78rem;
  color: #868e96;
  margin-bottom: 0;
}

.orders-details {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  padding: 0.65rem 1rem;
  background: #fafbfc;
}

.orders-details-summary {
  font-size: 0.82rem;
  font-weight: 600;
  color: #495057;
  cursor: pointer;
  user-select: none;
  list-style-position: outside;
}

.orders-details-summary::-webkit-details-marker {
  color: #6f42c1;
}

.orders-details[open] .orders-details-summary {
  margin-bottom: 0.25rem;
}

.orders-bills-zone {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(111, 66, 193, 0.12);
}

.orders-bills-zone-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.orders-dashboard .dashboard-panel {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04) !important;
}

.orders-dashboard .dashboard-kpi {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.orders-gain-hero {
  background: linear-gradient(135deg, #f8f5ff 0%, #fff5f9 50%, #f0f9ff 100%);
  border-radius: 0.85rem;
}

.orders-gain-rate-badge {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.orders-gain-stat {
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(111, 66, 193, 0.12);
  height: 100%;
}

.orders-gain-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  font-weight: 600;
}

.orders-gain-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  color: #212529;
}

.orders-gain-stat-value--positive {
  color: #198754;
}

.orders-gain-stat-value--negative {
  color: #dc3545;
}

.orders-gain-stat-sub {
  font-size: 0.72rem;
  color: #868e96;
  margin-top: 0.15rem;
}

.orders-profit-kpi .dashboard-kpi-value {
  font-size: 1.15rem;
}

/* Orders dashboard hero */
.orders-hero {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #4a2d8a 0%, #7c3aed 35%, #c026d3 70%, #db2777 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(111, 66, 193, 0.28);
}

.orders-hero--empty {
  background: linear-gradient(135deg, #f8f5ff, #fff5f9);
  color: #495057;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.orders-hero-empty-icon {
  font-size: 2.5rem;
  color: #6f42c1;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.5rem;
}

.orders-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.orders-hero-inner {
  position: relative;
  padding: 1.1rem 1.25rem;
}

@media (min-width: 768px) {
  .orders-hero-inner {
    padding: 1.25rem 1.5rem;
  }
}

.orders-hero-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.orders-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.orders-hero-sub {
  font-size: 0.82rem;
  opacity: 0.88;
}

.orders-hero-stat {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  height: 100%;
}

.orders-hero-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  font-weight: 600;
}

.orders-hero-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 0.1rem;
}
.orders-hero-stat-sub {
  font-size: 0.68rem;
  opacity: 0.78;
  margin-top: 0.15rem;
}

.orders-hero-stat-value--positive { color: #a7f3d0; }
.orders-hero-stat-value--negative { color: #fecaca; }

/* Inventory dashboard hero */
.inventory-dashboard .dashboard-panel {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04) !important;
}

.inventory-hero {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 30%, #6f42c1 70%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(13, 148, 136, 0.24);
}

.inventory-hero--empty {
  background: linear-gradient(135deg, #f0fdfa, #f5f3ff);
  color: #495057;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.inventory-hero-empty-icon {
  font-size: 2.5rem;
  color: #0d9488;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.5rem;
}

.inventory-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(255, 255, 255, 0.15), transparent),
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.inventory-hero-inner {
  position: relative;
  padding: 1.1rem 1.25rem;
}

@media (min-width: 768px) {
  .inventory-hero-inner {
    padding: 1.25rem 1.5rem;
  }
}

.inventory-hero-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.inventory-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.inventory-hero-sub {
  font-size: 0.82rem;
  opacity: 0.88;
}

.inventory-hero-stat {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  height: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.inventory-hero-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
  font-weight: 600;
}

.inventory-hero-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.inventory-hero-stat-sub {
  font-size: 0.68rem;
  opacity: 0.78;
  margin-top: 0.15rem;
}

/* Highlight cards */
.orders-highlight-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  padding: 0.85rem 0.9rem;
  height: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.orders-highlight-card--clickable {
  cursor: pointer;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
}

.orders-highlight-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(111, 66, 193, 0.12);
}

.orders-highlight-card--clickable:focus-visible {
  outline: 2px solid #6f42c1;
  outline-offset: 2px;
}

.orders-highlight-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.orders-highlight-card--purple .orders-highlight-icon { background: rgba(111, 66, 193, 0.12); color: #6f42c1; }
.orders-highlight-card--pink .orders-highlight-icon { background: rgba(214, 51, 132, 0.12); color: #d63384; }
.orders-highlight-card--blue .orders-highlight-icon { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }
.orders-highlight-card--amber .orders-highlight-icon { background: rgba(253, 126, 20, 0.12); color: #fd7e14; }
.orders-highlight-card--rose .orders-highlight-icon { background: rgba(220, 53, 69, 0.1); color: #dc3545; }
.orders-highlight-card--green .orders-highlight-icon { background: rgba(25, 135, 84, 0.12); color: #198754; }

.orders-highlight-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #868e96;
  font-weight: 600;
}

.orders-highlight-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #212529;
  margin: 0.15rem 0;
  line-height: 1.25;
  word-break: break-word;
}

.orders-highlight-sub {
  font-size: 0.7rem;
  color: #868e96;
  line-height: 1.35;
}

.orders-highlight-cta {
  margin-top: 0.35rem;
  color: #6f42c1;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.orders-highlight-card--clickable:hover .orders-highlight-cta {
  opacity: 1;
}

/* Daily trend */
.orders-trend-wrap {
  height: 220px;
  position: relative;
}

@media (min-width: 768px) {
  .orders-trend-wrap {
    height: 260px;
  }
}

.orders-trend-card {
  border-radius: 0.85rem;
}

/* Insight tiles */
.orders-insights-section {
  margin-top: 0.25rem;
}

.orders-insights-heading {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #868e96;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.orders-insight-tile {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.15s ease;
}

.orders-insight-tile:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.orders-insight-tile-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.orders-insight-tile--pink .orders-insight-tile-icon { background: rgba(214, 51, 132, 0.12); color: #d63384; }
.orders-insight-tile--purple .orders-insight-tile-icon { background: rgba(111, 66, 193, 0.12); color: #6f42c1; }
.orders-insight-tile--blue .orders-insight-tile-icon { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }
.orders-insight-tile--amber .orders-insight-tile-icon { background: rgba(253, 126, 20, 0.12); color: #fd7e14; }
.orders-insight-tile--success .orders-insight-tile-icon { background: rgba(25, 135, 84, 0.12); color: #198754; }
.orders-insight-tile--muted .orders-insight-tile-icon { background: rgba(108, 117, 125, 0.12); color: #6c757d; }
.orders-insight-tile--teal .orders-insight-tile-icon { background: rgba(32, 201, 151, 0.12); color: #20c997; }
.orders-insight-tile--green .orders-insight-tile-icon { background: rgba(25, 135, 84, 0.12); color: #198754; }

.orders-insight-tile-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.2rem;
}

.orders-insight-tile-text {
  font-size: 0.78rem;
  color: #6c757d;
  line-height: 1.45;
}

/* Margin gauge */
.orders-margin-gauge-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}

.orders-margin-gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #6f42c1;
  pointer-events: none;
}

/* Profit flow */
.orders-profit-flow-bar {
  display: flex;
  height: 2.25rem;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #f1f3f5;
}

.orders-profit-flow-seg {
  min-width: 0;
  transition: width 0.4s ease;
}

.orders-profit-flow-seg--proc {
  background: linear-gradient(90deg, #adb5bd, #868e96);
}

.orders-profit-flow-seg--gross {
  background: linear-gradient(90deg, #6f42c1, #9b6dd7);
}

.orders-profit-flow-deduction {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}

.orders-profit-flow-minus {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #fff5f5;
  color: #dc3545;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
}

.orders-profit-flow-interest-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #868e96;
  font-weight: 600;
  display: block;
}

.orders-profit-flow-interest-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #dc3545;
}

.orders-profit-flow-net {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.orders-profit-flow-net--positive {
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), rgba(25, 135, 84, 0.04));
  border: 1px solid rgba(25, 135, 84, 0.2);
}

.orders-profit-flow-net--negative {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.08), rgba(220, 53, 69, 0.03));
  border: 1px solid rgba(220, 53, 69, 0.15);
}

.orders-profit-flow-net-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #495057;
}

.orders-profit-flow-net-value {
  font-size: 1.35rem;
  font-weight: 800;
}

.orders-profit-flow-net--positive .orders-profit-flow-net-value { color: #198754; }
.orders-profit-flow-net--negative .orders-profit-flow-net-value { color: #dc3545; }

.orders-profit-flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.orders-profit-flow-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.orders-profit-flow-dot--proc { background: #868e96; }
.orders-profit-flow-dot--gross { background: #6f42c1; }
.orders-profit-flow-dot--interest { background: #dc3545; }

.orders-hero--loading {
  background: linear-gradient(135deg, #e9ecef, #f8f9fa);
  box-shadow: none;
}

.orders-skeleton {
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: orders-skeleton-shimmer 1.2s ease-in-out infinite;
}

.orders-skeleton--hero {
  height: 5.5rem;
}

.orders-skeleton--highlight {
  height: 6.5rem;
}

@keyframes orders-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.orders-category-bar-wrap {
  height: 220px;
  position: relative;
}

.orders-category-bar-wrap--compact {
  height: 180px;
}

.orders-category-table thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #868e96;
  white-space: nowrap;
  border-bottom-width: 1px;
}

.orders-category-row {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.orders-category-row:hover {
  background-color: rgba(111, 66, 193, 0.06);
}

.orders-category-row:focus-visible {
  outline: 2px solid #6f42c1;
  outline-offset: -2px;
}

.orders-margin-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.orders-margin-pill--high {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.orders-margin-pill--mid {
  background: rgba(253, 126, 20, 0.12);
  color: #e67700;
}

.orders-margin-pill--low {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.orders-speed-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.orders-speed-pill--fast {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

.orders-speed-pill--mid {
  background: rgba(253, 126, 20, 0.12);
  color: #e67700;
}

.orders-speed-pill--slow {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}

.billing-history-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  white-space: nowrap;
}

.scan-decoder-host {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 400px;
  height: 300px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
  z-index: -1;
}

.scan-reader-wrap video {
  border-radius: 0.5rem;
  object-fit: cover;
}

.scan-result-card {
  border-radius: 0.75rem;
}

.scan-mrp-hero {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 55%, #5a9fd4 100%);
  color: #fff;
  padding: 1.35rem 1.25rem 1.15rem;
  text-align: center;
}

.scan-mrp-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.scan-mrp-value-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.2rem 0;
}
.scan-mrp-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
}
.scan-mrp-discount-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  color: #146c43;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.scan-mrp-sub {
  font-size: 0.8rem;
  opacity: 0.92;
}

.scan-mrp-sub--discounted {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  margin-top: 0.15rem;
}

.scan-mrp-was-label {
  font-size: 0.88rem;
  opacity: 0.92;
}

.scan-mrp-was-value {
  text-decoration: line-through;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0.95;
}

.scan-mrp-off-meta {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.95;
}

.scan-mrp-was-meta {
  font-size: 0.82rem;
  opacity: 0.88;
}

.scan-mrp-range-was {
  text-decoration: line-through;
  opacity: 0.85;
  font-weight: 600;
}

.scan-variant-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.scan-variant-mrp--was {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.95rem;
  font-weight: 600;
}

.scan-variant-mrp--sale {
  color: #146c43;
  font-weight: 800;
  font-size: 1.05rem;
}

.item-price-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  line-height: 1.15;
}

.item-price-block--compact {
  flex-direction: row;
  align-items: baseline;
  gap: 0.4rem;
}

.item-price-was {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 0.92rem;
  font-weight: 600;
}

.item-price-sale {
  color: #146c43;
  font-weight: 800;
  font-size: 1.05rem;
}

.item-price-was-inline {
  text-decoration: line-through;
  color: #6c757d;
  font-weight: 600;
}

.item-price-sale-inline {
  color: #146c43;
  font-weight: 700;
}

.scan-mrp-range {
  margin-top: 0.65rem;
  opacity: 0.95;
}

.scan-result-top {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.scan-result-photo-wrap {
  flex-shrink: 0;
}

.scan-result-photo-btn {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: none;
  border-radius: 0.5rem;
  cursor: pointer;
  line-height: 0;
}

.scan-result-photo-btn:focus-visible {
  outline: 2px solid #6f42c1;
  outline-offset: 2px;
}

.scan-result-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  display: block;
}

.scan-result-photo-btn:active .scan-result-photo {
  opacity: 0.92;
}

.scan-photo-expand-hint {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-photo-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  background: #111;
  border-radius: 0.5rem;
}

.scan-photo-modal-img {
  max-width: 100%;
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.25rem;
}

/* Full-size photo lightbox — stacks above Bootstrap modals (item display, edit item, etc.) */
.maguva-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.maguva-photo-lightbox[hidden] {
  display: none !important;
}
.maguva-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.maguva-photo-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(94vw, 920px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.maguva-photo-lightbox-close {
  position: absolute;
  top: -0.25rem;
  right: 0;
  z-index: 2;
  opacity: 0.9;
}
.maguva-photo-lightbox-viewport {
  width: min(94vw, 920px);
  max-height: min(78vh, 720px);
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
  background: #111;
}
.maguva-photo-lightbox-img {
  max-width: 100%;
  max-height: min(78vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.maguva-photo-lightbox-hint {
  text-align: center;
  opacity: 0.75;
}
body.maguva-photo-lightbox-open {
  overflow: hidden;
}

.scan-result-photo-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 0.5rem;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.75rem;
}

.scan-result-head {
  flex: 1;
  min-width: 0;
}

.scan-item-id .btn-link {
  font-size: 1.1rem;
  font-weight: 700;
}

.item-display-modal-header {
  background: linear-gradient(135deg, #f3f0ff 0%, #fff 55%, #fff5f9 100%);
  padding: 1rem 1.25rem 0.85rem;
  align-items: flex-start;
}
.item-display-modal-title {
  flex: 1;
  min-width: 0;
}
.item-display-id-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6f42c1;
  margin-bottom: 0.35rem;
}
.item-display-id-value {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.85rem;
  border-radius: 0.55rem;
  color: #fff;
  background: linear-gradient(135deg, #6f42c1 0%, #9b4dca 50%, #d63384 100%);
  box-shadow: 0 3px 12px rgba(111, 66, 193, 0.28);
}
.item-display-id--compact .item-display-id-label {
  font-size: 0.6rem;
  margin-bottom: 0.2rem;
}
.item-display-id--compact .item-display-id-value {
  font-size: 1.1rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.45rem;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.2);
}

.scan-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f1f3f5;
}

.scan-detail-row span:first-child {
  color: #6c757d;
}

.scan-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.scan-section-related {
  min-height: 7.5rem;
}

.scan-related-colors {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.25rem;
  min-height: 6.75rem;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}

.maguva-item-display-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.scan-related-color-btn {
  flex: 0 0 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 5.5rem;
  min-height: 6.5rem;
  padding: 0.35rem;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  background: #f8f9fa;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scan-related-color-btn:hover:not(:disabled) {
  border-color: rgba(111, 66, 193, 0.35);
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.12);
}

.scan-related-color-btn--current {
  border-color: var(--maguva-primary, #6f42c1);
  background: rgba(111, 66, 193, 0.06);
  cursor: default;
}

.scan-related-color-thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #e9ecef;
}

.scan-related-color-thumb-placeholder {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.5rem;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.25rem;
}

.scan-related-color-label {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-related-color-id {
  font-size: 0.62rem;
  color: #6c757d;
  font-family: var(--bs-font-monospace, monospace);
}

.intake-success-actions {
  max-width: 22rem;
}

.btn-intake-add-other {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--maguva-primary, #6f42c1);
  --bs-btn-border-color: var(--maguva-primary, #6f42c1);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #5a32a3;
  --bs-btn-hover-border-color: #5a32a3;
  --bs-btn-active-bg: #4e2b8e;
  --bs-btn-active-border-color: #4e2b8e;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(111, 66, 193, 0.35);
}

.btn-intake-add-color {
  --bs-btn-color: #fff;
  --bs-btn-bg: linear-gradient(135deg, #e83e8c 0%, #fd7e14 45%, #6f42c1 100%);
  --bs-btn-border-color: #e83e8c;
  background: linear-gradient(135deg, #e83e8c 0%, #fd7e14 45%, #6f42c1 100%);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(232, 62, 140, 0.3);
}

.btn-intake-add-color:hover,
.btn-intake-add-color:focus {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(232, 62, 140, 0.38);
}

.btn-intake-add-color:active {
  color: #fff;
  filter: brightness(0.96);
}

.intake-color-variant-banner {
  border-radius: var(--maguva-radius-lg);
  border: 1px solid rgba(232, 62, 140, 0.28);
  background: linear-gradient(135deg, rgba(232, 62, 140, 0.1) 0%, rgba(111, 66, 193, 0.08) 55%, rgba(253, 126, 20, 0.06) 100%);
  box-shadow: 0 2px 10px rgba(232, 62, 140, 0.1);
  overflow: hidden;
}

.intake-color-variant-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
}

.intake-color-variant-photo {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 4.75rem;
}

.intake-color-variant-photo-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9d174d;
  text-align: center;
  line-height: 1.1;
}

.intake-color-variant-thumb {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 0.6rem;
  object-fit: cover;
  display: block;
  box-shadow: 0 3px 12px rgba(17, 24, 39, 0.16);
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #fff;
}

.intake-color-variant-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  color: #adb5bd;
  font-size: 1.25rem;
}

.intake-color-variant-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.intake-color-variant-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c22575;
  margin-bottom: 0.2rem;
}

.intake-color-variant-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #2d2640;
  line-height: 1.35;
}

.intake-color-variant-meta {
  font-size: 0.78rem;
  color: #5c5470;
  line-height: 1.35;
}

.intake-color-variant-hint {
  font-size: 0.78rem;
  color: #6f42c1;
  line-height: 1.35;
}

.scan-attr-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scan-attr-chip {
  display: inline-flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.08), rgba(214, 51, 132, 0.06));
  border: 1px solid rgba(111, 66, 193, 0.15);
  border-radius: 0.4rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
}

.scan-attr-key {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #6c757d;
  letter-spacing: 0.04em;
}

.scan-color-value,
.scan-attr-color-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
}
.scan-color-swatch {
  display: inline-block;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--swatch, #94a3b8);
  border: 2px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 4px rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}
.scan-color-swatch--light {
  border-color: rgba(15, 23, 42, 0.22);
}
.scan-detail-row--color .scan-color-value {
  color: #343a40;
}
.scan-attr-chip--color {
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.08), rgba(111, 66, 193, 0.06));
  border-color: rgba(13, 202, 240, 0.2);
}
.scan-attr-chip--color .scan-attr-color-value {
  font-size: 0.85rem;
}

.scan-variant-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.scan-variant-row {
  border: 1px solid #e9ecef;
  border-radius: 0.45rem;
  padding: 0.5rem 0.65rem;
  background: #fff;
}

.scan-variant-row--active {
  border-color: var(--maguva-primary, #6f42c1);
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.06), rgba(255, 255, 255, 1));
  box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.12);
}

.scan-variant-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.scan-variant-size {
  font-weight: 700;
}

.scan-variant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #495057;
}

.scan-variant-mrp {
  font-weight: 600;
  color: #198754;
}

@media (min-width: 768px) {
  .employee-recent-pane {
    min-height: calc(100vh - 8rem);
  }
}

.recent-entry-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--maguva-surface);
  border: 1px solid rgba(111, 66, 193, 0.08);
  border-radius: var(--maguva-radius-md);
  margin-bottom: 0.75rem;
  box-shadow: var(--maguva-shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.recent-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--maguva-shadow-md);
  border-color: rgba(111, 66, 193, 0.16);
}
.recent-entry-card .recent-card-photo {
  flex-shrink: 0;
}
.recent-entry-card .inv-thumb,
.recent-entry-card .inv-thumb-placeholder {
  width: 72px;
  height: 72px;
}
.recent-entry-card .recent-card-body {
  flex: 1;
  min-width: 0;
}
.recent-entry-card .recent-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.35rem;
}
.recent-entry-card .recent-card-meta {
  font-size: 0.8rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.recent-entry-card .recent-card-detail {
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
}
.recent-entry-card .recent-card-detail + .recent-card-detail {
  margin-top: 0.35rem;
}
.recent-cards-empty {
  text-align: center;
  color: #6c757d;
  padding: 2rem 1rem;
}

.recent-days-select {
  max-width: 12rem;
}

.recent-item-id-link {
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--maguva-primary);
  padding: 0;
  text-align: left;
}
.recent-item-id-link:hover,
.recent-item-id-link:focus {
  text-decoration: underline;
  color: #5a32a3;
}

.recent-photo-btn {
  display: block;
  cursor: pointer;
  line-height: 0;
  border-radius: 0.25rem;
  background: transparent;
}
.recent-photo-btn:hover .inv-thumb,
.recent-photo-btn:focus .inv-thumb {
  outline: 2px solid var(--maguva-primary);
  outline-offset: 2px;
}
.recent-photo-btn .inv-thumb-placeholder {
  cursor: pointer;
}

.recent-detail-photo {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 0.5rem;
  background: #f8f9fa;
  margin-bottom: 1rem;
}
/* Item editor overlay popup — list stays visible behind on cancel */
.item-editor-popup .modal-dialog {
  max-width: min(720px, calc(100vw - 1.5rem));
  max-height: calc(100vh - 1.5rem);
  margin: 0.75rem auto;
}
.item-editor-popup .modal-content {
  max-height: calc(100vh - 1.5rem);
  border-radius: 0.75rem;
  overflow: hidden;
}
.item-editor-popup .modal-body {
  overflow-y: auto;
  max-height: calc(100vh - 12rem);
}
.item-editor-popup.show ~ .modal-backdrop {
  opacity: 0.55;
}

.item-editor-shell {
  border: 1px solid rgba(111, 66, 193, 0.12);
  overflow: hidden;
}
.item-editor-header {
  background: linear-gradient(135deg, #6f42c1 0%, #9b4dca 45%, #d63384 100%);
  color: #fff;
  padding: 1.1rem 1.25rem;
}
.item-editor-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.item-editor-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin: 0;
}
.item-editor-subtitle {
  font-size: 0.8rem;
  opacity: 0.88;
}
.item-editor-body {
  background: linear-gradient(180deg, #f8f5ff 0%, #fff 35%, #fff5f9 100%);
  padding: 1rem 1.1rem 1.25rem;
}
.item-editor-footer {
  background: linear-gradient(180deg, #fff 0%, #f8f5ff 100%);
  padding: 0.85rem 1.1rem 1rem;
  border-top: 1px solid rgba(111, 66, 193, 0.1) !important;
}

.item-editor-footer .btn-intake-add-color {
  font-weight: 600;
}

.item-editor-btn-save {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 100%);
  border: none;
  color: #fff;
  font-weight: 600;
}
.item-editor-btn-save:hover,
.item-editor-btn-save:focus {
  background: linear-gradient(135deg, #5a32a3 0%, #c22575 100%);
  color: #fff;
}
.item-editor-section {
  border-radius: 0.75rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.item-editor-section-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  font-weight: 700;
  font-size: 0.82rem;
}
.item-editor-section-head--split {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.item-editor-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.item-editor-section-title {
  line-height: 1.2;
}
.item-editor-optional {
  font-weight: 500;
  font-size: 0.72rem;
  opacity: 0.75;
}
.item-editor-section-body {
  padding: 0.85rem;
  background: #fff;
}
.item-editor-section--identity {
  border-color: rgba(111, 66, 193, 0.18);
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.07), rgba(255, 255, 255, 0.9));
}
.item-editor-section--identity .item-editor-section-head {
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.14), rgba(111, 66, 193, 0.04));
  color: #5a32a3;
}
.item-editor-section--identity .item-editor-section-icon {
  background: linear-gradient(135deg, #6f42c1, #9b4dca);
  color: #fff;
}
.item-editor-id-field {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a32a3;
  background: linear-gradient(135deg, #f3f0ff, #fff);
  border-color: rgba(111, 66, 193, 0.25);
}
.item-editor-section--photo {
  border-color: rgba(13, 202, 240, 0.22);
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.06), rgba(255, 255, 255, 0.95));
}
.item-editor-section--photo .item-editor-section-head {
  background: linear-gradient(90deg, rgba(13, 202, 240, 0.14), rgba(13, 202, 240, 0.03));
  color: #087990;
}
.item-editor-section--photo .item-editor-section-icon {
  background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
  color: #fff;
}
.item-editor-btn-photo {
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.12), rgba(90, 159, 212, 0.1));
  border: 1px solid rgba(13, 202, 240, 0.35);
  color: #087990;
  font-weight: 600;
}
.item-editor-btn-photo:hover {
  background: linear-gradient(135deg, #0dcaf0, #5a9fd4);
  border-color: transparent;
  color: #fff;
}
.item-editor-photo-preview img,
.item-editor-photo-preview .inv-thumb {
  border-radius: 0.65rem;
  border: 2px solid rgba(13, 202, 240, 0.25);
  box-shadow: 0 4px 14px rgba(13, 202, 240, 0.15);
}
.item-editor-photo-expand-btn {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: none;
  width: 100%;
  max-width: 280px;
  cursor: pointer;
  line-height: 0;
}
.item-editor-photo-expand-btn:focus-visible {
  outline: 2px solid #0dcaf0;
  outline-offset: 2px;
  border-radius: 0.65rem;
}
.item-editor-photo-expand-btn .recent-detail-photo {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  margin-bottom: 0;
  pointer-events: none;
  border-radius: 0.65rem;
  border: 2px solid rgba(13, 202, 240, 0.25);
  box-shadow: 0 4px 14px rgba(13, 202, 240, 0.15);
  background: #f8f9fa;
}
.item-editor-photo-expand-btn:active .recent-detail-photo {
  opacity: 0.92;
}
.item-editor-section--attrs {
  border-color: rgba(214, 51, 132, 0.18);
  background: linear-gradient(135deg, rgba(214, 51, 132, 0.05), rgba(255, 255, 255, 0.95));
}
.item-editor-section--attrs .item-editor-section-head {
  background: linear-gradient(90deg, rgba(214, 51, 132, 0.12), rgba(214, 51, 132, 0.03));
  color: #ab296a;
}
.item-editor-section--attrs .item-editor-section-icon {
  background: linear-gradient(135deg, #d63384, #e685b5);
  color: #fff;
}
.item-editor-attr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.65rem;
}
.item-editor-attr-card {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.06), rgba(214, 51, 132, 0.04));
  border: 1px solid rgba(111, 66, 193, 0.12);
  border-radius: 0.55rem;
  padding: 0.55rem 0.65rem;
}
.item-editor-attr-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6f42c1;
  margin-bottom: 0.3rem;
}
.item-editor-required {
  color: #d63384;
}
.item-editor-section--variants {
  border-color: rgba(253, 126, 20, 0.22);
  background: linear-gradient(135deg, rgba(253, 126, 20, 0.05), rgba(255, 255, 255, 0.95));
}
.item-editor-section--variants .item-editor-section-head {
  background: linear-gradient(90deg, rgba(253, 126, 20, 0.14), rgba(253, 126, 20, 0.03));
  color: #ca6510;
}
.item-editor-section--variants .item-editor-section-icon {
  background: linear-gradient(135deg, #fd7e14, #ffb347);
  color: #fff;
}
.item-editor-btn-add {
  background: linear-gradient(135deg, #fd7e14, #e67700);
  border: none;
  color: #fff;
  font-weight: 600;
}
.item-editor-btn-add:hover {
  background: linear-gradient(135deg, #e67700, #d66a00);
  color: #fff;
}
.item-editor-variant-row {
  background: linear-gradient(135deg, rgba(253, 126, 20, 0.07), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(253, 126, 20, 0.15);
  border-radius: 0.55rem;
  padding: 0.5rem 0.55rem 0.35rem;
  margin-bottom: 0.5rem !important;
}
.item-editor-variant-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ca6510;
  margin-bottom: 0.2rem;
}
.item-editor-variant-remove {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  color: #dc3545;
}
.item-editor-variant-remove:hover {
  background: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.item-editor-section--pricing {
  border-color: rgba(25, 135, 84, 0.22);
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.05), rgba(255, 255, 255, 0.95));
}
.item-editor-section--pricing .item-editor-section-head {
  background: linear-gradient(90deg, rgba(25, 135, 84, 0.14), rgba(25, 135, 84, 0.03));
  color: #146c43;
}
.item-editor-section--pricing .item-editor-section-icon {
  background: linear-gradient(135deg, #198754, #20c997);
  color: #fff;
}
.item-editor-mrp-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
}
.item-editor-mrp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.88rem;
  color: #fff;
  background: linear-gradient(135deg, #198754, #20c997);
  box-shadow: 0 3px 10px rgba(25, 135, 84, 0.25);
}
.item-editor-mrp-meta {
  font-size: 0.8rem;
  color: #6c757d;
}
.item-editor-section--discount {
  border-color: rgba(111, 66, 193, 0.2);
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.05), rgba(214, 51, 132, 0.04));
}
.item-editor-section--discount .item-editor-section-head {
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.12), rgba(214, 51, 132, 0.06));
  color: #6f42c1;
}
.item-editor-section--discount .item-editor-section-icon {
  background: linear-gradient(135deg, #6f42c1, #d63384);
  color: #fff;
}
.item-editor-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #495057;
}

.recent-detail-dl dt {
  font-weight: 600;
  color: #6c757d;
}
.recent-detail-dl dd {
  margin-bottom: 0.5rem;
}

.recent-entry-card .recent-card-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.2rem;
}
.recent-entry-card .recent-card-row span:last-child {
  text-align: right;
}
.recent-entry-card.recent-entry-priced {
  border-color: #198754;
  background: #f8fff9;
}
.recent-entry-card .recent-mrp-row {
  font-size: 0.95rem;
  margin: 0.35rem 0 0.5rem;
  padding: 0.35rem 0.5rem;
  background: #d1e7dd;
  border-radius: 0.35rem;
}
.recent-entry-card .recent-card-title .badge {
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
}
.btn-photo-mobile {
  min-height: 3rem;
  font-size: 1.05rem;
  padding: 0.75rem 1rem;
  touch-action: manipulation;
}
.photo-card .card-body { padding: 1.25rem; }
.photo-confirm-frame {
  background: #000;
  border-radius: 0.5rem;
  overflow: hidden;
  max-height: min(70vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-confirm-frame img {
  max-height: min(70vh, 520px);
  object-fit: contain;
}
.photo-confirmed-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 0.5rem;
  border: 2px solid #198754;
  background: #f8f9fa;
}
.recent-inv-card .inv-photo {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #eee;
  border-radius: 0.375rem 0.375rem 0 0;
}
.recent-inv-card .inv-photo-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #888;
  font-size: 0.9rem;
  border-radius: 0.375rem 0.375rem 0 0;
}

/* Bootstrap-enhanced data tables */
.maguva-table-card {
  overflow: hidden;
  border-radius: 0.5rem !important;
}

.maguva-table-wrap {
  margin-bottom: 0;
}

.maguva-table-wrap .table {
  --bs-table-striped-bg: rgba(111, 66, 193, 0.04);
  --bs-table-hover-bg: rgba(111, 66, 193, 0.09);
  --bs-table-active-bg: rgba(111, 66, 193, 0.12);
}

.maguva-table-wrap thead th {
  background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-color: #5a32a3;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0.65rem 0.75rem;
}

.maguva-table-wrap thead.sticky-top th {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.maguva-table-wrap tbody td {
  font-size: 0.875rem;
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
}

.maguva-table-wrap tbody tr.table-success {
  --bs-table-bg: rgba(25, 135, 84, 0.1);
  --bs-table-striped-bg: rgba(25, 135, 84, 0.14);
  --bs-table-hover-bg: rgba(25, 135, 84, 0.18);
}

.maguva-table-wrap .table-group-divider > tr:first-child > * {
  border-top-width: 2px;
  border-top-color: #dee2e6;
}

.recent-table-wrap {
  max-height: calc(100vh - 12rem);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.inv-table .inv-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 0.375rem;
  background: #eee;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.inv-table .inv-thumb-placeholder {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-size: 0.65rem;
  border-radius: 0.375rem;
  text-align: center;
  line-height: 1.1;
}
.inv-table .form-control-sm {
  min-width: 5rem;
  border-radius: 0.375rem;
}
.inv-table .mrp-live {
  font-weight: 700;
  color: var(--maguva-primary);
  white-space: nowrap;
  font-size: 0.95rem;
}

.inv-table .btn-sm {
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-padding-x: 0.5rem;
}

.maguva-table-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #6c757d;
  background-color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.maguva-table-checkbox:hover {
  border-color: var(--maguva-primary);
}

.maguva-table-checkbox:checked {
  background-color: var(--maguva-primary);
  border-color: var(--maguva-primary);
}

.dashboard-panel {
  border-radius: 0.65rem;
  overflow: hidden;
}

.dashboard-panel-header {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.08) 0%, rgba(214, 51, 132, 0.05) 100%);
  border-bottom: 1px solid rgba(111, 66, 193, 0.12);
  font-size: 0.85rem;
  font-weight: 600;
}

.dashboard-kpi {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 0.65rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.dashboard-kpi-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  flex-shrink: 0;
}

.dashboard-kpi--purple .dashboard-kpi-icon { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.dashboard-kpi--pink .dashboard-kpi-icon { background: linear-gradient(135deg, #d63384, #c22575); }
.dashboard-kpi--blue .dashboard-kpi-icon { background: linear-gradient(135deg, #5a9fd4, #0d6efd); }
.dashboard-kpi--amber .dashboard-kpi-icon { background: linear-gradient(135deg, #fd7e14, #e67700); }
.dashboard-kpi--teal .dashboard-kpi-icon { background: linear-gradient(135deg, #20c997, #0ca678); }

.dashboard-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  font-weight: 600;
}

.dashboard-kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: #212529;
}

.dashboard-kpi-sub {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

.dashboard-insights-card {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.06) 0%, rgba(13, 202, 240, 0.05) 100%);
}

.dashboard-bucket-card {
  cursor: pointer;
  border: 1px solid #e9ecef;
  border-radius: 0.65rem;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-bucket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(111, 66, 193, 0.12);
  border-color: rgba(111, 66, 193, 0.35);
}

.dashboard-bucket-card.active {
  border-color: var(--maguva-primary);
  box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.2);
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.07) 0%, rgba(214, 51, 132, 0.05) 100%);
}

.dashboard-bucket-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.dashboard-bucket-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: linear-gradient(135deg, #6f42c1, #d63384);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.dashboard-bucket-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.dashboard-bucket-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #495057;
  margin-bottom: 0.35rem;
}

.dashboard-bucket-value {
  font-size: 0.8rem;
  color: var(--maguva-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dashboard-bucket-bar {
  height: 6px;
  background: #e9ecef;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.dashboard-bucket-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6f42c1, #d63384);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.dashboard-bucket-pct {
  font-size: 0.7rem;
}

.dashboard-chart-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.dashboard-chart-card {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.dashboard-bar-wrap {
  position: relative;
  height: 220px;
}

.dashboard-shops-bar {
  position: relative;
  width: 100%;
  height: min(280px, 40px * 8);
  min-height: 120px;
}

.dashboard-chart-card--bar {
  display: block;
  align-items: stretch;
  justify-content: flex-start;
}

.dashboard-chart-card--bar .dashboard-shops-bar,
.dashboard-chart-card--bar .orders-category-bar-wrap {
  width: 100%;
}

.dashboard-chart-card--donut {
  display: flex;
  align-items: center;
  justify-content: center;
}

.orders-visual-metric {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.orders-visual-metric-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.orders-visual-metric--purple .orders-visual-metric-icon { background: rgba(111, 66, 193, 0.12); color: #6f42c1; }
.orders-visual-metric--green .orders-visual-metric-icon { background: rgba(25, 135, 84, 0.12); color: #198754; }
.orders-visual-metric--pink .orders-visual-metric-icon { background: rgba(214, 51, 132, 0.12); color: #d63384; }
.orders-visual-metric--blue .orders-visual-metric-icon { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }

.orders-visual-metric-value {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.15;
  color: #212529;
}

.orders-visual-metric-label {
  font-size: 0.72rem;
  color: #868e96;
  margin-top: 0.15rem;
  margin-bottom: 0.5rem;
}

.orders-visual-meter {
  height: 0.35rem;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}

.orders-visual-meter--lg {
  height: 0.5rem;
  margin: 0.5rem 0;
}

.orders-visual-meter--table {
  height: 0.45rem;
  min-width: 5rem;
}

.orders-visual-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f42c1, #9b6dd7);
  transition: width 0.35s ease;
}

.orders-visual-meter-fill--high { background: linear-gradient(90deg, #198754, #20c997); }
.orders-visual-meter-fill--mid { background: linear-gradient(90deg, #fd7e14, #ffc107); }
.orders-visual-meter-fill--low { background: linear-gradient(90deg, #dc3545, #e85d9a); }

.orders-compare-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.85rem;
  padding: 1rem;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.orders-compare-card--best { border-top: 3px solid #198754; }
.orders-compare-card--worst { border-top: 3px solid #dc3545; }
.orders-compare-card--fast { border-top: 3px solid #0d6efd; }
.orders-compare-card--slow { border-top: 3px solid #fd7e14; }

.orders-compare-icon {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  opacity: 0.85;
}

.orders-compare-card--best .orders-compare-icon { color: #198754; }
.orders-compare-card--worst .orders-compare-icon { color: #dc3545; }
.orders-compare-card--fast .orders-compare-icon { color: #0d6efd; }
.orders-compare-card--slow .orders-compare-icon { color: #fd7e14; }

.orders-compare-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #868e96;
  font-weight: 600;
}

.orders-compare-cat {
  font-size: 1rem;
  font-weight: 700;
  margin: 0.15rem 0;
}

.orders-compare-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: #6f42c1;
}

.orders-compare-sub {
  font-size: 0.72rem;
  color: #868e96;
  margin-top: 0.35rem;
}

.letter-spacing {
  letter-spacing: 0.06em;
}

.dashboard-cohort-select {
  min-width: 10rem;
  max-width: 14rem;
}

#dashboardItemsBody tr {
  cursor: default;
}

#dashboardItemsBody .dashboard-item-id {
  font-weight: 600;
}

.dashboard-cohort-stats {
  margin-bottom: 0;
}

.dashboard-cohort-stat {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.08) 0%, rgba(214, 51, 132, 0.06) 100%);
  border: 1px solid rgba(111, 66, 193, 0.12);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  height: 100%;
}

.dashboard-cohort-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary);
  margin-bottom: 0.25rem;
}

.dashboard-cohort-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--maguva-primary);
}

.dashboard-cohort-stat-sub {
  font-size: 0.75rem;
  color: var(--bs-secondary);
  margin-top: 0.15rem;
}

.dashboard-chart-card--clickable {
  cursor: pointer;
}

.dashboard-chart-focused {
  outline: 3px solid var(--maguva-primary);
  box-shadow: 0 0 0 4px rgba(111, 66, 193, 0.15);
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.dashboard-chart-focused .dashboard-panel-header {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.15) 0%, rgba(214, 51, 132, 0.1) 100%);
}

.dashboard-facet-chip {
  font-weight: 500;
  font-size: 0.75rem;
}

.maguva-table-wrap td .maguva-table-checkbox {
  margin: 0 auto;
  display: block;
}

.audit-qr-reader {
  width: 100%;
  min-height: 220px;
  margin: 0 auto;
}

.audit-scanner-wrap {
  background: #111;
  border-radius: 0.5rem 0.5rem 0 0;
  overflow: hidden;
}

.audit-scan-mode .btn {
  min-height: 2.75rem;
  font-weight: 600;
}

.audit-scan-mode .btn-check:checked + .btn {
  background: var(--maguva-primary);
  border-color: var(--maguva-primary);
  color: #fff;
}

.audit-wedge-wrap {
  text-align: center;
}

.audit-wedge-ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #e8f4fc 0%, #f3e8ff 100%);
  border: 2px dashed var(--maguva-primary);
  color: #333;
  font-weight: 600;
  font-size: 0.95rem;
}

.audit-wedge-ready i {
  font-size: 2rem;
  color: var(--maguva-primary);
}

.audit-wedge-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.audit-wedge-wrap.audit-wedge-wrap--error .audit-wedge-ready {
  border-color: #dc3545;
  background: #fff5f5;
}

.audit-wedge-wrap.audit-wedge-wrap--error .audit-wedge-ready i {
  color: #dc3545;
}

.audit-manual-entry summary {
  cursor: pointer;
  user-select: none;
}

.audit-app--mobile.audit-scan-mode-camera .audit-wedge-wrap {
  display: none !important;
}

.audit-app--mobile.audit-scan-mode-scanner .audit-scanner-wrap {
  display: none !important;
}

.audit-scan-panel.audit-scan-dimmed {
  opacity: 0.35;
  pointer-events: none;
}

.audit-success-flash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 135, 84, 0.92);
  backdrop-filter: blur(4px);
}

.audit-success-flash-inner {
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem;
  animation: auditPop 0.25s ease-out;
}

.audit-success-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

.audit-success-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.audit-success-code {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 0.35rem;
}

.audit-success-meta,
.audit-success-progress {
  opacity: 0.9;
}

@keyframes auditPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.offers-basket-flash {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.offers-basket-flash--success {
  background: rgba(25, 135, 84, 0.92);
}
.offers-basket-flash--fail {
  background: rgba(220, 53, 69, 0.92);
}
.offers-basket-flash-inner {
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem;
  animation: auditPop 0.25s ease-out;
}
.offers-basket-flash-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}
.offers-basket-flash-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.offers-basket-flash-code {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 0.35rem;
}
.offers-basket-flash-meta {
  opacity: 0.9;
  font-size: 0.95rem;
}
.offers-basket-scan-panel.offers-basket-scan-dimmed {
  opacity: 0.35;
  pointer-events: none;
}
.offers-basket-scan-mode-scanner .audit-scanner-wrap {
  display: none !important;
}

.audit-progress-card .progress-bar {
  background: linear-gradient(90deg, var(--maguva-primary), #d63384);
}

.audit-progress-card .progress-bar.bg-success {
  background: #198754 !important;
}

.audit-mini-progress .progress-bar {
  background-color: var(--maguva-primary);
}

/* ── Feature UI: Staff, Incentives, Audit ── */

.maguva-feature-hero {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 52%, #5a9fd4 100%);
  color: #fff;
  border-radius: 0.85rem;
  overflow: hidden;
  position: relative;
}

.maguva-feature-hero--teal {
  background: linear-gradient(135deg, #0d6efd 0%, #20c997 55%, #6f42c1 100%);
}

.maguva-feature-hero--gold {
  background: linear-gradient(135deg, #b8860b 0%, #f59e0b 45%, #d63384 100%);
}

.maguva-feature-hero--audit {
  background: linear-gradient(135deg, #495057 0%, #6f42c1 48%, #20c997 100%);
}

.maguva-feature-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.22) 0%, transparent 45%);
  pointer-events: none;
}

.maguva-feature-hero-body {
  position: relative;
  padding: 1.25rem 1.35rem;
}

.maguva-feature-eyebrow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.88;
  margin-bottom: 0.25rem;
}

.maguva-feature-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.maguva-feature-sub {
  font-size: 0.85rem;
  opacity: 0.88;
  margin: 0.35rem 0 0;
}

.maguva-stat-tile {
  border-radius: 0.85rem;
  border: 0;
  background: #fff;
  box-shadow: 0 0.15rem 0.65rem rgba(17, 24, 39, 0.06);
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.maguva-stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.35rem 1rem rgba(17, 24, 39, 0.1);
}

.maguva-stat-tile .card-body {
  padding: 1rem 1.1rem;
}

.maguva-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.maguva-stat-icon--purple { background: rgba(111, 66, 193, 0.12); color: #6f42c1; }
.maguva-stat-icon--pink { background: rgba(214, 51, 132, 0.12); color: #d63384; }
.maguva-stat-icon--blue { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }
.maguva-stat-icon--green { background: rgba(25, 135, 84, 0.12); color: #198754; }
.maguva-stat-icon--amber { background: rgba(245, 158, 11, 0.15); color: #b45309; }

.maguva-stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: #212529;
}

.maguva-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
  margin-top: 0.15rem;
}

.maguva-filter-card {
  border-radius: 0.85rem;
  border: 1px solid rgba(111, 66, 193, 0.12);
  background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
}

.maguva-section-card {
  border-radius: 0.85rem;
  border: 0;
  box-shadow: 0 0.12rem 0.55rem rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

.maguva-section-card .card-header {
  background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
  border-bottom: 1px solid #eef0f2;
  font-weight: 600;
  padding: 0.85rem 1.1rem;
}

.staff-user-card {
  border-radius: 0.85rem;
  border: 1px solid #eef0f2;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.staff-user-card-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.staff-user-card-info {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.staff-user-name {
  max-width: 100%;
}

.staff-user-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

@media (min-width: 576px) {
  .staff-user-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
}

.staff-user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eef0f2;
}

.staff-user-card-actions .btn {
  flex: 1 1 8.5rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .staff-user-card .card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  .staff-user-card-main {
    flex: 1 1 14rem;
    min-width: 0;
  }

  .staff-user-card-actions {
    flex: 0 0 auto;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    justify-content: flex-end;
  }

  .staff-user-card-actions .btn {
    flex: 0 0 auto;
  }
}

.staff-user-card:hover {
  border-color: rgba(111, 66, 193, 0.35);
  box-shadow: 0 0.25rem 0.75rem rgba(111, 66, 193, 0.08);
}

.staff-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  flex-shrink: 0;
}

.staff-avatar--employee { background: linear-gradient(135deg, #6f42c1, #d63384); }
.staff-avatar--front_office { background: linear-gradient(135deg, #0d6efd, #20c997); }
.staff-avatar--admin { background: linear-gradient(135deg, #495057, #212529); }

.staff-cred-box {
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.08) 0%, rgba(32, 201, 151, 0.1) 100%);
  border: 1px solid rgba(25, 135, 84, 0.25);
}

.staff-cred-item .staff-cred-value {
  word-break: break-all;
}

.staff-cred-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(25, 135, 84, 0.2);
}

.staff-cred-item:last-child { border-bottom: 0; }

.incentive-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.incentive-podium-slot {
  text-align: center;
  border-radius: 0.85rem;
  padding: 0.85rem 0.5rem 1rem;
  background: #fff;
  box-shadow: 0 0.15rem 0.55rem rgba(17, 24, 39, 0.07);
  min-height: 7rem;
}

.incentive-podium-slot--first {
  min-height: 8.5rem;
  background: linear-gradient(180deg, #fff9e6 0%, #fff 100%);
  border: 2px solid rgba(245, 158, 11, 0.45);
}

.incentive-podium-slot--second {
  background: linear-gradient(180deg, #f3f4f6 0%, #fff 100%);
}

.incentive-podium-slot--third {
  background: linear-gradient(180deg, #fff7ed 0%, #fff 100%);
}

.incentive-podium-medal {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.incentive-podium-name {
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 0.15rem;
}

.incentive-podium-rev {
  font-weight: 800;
  color: #6f42c1;
  font-size: 0.95rem;
}

.incentive-rank-row {
  border-radius: 0.75rem;
  border: 1px solid #eef0f2;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: #fff;
  transition: border-color 0.15s ease;
}

.incentive-rank-row:hover {
  border-color: rgba(111, 66, 193, 0.3);
}

.incentive-rank-row--top {
  border-color: rgba(111, 66, 193, 0.25);
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.04) 0%, #fff 100%);
}

.incentive-rank-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
  background: #e9ecef;
  color: #495057;
  flex-shrink: 0;
}

.incentive-rank-badge--1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.incentive-rank-badge--2 { background: linear-gradient(135deg, #9ca3af, #6b7280); color: #fff; }
.incentive-rank-badge--3 { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.incentive-bar-track {
  height: 6px;
  border-radius: 99px;
  background: #e9ecef;
  overflow: hidden;
  margin-top: 0.35rem;
}

.incentive-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6f42c1, #d63384);
}

#adminMainTabContent > .tab-pane:not(.active) .modal {
  display: none !important;
  pointer-events: none !important;
}

body:not(.modal-open) .modal-backdrop {
  display: none !important;
  pointer-events: none !important;
}

.role-features-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.role-features-table .role-features-feature-col {
  min-width: 14rem;
  max-width: 22rem;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 2px 0 0 rgba(0, 0, 0, 0.04);
}

.role-feature-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0;
}

.role-feature-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.12), rgba(214, 51, 132, 0.1));
  color: var(--maguva-primary);
  font-size: 0.9rem;
}

.role-feature-label {
  line-height: 1.25;
}

.role-feature-summary {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #5c6670;
  padding-left: 2.25rem;
}

.role-features-col-hint {
  font-weight: 400;
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
  color: #8b949e;
}

.role-features-table thead .role-features-feature-col {
  z-index: 3;
  background: var(--bs-table-bg, #f8f9fa);
}

.role-features-table .role-features-role-col {
  width: 6.5rem;
  min-width: 6.5rem;
}

.role-features-table .role-feature-cell {
  vertical-align: middle;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.role-features-table tbody tr:hover {
  background-color: rgba(111, 66, 193, 0.04);
}

.role-features-table .role-features-role-col .badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35em 0.65em;
}

.role-feature-locked {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6c757d;
  background: linear-gradient(180deg, #f8f9fa 0%, #eef1f4 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

.role-feature-locked .bi {
  font-size: 0.65rem;
  opacity: 0.75;
}

/* Maguva toggle switch (role access matrix) */
.maguva-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  margin: 0;
  vertical-align: middle;
}

.maguva-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.maguva-toggle-track {
  position: relative;
  width: 2.85rem;
  height: 1.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #e2e6ea 0%, #d0d5db 100%);
  box-shadow:
    inset 0 1px 3px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    background 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.15s ease;
}

.maguva-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #f3f4f6 100%);
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.22),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  transform: translateY(-50%);
  transition:
    transform 0.28s cubic-bezier(0.34, 1.35, 0.64, 1),
    box-shadow 0.28s ease;
}

.maguva-toggle-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.45), transparent 55%);
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.maguva-toggle:hover .maguva-toggle-track {
  box-shadow:
    inset 0 1px 3px rgba(15, 23, 42, 0.12),
    0 0 0 3px rgba(111, 66, 193, 0.14);
}

.maguva-toggle-input:focus-visible + .maguva-toggle-track {
  outline: 2px solid var(--maguva-primary);
  outline-offset: 3px;
}

.maguva-toggle-input:checked + .maguva-toggle-track {
  background: linear-gradient(135deg, var(--maguva-chrome-purple) 0%, var(--maguva-chrome-pink) 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.15),
    0 4px 14px rgba(111, 66, 193, 0.28);
}

.maguva-toggle-input:checked + .maguva-toggle-track .maguva-toggle-thumb {
  transform: translate(1.3rem, -50%);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.35);
}

.maguva-toggle-input:checked + .maguva-toggle-track .maguva-toggle-glow {
  opacity: 1;
}

.maguva-toggle:active .maguva-toggle-track {
  transform: scale(0.97);
}

.maguva-toggle--admin .maguva-toggle-input:checked + .maguva-toggle-track {
  background: linear-gradient(135deg, #4a2885 0%, #6f42c1 55%, #8b5cf6 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    0 4px 14px rgba(74, 40, 133, 0.32);
}

.maguva-toggle--front_office .maguva-toggle-input:checked + .maguva-toggle-track {
  background: linear-gradient(135deg, #5a32a3 0%, #7c3aed 50%, #d63384 100%);
}

.maguva-toggle--employee .maguva-toggle-input:checked + .maguva-toggle-track {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 45%, #2dd4bf 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.12),
    0 4px 14px rgba(13, 148, 136, 0.28);
}

.maguva-toggle--employee:hover .maguva-toggle-track {
  box-shadow:
    inset 0 1px 3px rgba(15, 23, 42, 0.12),
    0 0 0 3px rgba(13, 148, 136, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .maguva-toggle-track,
  .maguva-toggle-thumb,
  .maguva-toggle-glow {
    transition: none;
  }
}

.fo-incentive-hero-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(4px);
}

.fo-incentive-hero-stat .val {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.fo-incentive-hero-stat .lbl {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.audit-resume-banner {
  border-radius: 0.85rem;
  border: 0;
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.12) 0%, rgba(32, 201, 151, 0.12) 100%);
  border-left: 4px solid #6f42c1;
}

.audit-list-card {
  border-radius: 0.85rem;
  border: 1px solid #eef0f2;
  background: #fff;
  padding: 1rem 1.1rem;
  margin-bottom: 0.65rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.audit-list-card:hover {
  border-color: rgba(111, 66, 193, 0.35);
  box-shadow: 0 0.25rem 0.85rem rgba(111, 66, 193, 0.1);
}

.audit-list-card--active {
  border-color: rgba(111, 66, 193, 0.45);
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.05) 0%, #fff 100%);
}

.audit-preview-tile {
  border-radius: 0.85rem;
  text-align: center;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.08) 0%, rgba(32, 201, 151, 0.08) 100%);
  border: 1px solid rgba(111, 66, 193, 0.15);
}

.audit-preview-tile .big-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: #6f42c1;
  line-height: 1;
}

.audit-scope-step {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.audit-scope-step-item {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #e9ecef;
  color: #6c757d;
}

.audit-scope-step-item.active {
  background: linear-gradient(135deg, #6f42c1, #d63384);
  color: #fff;
}

.audit-scope-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.audit-scope-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #495057;
}

.audit-scope-badge--compact {
  font-size: 0.68rem;
}

.audit-scope-badge-label {
  color: #6c757d;
  font-weight: 500;
}

.audit-active-scope .audit-scope-badges::before {
  content: 'Scope';
  display: block;
  width: 100%;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.audit-remaining-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  background: #fff3cd;
  border: 1px solid #ffe69c;
  color: #664d03;
  margin: 0.2rem;
}

.audit-remaining-chip--btn {
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.audit-remaining-chip--btn:hover,
.audit-remaining-chip--btn:focus-visible {
  background: #ffe69c;
  border-color: #ffc107;
  outline: none;
}

.audit-remaining-chip--btn.audit-remaining-chip--active {
  background: #ffc107;
  border-color: #e0a800;
  color: #332701;
  font-weight: 600;
}

.audit-missing-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.audit-missing-card {
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid #eee;
  overflow: hidden;
}

.audit-missing-card-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.audit-missing-card-main:hover,
.audit-missing-card-main:focus-visible {
  background: #f8f9fa;
  outline: none;
}

.audit-missing-card-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #e7f1ff, #f3e8ff);
  color: #6f42c1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.audit-missing-card-barcodes {
  border-top: 1px dashed #eee;
  padding-top: 0.35rem;
}

.audit-missing-modal-dialog {
  max-width: 420px;
}

.audit-missing-photo {
  width: 100%;
  max-width: 200px;
  max-height: 260px;
  object-fit: cover;
}

.audit-missing-photo--empty {
  width: 100%;
  max-width: 200px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-size: 0.85rem;
  margin: 0 auto;
}

.audit-missing-barcodes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.audit-recent-item {
  border-left: 3px solid #20c997;
}

.maguva-empty-state {
  text-align: center;
  padding: 2.75rem 1.5rem;
  border-radius: var(--maguva-radius-lg);
  background: linear-gradient(165deg, #f8f5ff 0%, #fff 45%, #fafbff 100%);
  border: 1px dashed rgba(111, 66, 193, 0.22);
}

.maguva-empty-state i {
  font-size: 2.75rem;
  background: linear-gradient(135deg, var(--maguva-primary), var(--maguva-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.85rem;
  display: block;
}

.maguva-skeleton {
  border-radius: 0.85rem;
  background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
  background-size: 200% 100%;
  animation: maguvaShimmer 1.2s ease-in-out infinite;
  min-height: 4rem;
}

@keyframes maguvaShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Period pill selector (mobile-friendly) */
.maguva-period-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.maguva-period-pills .btn {
  flex: 1 1 auto;
  min-width: 5.5rem;
  min-height: 2.75rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #495057;
}

.maguva-period-pills .btn.active {
  background: linear-gradient(135deg, #6f42c1, #d63384);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.25);
}

.audit-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.78rem;
  color: #6c757d;
}

.audit-detail-meta span {
  white-space: nowrap;
}

.audit-app--admin .audit-list-card {
  max-width: 42rem;
}

.employee-sales-pane .incentive-rank-row {
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid #eef0f2;
}

.employee-sales-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.employee-sales-stats .maguva-stat-tile--revenue {
  grid-column: 1 / -1;
}

.employee-sales-pane .maguva-stat-value {
  font-size: 1.35rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.employee-sales-pane .maguva-stat-tile--revenue .maguva-stat-value {
  font-size: 1.55rem;
}

@media (min-width: 576px) {
  .employee-sales-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .employee-sales-stats .maguva-stat-tile--revenue {
    grid-column: auto;
  }

  .employee-sales-pane .maguva-stat-tile--revenue .maguva-stat-value {
    font-size: 1.35rem;
  }
}

@media (max-width: 575.98px) {
  .employee-sales-pane .maguva-stat-tile .card-body {
    padding: 0.65rem 0.35rem !important;
  }

  .employee-sales-pane .maguva-stat-value {
    font-size: 1.25rem;
  }
}

/* FO audit — optimized for phone scanning */
.audit-app--mobile {
  max-width: 720px;
}

.audit-app--mobile.audit-scanning .audit-progress-card {
  position: sticky;
  top: 0;
  z-index: 1010;
  margin-bottom: 0.5rem !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.audit-app--mobile .audit-scan-actions .btn {
  min-height: 2.75rem;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  .audit-app--mobile {
    max-width: 100%;
  }

  .audit-app--mobile .audit-qr-reader {
    min-height: min(48vh, 360px);
  }

  .audit-app--mobile .audit-list-card .audit-open-btn {
    width: 100%;
    min-height: 2.75rem;
    margin-top: 0.25rem;
  }

  .audit-app--mobile .audit-scan-actions {
    position: sticky;
    bottom: 0;
    z-index: 1005;
    background: #fff;
    margin: 0 -0.25rem;
    padding: 0.65rem 0.25rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef0f2;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .audit-app--mobile #auditViewActive .card-body.p-3,
  .audit-app--mobile .audit-scan-panel .p-3 {
    padding-bottom: 0.5rem !important;
  }

  .audit-app--mobile .audit-scope-step-item {
    font-size: 0.65rem;
    padding: 0.55rem 0.25rem;
  }

  .audit-app--mobile .maguva-feature-hero-body {
    padding: 1rem !important;
  }

  .audit-app--mobile .maguva-feature-title {
    font-size: 1.1rem;
  }

  .employee-sales-pane {
    max-width: 100%;
  }

  .employee-sales-pane .maguva-feature-hero-body {
    padding: 1rem !important;
  }

  .employee-sales-pane .incentive-rank-row {
    flex-wrap: wrap;
  }

  .maguva-desktop-pane .maguva-filter-card,
  .maguva-desktop-pane .maguva-section-card {
    min-width: 0;
  }
}

@media (max-width: 576px) {
  .employee-page .card-header { font-size: 1rem; }
  .employee-page .form-control,
  .employee-page .form-select { font-size: 16px; }
  .employee-shell.maguva-app-shell { padding-left: 0 !important; padding-right: 0 !important; }
  .employee-shell .employee-tabs .nav-link {
    min-height: 3.65rem;
    padding: 0.4rem 0.1rem;
  }
  .employee-shell .employee-tabs .nav-link .maguva-nav-label {
    font-size: 0.58rem;
  }
  .employee-shell .employee-tabs--fo .nav-link .maguva-nav-label {
    font-size: 0.52rem;
  }
  .employee-shell .employee-tabs .nav-link i {
    font-size: 1.1rem;
  }
  .incentive-podium { grid-template-columns: 1fr; }
  .incentive-podium-slot--first { min-height: auto; order: -1; }

  .audit-success-icon { font-size: 3rem; }
  .audit-success-title { font-size: 1.25rem; }
}

/* Label printer — dress photos for reference while labeling */
.label-printer-table .inv-thumb {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 0.375rem;
  background: #eee;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.label-printer-table .inv-thumb-placeholder {
  width: 64px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #999;
  font-size: 0.6rem;
  border-radius: 0.375rem;
  text-align: center;
  line-height: 1.15;
  padding: 0.25rem;
}
.label-photo-btn:hover .inv-thumb,
.label-photo-btn:focus-visible .inv-thumb {
  outline: 2px solid var(--maguva-primary);
  outline-offset: 2px;
}
.label-photo-modal-img {
  max-width: 100%;
  max-height: min(70vh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.label-selected-preview {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #fafafa;
  padding: 0.75rem 1rem;
}
.label-selected-preview-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.label-preview-card {
  flex: 0 0 auto;
  width: 108px;
  text-align: center;
}
.label-preview-card .label-preview-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0.375rem;
}
.label-preview-card img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 0.375rem;
  background: #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.label-preview-card .label-preview-placeholder {
  width: 96px;
  height: 128px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ececec;
  color: #999;
  font-size: 0.65rem;
  border-radius: 0.375rem;
}
.label-preview-card .label-preview-id {
  font-family: var(--bs-font-monospace);
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 0.35rem;
}
.label-preview-card .label-preview-attrs {
  font-size: 0.65rem;
  color: #666;
  line-height: 1.2;
  margin-top: 0.15rem;
}

/* Offers / discounts admin */
.discount-offers-app {
  max-width: 1400px;
}
.discount-offers-subtabs {
  max-width: 36rem;
}
.maguva-subtab-panes > .maguva-subtab-pane {
  display: none;
}
.maguva-subtab-panes > .maguva-subtab-pane.active {
  display: block;
}
.discount-offers-app .form-select,
.discount-offers-app .form-control {
  width: 100%;
  min-height: calc(1.5em + 0.75rem + 2px);
}
.discount-offers-app .form-select {
  padding-right: 2.25rem;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
}
.discount-offers-app .discount-attr-select,
.discount-offers-app #discountEligibleCategory {
  cursor: pointer;
}
.discount-offers-card {
  border-radius: 0.65rem;
  overflow: hidden;
}
.discount-offers-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
  padding: 0.85rem 1.1rem;
}
.discount-filter-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.discount-filter-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.discount-filter-block-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.65rem;
}
.discount-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.discount-size-chip {
  border: 1px solid #dee2e6;
  background: #fff;
  color: #495057;
  border-radius: 2rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.discount-size-chip:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.discount-size-chip.active {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}
.discount-preview-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.08) 0%, rgba(25, 135, 84, 0.06) 100%);
  border: 1px solid rgba(13, 110, 253, 0.15);
  border-radius: 0.5rem;
}
.discount-preview-panel--empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  grid-template-columns: none;
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.35);
  font-size: 0.875rem;
}
.discount-preview-wrap {
  border: 1px solid rgba(111, 66, 193, 0.18);
  border-radius: 0.65rem;
  background: linear-gradient(180deg, rgba(111, 66, 193, 0.04) 0%, #fff 100%);
  padding: 0.85rem 1rem;
}
.discount-preview-result .discount-preview-panel {
  margin-bottom: 0;
}
.discount-preview-expand-btn {
  font-weight: 500;
}
.discount-preview-expand-chevron {
  font-size: 0.75rem;
  transition: transform 0.15s;
}
.discount-preview-items-list {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
}
.discount-preview-item-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.discount-preview-item-row:last-child {
  border-bottom: 0;
}
.discount-preview-item-thumb-wrap {
  flex-shrink: 0;
}
.discount-preview-item-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f9fa;
  display: block;
}
.discount-preview-item-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 0.95rem;
}
.discount-preview-item-thumb--broken {
  opacity: 0.35;
}
.discount-preview-item-main {
  flex: 1;
  min-width: 0;
}
.discount-preview-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.discount-preview-item-chips {
  margin-top: 0.25rem;
}
.discount-preview-item-row .discount-recent-chips {
  margin-bottom: 0;
}
.discount-preview-item-meta {
  font-size: 0.75rem;
  color: #6c757d;
  white-space: nowrap;
  flex-shrink: 0;
}
.discount-dialog-modal {
  border: 0;
  border-radius: 0.85rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.discount-notice-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.discount-basket-attr-sets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.discount-basket-attr-sets-empty {
  padding: 0.65rem 0.75rem;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.02);
}
.discount-basket-attr-set-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(111, 66, 193, 0.15);
  border-radius: 0.5rem;
  background: rgba(111, 66, 193, 0.04);
}
.discount-basket-attr-set-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.discount-basket-attr-set-num {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--maguva-primary);
  background: rgba(111, 66, 193, 0.12);
  border-radius: 2rem;
  padding: 0.15rem 0.45rem;
  flex-shrink: 0;
}
.discount-basket-attr-set-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.discount-basket-attr-chip {
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: 2rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #495057;
}
.discount-basket-attr-chip-k {
  font-weight: 600;
  color: var(--maguva-primary);
  margin-right: 0.2rem;
}
.discount-stat {
  text-align: center;
  padding: 0.35rem 0.25rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.55);
}
.discount-stat-icon {
  font-size: 1rem;
  color: var(--maguva-primary);
  opacity: 0.85;
  margin-bottom: 0.2rem;
}
.discount-stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #212529;
  line-height: 1.2;
}
.discount-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-top: 0.15rem;
}
.discount-tiers-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  font-weight: 600;
  border-bottom-width: 1px;
}
.discount-tiers-wrap {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
}
.discount-tiers-table {
  margin-bottom: 0;
}
.discount-tiers-table tbody td {
  vertical-align: middle;
  padding: 0.65rem 0.75rem;
}
.discount-recent-intro {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: #6c757d;
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.06) 0%, rgba(111, 66, 193, 0.02) 100%);
  border-bottom: 1px solid rgba(111, 66, 193, 0.1);
}
.discount-recent-intro > i {
  color: var(--maguva-primary);
  margin-top: 0.1rem;
  flex-shrink: 0;
}
.discount-recent-count {
  background: rgba(111, 66, 193, 0.1);
  color: var(--maguva-primary);
  border: 1px solid rgba(111, 66, 193, 0.2);
  font-weight: 600;
  font-size: 0.72rem;
}
.discount-recent-refresh-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.discount-recent-toolbar {
  padding: 0.75rem 1rem;
  background: #fafbfc;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.discount-recent-toolbar .input-group-text {
  background: #fff;
  color: #6c757d;
}
.discount-recent-pager {
  background: #fafbfc;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.discount-recent-pager-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
}
.discount-recent-pager-info {
  font-size: 0.78rem;
  color: #6c757d;
  font-weight: 500;
}
.discount-recent-pager-nav {
  display: flex;
  gap: 0.35rem;
}
.discount-recent-list {
  max-height: 28rem;
  overflow-y: auto;
  scrollbar-width: thin;
}
.discount-recent-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: transparent;
  text-align: left;
  color: inherit;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.discount-recent-row:hover {
  background: linear-gradient(90deg, rgba(111, 66, 193, 0.06) 0%, rgba(111, 66, 193, 0.02) 100%);
}
.discount-recent-row:hover .discount-recent-chevron {
  color: var(--maguva-primary);
  transform: translateX(2px);
}
.discount-recent-row:focus-visible {
  outline: 2px solid var(--maguva-primary);
  outline-offset: -2px;
  z-index: 1;
}
.discount-recent-row:last-child {
  border-bottom: 0;
}
.discount-recent-row--skeleton {
  pointer-events: none;
  cursor: default;
}
.discount-recent-row--skeleton:hover {
  background: transparent;
}
.discount-recent-skel-thumb {
  width: 2.75rem;
  height: 3.25rem;
  border-radius: 0.4rem;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: discount-skel-shimmer 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.discount-recent-skel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.discount-recent-skel-line {
  height: 0.65rem;
  border-radius: 0.25rem;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: discount-skel-shimmer 1.2s ease-in-out infinite;
}
.discount-recent-skel-line--short {
  width: 45%;
}
.discount-recent-skel-line--tiny {
  width: 65%;
  height: 0.5rem;
}
@keyframes discount-skel-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.discount-recent-thumb-wrap {
  flex-shrink: 0;
}
.discount-recent-thumb {
  display: block;
  width: 2.75rem;
  height: 3.25rem;
  object-fit: cover;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.discount-recent-thumb--empty,
.discount-recent-thumb--broken {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 3.25rem;
  background: linear-gradient(145deg, #f3f4f6 0%, #e9ecef 100%);
  color: #adb5bd;
  font-size: 1rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.discount-recent-body {
  flex: 1;
  min-width: 0;
}
.discount-recent-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.2rem;
}
.discount-recent-id {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}
.discount-recent-pct {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--maguva-primary);
  padding: 0.12rem 0.45rem;
  border-radius: 2rem;
  line-height: 1.3;
}
.discount-recent-basket {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
  font-size: 0.72rem;
}
.discount-recent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.discount-recent-chip {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  color: #495057;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discount-recent-chip-k {
  font-weight: 600;
  margin-right: 0.2rem;
  color: #6c757d;
}
.discount-recent-chip--more {
  background: rgba(111, 66, 193, 0.1);
  color: var(--maguva-primary);
  font-weight: 600;
}
.discount-recent-meta-line {
  font-size: 0.75rem;
  color: #6c757d;
}
.discount-recent-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 4.5rem;
}
.discount-recent-when {
  font-size: 0.68rem;
  color: #868e96;
  text-align: right;
  line-height: 1.3;
  white-space: nowrap;
}
.discount-recent-chevron {
  font-size: 0.85rem;
  color: #ced4da;
  transition: color 0.15s, transform 0.15s;
}
.discount-recent-modal {
  border: 0;
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.discount-recent-modal-dialog .modal-header {
  padding: 1rem 1.25rem 0;
}
.discount-recent-photo-frame {
  position: relative;
  background: linear-gradient(160deg, #f8f9fa 0%, #eef0f3 100%);
  border-radius: 0.65rem;
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.discount-recent-detail-photo {
  display: block;
  width: 100%;
  max-height: min(60vh, 480px);
  object-fit: contain;
  border-radius: 0.45rem;
  margin: 0 auto;
}
.discount-recent-detail-photo--empty {
  width: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #adb5bd;
  font-size: 0.9rem;
}
.discount-recent-detail-photo--empty i {
  font-size: 2rem;
}
.discount-recent-photo-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--maguva-primary);
  padding: 0.3rem 0.65rem;
  border-radius: 2rem;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.35);
}
.discount-recent-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.discount-detail-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.6rem;
}
.discount-detail-badge--basket {
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
}
.discount-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.discount-detail-pill {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 2rem;
  background: rgba(111, 66, 193, 0.08);
  color: #212529;
  border: 1px solid rgba(111, 66, 193, 0.12);
}
.discount-detail-pill-k {
  font-weight: 600;
  color: var(--maguva-primary);
  margin-right: 0.25rem;
}
.discount-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.discount-detail-chip {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #495057;
}
.discount-recent-detail-card {
  background: #fafbfc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.55rem;
  padding: 0.35rem 0.85rem;
}
.discount-recent-detail-row {
  display: grid;
  grid-template-columns: 6.75rem 1fr;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  align-items: start;
}
.discount-recent-detail-row:last-child {
  border-bottom: 0;
}
.discount-recent-detail-row dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.discount-recent-detail-row dt i {
  color: var(--maguva-primary);
  opacity: 0.8;
  font-size: 0.85rem;
}
.discount-recent-detail-row dd {
  margin: 0;
  font-size: 0.82rem;
  color: #212529;
}
.discount-eligible-list {
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #fff;
}
.discount-eligible-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: background 0.12s;
}
.discount-eligible-main {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}
.discount-eligible-main--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}
.discount-eligible-top {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.discount-eligible-chips {
  margin-top: 0.1rem;
}
.discount-eligible-chips .discount-recent-chips {
  margin-bottom: 0;
}
.discount-live-count,
.discount-basket-live-count {
  font-size: 0.8rem;
  font-weight: 600;
}
.offer-rack-summary strong { color: var(--bs-body-color); }
.offer-category-block {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}
.offer-category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.offer-rack-list { display: flex; flex-direction: column; }
.offer-rack-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.offer-rack-row:last-child { border-bottom: 0; }
.offer-rack-thumb {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.5rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #f8f9fa;
}
.offer-rack-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 1.25rem;
}
.offer-rack-body { flex: 1; min-width: 0; }
.offer-rack-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.15rem;
}
.offer-fulfill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.offer-fulfill-btn {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}
.offer-fulfill-done {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #198754;
  padding: 0.2rem 0.45rem;
  border-radius: 2rem;
  background: rgba(25, 135, 84, 0.1);
  border: 1px solid rgba(25, 135, 84, 0.2);
}
.offer-fulfill-done i {
  font-size: 1rem;
  flex-shrink: 0;
}
#offersTypeTabs .nav-link {
  font-size: 0.85rem;
  padding: 0.5rem 0.65rem;
}
@media (max-width: 575.98px) {
  .offer-fulfill-actions { flex-direction: column; }
  .offer-fulfill-btn { width: 100%; justify-content: center; }
  .offer-fulfill-done { width: 100%; justify-content: center; }
}
.discount-selection-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.discount-selection-confirm-count {
  min-width: 10rem;
}
.discount-live-count--loading,
.discount-basket-live-count--loading {
  opacity: 0.65;
}
.discount-basket-preview-card .discount-preview-panel {
  margin-bottom: 0;
}
.discount-basket-items-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.discount-eligible-row:hover {
  background: rgba(111, 66, 193, 0.04);
}
.discount-eligible-row:last-child {
  border-bottom: 0;
}
.discount-eligible-thumb-wrap {
  flex-shrink: 0;
}
.discount-eligible-thumb {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f8f9fa;
  display: block;
}
.discount-eligible-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 0.95rem;
}
.discount-eligible-thumb--broken {
  opacity: 0.35;
}
.discount-eligible-id {
  font-weight: 600;
  font-size: 0.85rem;
}
.item-id-link,
.discount-item-id-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--maguva-primary, #6f42c1);
  font-weight: 600;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(111, 66, 193, 0.35);
  text-underline-offset: 0.15em;
  cursor: pointer;
  line-height: inherit;
}
.item-id-link:hover,
.item-id-link:focus-visible,
.discount-item-id-btn:hover,
.discount-item-id-btn:focus-visible {
  color: #5a32a3;
  text-decoration-color: currentColor;
}
.item-id-link:focus-visible,
.discount-item-id-btn:focus-visible {
  outline: 2px solid rgba(111, 66, 193, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}
button.item-id-link {
  font-family: var(--bs-font-monospace);
}
.discount-eligible-row--clickable {
  cursor: default;
}
.discount-preview-item-row .discount-item-id-btn {
  font-size: 0.85rem;
}
.discount-eligible-meta {
  font-size: 0.75rem;
  color: #6c757d;
}
.discount-empty-state {
  text-align: center;
  padding: 2.25rem 1.25rem;
  color: #6c757d;
}
.discount-empty-state--recent {
  padding: 2.5rem 1.5rem;
}
.discount-empty-state--compact {
  padding: 1.5rem 1rem;
}
.discount-empty-state i {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.65rem;
  color: var(--maguva-primary);
  opacity: 0.35;
}
@media (max-width: 767.98px) {
  .discount-preview-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}

.scan-mrp-hero--discounted .scan-mrp-value {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.scan-basket-offer {
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.scan-basket-offer--eligible {
  background: linear-gradient(180deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.03) 100%);
}
.scan-basket-offer--ineligible {
  background: linear-gradient(180deg, rgba(108, 117, 125, 0.08) 0%, rgba(108, 117, 125, 0.02) 100%);
}
.scan-basket-offer-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.scan-basket-offer-icon {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}
.scan-basket-offer--eligible .scan-basket-offer-icon {
  background: rgba(25, 135, 84, 0.15);
  color: #146c43;
}
.scan-basket-offer--ineligible .scan-basket-offer-icon {
  background: rgba(108, 117, 125, 0.12);
  color: #6c757d;
}
.scan-basket-offer-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}
.scan-basket-offer-status {
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: 0.15rem;
}
.scan-basket-offer-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
}
.scan-basket-offer-badge--yes {
  background: #198754;
  color: #fff;
}
.scan-basket-offer-badge--no {
  background: #e9ecef;
  color: #6c757d;
}
.scan-basket-tiers-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6c757d;
  margin: 0.85rem 0 0.45rem;
}
.scan-basket-tiers {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.scan-basket-tier {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  background: #fff;
  border: 1px solid rgba(111, 66, 193, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.scan-basket-offer--eligible .scan-basket-tier {
  border-color: rgba(25, 135, 84, 0.2);
}
.scan-basket-tier-step {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(111, 66, 193, 0.1);
  color: #6f42c1;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.scan-basket-offer--eligible .scan-basket-tier-step {
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
}
.scan-basket-tier-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.scan-basket-tier-spend {
  font-size: 0.82rem;
  font-weight: 600;
  color: #212529;
}
.scan-basket-tier-off {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6f42c1;
}
.scan-basket-offer--eligible .scan-basket-tier-off {
  color: #146c43;
}
.scan-basket-offer-hint {
  margin-top: 0.75rem;
  color: #6c757d;
}

.offers-eligible-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.offers-eligible-row:last-child {
  border-bottom: 0;
}
.offers-eligible-body {
  flex: 1;
  min-width: 0;
}

.billing-savings-panel .alert {
  background: rgba(25, 135, 84, 0.1);
}

/* Offers dashboard */
.offers-discount-heatmap .offers-heatmap-row {
  cursor: pointer;
  transition: background 0.12s;
}
.offers-discount-heatmap .offers-heatmap-row:hover .ml-discount-heatmap-cell--cat {
  background: #ede9fe;
}
.offers-stock-table tbody tr { cursor: pointer; }
.inventory-discount-heatmap .inventory-heatmap-row:hover .ml-discount-heatmap-cell--cat {
  background: #ede9fe;
}
.inventory-discount-heatmap .inventory-heatmap-row { cursor: pointer; }
.inventory-stock-table tbody tr { cursor: pointer; }

.dashboard-category-overview {
  border-radius: 0.85rem;
}
.dashboard-category-overview-stat {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  text-align: center;
}
.dashboard-category-overview-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-category-overview-stat-lbl {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}
.dashboard-category-overview-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dashboard-category-overview-bar-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 4.5rem;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 0.72rem;
}
button.dashboard-category-overview-bar-row { cursor: pointer; }
button.dashboard-category-overview-bar-row:hover .dashboard-category-overview-bar-fill {
  filter: brightness(1.08);
}
.dashboard-category-overview-bar-row--static { cursor: default; }
.dashboard-category-overview-desc {
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border-radius: 0.55rem;
  border-left: 3px solid #6f42c1;
}
.dashboard-category-overview-bar-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-category-overview-bar-track {
  height: 0.55rem;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}
.dashboard-category-overview-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d63384, #6f42c1);
  border-radius: 999px;
  min-width: 2px;
}
.dashboard-category-overview-bar-val {
  text-align: right;
  color: #495057;
  white-space: nowrap;
}
.dashboard-category-overview-pie-wrap {
  height: 220px;
}

.offers-dashboard .dashboard-panel {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04) !important;
}
.offers-hero {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #7c2d12 0%, #c2410c 30%, #db2777 65%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(219, 39, 119, 0.22);
}
.offers-hero--empty {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
  color: #495057;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.offers-hero-empty-icon {
  font-size: 2.5rem;
  color: #db2777;
  opacity: 0.45;
  display: block;
  margin-bottom: 0.5rem;
}
.offers-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 45%, rgba(255, 255, 255, 0.14), transparent),
    radial-gradient(ellipse 45% 70% at 88% 25%, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}
.offers-hero-inner {
  position: relative;
  padding: 1.1rem 1.25rem;
}
.offers-hero-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.88;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.offers-hero-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}
.offers-hero-sub {
  font-size: 0.82rem;
  opacity: 0.9;
}
.offers-hero-stat {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  height: 100%;
}
.offers-hero-stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.82;
  font-weight: 600;
}
.offers-hero-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 0.1rem;
}
.offers-hero-stat-sub {
  font-size: 0.68rem;
  opacity: 0.78;
  margin-top: 0.15rem;
}
.offers-hero-stat-value--positive { color: #bbf7d0; }
.offers-hero-stat-value--negative { color: #fecaca; }
.offers-fin-pill {
  background: #fafbfc;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.55rem;
  padding: 0.55rem 0.65rem;
  height: 100%;
}
.offers-fin-pill-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  font-weight: 600;
}
.offers-fin-pill-value {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.offers-fin-pill-sub {
  font-size: 0.68rem;
  color: #6c757d;
}
.offers-insights-list {
  padding-left: 1.15rem;
  color: #495057;
  font-size: 0.88rem;
}
.offers-insights-list li {
  margin-bottom: 0.35rem;
}
.offers-category-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
  background: #fafbfc;
}
.offers-category-row {
  cursor: pointer;
  transition: background 0.12s;
}
.offers-category-row:hover {
  background: rgba(111, 66, 193, 0.05);
}

/* Customers dashboard */
.customers-dashboard .dashboard-panel {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04) !important;
}
.customers-hero {
  border-radius: 1rem;
  overflow: hidden;
}
.customers-hero--empty {
  background: linear-gradient(135deg, #f0fdf9, #f5f3ff);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.customers-hero-empty-icon {
  font-size: 2.5rem;
  color: #6f42c1;
  opacity: 0.4;
}
.customers-hero-stat {
  border-radius: 0.85rem;
  padding: 1.1rem 1.25rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.customers-hero-stat--teal { background: linear-gradient(135deg, #0d9488, #20c997); }
.customers-hero-stat--purple { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.customers-hero-stat--pink { background: linear-gradient(135deg, #be185d, #db2777); }
.customers-hero-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}
.customers-hero-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.2rem 0;
}
.customers-hero-stat-sub {
  font-size: 0.78rem;
  opacity: 0.92;
}
.customers-segment-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  text-transform: capitalize;
}
.customers-segment-badge--new { background: rgba(32, 201, 151, 0.15); color: #0ca678; }
.customers-segment-badge--regular { background: rgba(253, 126, 20, 0.15); color: #e67700; }
.customers-segment-badge--loyal { background: rgba(13, 110, 253, 0.12); color: #0d6efd; }
.customers-segment-badge--vip { background: rgba(214, 51, 132, 0.12); color: #d63384; }
.customers-segment-badge--at_risk { background: rgba(220, 53, 69, 0.12); color: #dc3545; }
.customers-dir-row { cursor: pointer; }
.customers-dir-row:hover { background: rgba(111, 66, 193, 0.05); }
.customers-purchase-summary {
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.customers-purchase-summary--new { border-left: 4px solid #20c997; }
.customers-purchase-summary--returning { border-left: 4px solid #6f42c1; }
.customers-purchase-summary-title {
  font-weight: 700;
  font-size: 0.9rem;
}
.customers-purchase-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c757d;
}
.customers-purchase-stat-value {
  font-weight: 600;
  font-size: 0.95rem;
}
.customers-purchase-panel--new .dashboard-panel-header { border-bottom-color: rgba(32, 201, 151, 0.25); }
.customers-purchase-panel--returning .dashboard-panel-header { border-bottom-color: rgba(111, 66, 193, 0.25); }

@media (max-width: 575.98px) {
  .customers-dashboard .customers-hero-stat-value {
    font-size: 1.45rem;
  }
  .customers-dashboard .dashboard-bucket-card {
    min-height: 2.75rem;
    padding: 0.85rem;
  }
  .customers-dashboard .dashboard-chart-card {
    min-height: 200px !important;
  }
  .customers-dashboard .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

/* ML insights tab */
.ml-insights-tab {
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.ml-insights-tab > .mb-2 {
  margin-bottom: 1rem !important;
}
.ml-insights-tab > .mb-2 h2 {
  background: linear-gradient(90deg, #7c3aed, #db2777, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.ml-insights-hero {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #312e81 0%, #5b21b6 25%, #7c3aed 50%, #db2777 75%, #f97316 100%);
  color: #fff;
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.35);
}
.ml-hero-stat { padding: 0.35rem 0; }
.ml-hero-stat-btn {
  width: 100%; border: none; background: transparent; color: inherit; padding: 0.35rem 0;
  border-radius: 0.5rem; cursor: pointer; transition: background 0.15s;
}
.ml-hero-stat-btn:hover { background: rgba(255,255,255,0.12); }
.ml-hero-stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.ml-hero-stat-lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.ml-toolbar-clock {
  width: 2.5rem; height: 2.5rem; border-radius: 0.65rem;
  background: rgba(124, 58, 237, 0.12); color: #6f42c1;
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.ml-chart-wrap { position: relative; height: 200px; min-height: 120px; padding: 0.15rem 0.35rem 0; }
.ml-chart-wrap--donut { height: 200px; }
.ml-chart-wrap--trend { height: 152px; }
.ml-trend-card .card-body {
  padding: 0.75rem 0.85rem !important;
}
.ml-trend-card .card-header {
  padding: 0.5rem 0.85rem !important;
}
.ml-chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.35rem; padding: 1.5rem; color: #adb5bd; font-size: 0.82rem; min-height: 80px;
}
.ml-chart-empty i { font-size: 1.75rem; opacity: 0.5; }
.ml-trend-badge {
  font-size: 0.72rem; font-weight: 700; color: #fff; padding: 0.15rem 0.45rem; border-radius: 999px;
}
.ml-trend-summary {
  line-height: 1.45;
  color: #64748b;
}
.ml-trend-action {
  line-height: 1.45;
  color: #495057;
  white-space: normal;
  word-break: break-word;
}
.ml-trend-card { border-top: 3px solid var(--trend-color, #6c757d); }
.ml-conf-ring {
  width: 2.75rem; height: 2.75rem; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--clr) calc(var(--pct) * 1%), #e9ecef 0);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; color: #495057;
}
.ml-conf-ring span {
  width: 2rem; height: 2rem; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ml-insight-card {
  display: flex; gap: 0.75rem; border-radius: 0.75rem; border: 1px solid rgba(0,0,0,0.06);
  background: #fff; padding: 0.85rem; height: 100%; box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.ml-insight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
}
.ml-insight-card--high {
  border-left: 4px solid #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 45%);
}
.ml-insight-card--medium {
  border-left: 4px solid #fd7e14;
  background: linear-gradient(135deg, #fff7ed 0%, #fff 45%);
}
.ml-insight-card--low {
  border-left: 4px solid #adb5bd;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 45%);
}
.ml-insight-card-visual {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.ml-insight-card-icon {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.ml-insight-card-content { flex: 1; min-width: 0; }
.ml-insight-card-title { font-weight: 700; font-size: 0.88rem; line-height: 1.25; margin-bottom: 0.2rem; }
.ml-insight-card-meta { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.35rem; }
.ml-pri-dot { width: 8px; height: 8px; border-radius: 50%; }
.ml-insight-card-body {
  font-size: 0.78rem; color: #6c757d; margin-bottom: 0.4rem; line-height: 1.45;
  white-space: normal; word-break: break-word;
}
.ml-insight-card-action {
  font-size: 0.75rem; background: #f8f5ff; border-radius: 0.4rem; padding: 0.35rem 0.5rem; color: #432874;
  line-height: 1.45; white-space: normal; word-break: break-word;
}
.ml-insight-card-action i { color: #fd7e14; margin-right: 0.25rem; }
.ml-proc-row { margin-bottom: 0.65rem; }
.ml-proc-row-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.2rem; font-size: 0.8rem; }
.ml-proc-label { flex: 1; font-weight: 600; min-width: 0; word-break: break-word; }
.ml-proc-reason {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  margin-top: 0.15rem;
  padding-left: 1.65rem;
  word-break: break-word;
}
.ml-proc-val { font-size: 0.72rem; color: #6c757d; white-space: nowrap; }
.ml-proc-bar-track { height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.ml-proc-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.ml-insights-hero--empty {
  background: linear-gradient(135deg, #f5f3ff, #fdf4ff);
  color: #495057;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
.ml-insights-hero-icon {
  font-size: 2.5rem;
  color: #7c3aed;
  opacity: 0.45;
  display: block;
  margin-bottom: 0.5rem;
}
.ml-insights-toolbar {
  background: linear-gradient(90deg, #ede9fe, #fce7f3, #fff);
  border: 1px solid rgba(124, 58, 237, 0.12) !important;
}
.ml-group-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: #f8f9fa;
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.06);
}
.ml-group-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: none;
  border-radius: 0.55rem;
  background: transparent;
  color: #495057;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.ml-group-nav-btn:hover { background: rgba(124, 58, 237, 0.08); color: #432874; }
.ml-group-nav-btn.active {
  background: #fff;
  color: #6f42c1;
  box-shadow: 0 2px 8px rgba(111, 66, 193, 0.15);
}
.ml-group-nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(111, 66, 193, 0.12);
  color: #6f42c1;
  min-width: 1.25rem;
  text-align: center;
}
.ml-group-nav-badge--urgent { background: #dc3545; color: #fff; }
.ml-group-panes {
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  min-height: 200px;
}
.ml-group-desc { border-left: 3px solid #7c3aed; padding-left: 0.65rem; }

.ml-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(90deg, #f5f3ff, #fdf2f8, #eff6ff);
  border-radius: 0.85rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}
.ml-section-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: #fff;
  color: var(--ml-nav, #495057);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid color-mix(in srgb, var(--ml-nav, #adb5bd) 35%, white);
  transition: background 0.15s, color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.ml-section-nav-link:hover {
  background: color-mix(in srgb, var(--ml-nav, #7c3aed) 12%, white);
  color: var(--ml-nav, #432874);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--ml-nav, #7c3aed) 25%, transparent);
}
.ml-page-sections {
  border-radius: 0;
  padding: 0;
}
.ml-page-section {
  scroll-margin-top: 4rem;
  margin-bottom: 1rem;
}
.ml-page-section:last-child {
  margin-bottom: 0;
}
.ml-section-shell {
  border-radius: 0.85rem;
  padding: 1rem 1.15rem 1.15rem;
  background: var(--ml-sec-bg, #fff);
  border: 1px solid color-mix(in srgb, var(--ml-sec, #7c3aed) 18%, white);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--ml-sec, #7c3aed) 8%, transparent);
}
.ml-section-head {
  margin-bottom: 0.85rem !important;
}
.ml-section-head-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.ml-section-head-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--ml-sec, #7c3aed);
  background: color-mix(in srgb, var(--ml-sec, #7c3aed) 14%, white);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ml-sec, #7c3aed) 20%, transparent);
}
.ml-section-sub { color: #64748b; margin-top: 0.15rem; }
.ml-section-head h3 { font-weight: 800; }
.ml-discount-cat-head {
  background: linear-gradient(90deg, color-mix(in srgb, var(--ml-cat, #ef4444) 88%, #1e1b4b), color-mix(in srgb, var(--ml-cat, #ef4444) 65%, #312e81));
  color: #fff;
}
.ml-discount-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: #6c757d; white-space: nowrap; }
.ml-discount-table td { vertical-align: middle; }

.discount-ai-root { padding: 0.25rem 0; }
.discount-ai-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, #faf5ff, #fff);
  border-radius: 0.75rem;
  border: 1px solid rgba(111, 66, 193, 0.15);
  margin-bottom: 1rem;
}
.discount-ai-toolbar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}
.discount-ai-pct-row,
.discount-ai-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.discount-ai-pct-presets { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.discount-ai-preset.active {
  background: #6f42c1;
  border-color: #6f42c1;
  color: #fff;
}
.discount-ai-pct-input { width: 4.25rem; text-align: center; }
.discount-ai-cat-pct { width: 4rem !important; }
.discount-ai-cat {
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.07);
  margin-bottom: 1rem;
  overflow: hidden;
}
.discount-ai-cat-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.discount-ai-cat-title {
  min-width: 0;
}
.discount-ai-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.discount-ai-item:last-child { border-bottom: none; }
.discount-ai-item-main { cursor: pointer; min-width: 0; }
.discount-ai-item-reason { font-size: 0.8rem; color: #6c757d; margin-top: 0.15rem; }
.discount-ai-item-meta { font-size: 0.78rem; color: #495057; margin-top: 0.2rem; }
.discount-ai-item-pct-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 4.5rem;
}
.discount-ai-pct-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; }
.discount-ai-bulk-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #ede9fe 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.discount-ai-bulk-label {
  font-weight: 800;
  font-size: 0.85rem;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.discount-ai-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ml-top-priorities {
  background: linear-gradient(135deg, #fef2f2 0%, #fff 50%);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.06);
}

.ml-top-priorities-head {
  margin-bottom: 0.85rem;
}

.ml-top-priorities-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ml-top-priority-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ml-top-priority-card--high {
  border-left: 4px solid #dc3545;
}

.ml-top-priority-card--medium {
  border-left: 4px solid #fd7e14;
}

.ml-top-priority-rank {
  font-size: 1rem;
  font-weight: 800;
  color: #7c3aed;
  min-width: 1.75rem;
  line-height: 1.3;
}

.ml-top-priority-icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #6f42c1) 14%, #fff);
  color: var(--accent, #6f42c1);
  font-size: 1.15rem;
}

.ml-top-priority-body {
  flex: 1 1 auto;
  min-width: 0;
}

.ml-top-priority-action {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.35;
}

.ml-top-priority-conf {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6c757d;
  padding-top: 0.15rem;
}

.ml-top-priorities-empty {
  font-size: 0.9rem;
}

.ml-actionables-section {
  border-radius: 1rem;
  padding: 0;
  background: transparent;
  border: none;
}
.ml-actionables-section .ml-section-shell {
  background: var(--ml-sec-bg, linear-gradient(180deg, #fffbeb 0%, #fff 40%));
  border-color: rgba(245, 158, 11, 0.25);
}
.ml-actionables-list { display: flex; flex-direction: column; gap: 0.85rem; }
.ml-actionable-item {
  border-radius: 0.75rem;
  border: 1px solid rgba(0,0,0,0.07);
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.ml-actionable-item--high { border-left: 4px solid #dc3545; }
.ml-actionable-item--medium { border-left: 4px solid #fd7e14; }
.ml-actionable-item--low { border-left: 4px solid #adb5bd; }
.ml-actionable-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.ml-actionable-rank {
  font-size: 1.1rem;
  font-weight: 800;
  color: #7c3aed;
  min-width: 2rem;
  line-height: 1.2;
}
.ml-actionable-conf {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--clr, #6f42c1);
  background: color-mix(in srgb, var(--clr) 12%, white);
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  white-space: nowrap;
}
.ml-actionable-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 992px) {
  .ml-actionable-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.ml-actionable-block {
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
}
.ml-actionable-block p {
  margin: 0;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}
.ml-actionable-block-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.ml-actionable-block--why { background: #f8f9fa; color: #495057; }
.ml-actionable-block--why .ml-actionable-block-title { color: #6c757d; }
.ml-actionable-block--action { background: #ecfdf5; color: #14532d; }
.ml-actionable-block--action .ml-actionable-block-title { color: #198754; }
.ml-actionable-block--details { background: #f5f3ff; color: #432874; }
.ml-actionable-block--details .ml-actionable-block-title { color: #6f42c1; }
.ml-actionable-details-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ml-actionable-details-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.ml-actionable-details-list span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}
.ml-actionable-more { font-size: 0.78rem; text-decoration: none; }
.ml-actionable-item--compact { padding: 0.75rem 1rem; }
.ml-actionable-compact-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.ml-actionable-compact-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #7c3aed) 14%, white);
  color: var(--accent, #7c3aed);
}
.ml-actionable-teaser {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}
.ml-actionable-conf--sm {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.58rem;
}
.ml-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  border: none;
  background: transparent;
  color: #6f42c1;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.ml-expand-btn:hover { color: #432874; text-decoration: underline; }
.ml-expand-btn--sm { margin-top: 0.35rem; font-size: 0.72rem; }
.ml-insight-card--visual {
  flex-direction: column;
  gap: 0.35rem;
}
.ml-insight-card-top {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.ml-insight-card-icon-lg {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent, #7c3aed) 12%, white);
  color: var(--accent, #7c3aed);
  font-size: 1.1rem;
}
.ml-insight-card-teaser {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}
.ml-discount-legend { line-height: 1.8; }
.ml-legend-swatch {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  margin-right: 0.2rem;
  vertical-align: middle;
}
.ml-discount-age-band {
  position: relative;
  border-radius: 0.65rem;
  margin-bottom: 0.5rem;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--ml-cat, #ef4444) 20%, white);
  overflow: hidden;
}
.ml-discount-age-band-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--bar, 30%);
  max-width: 100%;
  background: color-mix(in srgb, var(--ml-cat, #ef4444) 18%, white);
  pointer-events: none;
}
.ml-discount-age-band-main {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0.75rem;
}
.ml-discount-age-band-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 7rem;
  font-size: 0.85rem;
}
.ml-discount-age-band-stats {
  display: flex;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: #64748b;
}
.ml-discount-pct-badge {
  font-weight: 800;
  font-size: 0.95rem;
  color: #dc2626;
  background: #fef2f2;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-left: auto;
}
.ml-discount-sku-list {
  padding: 0.25rem 0.5rem 0.5rem;
  border-top: 1px dashed rgba(0,0,0,0.06);
}
.ml-discount-sku-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.35rem;
  font-size: 0.78rem;
}
.discount-ai-band {
  border-top: 1px solid rgba(0,0,0,0.06);
}
.discount-ai-band-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: #fafafa;
}
.discount-ai-band-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: nowrap;
}
.discount-ai-band-title strong { white-space: nowrap; }
.discount-ai-band-title .discount-ai-band-stats {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.discount-ai-band-actions {
  display: grid;
  grid-template-columns: 4.25rem 5.5rem 5.75rem 5.5rem;
  align-items: center;
  gap: 0.35rem;
  justify-items: stretch;
}
.discount-ai-band-actions .discount-ai-band-pct { width: 100% !important; }
.discount-ai-band-actions .btn { white-space: nowrap; padding-left: 0.5rem; padding-right: 0.5rem; }
.discount-ai-band-actions .discount-ai-band-toggle {
  justify-self: end;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}
@media (max-width: 991.98px) {
  .discount-ai-band-head {
    grid-template-columns: 1fr;
  }
  .discount-ai-band-actions {
    grid-template-columns: 4.25rem 1fr 1fr 1fr;
    width: 100%;
  }
}
.discount-ai-visual-panel {
  border-radius: 0.85rem;
  border: 1px solid rgba(111, 66, 193, 0.12);
  background: linear-gradient(135deg, #faf5ff 0%, #fff 60%);
  padding: 1rem;
  margin-bottom: 1rem;
}
.discount-ai-vis-stat {
  text-align: center;
  padding: 0.65rem;
  border-radius: 0.65rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}
.discount-ai-vis-stat-val { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.discount-ai-vis-stat-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6c757d; }
.discount-ai-vis-bar-row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 5.5rem;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}
.discount-ai-vis-bar-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discount-ai-vis-bar-track {
  height: 8px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
}
.discount-ai-vis-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #dc3545);
}
.discount-ai-vis-bar-val { text-align: right; color: #495057; white-space: nowrap; }
.ml-discount-visuals .card-header { font-size: 0.82rem; font-weight: 700; }
.heatmap-legend-read { line-height: 1.45; }
.heatmap-legend-scale {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.heatmap-legend-cap {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.heatmap-legend-bar {
  width: 5.5rem;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(var(--heat-accent), 0.08),
    rgba(var(--heat-accent), 0.72));
  border: 1px solid rgba(var(--heat-accent), 0.12);
}
.heatmap-legend-hint { margin-left: 0.15rem; }
.ml-discount-heatmap {
  display: grid;
  gap: 3px;
  font-size: 0.72rem;
  min-width: 36rem;
}
.ml-discount-heatmap-head,
.ml-discount-heatmap-row {
  display: grid;
  grid-template-columns: 5.5rem repeat(var(--ml-heat-cols, 5), minmax(3.25rem, 1fr));
  gap: 3px;
  align-items: stretch;
}
.ml-discount-heatmap-cell {
  padding: 0.4rem 0.3rem;
  text-align: center;
  border-radius: 0.4rem;
  min-height: 2.35rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  border: 1px solid rgba(15, 23, 42, 0.04);
}
.ml-discount-heatmap-cell--head {
  background: #f1f5f9;
  font-weight: 700;
  color: #475569;
  font-size: 0.68rem;
  padding: 0.35rem 0.2rem;
  min-height: auto;
}
.ml-discount-heatmap-cell--cat {
  background: #f8fafc;
  font-weight: 600;
  text-align: left;
  padding-left: 0.55rem;
  justify-content: center;
  font-size: 0.78rem;
}
.heatmap-cell-primary {
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: #1e293b;
}
.heatmap-cell-secondary {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 0.12rem;
  font-variant-numeric: tabular-nums;
}
.heatmap-cell--empty {
  background: var(--heatmap-empty-bg, #f8fafc) !important;
  border-color: transparent;
}
.heatmap-cell--empty .heatmap-cell-primary {
  font-weight: 500;
  color: #cbd5e1;
  font-size: 0.9rem;
}
.ml-stock-intel-section {
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f5f3ff 100%);
  border: 1px solid rgba(111, 66, 193, 0.1);
}
.ml-customer-intel-section {
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 55%, #fff 100%);
  border: 1px solid rgba(6, 182, 212, 0.12);
}
.ml-customer-kpi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  height: 100%;
}
.ml-customer-kpi i { font-size: 1.65rem; }
.ml-customer-kpi-val { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.ml-customer-kpi-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6c757d; }
.ml-customer-kpi-sub { font-size: 0.72rem; color: #94a3b8; margin-top: 0.1rem; }
.ml-customer-kpi--new i { color: #06b6d4; }
.ml-customer-kpi--repeat i { color: #6f42c1; }
.ml-customer-kpi--basket i { color: #20c997; }
.ml-customer-kpi--offer i { color: #f59e0b; }
.ml-stock-kpi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  height: 100%;
}
.ml-stock-kpi i { font-size: 1.75rem; }
.ml-stock-kpi-val { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.ml-stock-kpi-lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #6c757d; }
.ml-stock-kpi--buy i { color: #198754; }
.ml-stock-kpi--less i { color: #fd7e14; }
.ml-stock-kpi--disc i { color: #dc3545; }
.ml-stock-kpi--dead i { color: #6f42c1; }
.ml-stock-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.ml-stock-table th { font-size: 0.72rem; text-transform: uppercase; color: #6c757d; }
.ml-stock-table td { vertical-align: middle; font-size: 0.82rem; }
.ml-age-bar {
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  margin-bottom: 2px;
  max-width: 80px;
}
.ml-age-bar span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #fd7e14, #dc3545);
}

@media (max-width: 575.98px) {
  .ml-insights-toolbar .card-body {
    flex-direction: column;
    align-items: stretch !important;
  }
  .ml-insights-toolbar .d-flex.align-items-center.gap-2 {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .ml-section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
  }
  .ml-section-nav-link {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.38rem 0.65rem;
  }
  .ml-hero-stat-val { font-size: 1.2rem; }
  .ml-actionable-compact-head {
    flex-wrap: wrap;
  }
  .ml-actionable-conf--sm {
    margin-left: auto;
  }
  .ml-proc-row-head {
    flex-wrap: wrap;
  }
  .ml-proc-val {
    white-space: normal;
    width: 100%;
    margin-top: 0.15rem;
  }
  .ml-chart-wrap--trend { height: 140px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile UX — touch targets, sticky actions, billing cart cards, polish
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sticky primary-action bar (intake submit, billing checkout) */
.maguva-action-dock {
  position: sticky;
  bottom: 0;
  z-index: 1005;
  margin: 1.25rem -0.75rem -0.75rem;
  padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.94) 22%, #fff 100%);
  border-top: 1px solid rgba(111, 66, 193, 0.1);
}

.maguva-action-dock--checkout {
  margin-top: 1.5rem;
}

.maguva-action-dock .btn {
  min-height: 3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.maguva-action-dock .intake-color-variant-banner {
  margin-bottom: 0.55rem;
}

.maguva-action-dock .intake-color-variant-inner {
  padding: 0.55rem 0.65rem;
  gap: 0.6rem;
}

.maguva-action-dock .intake-color-variant-photo {
  width: 3.5rem;
}

.maguva-action-dock .intake-color-variant-thumb {
  width: 3.5rem;
  height: 3.5rem;
}

.maguva-action-dock .intake-color-variant-title {
  font-size: 0.86rem;
  line-height: 1.25;
}

.maguva-action-dock .intake-color-variant-meta,
.maguva-action-dock .intake-color-variant-hint {
  font-size: 0.72rem;
}

.maguva-action-dock .intake-color-variant-photo-label {
  font-size: 0.58rem;
}

/* Touch-friendly buttons app-wide on narrow screens */
@media (max-width: 767.98px) {
  .employee-shell .employee-tabs--fo .nav-link {
    min-height: 3.35rem;
  }

  .employee-shell .employee-tabs--fo .nav-link .maguva-nav-label {
    font-size: 0.58rem;
  }

  .btn-photo-mobile,
  .employee-shell .btn-lg,
  .employee-shell .btn-primary:not(.btn-sm):not(.btn-link),
  .maguva-chrome .modal-footer .btn,
  .maguva-chrome .card-footer .btn {
    min-height: 2.75rem;
  }

  .maguva-main-content {
    padding-left: max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-left, 0px)) !important;
    padding-right: max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-right, 0px)) !important;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .employee-page {
    padding-left: 0;
    padding-right: 0;
  }

  /* Intake success actions — full-width stacked CTAs */
  .intake-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: none;
  }

  .intake-success-actions .btn {
    width: 100%;
    min-height: 2.75rem;
  }

  /* Compact employee intake — hide redundant section titles; fields keep labels */
  #inventoryForm > .card {
    margin-bottom: 0.55rem !important;
    border-radius: 0.65rem;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05) !important;
  }

  #inventoryForm > .card > .card-header {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  #inventoryForm > .card > .card-body {
    padding: 0.7rem 0.8rem;
  }

  #inventoryForm .photo-card .card-body {
    padding: 0.5rem;
  }

  #inventoryForm #photoCaptureActions {
    padding: 0.75rem 0.55rem;
    border-width: 1.5px;
  }

  #inventoryForm .card-body > .text-muted.small.mb-2 {
    display: none;
  }

  #inventoryForm #attributeFields .mb-3 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem !important;
  }

  #inventoryForm #attributeFields .form-label {
    flex: 0 0 38%;
    max-width: 7.25rem;
    margin-bottom: 0;
    font-size: 0.78rem;
    line-height: 1.15;
  }

  #inventoryForm #attributeFields .form-select {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .employee-page .item-editor-attr-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .employee-page .item-editor-attr-card {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
  }

  .employee-page .item-editor-attr-label {
    flex: 0 0 38%;
    max-width: 7.25rem;
    margin-bottom: 0;
    font-size: 0.68rem;
    line-height: 1.15;
    text-transform: none;
    letter-spacing: 0;
  }

  .employee-page .item-editor-attr-card .form-select {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  #inventoryForm .variant-grid-table thead {
    font-size: 0.78rem;
  }

  #inventoryForm .variant-grid-table td,
  #inventoryForm .variant-grid-table th {
    padding: 0.35rem 0.25rem;
  }

  #inventoryForm #variantQtyTotal {
    font-size: 0.8125rem;
    margin-top: 0.35rem !important;
  }

  /* Item editor (recent entries) — same compact section chrome */
  .employee-page .item-editor-section {
    margin-bottom: 0.55rem;
    border-radius: 0.65rem;
  }

  .employee-page .item-editor-section-head:not(.item-editor-section-head--split) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .employee-page .item-editor-section-head--split {
    padding: 0 0.75rem 0;
    background: transparent !important;
    min-height: 0;
    justify-content: flex-end;
  }

  .employee-page .item-editor-section-head--split > .d-flex {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .employee-page .item-editor-section-body {
    padding: 0.7rem 0.8rem;
  }

  /* Billing step indicator — wrap on small screens */
  .billing-steps {
    flex-wrap: wrap;
    gap: 0.5rem 0.35rem;
    padding: 0.55rem 0.65rem;
  }

  .billing-step-line {
    display: none;
  }

  .billing-step {
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    white-space: normal;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  /* Billing cart — card rows instead of cramped table */
  .billing-cart-table thead {
    display: none;
  }

  .billing-cart-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.45rem;
    background: #fff;
    border-radius: 0.65rem;
    border: 1px solid #eef0f2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .billing-cart-table tbody td {
    display: block;
    border: none;
    padding: 0;
    vertical-align: middle;
  }

  .billing-cart-table tbody td:nth-child(1) {
    flex: 1 1 100%;
    font-weight: 600;
    padding-bottom: 0.15rem;
  }

  .billing-cart-table tbody td:nth-child(2)::before {
    content: "Size: ";
    color: #6c757d;
    font-size: 0.78rem;
  }

  .billing-cart-table tbody td:nth-child(3)::before {
    content: "Category: ";
    color: #6c757d;
    font-size: 0.78rem;
  }

  .billing-cart-table tbody td:nth-child(4) {
    flex: 1 1 auto;
    font-size: 0.85rem;
  }

  .billing-cart-table tbody td:nth-child(4)::before {
    content: "Price: ";
    color: #6c757d;
    font-size: 0.78rem;
  }

  .billing-cart-table tbody td:nth-child(5)::before {
    content: "Qty ";
    color: #6c757d;
    font-size: 0.78rem;
  }

  .billing-cart-table tbody td:nth-child(6) {
    font-weight: 700;
    color: var(--bs-primary);
  }

  .billing-cart-table tbody td:nth-child(7) {
    margin-left: auto;
  }

  .billing-cart-table .billing-remove-btn {
    width: 2.5rem;
    height: 2.5rem;
  }

  #billingCartTableWrap.table-responsive {
    overflow: visible;
  }

  /* Payment tiles — single column on phone */
  #billingPaySplitRow .billing-pay-col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Modal footers — stacked full-width buttons */
  .maguva-chrome .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .maguva-chrome .modal-footer .btn {
    width: 100%;
    margin: 0 !important;
  }

  .item-editor-popup .modal-footer .btn-group,
  .item-editor-popup .modal-footer .d-flex {
    flex-direction: column;
    width: 100%;
    gap: 0.45rem;
  }

  .item-editor-popup .modal-footer .btn-group .btn {
    width: 100%;
    border-radius: var(--bs-btn-border-radius) !important;
  }

  /* Item display — related colour chips wrap */
  .scan-related-colors {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .scan-related-color-btn {
    min-height: 2.25rem;
  }

  /* Navbar — compact user chip */
  .maguva-navbar .navbar-text,
  .maguva-navbar .nav-link.text-light {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Admin mobile tab strip — slightly larger tap targets */
  .maguva-sidebar-nav .nav-link {
    min-width: 2.85rem;
    min-height: 2.85rem;
  }

  /* Tables in admin — horizontal scroll hint */
  .maguva-tab-pane .table-responsive {
    -webkit-overflow-scrolling: touch;
    margin-bottom: 0.5rem;
  }

  /* Bills list filter row */
  .bills-filter-card .row.g-2 > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Scan page — full-width result actions */
  #scanResultContent .btn,
  #tab-emp-scan .btn-group .btn {
    min-height: 2.65rem;
  }
}

/* Login page polish */
body.maguva-login {
  background: linear-gradient(145deg, #f3f0ff 0%, #fce7f3 45%, #e8f4fc 100%) !important;
}

body.maguva-login .card {
  border-radius: 1rem;
  box-shadow: 0 0.5rem 2rem rgba(111, 66, 193, 0.12) !important;
}

body.maguva-login .btn-primary {
  min-height: 2.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #6f42c1, #d63384);
  border: none;
}

body.maguva-login .btn-primary:hover {
  background: linear-gradient(135deg, #5a32a3, #c22570);
}

@media (max-width: 767.98px) {
  body.maguva-login .container {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  body.maguva-login code {
    word-break: break-all;
  }
}

/* ── Production polish: intake success, billing shortcuts, pane loading ── */

.billing-pay-shortcuts .btn {
  min-height: 2.25rem;
  font-weight: 600;
}

.billing-status.alert-success {
  font-size: 0.95rem;
  font-weight: 600;
}

.shell-pane-loading {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #6c757d;
}

.recent-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fo-inventory-card .recent-card-row span:first-child {
  min-width: 4.5rem;
}

@media (max-width: 767.98px) {
  #tab-role-access .maguva-feature-hero-body .btn-light {
    width: 100%;
  }

  .billing-pay-shortcuts {
    justify-content: stretch;
  }

  .billing-pay-shortcuts .btn {
    flex: 1 1 calc(33% - 0.35rem);
    min-width: 0;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.72rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Visual polish — surfaces, forms, intake, billing, cards
   ═══════════════════════════════════════════════════════════════════════════ */

.employee-page .card,
.billing-card,
.billing-step-card,
.maguva-filter-card,
.maguva-section-card {
  border-radius: var(--maguva-radius-lg) !important;
  border: 1px solid rgba(111, 66, 193, 0.07) !important;
  box-shadow: var(--maguva-shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.employee-page .card:hover,
.billing-card:hover {
  box-shadow: var(--maguva-shadow-md);
}

.employee-page .card-header,
.billing-card .card-header {
  background: linear-gradient(180deg, #fff 0%, #faf8ff 100%) !important;
  border-bottom: 1px solid rgba(111, 66, 193, 0.08);
  font-weight: 700;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.employee-page .card-header strong,
.billing-card .card-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.photo-card .card-body {
  background: linear-gradient(180deg, #fdfbff 0%, #fff 100%);
}

#photoCaptureActions {
  padding: 1.25rem 1rem;
  border-radius: var(--maguva-radius-md);
  border: 2px dashed rgba(111, 66, 193, 0.2);
  background: rgba(111, 66, 193, 0.03);
  text-align: center;
}

.photo-confirmed-thumb {
  border-radius: var(--maguva-radius-md);
  box-shadow: var(--maguva-shadow-md);
  max-height: 220px;
  object-fit: cover;
}

.maguva-page-hero {
  background: linear-gradient(135deg, #6f42c1 0%, #d63384 55%, #5a9fd4 100%);
  color: #fff;
  border-radius: var(--maguva-radius-lg);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--maguva-shadow-glow);
}

.maguva-page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.22) 0%, transparent 42%);
  pointer-events: none;
}

.maguva-page-hero-inner {
  position: relative;
  z-index: 1;
}

.maguva-page-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.maguva-page-hero-sub {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.9;
  line-height: 1.45;
}

.maguva-page-hero-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.intake-success-card {
  background: linear-gradient(165deg, #ecfdf5 0%, #fff 50%, #f0fdf4 100%);
  border: 1px solid rgba(25, 135, 84, 0.2) !important;
  border-left: 5px solid #198754 !important;
  box-shadow: 0 12px 32px rgba(25, 135, 84, 0.12);
}

.intake-success-icon {
  font-size: 2.75rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(25, 135, 84, 0.25));
}

.billing-empty-state {
  color: #6c757d;
}

.billing-empty-state i {
  background: linear-gradient(135deg, #adb5bd, #6f42c1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}

.billing-cart-table tbody tr {
  transition: background-color 0.15s ease;
}

.billing-pay-tile {
  border-radius: var(--maguva-radius-md) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.maguva-action-dock {
  border-top: 1px solid rgba(111, 66, 193, 0.12);
  backdrop-filter: blur(10px);
}

.maguva-feature-hero {
  box-shadow: var(--maguva-shadow-glow);
}

.maguva-stat-tile {
  border: 1px solid rgba(111, 66, 193, 0.06);
}

.maguva-period-pills .btn.active {
  background: linear-gradient(135deg, var(--maguva-primary), var(--maguva-accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(111, 66, 193, 0.3);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(111, 66, 193, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.14);
}

.maguva-table-card {
  border-radius: var(--maguva-radius-lg);
  border: 1px solid rgba(111, 66, 193, 0.08);
  box-shadow: var(--maguva-shadow-sm);
}

.modal-content {
  border-radius: var(--maguva-radius-lg);
  border: none;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
}

.navbar-maguva .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  border-radius: 99px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

.navbar-maguva .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
}

.maguva-nav-user-menu {
  position: relative;
}

.maguva-nav-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.5rem 0.22rem 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-width: 0;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.maguva-nav-user-chip.dropdown-toggle::after {
  display: none;
}

.maguva-nav-user-chip:hover,
.maguva-nav-user-chip.show,
.maguva-nav-user-chip:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  box-shadow: none;
}

.maguva-nav-user-caret {
  font-size: 0.58rem;
  opacity: 0.55;
  margin-right: 0.05rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.maguva-nav-user-chip:hover .maguva-nav-user-caret,
.maguva-nav-user-chip.show .maguva-nav-user-caret {
  opacity: 0.85;
}

.maguva-nav-user-chip.show .maguva-nav-user-caret {
  transform: rotate(180deg);
}

.maguva-nav-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.maguva-nav-user-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
  gap: 0.05rem;
}

.maguva-nav-short-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.01em;
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maguva-nav-chip-role {
  font-size: 0.58rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.02em;
  max-width: 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maguva-nav-user-dropdown {
  min-width: 12rem;
  border: none;
  border-radius: 0.9rem;
  padding: 0.35rem 0;
  margin-top: 0.5rem !important;
  box-shadow: 0 12px 40px rgba(17, 24, 39, 0.14) !important;
}

.maguva-nav-user-dropdown-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
}

.maguva-nav-user-dropdown-role {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6c757d;
}

.maguva-nav-user-dropdown-role .bi {
  font-size: 0.75rem;
  color: #6f42c1;
}

.maguva-nav-logout-item {
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  margin: 0 0.35rem;
  width: calc(100% - 0.7rem);
}

.maguva-nav-logout-item:hover,
.maguva-nav-logout-item:focus {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

.maguva-nav-user-chip--admin .maguva-nav-user-avatar {
  background: linear-gradient(145deg, #9333ea 0%, #ec4899 100%);
}

.maguva-nav-user-chip--front-office .maguva-nav-user-avatar {
  background: linear-gradient(145deg, #0d9488 0%, #2dd4bf 100%);
}

.maguva-nav-user-chip--employee .maguva-nav-user-avatar {
  background: linear-gradient(145deg, #4f46e5 0%, #6366f1 100%);
}

.maguva-nav-user-chip--staff .maguva-nav-user-avatar {
  background: linear-gradient(145deg, #64748b 0%, #475569 100%);
}

body.maguva-login .card {
  border-radius: 1.15rem;
  box-shadow: 0 20px 60px rgba(111, 66, 193, 0.15) !important;
  border: 1px solid rgba(111, 66, 193, 0.08);
}

body.maguva-login h1.h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media (max-width: 767.98px) {
  .employee-page .card-header {
    font-size: 0.95rem;
  }
}

/* ── Final polish: shell loading, label/rules cards, exchange banner ── */

.maguva-shell-loading {
  text-align: center;
}

.maguva-shell-boot-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(420px, calc(100dvh - 56px - var(--maguva-mobile-nav-h, 3.75rem)));
  padding: 2rem 1rem 2.5rem;
  color: #5c6370;
}

html.maguva-shell-boot:not(.maguva-nav-ready) .maguva-shell-boot-screen {
  display: flex;
}

html.maguva-nav-ready .maguva-shell-boot-screen {
  display: none !important;
}

html.maguva-shell-boot:not(.maguva-nav-ready) .maguva-main-content > #globalAlert,
html.maguva-shell-boot:not(.maguva-nav-ready) .maguva-main-content > #adminMainTabContent {
  display: none !important;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navUserChip.maguva-chrome-pending {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  min-height: 2.35rem;
  color: transparent;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navUserChip.maguva-chrome-pending .maguva-nav-user-avatar,
html.maguva-shell-boot:not(.maguva-nav-ready) #navUserChip.maguva-chrome-pending .maguva-nav-user-copy {
  visibility: hidden;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navUserChip.maguva-chrome-pending::after {
  content: '';
  position: absolute;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: maguva-boot-spin 0.65s linear infinite;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navUserChip.maguva-chrome-pending {
  position: relative;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navRoleLabel.maguva-chrome-pending {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  min-height: 1rem;
  font-size: 0;
  color: transparent;
}

html.maguva-shell-boot:not(.maguva-nav-ready) #navRoleLabel.maguva-chrome-pending::after {
  content: '';
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: maguva-boot-spin 0.65s linear infinite;
}

@keyframes maguva-boot-spin {
  to { transform: rotate(360deg); }
}

.maguva-login-redirecting {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, #fafbff 0%, #f3f0ff 100%);
  color: #5c6370;
}

.maguva-shell-loading-icon {
  width: auto;
  max-width: 3.25rem;
  height: 2.25rem;
  margin: 0 auto 0.75rem;
  border-radius: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--maguva-primary), var(--maguva-accent));
  padding: 0.25rem 0.35rem;
  box-shadow: var(--maguva-shadow-glow);
  overflow: hidden;
}

.maguva-shell-loading-icon img {
  height: 1.65rem;
  width: auto;
  object-fit: contain;
  display: block;
}

.label-printer-cards,
.rules-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.label-printer-card .recent-card-photo .inv-thumb,
.label-printer-card .recent-card-photo .inv-thumb-placeholder {
  width: 64px;
  height: 64px;
}

.billing-exchange-success {
  border: none;
  border-left: 4px solid #198754;
  box-shadow: 0 4px 16px rgba(25, 135, 84, 0.12);
  font-weight: 600;
}

.rules-card .recent-card-row span:first-child {
  min-width: 4.5rem;
}

.ml-insights-skeleton {
  padding: 0.25rem 0;
}

@media (max-width: 767.98px) {
  .maguva-app-nav .maguva-nav-pills .nav-link.active {
    box-shadow: inset 0 -3px 0 #ffc107;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Mobile speed — bottom tab bar, thumb reach, billing scan FAB
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 767.98px) {
  :root {
    --maguva-mobile-nav-h: 4.35rem;
    --admin-context-h: 0;
  }

  /* Mobile top bar — logo left, page title centered, account right */
  .navbar-maguva > .container-fluid,
  .navbar-maguva .maguva-navbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 0.35rem;
    min-height: 2.75rem;
  }

  .navbar-maguva .maguva-brand {
    display: inline-flex !important;
    grid-column: 1;
    margin: 0;
    padding: 0;
    min-width: 0;
  }

  .navbar-maguva .maguva-brand-word {
    display: none !important;
  }

  .navbar-maguva .maguva-brand-logo {
    height: 1.45rem;
    width: auto;
  }

  .maguva-navbar-page-title {
    grid-column: 2;
    justify-self: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #fff;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
  }

  .navbar-maguva .maguva-nav-user,
  .navbar-maguva > .container-fluid > .d-flex.align-items-center {
    grid-column: 3;
    justify-self: end;
    margin-left: 0 !important;
  }

  /* Compact top bar — more room for content */

  .employee-shell .navbar-maguva #userLabel {
    max-width: 5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
  }

  .employee-shell .navbar-maguva .btn-outline-light {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  /* Bottom thumb tab bar (employee + front office) */
  .employee-shell .maguva-app-nav {
    position: fixed !important;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
    padding: 0.2rem 0.15rem calc(0.2rem + env(safe-area-inset-bottom, 0px));
  }

  .employee-shell .maguva-app-nav .maguva-nav-pills,
  .employee-shell .employee-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.1rem !important;
    padding: 0 0.1rem !important;
    width: 100%;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
  }

  .employee-shell .employee-tabs .nav-item {
    flex: 1 1 0;
    min-width: 3.5rem;
    max-width: none;
    scroll-snap-align: center;
  }

  .employee-shell .employee-tabs--fo .nav-item {
    flex: 1 1 0;
    min-width: 3.25rem;
  }

  .employee-shell .employee-tabs .nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-height: calc(var(--maguva-mobile-nav-h) - 0.5rem);
    padding: 0.35rem 0.2rem !important;
    border-radius: 0.65rem !important;
    border-bottom: none !important;
    font-size: 0.62rem;
    width: 100%;
  }

  .employee-shell .employee-tabs .nav-link i {
    font-size: 1.35rem;
  }

  .employee-shell .employee-tabs .nav-link.active {
    background: rgba(255, 255, 255, 0.16) !important;
    border-bottom: none !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }

  .employee-shell .employee-tabs .nav-link.active i {
    color: #ffc107;
  }

  .employee-shell .maguva-nav-label-long {
    display: none;
  }

  .employee-shell .maguva-nav-label-short {
    display: inline;
  }

  .employee-shell .maguva-main-content {
    padding-bottom: calc(var(--maguva-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem) !important;
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h)) !important;
    background: #fff !important;
  }

  /* Page hints hidden on mobile — tab bar + context title carry the page name */

  /* Billing — sticky scan + floating FAB */
  .billing-scan-dock {
    position: sticky;
    top: 0.25rem;
    z-index: 1015;
  }

  .billing-scan-dock .card-header p.small {
    display: none;
  }

  .billing-scan-dock .card-header {
    padding-top: 0.65rem !important;
    padding-bottom: 0.35rem !important;
  }

  .maguva-scan-fab {
    position: fixed;
    right: 0.85rem;
    bottom: calc(var(--maguva-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem);
    z-index: 1038;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 22px rgba(111, 66, 193, 0.45);
  }

  .employee-billing-page:has(.maguva-action-dock) {
    padding-bottom: 3.5rem;
  }

  .maguva-action-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--maguva-mobile-nav-h) + env(safe-area-inset-bottom, 0px));
    margin: 0;
    z-index: 1037;
    border-top: 1px solid rgba(111, 66, 193, 0.14);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  }

  .employee-shell:has(.maguva-action-dock) .maguva-main-content,
  .admin-shell:has(.maguva-action-dock) .maguva-main-content {
    padding-bottom: calc(var(--maguva-mobile-nav-h) + 4.25rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .employee-shell:has(.intake-color-variant-banner:not(.d-none)) .maguva-main-content,
  .admin-shell:has(.intake-color-variant-banner:not(.d-none)) .maguva-main-content {
    padding-bottom: calc(var(--maguva-mobile-nav-h) + 7.75rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Payment shortcuts — full-width tap row */
  .billing-pay-shortcuts {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem !important;
  }

  .billing-pay-shortcuts .btn {
    flex: unset !important;
    min-height: 2.85rem;
    font-size: 0.75rem !important;
    padding: 0.45rem 0.25rem !important;
  }

  /* Phone step — bigger tap targets */
  #billingStepPhone .input-group-lg,
  #billingStepDetails .input-group-lg {
    font-size: 1.15rem;
  }

  #billingStepPhone .d-grid.d-sm-flex {
    display: grid !important;
    gap: 0.5rem;
  }

  #billingStepPhone .d-grid.d-sm-flex .btn {
    width: 100%;
    min-height: 3rem;
  }

  /* Billing total hero — tighter on phone */
  .billing-total-hero .billing-total-amount {
    font-size: 1.65rem;
  }

  .billing-total-hero .card-body {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  /* Hide verbose hints on small screens */
  #billingStepPhone .text-muted small .kbd,
  .billing-step-card .text-muted kbd {
    display: none;
  }
}

.maguva-nav-label-short {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Admin shell — sidebar polish + mobile bottom nav & section drawer
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --admin-context-h: 0;
}

@media (min-width: 768px) {
  .admin-shell .maguva-app-nav .maguva-nav-heading {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    padding-top: 0.15rem;
  }

  .admin-shell .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link {
    border-radius: 0.55rem !important;
    margin: 0 0.35rem 0.12rem;
    padding: 0.55rem 0.75rem !important;
    transition: background 0.15s ease, transform 0.12s ease;
  }

  .admin-shell .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
  }

  .admin-shell .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link[data-admin-tab].active {
    background: rgba(255, 255, 255, 0.14) !important;
    box-shadow: inset 3px 0 0 #ffc107, 0 4px 14px rgba(0, 0, 0, 0.12);
  }

  .admin-shell .maguva-app-nav .maguva-nav-pills > .nav-item > .nav-link[data-admin-tab].active::before {
    display: none;
  }

  .admin-shell .maguva-main-content {
    background: linear-gradient(180deg, #fff 0%, #f8f6ff 100%);
  }

  .admin-shell .maguva-feature-hero,
  .admin-shell .pending-pricing-hero {
    box-shadow: var(--maguva-shadow-glow);
  }
}

@media (max-width: 767.98px) {
  .admin-shell .navbar-maguva .maguva-nav-user-chip {
    padding: 0.22rem 0.45rem 0.22rem 0.22rem;
    gap: 0.4rem;
  }

  .admin-shell .navbar-maguva .maguva-nav-user-avatar {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.58rem;
  }

  .admin-shell .navbar-maguva .maguva-nav-short-name,
  .admin-shell .navbar-maguva .maguva-nav-chip-role {
    max-width: 4.25rem;
  }

  .admin-shell .navbar-maguva .maguva-nav-chip-role {
    font-size: 0.54rem;
  }

  .admin-shell .navbar-maguva .maguva-nav-user-caret {
    font-size: 0.55rem;
  }

  .admin-shell .navbar-maguva .btn-outline-light {
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
  }

  /* Bottom tab bar — all allowed tabs, scroll horizontally */
  .admin-shell .maguva-app-nav {
    position: fixed !important;
    top: auto !important;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: none;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
    padding: 0.2rem 0.15rem calc(0.2rem + env(safe-area-inset-bottom, 0px)) !important;
    overflow: visible !important;
    max-height: none !important;
  }

  .admin-shell .maguva-app-nav .maguva-nav-pills,
  .admin-shell #adminTabs.maguva-nav-pills {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0.35rem;
    scrollbar-width: none;
    gap: 0.1rem !important;
    padding: 0 0.35rem !important;
    width: 100%;
  }

  .admin-shell #adminTabs.maguva-nav-pills::-webkit-scrollbar {
    display: none;
  }

  .admin-shell #adminTabs > .maguva-nav-section,
  .admin-shell #adminTabs > .maguva-nav-group {
    display: none !important;
  }

  .admin-shell #adminTabs > .nav-item:not(.d-none) {
    flex: 0 0 auto;
    min-width: 4.25rem;
    max-width: 5.5rem;
    scroll-snap-align: center;
    display: list-item !important;
  }

  .admin-shell #adminTabs.maguva-nav-spread {
    overflow-x: hidden;
    gap: 0.25rem !important;
    padding: 0.35rem 0.45rem calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .admin-shell #adminTabs.maguva-nav-spread > .nav-item:not(.d-none) {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    scroll-snap-align: none;
  }

  body.maguva-role-employee .admin-shell {
    --maguva-mobile-nav-h: 4.05rem;
  }

  body.maguva-role-employee .admin-shell .maguva-app-nav {
    padding: 0.28rem 0.45rem calc(0.28rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread {
    gap: 0.12rem !important;
    padding: 0 !important;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link {
    min-height: 3.35rem;
    padding: 0.3rem 0.15rem 0.26rem !important;
    gap: 0.1rem;
    border-radius: 0.55rem !important;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link i {
    font-size: 1.28rem;
    line-height: 1;
    opacity: 0.9;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link.active i {
    opacity: 1;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .maguva-nav-label-short,
  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link:not(:has(.maguva-nav-label-short)) .maguva-nav-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    opacity: 0.85;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link.active {
    background: rgba(255, 255, 255, 0.13) !important;
    box-shadow: inset 0 -2px 0 #ffc107;
  }

  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link.active .maguva-nav-label-short,
  body.maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link.active .maguva-nav-label {
    opacity: 1;
    font-weight: 700;
  }

  body[data-maguva-unified-shell="1"].maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link {
    min-height: 3.35rem;
    min-width: 0;
    padding: 0.3rem 0.15rem 0.26rem !important;
  }

  body[data-maguva-unified-shell="1"].maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link i {
    font-size: 1.28rem;
  }

  body[data-maguva-unified-shell="1"].maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .nav-link .maguva-nav-label,
  body[data-maguva-unified-shell="1"].maguva-role-employee .admin-shell #adminTabs.maguva-nav-spread .maguva-nav-label-short {
    font-size: 0.625rem;
    font-weight: 600;
  }

  .admin-shell #adminTabs.maguva-nav-spread .nav-link {
    min-height: 4rem;
    padding: 0.48rem 0.3rem !important;
    gap: 0.22rem;
  }

  .admin-shell #adminTabs.maguva-nav-spread .nav-link i {
    font-size: 1.65rem;
  }

  .admin-shell #adminTabs.maguva-nav-spread .maguva-nav-label-short,
  .admin-shell #adminTabs.maguva-nav-spread .nav-link:not(:has(.maguva-nav-label-short)) .maguva-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    white-space: normal;
    line-height: 1.15;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-maguva-unified-shell="1"] .admin-shell #adminTabs .nav-link {
    max-width: none !important;
    min-width: 4.25rem;
    min-height: 3.85rem;
    padding: 0.45rem 0.35rem;
  }

  body[data-maguva-unified-shell="1"] .admin-shell #adminTabs.maguva-nav-spread .nav-link {
    min-width: 0;
    max-width: none !important;
  }

  body[data-maguva-unified-shell="1"] .admin-shell #adminTabs .nav-link i {
    font-size: 1.5rem;
  }

  body[data-maguva-unified-shell="1"] .admin-shell #adminTabs .nav-link .maguva-nav-label {
    font-size: 0.675rem;
    font-weight: 700;
  }

  .admin-shell #adminTabs > .nav-item.d-none {
    display: none !important;
  }

  .admin-shell #adminTabs .nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.85rem;
    padding: 0.45rem 0.3rem !important;
    border-radius: 0.65rem !important;
    border-bottom: none !important;
    font-size: 0.68rem;
    width: 100%;
    max-width: none;
    white-space: normal;
    position: relative;
  }

  .admin-shell #adminTabs .nav-link i {
    font-size: 1.5rem;
    width: auto;
    margin: 0;
  }

  .admin-shell #adminTabs .nav-link.active {
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    border-bottom: none !important;
  }

  .admin-shell #adminTabs .nav-link.active i {
    color: #ffc107;
  }

  .admin-shell #adminTabs .maguva-nav-label-long {
    display: none;
  }

  .admin-shell #adminTabs .maguva-nav-label-short {
    display: inline;
  }

  .admin-shell #adminTabs .nav-link:not(:has(.maguva-nav-label-short)) .maguva-nav-label {
    font-size: 0.675rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-shell #adminTabs .maguva-nav-label-short {
    font-weight: 700;
  }

  .admin-shell #adminTabs .maguva-tab-badge {
    position: absolute;
    top: 0.12rem;
    right: 0.08rem;
    margin: 0;
    font-size: 0.52rem;
  }

  .admin-shell .maguva-main-content {
    padding-bottom: calc(var(--maguva-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 0.65rem) !important;
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h)) !important;
    background: #fff !important;
  }

  body[data-maguva-unified-shell="1"] .admin-shell.maguva-app-shell > .row > main {
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h) - var(--admin-context-h)) !important;
    padding-top: 0.35rem !important;
    padding-left: max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-left, 0px)) !important;
    padding-right: max(var(--maguva-mobile-page-x, 0.9rem), env(safe-area-inset-right, 0px)) !important;
  }

  body[data-maguva-unified-shell="1"] .admin-shell #adminMainTabContent > .tab-pane.active {
    min-height: calc(100dvh - 56px - var(--maguva-mobile-nav-h) - var(--admin-context-h));
    padding: 0;
    background: #fff;
  }
}

/* ═══ Page hints / hero headers — desktop only ═══ */

@media (min-width: 768px) {
  .maguva-mobile-hint {
    background: linear-gradient(135deg, #6f42c1 0%, #d63384 55%, #5a9fd4 100%);
    color: #fff;
    border-radius: var(--maguva-radius-lg);
    padding: 1.35rem 1.4rem;
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--maguva-shadow-glow);
  }

  .maguva-mobile-hint::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.22) 0%, transparent 42%);
    pointer-events: none;
  }

  .maguva-mobile-hint > i {
    display: none;
  }

  .maguva-mobile-hint-title {
    display: block;
    position: relative;
    z-index: 1;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
    color: #fff;
  }

  .maguva-mobile-hint-text {
    display: block;
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.88rem;
    opacity: 0.9;
    line-height: 1.45;
    font-weight: 500;
    color: #fff;
  }
}

@media (max-width: 767.98px) {
  .maguva-mobile-hint,
  .maguva-page-hero,
  .pending-pricing-hero,
  .pending-pricing-hint,
  .bills-hero {
    display: none !important;
  }

  /* Feature heroes: hide descriptive copy; keep action buttons (New, Refresh, Save) */
  .maguva-feature-hero:not(:has(.btn)) {
    display: none !important;
  }

  .maguva-feature-hero:has(.btn) {
    background: none !important;
    box-shadow: none !important;
    margin: 0 0 0.5rem !important;
    overflow: visible;
  }

  .maguva-feature-hero:has(.btn) .maguva-feature-hero-glow,
  .maguva-feature-hero:has(.btn) .maguva-feature-eyebrow,
  .maguva-feature-hero:has(.btn) .maguva-feature-title,
  .maguva-feature-hero:has(.btn) .maguva-feature-sub {
    display: none !important;
  }

  .maguva-feature-hero:has(.btn) .maguva-feature-hero-body {
    padding: 0 !important;
    display: flex;
    justify-content: flex-end;
  }

  .maguva-feature-hero:has(.btn) .maguva-feature-hero-body > div:not(:has(.btn)) {
    display: none !important;
  }
}
