/* ══════════════════════════════════════════════════════════
   Harlienz Design Qatar — Luxury Haute Couture ERP Design System
   Aesthetic: Contemporary Haute Couture Luxury Atelier
   Typography: Plus Jakarta Sans (Primary UI) & Cormorant Garamond
   ══════════════════════════════════════════════════════════ */

:root {
  /* Fonts */
  --font-sans:     "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif:    "Cormorant Garamond", Georgia, serif;

  /* Modern Obsidian & Slate Ramp */
  --black:         #0D0F12;
  --ink:           #111827;
  --ink-2:         #374151;
  --ink-3:         #6B7280;
  --ink-4:         #9CA3AF;

  /* Precision Lines & Borders */
  --line:          #E8EAEF;
  --line-2:        #D9DCE3;
  --line-3:        #B5B9C4;

  /* Atmospheric Canvas & Pristine Surfaces */
  --bg:            #F8F9FC;
  --surface:       #FFFFFF;
  --surface-2:     #FAFBFD;
  --surface-3:     #F1F3F7;

  /* Harlienz Signature Rose / Champagne Accents */
  --pink:          #F3C4D5;
  --pink-mid:      #E595B3;
  --pink-soft:     #FDF2F6;
  --pink-line:     #F7D5E2;
  --pink-ink:      #9E3560;

  /* Semantic Accents */
  --emerald:       #10B981;
  --emerald-soft:  #ECFDF5;
  --amber:         #F59E0B;
  --amber-soft:    #FFFBEB;
  --blue:          #3B82F6;
  --blue-soft:     #EFF6FF;

  /* Geometries & Elevations */
  --radius:        14px;
  --radius-sm:     9px;
  --radius-xs:     6px;
  --radius-lg:     20px;
  --shadow-subtle: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow:        0 1px 3px rgba(16, 24, 40, 0.03), 0 4px 14px -2px rgba(16, 24, 40, 0.04);
  --shadow-card:   0 1px 3px rgba(16, 24, 40, 0.02), 0 6px 18px -3px rgba(16, 24, 40, 0.05);
  --shadow-card-hover: 0 6px 16px -2px rgba(16, 24, 40, 0.06), 0 16px 32px -4px rgba(16, 24, 40, 0.1);
  --shadow-lg:     0 20px 48px -8px rgba(15, 23, 42, 0.18), 0 4px 16px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
}
body {
  min-height: 100vh;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(243, 196, 213, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(17, 24, 39, 0.03) 0px, transparent 45%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; letter-spacing: -0.022em; }
p { margin: 0; }
a { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; z-index: 200; background: var(--black); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 16px; top: 16px; }
:focus-visible { outline: 2px solid var(--pink-mid); outline-offset: 2px; border-radius: 6px; }

/* ── Shell ──────────────────────────────────────────────── */
body { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Top app bar ────────────────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 58px; flex: 0 0 58px;
  background: rgba(13, 15, 18, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #F3F4F6;
}
.ab-burger {
  display: none; place-items: center; width: 34px; height: 34px;
  background: none; border: 0; border-radius: 8px; color: inherit; cursor: pointer;
}
.ab-burger:hover { background: rgba(255,255,255,.1); }

.ab-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex: 0 0 auto; padding-right: 8px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, #FDEAF1 0%, #F3C4D5 50%, #E595B3 100%);
  box-shadow: 0 2px 10px rgba(243, 196, 213, 0.35);
  color: #5A1633;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.logo-text { display: flex; flex-direction: column; font-weight: 700; font-size: 14.5px; line-height: 1.15; letter-spacing: -0.015em; }
.logo-text em {
  font-style: normal; font-size: 8.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--pink);
}

/* menus */
.ab-nav { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.menu { position: relative; }
.menu-top {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px; background: none; border: 0; border-radius: 8px;
  color: rgba(243, 244, 246, 0.78); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all 0.15s ease;
}
.menu-top:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.menu-top.is-link { padding-right: 10px; }
.menu-top.is-active {
  color: #fff; font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 -2px 0 var(--pink);
}
.menu-top[aria-expanded="true"],
.menu:hover .menu-top,
.menu.is-open .menu-top {
  background: #FFFFFF; color: var(--black); font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.menu-top .mt-caret {
  width: 10px;
  height: 10px;
  opacity: .6;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
}
.menu:hover .mt-caret,
.menu.is-open .mt-caret,
.menu-top[aria-expanded="true"] .mt-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.menu-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 100;
  min-width: 190px; width: max-content; max-width: 250px; padding: 6px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: pop-in .12s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Ensure popover is displayed whenever menu is open or hovered */
.menu.is-open > .menu-pop,
.menu:hover > .menu-pop:not([hidden]) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Invisible hover bridge to eliminate any gap jitter when cursor moves between trigger and popover */
.menu-pop::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
@keyframes pop-in { from { transform: translateY(-4px); opacity: 0; } to { transform: none; opacity: 1; } }

.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 7px 11px; background: none; border: 0; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all 0.12s ease;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-3); color: var(--ink); outline: none; }
.menu-item[aria-current="page"] { background: var(--black); color: #fff; font-weight: 600; }
.menu-item .mi-ico { flex: 0 0 16px; opacity: .7; display: inline-flex; align-items: center; justify-content: center; }
.menu-item[aria-current="page"] .mi-ico { opacity: 1; }
.menu-item .mi-tag {
  margin-left: auto; font-size: 9.5px; font-weight: 700;
  background: var(--pink-soft); color: var(--pink-ink); padding: 1.5px 7px; border-radius: 999px;
  border: 1px solid var(--pink-line);
}

/* right cluster */
.ab-right { margin-left: auto; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.ab-pos-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 9px; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.05) 100%);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 6px rgba(0,0,0,0.25);
  color: #fff; font-size: 12.5px; font-weight: 600;
  transition: all .16s cubic-bezier(0.16, 1, 0.3, 1);
}
.ab-pos-btn:hover {
  background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.38);
  color: #fff; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 12px rgba(0,0,0,0.35);
}
.ab-pos-btn.is-active {
  background: #FFFFFF; color: #111; border-color: #FFFFFF; font-weight: 700;
  box-shadow: 0 2px 10px rgba(255,255,255,0.25);
}
.ab-pos-btn kbd {
  font-family: inherit; font-size: 10px; font-weight: 600;
  padding: 1.5px 6px; border-radius: 5px;
  background: rgba(255,255,255,.18); color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.15);
}
.ab-pos-btn.is-active kbd {
  background: rgba(0,0,0,.08); color: #111; border-color: rgba(0,0,0,.15);
}
.ab-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: rgba(243, 244, 246, 0.75); font-size: 12.5px;
  transition: all .15s ease;
}
.ab-search:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.2); }
.ab-search span { min-width: 54px; text-align: left; }
.ab-branch {
  max-width: 145px; padding: 6px 11px; font-size: 12.5px; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: rgba(243, 244, 246, 0.88);
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap;
  transition: all .15s ease;
}
.ab-branch:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.2); }
.ab-branch option { color: var(--ink); background: #fff; }
.ab-icon {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px;
  background: none; border: 0; border-radius: 9px; color: inherit; cursor: pointer; font-size: 20px;
  transition: background .12s;
}
.ab-icon:hover { background: rgba(255,255,255,.12); }
.dot-badge {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--pink); color: #5A1633; font-size: 9.5px; font-weight: 700;
  line-height: 15px; border-radius: 999px; text-align: center;
  box-shadow: 0 1px 4px rgba(243, 196, 213, 0.4);
}
.ab-user { display: flex; align-items: center; gap: 9px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #FDEAF1 0%, #F3C4D5 100%);
  color: #5A1633; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(243, 196, 213, 0.3);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta strong { font-size: 12px; font-weight: 600; color: #FFFFFF; }
.user-meta span { font-size: 10.5px; color: rgba(243, 244, 246, 0.6); }

/* drawer/help close buttons sit on light surfaces */
.drawer-head .ab-icon, .help .ab-icon, .ms-head .ab-icon { color: var(--ink-2); }
.drawer-head .ab-icon:hover, .help .ab-icon:hover, .ms-head .ab-icon:hover { background: var(--surface-3); color: var(--black); }

/* ── Mobile menu sheet (Haute Couture Navigation Drawer) ── */
.menu-sheet {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
}
.menu-sheet[hidden] {
  display: none !important;
}

.ms-scrim {
  position: fixed;
  inset: 0;
  background: rgba(13, 15, 18, 0.65);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px);
  animation: ms-fade-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

@keyframes ms-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ms-panel {
  position: relative;
  width: min(348px, 88vw);
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #FAFAFC;
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 2;
  animation: ms-slide-drawer 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 1px solid rgba(226, 230, 238, 0.9);
  overflow: hidden;
}

@keyframes ms-slide-drawer {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.ms-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(226, 230, 238, 0.85);
  flex-shrink: 0;
}

.ms-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ms-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #0D0F12;
  color: #E8B4B8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(13, 15, 18, 0.25);
  border: 1px solid rgba(232, 180, 184, 0.3);
}

.ms-brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ms-brand-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #0D0F12;
  letter-spacing: -0.01em;
}

.ms-brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: #8E95A5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.ms-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  color: #4B5563;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.ms-close-btn:hover {
  background: #E5E7EB;
  color: #111827;
  transform: scale(1.06);
}

.ms-user-strip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(232, 180, 184, 0.12) 0%, rgba(243, 244, 246, 0.7) 100%);
  border-bottom: 1px solid rgba(226, 230, 238, 0.8);
  flex-shrink: 0;
}

.ms-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #111827;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.ms-user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.ms-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ms-user-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  display: inline-block;
}

.ms-user-role {
  font-size: 10.5px;
  color: #6B7280;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-user-status {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  flex-shrink: 0;
}

.ms-search-wrap {
  padding: 10px 16px 12px;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(226, 230, 238, 0.85);
  flex-shrink: 0;
}

.ms-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.ms-search-ico {
  position: absolute;
  left: 12px;
  color: #9CA3AF;
  pointer-events: none;
}

.ms-search-box input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  font-size: 13px;
  font-family: inherit;
  background: #F4F5F7;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  color: #111827;
  transition: all 0.16s ease;
  outline: none !important;
  -webkit-appearance: none;
}

.ms-search-box input:focus {
  outline: none !important;
  border-color: #D4A5A5 !important;
  box-shadow: 0 0 0 3px rgba(212, 165, 165, 0.25) !important;
  background: #FFFFFF !important;
}

.ms-search-box input::placeholder {
  color: #9CA3AF;
  font-size: 12.5px;
}

.ms-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px;
}

.ms-body::-webkit-scrollbar {
  width: 4px;
}
.ms-body::-webkit-scrollbar-thumb {
  background: #E2E8F0;
  border-radius: 4px;
}

.ms-group {
  margin-bottom: 18px;
}

.ms-group:last-child {
  margin-bottom: 8px;
}

.ms-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 7px;
}

.ms-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #717D96;
  margin: 0;
}

.ms-group-count {
  font-size: 9.5px;
  font-weight: 600;
  color: #A0AEC0;
}

.ms-group-card {
  background: #FFFFFF;
  border: 1px solid rgba(226, 230, 238, 0.9);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.025);
}

.ms-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(243, 244, 246, 0.95);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  font-family: inherit;
  color: var(--ink);
}

.ms-item:last-child {
  border-bottom: none;
}

.ms-item:hover {
  background: #F8FAFC;
}

.ms-item:active {
  background: #F1F5F9;
  transform: scale(0.99);
}

.ms-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.ms-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.ms-item:hover .ms-icon-badge {
  transform: scale(1.06);
}

.ms-item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.ms-item-label {
  font-size: 13px;
  font-weight: 600;
  color: #1F242D;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-item-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.ms-item-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.ms-item-chevron {
  color: #CBD5E1;
  transition: all 0.14s ease;
}

.ms-item:hover .ms-item-chevron {
  color: #64748B;
  transform: translateX(2px);
}

.ms-item.is-active,
.ms-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(232, 180, 184, 0.16) 0%, rgba(255, 255, 255, 0.7) 100%);
  position: relative;
}

.ms-item.is-active::before,
.ms-item[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #C86D7C;
}

.ms-item.is-active .ms-item-label,
.ms-item[aria-current="page"] .ms-item-label {
  color: #0D0F12;
  font-weight: 700;
}

.ms-badge-current {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 6px;
  background: #0D0F12;
  color: #FFFFFF;
}

.ms-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 16px;
}

.ms-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #F3F4F6;
  color: #9CA3AF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.ms-empty-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.ms-empty-desc {
  font-size: 11.5px;
  color: #6B7280;
  max-width: 220px;
  margin: 0 0 14px;
  line-height: 1.4;
}

.ms-foot {
  padding: 12px 16px 14px;
  background: #FFFFFF;
  border-top: 1px solid rgba(226, 230, 238, 0.9);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.ms-quick-pos-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  background: #0D0F12;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(13, 15, 18, 0.16);
  font-family: inherit;
}

.ms-quick-pos-btn:hover {
  background: #232832;
  transform: translateY(-1px);
}

.ms-quick-pos-btn:active {
  transform: translateY(0);
}

.ms-pos-arrow {
  margin-left: 2px;
  opacity: 0.7;
}

.ms-sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10.5px;
  color: #9CA3AF;
  font-weight: 500;
}

.ms-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: ms-pulse 2s infinite;
}

@keyframes ms-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── View Container ─────────────────────────────────────── */
.view { flex: 1 0 auto; padding: 26px 26px 48px; max-width: 1560px; width: 100%; margin: 0 auto; }
.appfoot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 26px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3);
  background: #FFFFFF;
  flex: 0 0 auto;
}

/* ── Page Header (Global Luxury Container) ──────────────── */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03), 0 2px 6px -1px rgba(16, 24, 40, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.page-head:hover {
  border-color: rgba(217, 220, 227, 0.95);
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.04), 0 6px 18px -3px rgba(16, 24, 40, 0.03);
}

.page-head .ph-titles,
.page-head > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-head .ph-pre {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink-ink);
  margin-bottom: 3px;
}

.page-head .ph-sub {
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.48;
  margin-top: 4px;
  margin-bottom: 0;
  max-width: 78ch;
}

.page-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .page-head {
    padding: 16px 18px;
    gap: 14px;
  }
  .page-head h1 {
    font-size: 20px;
  }
  .page-actions {
    width: 100%;
    margin-left: 0;
  }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px;
  border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line-2); background: #FFFFFF; color: var(--ink);
  white-space: nowrap; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: all .16s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  border-color: #CBD0DC; background: #F8FAFD; transform: translateY(-1px);
  box-shadow: 0 3px 8px -1px rgba(16, 24, 40, 0.07);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn svg { width: 15px; height: 15px; flex: 0 0 15px; }

.btn-primary {
  background: linear-gradient(180deg, #1E2127 0%, #0D0F12 100%);
  border: 1px solid #0D0F12; color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 6px rgba(13, 15, 18, 0.18);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2D323B 0%, #15181E 100%);
  border-color: #15181E; color: #FFFFFF; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 5px 12px rgba(13, 15, 18, 0.25);
}

.btn-accent {
  background: linear-gradient(135deg, #FDEAF1 0%, #F3C4D5 50%, #E595B3 100%);
  border: 1px solid #E595B3; color: #6C193C; font-weight: 600;
  box-shadow: 0 2px 8px rgba(229, 149, 179, 0.3);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #FDF0F5 0%, #F5CEdd 50%, #E9A3BD 100%);
  border-color: #D883A3; transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 149, 179, 0.4);
}

.btn-quiet {
  background: transparent; border-color: transparent; color: var(--ink-2); box-shadow: none;
}
.btn-quiet:hover { background: var(--surface-3); color: var(--black); box-shadow: none; transform: none; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 13px; height: 13px; flex: 0 0 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 12px 20px; font-size: 14.5px; border-radius: 11px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Cards & Layout ─────────────────────────────────────── */
.card {
  background: #FFFFFF;
  border: 1px solid rgba(232, 234, 239, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  overflow: hidden;
}
.card:hover {
  border-color: rgba(217, 220, 227, 0.95);
  box-shadow: var(--shadow-card-hover);
}
.card-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 22px;
  border-bottom: 1px solid rgba(232, 234, 239, 0.85); background: #FFFFFF;
}
.card-head h2, .card-head h3 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.card-head .ch-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.card-head .ch-actions { margin-left: auto; display: flex; gap: 7px; align-items: center; }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 18px; }
.grid > *, .stack > *, .pos > *, .main { min-width: 0; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-3-2 { grid-template-columns: 3fr 2fr; }
.stack { display: grid; gap: 18px; }
.row { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; }

/* ── KPI Cards (Luxury Atelier Polish) ──────────────────── */
.kpi {
  position: relative;
  background: #FFFFFF;
  border: 1px solid rgba(232, 234, 239, 0.95);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.02), 0 4px 14px -2px rgba(16, 24, 40, 0.04);
  display: flex; gap: 16px; align-items: flex-start;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(209, 213, 222, 0.95);
  box-shadow: 0 4px 8px -1px rgba(16, 24, 40, 0.04), 0 14px 28px -4px rgba(16, 24, 40, 0.08);
}
.kpi.k-pink::before { background: linear-gradient(90deg, var(--pink-mid), var(--pink)); }
.kpi.k-dark::before { background: linear-gradient(90deg, #111827, #374151); }
.kpi.k-ok::before   { background: linear-gradient(90deg, #10B981, #34D399); }
.kpi.k-warn::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

.kpi-ico {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2);
  transition: transform 0.2s ease;
}
.kpi:hover .kpi-ico { transform: scale(1.06); }
.kpi-ico svg { width: 20px; height: 20px; stroke-width: 1.8; }

.kpi.k-pink .kpi-ico {
  background: var(--pink-soft); color: var(--pink-ink);
  border: 1px solid var(--pink-line);
}
.kpi.k-dark .kpi-ico {
  background: #111827; color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.25);
}
.kpi.k-ok .kpi-ico {
  background: #ECFDF5; color: #047857;
  border: 1px solid #A7F3D0;
}
.kpi.k-warn .kpi-ico {
  background: #FFFBEB; color: #B45309;
  border: 1px solid #FDE68A;
}

.kpi-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kpi-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
}
.kpi-value {
  font-size: 26px; font-weight: 700; letter-spacing: -0.035em;
  line-height: 1.15; color: var(--ink);
}
.kpi-foot {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-3); font-weight: 500;
  margin-top: 2px;
}
.delta { font-weight: 700; display: inline-flex; align-items: center; gap: 2px; font-size: 11px; }
.delta.up { color: var(--black); }
.delta.down { color: var(--pink-ink); }
.delta.flat { color: var(--ink-3); }

/* ── Badges & Chips ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent;
  letter-spacing: 0.01em;
}
.badge.ok    { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.badge.warn  { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.badge.risk  { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.badge.pink  { background: var(--pink-soft); color: var(--pink-ink); border-color: var(--pink-line); }
.badge.info  { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.badge.mute  { background: transparent; color: var(--ink-3); border-color: var(--line); }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.no-dot::before, .badge.risk::before { display: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #FFFFFF; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: all 0.14s ease;
}
.chip:hover { border-color: var(--line-3); background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: #fff; font-weight: 600; }

.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; }
.src i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; background: var(--ink-2); }
.src-boutique i   { background: var(--black); }
.src-website i    { background: var(--ink-3); }
.src-exhibition i { background: var(--pink); }
.src-event i      { background: var(--pink-mid); }
.src-b2b i        { background: var(--line-3); }
.src-stall i      { background: #16A34A; }
.src-pos i        { background: var(--black); }
.src-popup i      { background: #D97706; }
.src-online i     { background: #2563EB; }

/* ── Toolbar ────────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: #F8FAFD; border-radius: var(--radius) var(--radius) 0 0;
}
.toolbar .spacer { margin-left: auto; }
.field {
  display: flex; align-items: center; gap: 8px; padding: 7px 13px;
  background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 9px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field:focus-within { border-color: var(--pink-mid); box-shadow: 0 0 0 3px rgba(229, 149, 179, 0.2); }
.field input, .field select { border: 0; background: none; font-size: 13px; min-width: 120px; outline: none; }
.field svg { color: var(--ink-3); flex: 0 0 15px; }
.field.grow { flex: 1 1 220px; }
.field.grow input { width: 100%; min-width: 0; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto !important;
  overflow-y: hidden;
  border-radius: 10px 10px 0 0;
  scrollbar-width: thin;
  scrollbar-color: #CBD0DC #F8FAFD;
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar {
  height: 8px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #F8FAFD;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #CBD0DC;
  border-radius: 4px;
  border: 2px solid #F8FAFD;
  transition: background 0.15s ease;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--pink-mid, #E595B3);
}
table.data, table.table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 13px; }
table.data th, table.table th {
  text-align: center !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #FFFFFF !important;
  padding: 13px 14px;
  background: var(--ink, #111827) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
table.data thead th:last-child, table.table thead th:last-child {
  border-right: none;
}
table.data thead tr:first-child th:first-child, table.table thead tr:first-child th:first-child {
  border-top-left-radius: 8px;
}
table.data thead tr:first-child th:last-child, table.table thead tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

table.data td, table.table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(232, 234, 239, 0.75);
  vertical-align: middle;
  color: var(--ink-2);
  text-align: center !important;
}
table.data tbody tr, table.table tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover, table.table tbody tr:hover { background: rgba(248, 250, 253, 0.85); }
table.data tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: 0; }

table.data .num, table.table .num { text-align: center !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .strong, table.table .strong { font-weight: 600; color: var(--ink); }
table.data .muted, table.table .muted { color: var(--ink-3); font-size: 12.5px; }
table.data .code, table.table .code { font-size: 12.5px; font-weight: 600; font-family: ui-monospace, monospace; white-space: nowrap; color: var(--ink); }

/* Global centering for flex containers & badges inside table cells */
table.data td > div, table.table td > div,
table.data td > span, table.table td > span,
table.data td > .cell-sub, table.table td > .cell-sub {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
table.data td > div[style*="flex"], table.table td > div[style*="flex"],
table.data td > div.cell-art, table.table td > div.cell-art,
table.data td > div.row, table.table td > div.row {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}
table.data td > div[style*="flex"] > div,
table.table td > div[style*="flex"] > div {
  text-align: center;
}

/* Action icons container centered globally */
table.data td.w-act, table.table td.w-act,
table.data th.w-act, table.table th.w-act {
  text-align: center !important;
  white-space: nowrap;
}
table.data td.w-act > div, table.table td.w-act > div,
table.data td div:has(.act-icon-btn), table.table td div:has(.act-icon-btn) {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 auto !important;
  text-align: center !important;
}
table.data .act-icon-btn, table.table .act-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

table.data th *, table.table th * {
  color: inherit !important;
}

table.data td input, table.table td input {
  text-align: center !important;
}

/* Badges & sources centered globally */
table.data td .badge, table.table td .badge,
table.data td .src, table.table td .src {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto;
}

/* Product & Qty custom cells centered */
table.data td .inward-product-cell, table.table td .inward-product-cell {
  display: inline-flex !important;
  justify-content: center !important;
  margin: 0 auto !important;
  text-align: left;
}
table.data td .inward-item-info, table.table td .inward-item-info {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
}
table.data td .inward-qty-col, table.table td .inward-qty-col {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  text-align: center !important;
}

/* ── S.NO Column Styling ─────────────────────────────────── */
table.data th.col-sno, table.data td.col-sno,
table.table th.col-sno, table.table td.col-sno {
  width: 65px;
  min-width: 60px;
  max-width: 75px;
  text-align: center !important;
}

/* ── Profile Pic Column Styling (Global) ─────────────────── */
table.data th.col-pic, table.data td.col-pic,
table.table th.col-pic, table.table td.col-pic {
  width: 110px;
  min-width: 105px;
  text-align: center !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}
table.data td.col-pic .inward-thumb,
table.table td.col-pic .inward-thumb,
table.data td.col-pic .client-avatar,
table.table td.col-pic .client-avatar {
  margin: 0 auto !important;
}
.client-avatar {
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.client-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(229, 149, 179, 0.35);
}

/* ── Client Directory Table Layout & Precision Alignment ─── */
#clients-register-table {
  min-width: 1240px !important;
  width: 100% !important;
  table-layout: auto;
}

/* S.NO */
#clients-register-table th.col-sno,
#clients-register-table td.col-sno {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 70px !important;
  text-align: center !important;
}

/* PROFILE PIC */
#clients-register-table th.col-pic,
#clients-register-table td.col-pic {
  width: 110px !important;
  min-width: 105px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#clients-register-table td.col-pic .client-avatar {
  margin: 0 auto !important;
}

/* CLIENT PROFILE (strictly left-aligned) */
#clients-register-table th.col-client-profile,
#clients-register-table td.col-client-profile {
  min-width: 250px !important;
  text-align: left !important;
  padding-left: 20px !important;
  padding-right: 14px !important;
}

#clients-register-table td.col-client-profile > div,
#clients-register-table td.col-client-profile .client-name-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  gap: 3px !important;
  width: auto !important;
}

#clients-register-table .btn-client-name {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#clients-register-table .client-name-text {
  border-bottom: 1.5px solid var(--pink-mid);
  padding-bottom: 1px;
  transition: all .15s ease;
}

#clients-register-table .client-name-arrow {
  color: var(--pink-ink);
  opacity: .85;
}

#clients-register-table .client-badge-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin: 0 !important;
}

#clients-register-table .client-cid-tag {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  color: var(--ink-4);
}

/* MOBILE NUMBER */
#clients-register-table th.col-client-phone,
#clients-register-table td.col-client-phone {
  min-width: 165px !important;
  text-align: left !important;
  padding-left: 18px !important;
}

#clients-register-table td.col-client-phone > div,
#clients-register-table td.col-client-phone .client-phone-cell {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

/* RESIDENCE / CITY */
#clients-register-table th.col-client-residence,
#clients-register-table td.col-client-residence {
  min-width: 185px !important;
  text-align: left !important;
  padding-left: 18px !important;
}

#clients-register-table td.col-client-residence > div,
#clients-register-table td.col-client-residence .client-residence-cell {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  font-size: 12px !important;
  max-width: 180px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  text-align: left !important;
}

/* ORDERS */
#clients-register-table th.col-client-orders,
#clients-register-table td.col-client-orders {
  min-width: 110px !important;
  text-align: center !important;
}

/* LIFETIME SPEND */
#clients-register-table th.col-client-spend,
#clients-register-table td.col-client-spend {
  min-width: 135px !important;
  text-align: right !important;
  padding-right: 20px !important;
}

/* LAST PURCHASE */
#clients-register-table th.col-client-last,
#clients-register-table td.col-client-last {
  min-width: 125px !important;
  text-align: center !important;
}

/* ACTIONS */
#clients-register-table th.col-client-actions,
#clients-register-table td.col-client-actions {
  min-width: 120px !important;
  text-align: center !important;
}

/* ── Returns & Exchanges Table Precision Alignment ──────── */
#returns-table {
  min-width: 1460px !important;
  width: 100% !important;
  table-layout: auto;
}

#returns-table th.col-purchase-date,
#returns-table td.col-purchase-date {
  min-width: 125px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#returns-table th.col-return-date,
#returns-table td.col-return-date {
  min-width: 125px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#returns-table th:nth-child(2),
#returns-table td:nth-child(2) {
  min-width: 130px !important;
  text-align: center !important;
}

#returns-table th:nth-child(3),
#returns-table td:nth-child(3) {
  min-width: 140px !important;
  text-align: center !important;
}

#returns-table th:nth-child(6),
#returns-table td:nth-child(6) {
  min-width: 175px !important;
  text-align: left !important;
  padding-left: 16px !important;
}

#returns-table th:nth-child(11),
#returns-table td:nth-child(11) {
  text-align: right !important;
  padding-right: 18px !important;
  min-width: 115px !important;
}

/* ── Sales Categories & Channels Table Styling ───────────── */
#categories-table {
  min-width: 1080px !important;
  width: 100% !important;
  table-layout: auto;
}

#categories-table th.col-cat-icon,
#categories-table td.col-cat-icon {
  width: 75px !important;
  min-width: 70px !important;
  max-width: 85px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

#categories-table td.col-cat-icon .cat-icon-cell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
}

#categories-table td.col-cat-icon .cat-icon-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  background: var(--surface-3, #F1F3F7) !important;
  color: var(--ink, #111827) !important;
  border: 1px solid var(--line, #E8EAEF) !important;
  box-shadow: var(--shadow-subtle, 0 1px 2px rgba(0,0,0,0.04)) !important;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

#categories-table td.col-cat-icon .cat-icon-badge:hover {
  transform: scale(1.08);
  border-color: var(--pink-mid, #E595B3) !important;
  box-shadow: 0 3px 10px rgba(229, 149, 179, 0.25) !important;
}

#categories-table th.col-cat-name,
#categories-table td.col-cat-name {
  min-width: 220px !important;
  text-align: left !important;
  padding-left: 20px !important;
}

#categories-table td.col-cat-name .cat-info-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  gap: 3px !important;
}

.sno-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-3, #F1F3F7);
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: var(--ink, #111827);
  border: 1px solid var(--line, #E8EAEF);
  letter-spacing: -0.01em;
}

/* ── Global Table Pagination Bar ────────────────────────── */
.tbl-paged-hidden {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════
   GLOBAL TABLE PAGINATION & METRICS BAR (LUXURY ERP ENGINE)
   ══════════════════════════════════════════════════════════ */
.table-pagination-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 18px;
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: auto;
  box-sizing: border-box;
  width: 100%;
}

/* ── A. Table Summary Strip (Live Metric Chips) ──────────── */
.tbl-pg-summary-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
  box-sizing: border-box;
}

.tbl-pg-summary-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  background: var(--surface-3);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.tbl-pg-summary-chips,
.tbl-pg-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.tbl-pg-summary-chips span,
.tbl-pg-extra span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--ink-sub);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.tbl-pg-summary-chips span strong,
.tbl-pg-extra span strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── B. Main Pagination & Control Row ────────────────────── */
.tbl-pg-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.tbl-pg-info-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tbl-pg-info {
  color: var(--ink-3);
  font-size: 12.5px;
  white-space: nowrap;
}

.tbl-pg-info strong {
  color: var(--ink);
  font-weight: 700;
}

.tbl-pg-size-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbl-pg-size-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.tbl-pg-size-box .theme-select {
  display: none !important;
}

.tbl-pg-select {
  display: inline-block !important;
  position: static !important;
  width: auto !important;
  height: 28px !important;
  line-height: 1 !important;
  padding: 3px 26px 3px 10px !important;
  border-radius: 6px !important;
  border: 1px solid var(--line-2) !important;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23374151' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 8px center !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  clip: auto !important;
  overflow: visible !important;
  white-space: normal !important;
  margin: 0 !important;
}

.tbl-pg-select:hover {
  border-color: var(--ink-3) !important;
  background-color: var(--surface-2) !important;
}

.tbl-pg-select:focus {
  border-color: var(--ink) !important;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.1) !important;
}

/* ── C. Controls (Pagination Nav + Actions) ───────────────── */
.tbl-pg-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.tbl-pg-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tbl-pg-btn, .tbl-pg-prev, .tbl-pg-next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 28px;
}

.tbl-pg-btn:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--ink-3);
  color: var(--black);
}

.tbl-pg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
  background: var(--surface-2);
}

.tbl-pg-current-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  font-size: 11.5px;
  color: var(--ink-2);
  font-weight: 500;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tbl-pg-current-pill strong {
  color: var(--ink);
  font-weight: 700;
}

.tbl-pg-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.tbl-pg-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  transition: all 0.15s ease;
  min-height: 28px;
}

.tbl-pg-actions .btn:hover {
  background: var(--surface-3);
  color: var(--black);
  border-color: var(--ink-3);
}

.cell-sub { display: block; font-size: 11.5px; color: var(--ink-3); font-weight: 400; margin-top: 1px; }
.cell-art { display: flex; align-items: center; gap: 11px; }
.row-link { cursor: pointer; }

/* ── Global Single-Layer Table Foot ─────────────────────── */
.table-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3);
  background: #FFFFFF;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.table-foot .spacer { margin-left: auto; }

/* Strictly suppress any redundant secondary footer layer */
.table-pagination-bar + .table-foot,
.table-wrap + .table-pagination-bar + .table-foot {
  display: none !important;
}
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }

/* ── Meters ─────────────────────────────────────────────── */
.meter { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 66px; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--black); }
.meter.ok > span   { background: var(--ink-2); }
.meter.warn > span { background: var(--pink-mid); }
.meter.risk > span { background: var(--black); }
.meter.pink > span { background: var(--pink); }
.meter-row { display: flex; align-items: center; gap: 9px; }
.meter-row .mv { font-size: 12px; color: var(--ink-3); min-width: 32px; text-align: right; }

/* ── Charts ─────────────────────────────────────────────── */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: inherit; font-size: 10.5px; fill: var(--ink-3); }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); padding-top: 10px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* ── Lists & tiles ──────────────────────────────────────── */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 11px 17px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.li-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
}
.li-main { min-width: 0; flex: 1; }
.li-main strong { display: block; font-size: 13px; font-weight: 600; }
.li-main span { font-size: 12px; color: var(--ink-3); }
.li-end { text-align: right; white-space: nowrap; font-size: 13px; }

.tiles { display: grid; gap: 9px; }
.tile {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); text-align: left; cursor: pointer; width: 100%;
}
.tile:hover { border-color: var(--line-3); background: var(--surface-2); }
.tile-ico { width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px; display: grid; place-items: center; background: var(--pink-soft); color: var(--pink-ink); }
.tile strong { display: block; font-size: 12.8px; }
.tile span { font-size: 11.5px; color: var(--ink-3); }
.tile .tile-go { margin-left: auto; color: var(--ink-4); }

/* ── Timeline & flow ────────────────────────────────────── */
.timeline { position: relative; padding-left: 21px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line-2); }
.tl-item { position: relative; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -20px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-3);
}
.tl-item.done::before { background: var(--black); border-color: var(--black); }
.tl-item.active::before { background: var(--pink); border-color: var(--pink-mid); }
.tl-item strong { font-size: 13px; display: block; }
.tl-item span { font-size: 12px; color: var(--ink-3); }

.flow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.flow-step { flex: 1 0 138px; padding: 11px 13px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.flow-step .fs-n { font-size: 10px; font-weight: 700; color: var(--ink-4); letter-spacing: .12em; }
.flow-step strong { display: block; font-size: 12.8px; margin: 2px 0 4px; }
.flow-step .fs-count { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.flow-step .fs-meta { font-size: 11.5px; color: var(--ink-3); }
.flow-step.is-hot { background: var(--pink-soft); border-color: var(--pink-line); }
.flow-step.is-block { background: var(--black); border-color: var(--black); color: #fff; }
.flow-step.is-block .fs-n, .flow-step.is-block .fs-meta { color: rgba(255,255,255,.62); }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 4px 8px; background: #F8FAFD; border-radius: var(--radius) var(--radius) 0 0; }
.tab {
  padding: 9px 16px; background: none; border: 0; border-radius: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-3); cursor: pointer; white-space: nowrap;
  transition: all 0.15s ease;
}
.tab:hover { color: var(--ink); background: rgba(0,0,0,0.03); }
.tab[aria-selected="true"] { color: var(--black); background: #FFFFFF; font-weight: 600; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06); }
.tab-panel[hidden] { display: none; }

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid > * { min-width: 0; }
.form-grid .full { grid-column: 1 / -1; }
label.lbl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  min-width: 0;
  width: 100%;
}
label.lbl .hint {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1.35;
  margin-top: 2px;
}
label.lbl input, label.lbl select, label.lbl textarea {
  padding: 10px 13px; font-size: 13.5px; font-weight: 400;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); width: 100%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
label.lbl input:focus, label.lbl select:focus, label.lbl textarea:focus {
  outline: none; border-color: var(--pink-mid);
  box-shadow: 0 0 0 3.5px rgba(229, 149, 179, 0.22);
}
label.lbl input[aria-invalid="true"], label.lbl select[aria-invalid="true"], label.lbl textarea[aria-invalid="true"] {
  border-color: #EF4444; background: #FEF2F2;
}
label.lbl textarea { resize: vertical; }
.req { color: var(--pink-ink); font-weight: 700; margin-left: 2px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }
.form-error { font-size: 12px; color: #DC2626; font-weight: 600; }

/* Luxury Form Section Headers */
.form-section-head {
  padding-top: 18px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.form-section-head:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.form-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}
.form-section-title .ab-icon {
  color: var(--pink-ink);
}
.form-section-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-left: 24px;
}

/* ══════════════════════════════════════════════════════════
   Employee Dossier & Full Details Styling
   ══════════════════════════════════════════════════════════ */
.emp-profile-dossier {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.emp-hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #FAF5F7 0%, #FFFFFF 100%);
  border: 1px solid var(--pink-soft);
  border-radius: var(--radius);
}
.emp-hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--black);
  color: #FFFFFF;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}
.emp-hero-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.emp-hero-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.emp-hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
}
.emp-hero-ar {
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 500;
}
.emp-hero-sub {
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.emp-hero-loc {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.emp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 768px) {
  .emp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.emp-stat-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.emp-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.emp-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}
.emp-stat-sub {
  font-size: 11px;
  color: var(--ink-3);
}
.emp-detail-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .emp-detail-sections {
    grid-template-columns: 1fr;
  }
}
.emp-section-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.emp-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--black);
}
.emp-sec-head h3 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
}
.emp-sec-head .ab-icon {
  color: var(--pink-ink);
}
.emp-kv {
  grid-template-columns: 140px 1fr !important;
  gap: 8px 12px !important;
  font-size: 12.5px !important;
}
.emp-salary-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--ink-2);
}
.sal-row.total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
}
.emp-dossier-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.emp-avatar-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.emp-cell-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--black);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.emp-cell-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── POS styles defined in Retail POS section below ── */

/* ── Drawer ─────────────────────────────────────────────── */
/* ── Drawer ─────────────────────────────────────────────── */
.drawer-host {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 18, 0.55);
  backdrop-filter: blur(4px);
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  max-height: 100vh;
  width: min(580px, 100%);
  background: #FFFFFF;
  box-shadow: -10px 0 40px rgba(13, 15, 18, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-in .18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 91;
}
.drawer.wide { width: min(880px, 95vw); }
@keyframes slide-in { from { transform: translateX(24px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.drawer-head h2 { font-size: 16px; font-weight: 700; flex: 1; letter-spacing: -0.02em; }
.drawer-body {
  flex: 1 1 auto;
  min-height: 0 !important;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom Visible Scrollbar for Drawer & Forms */
.drawer-body::-webkit-scrollbar {
  width: 8px;
}
.drawer-body::-webkit-scrollbar-track {
  background: #F8FAFC;
  border-radius: 4px;
}
.drawer-body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
  border: 2px solid #F8FAFC;
}
.drawer-body::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.drawer-body .card {
  box-shadow: none;
  border: 1px solid #E2E8F0;
  overflow: visible;
}
.drawer-body .card-body {
  padding: 18px 20px;
}

/* ── Luxury Segmented Stepper Bar (Zero Horizontal Scroll) ── */
.form-stepper-header {
  width: 100%;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: stepper;
  overflow: hidden !important;
  overflow-x: hidden !important;
  margin-bottom: 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.form-stepper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.form-step-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.step-badge-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #F1F5F9;
  color: #334155;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.step-name-current {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-toggle-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.form-toggle-view-btn:hover {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #94A3B8;
}

.form-toggle-view-btn.is-active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

.form-step-progress-track {
  width: 100%;
  height: 3px;
  background: #F1F5F9;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 10px;
}

.form-step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0D0F12 0%, #4F46E5 60%, #E595B3 100%);
  border-radius: 999px;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-stepper-segments {
  display: grid;
  width: 100%;
  box-sizing: border-box;
  gap: 6px;
  overflow: hidden !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.form-stepper-segments::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.stepper-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  color: #64748B;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.16s ease;
  user-select: none;
  min-width: 0;
}

.stepper-seg:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
}

.stepper-seg .step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.stepper-seg .step-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
}

/* Active Segment */
.stepper-seg.is-active {
  background: #0D0F12;
  color: #FFFFFF;
  border-color: #0D0F12;
  box-shadow: 0 2px 8px rgba(13, 15, 18, 0.16);
}

.stepper-seg.is-active .step-num {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* Completed Segment */
.stepper-seg.is-completed {
  background: #F0FDF4;
  color: #166534;
  border-color: #BBF7D0;
}

.stepper-seg.is-completed .step-num {
  background: #16A34A;
  color: #FFFFFF;
}

/* Container query: collapse labels when space is under 480px */
@container stepper (max-width: 480px) {
  .stepper-seg .step-txt {
    display: none;
  }
  .stepper-seg {
    padding: 7px 0;
  }
  .stepper-seg .step-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

@media (max-width: 560px) {
  .stepper-seg .step-txt {
    display: none;
  }
  .stepper-seg {
    padding: 7px 0;
  }
  .stepper-seg .step-num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}

/* Absolute zero horizontal scroll guarantee on forms, drawer, and document */
html,
.drawer-host,
.drawer,
.drawer-body,
.form-grid,
.form-sections-wrap,
.form-stepper-header,
.form-stepper-segments,
.form-tabs-nav {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Form Section Panes */
.form-section-pane {
  display: none;
  animation: fadeInPane 0.18s ease-out;
}
.form-section-pane.is-active {
  display: block;
}
.form-sections-all .form-section-pane {
  display: block !important;
  margin-bottom: 20px;
}
@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sticky Form Actions */
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 0 4px;
  margin-top: 14px;
  border-top: 1px solid #E2E8F0;
  position: sticky;
  bottom: 0;
  background: #FFFFFF;
  z-index: 20;
}
.btn-step-prev, .btn-step-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}


.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); font-size: 12px; font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; color: var(--ink); }

/* ── Notes ──────────────────────────────────────────────── */
.note {
  display: flex; gap: 12px; padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: 13px; background: var(--pink-soft); border: 1px solid var(--pink-line); color: var(--pink-ink);
}
.note.info { background: #F8FAFD; border-color: var(--line); color: var(--ink-2); }
.note.risk { background: var(--black); border-color: var(--black); color: #fff; }
.note svg { flex: 0 0 16px; margin-top: 2px; }
.note strong { font-weight: 700; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }

/* ── Toast ──────────────────────────────────────────────── */
.toast-host { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: grid; gap: 10px; justify-items: end; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  background: var(--black); color: #fff; border-radius: 12px; font-size: 13px;
  box-shadow: var(--shadow-lg); max-width: 400px; animation: toast-in .16s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.toast svg { flex: 0 0 18px; color: var(--pink); }
.toast strong { font-weight: 600; }
.toast span { color: rgba(255,255,255,.75); font-size: 12px; display: block; margin-top: 1px; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Product art ────────────────────────────────────────── */
.art { display: block; }
.art .a-fill { fill: var(--pink-soft); }
.art .a-fill-2 { fill: var(--surface-3); }
.art .a-line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.art .a-thin { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-linecap: round; }
.art-sm {
  display: inline-grid; place-items: center;
  width: 36px; height: 44px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  flex: 0 0 36px; padding: 3px; vertical-align: middle;
}
.art-sm svg { height: 36px; width: auto; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1240px) {
  .g-5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pos { grid-template-columns: 1fr 320px; }
}
@media (max-width: 1040px) {
  .g-2-1, .g-1-2, .g-3-2, .g-3 { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; }
  .cart { position: static; }
}
@media (max-width: 1420px) { .ab-search span { display: none; } }
@media (max-width: 1320px) { .ab-branch, .ab-branch-theme-select { display: none !important; } }
@media (max-width: 1240px) {
  .menu-top { padding: 7px 8px; font-size: 12.5px; }
  .menu-top .mt-key, .menu-top .mt-caret { display: none; }
  .ab-search kbd { display: none; }
  .user-meta { display: none; }
}
@media (max-width: 1080px) {
  .ab-nav { display: none; }
  .ab-burger { display: grid; }
}
@media (max-width: 880px) {
  .view { padding: 16px 13px 32px; }
  .appbar { padding: 0 10px; gap: 8px; }
  .user-meta { display: none; }
  .g-4, .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .g-2 { grid-template-columns: 1fr; }
  .g-5 > :last-child:nth-child(odd),
  .g-4 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .page-actions { width: 100%; margin-left: 0; }
  .kv { grid-template-columns: 116px 1fr; }
}


/* ══ Keyboard chips ═══════════════════════════════════════ */
kbd {
  display: inline-block; min-width: 18px; padding: 1px 5px;
  font-family: inherit; font-size: 10.5px; font-weight: 600; line-height: 16px;
  text-align: center; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 5px; white-space: nowrap;
}
.appbar kbd, .appfoot kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); color: rgba(233,233,235,.8); }
.appfoot kbd { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn kbd { margin-left: 2px; }

/* ══ Command palette ══════════════════════════════════════ */
.palette-host { position: fixed; inset: 0; z-index: 110; }
.palette-scrim { position: absolute; inset: 0; background: rgba(12,12,13,.42); }
.palette {
  position: absolute; left: 50%; top: 11vh; transform: translateX(-50%);
  width: min(640px, calc(100vw - 28px)); max-height: 72vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop-in .12s ease-out;
}
.pal-input { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.pal-input svg { color: var(--ink-3); flex: 0 0 17px; }
.pal-input input { flex: 1; border: 0; outline: none; font-size: 15px; background: none; }
.pal-list { overflow-y: auto; padding: 6px; }
.pal-group { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; padding: 9px 10px 4px; }
.pal-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; background: none; border: 0; border-radius: 8px;
  font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.pal-item .pi-ico { flex: 0 0 16px; color: var(--ink-3); }
.pal-item .pi-sub { margin-left: auto; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.pal-item[aria-selected="true"] { background: var(--black); color: #fff; }
.pal-item[aria-selected="true"] .pi-ico, .pal-item[aria-selected="true"] .pi-sub { color: var(--pink); }
.pal-empty { padding: 26px 12px; text-align: center; color: var(--ink-3); font-size: 13px; }
.pal-foot { display: flex; gap: 14px; padding: 9px 15px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; color: var(--ink-3); }

/* ══ Shortcut help ════════════════════════════════════════ */
.help-host { position: fixed; inset: 0; z-index: 110; }
.help {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(760px, calc(100vw - 28px)); max-height: 84vh;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.help-body { overflow-y: auto; padding: 16px; display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); align-content: start; }
.keys { display: grid; gap: 1px; }
.keys-row { display: flex; align-items: center; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 12.8px; }
.keys-row:last-child { border-bottom: 0; }
.keys-row .kr-keys { margin-left: auto; display: flex; gap: 3px; flex: 0 0 auto; }

/* ══ POS — fits the viewport, never scrolls the page ══════ */
/* The page is a fixed-height app screen: only the catalogue grid
   and the cart lines scroll, so staff never lose sight of the total. */
.pos-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  flex: 1;
  height: 100%;
}

body.has-pos .view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 8px 18px 0;
  height: calc(100vh - 56px - 38px);
  max-width: 1600px;
}
body.has-pos .appfoot {
  padding: 8px 24px;
  font-size: 11px;
}
body.has-pos { overflow: hidden; }
.pos-extras { flex: 0 0 auto; }
.pos-header-lux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.phl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.phl-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #0D0F12;
  color: var(--pink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.phl-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #09090B;
  letter-spacing: -0.02em;
}
.phl-sub {
  font-size: 11px;
  color: #71717A;
}

.phl-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  justify-content: center;
}
.phl-stat {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  border-left: 1px solid #F1F3F5;
  padding-left: 12px;
}
.phl-stat-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.phl-stat-val {
  font-size: 13px;
  font-weight: 700;
  color: #09090B;
}
.phl-stat-val.phl-pink {
  color: var(--pink-ink);
}
.phl-stat-delta {
  font-size: 10px;
  color: #059669;
  font-weight: 600;
}
.phl-stat-sub {
  font-size: 10px;
  color: #A1A1AA;
}

.phl-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

body.pos-full .appbar, body.pos-full .appfoot,
body.pos-full .pos-extras { display: none; }
body.pos-full .view { padding: 0; max-width: none; }
body.pos-full .pos-page { height: 100vh; gap: 0; }
body.pos-full { overflow: hidden; }

/* ── 1. Counter Header Bar ───────────────────────────────── */
.posbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 8px 14px;
  background: #0E1116;
  color: #F4F4F6;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  flex: 0 0 auto;
}
body.pos-full .posbar { border-radius: 0; border-left: 0; border-right: 0; }

.posbar .pb-till {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  flex: 0 0 auto;
}
.posbar .pb-till-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
}
.posbar .pb-till-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.posbar .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  display: inline-block;
}

.pb-till-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 24px 4px 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  transition: all 0.15s ease;
}
.pb-till-select:hover {
  background-color: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}
.pb-till-select option {
  background: #111419;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
}

.posbar .pb-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 360px;
  min-width: 220px;
  max-width: 440px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.15s ease;
}
.posbar .pb-field:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--pink-mid);
  box-shadow: 0 0 0 2px rgba(229, 149, 179, 0.25);
}
.posbar .pb-field svg { color: rgba(255, 255, 255, 0.6); flex-shrink: 0; }
.posbar .pb-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  color: #FFFFFF;
  font-size: 12px;
  font-family: inherit;
}
.posbar .pb-field input::placeholder { color: rgba(255, 255, 255, 0.45); }
.posbar .pb-field kbd {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
}


.posbar .pb-stat {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.posbar .pb-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.posbar .pb-stat strong {
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 700;
}

/* ── 2. POS Main Columns Split ──────────────────────────── */
.pos-main {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
body.pos-full .pos-main { gap: 0; }

/* ── 3. Product Catalogue Column ────────────────────────── */
.pos-cat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
body.pos-full .pos-cat { border-radius: 0; border-left: 0; border-bottom: 0; }
.pos-cat .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 0;
}

.pos-bar {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #FAFAFC;
}
.pos-bar .chip {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #FFFFFF;
  color: var(--ink-2);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pos-bar .chip:hover {
  background: var(--surface-2);
  border-color: var(--ink-3);
  color: var(--ink);
}
.pos-bar .chip[aria-pressed="true"] {
  background: #0D0F12;
  border-color: #0D0F12;
  color: #FFFFFF;
  font-weight: 700;
}
.pos-bar .hint {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-bar .hint kbd {
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Products Grid */
.pos-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 16px;
  padding: 16px;
  background: #F8FAFC;
}
body.pos-full .pos-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  padding: 18px;
}

/* ── POS Empty Channel Stock State ── */
.pos-no-stock-placeholder {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
  background: #FFFFFF;
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(13, 15, 18, 0.02);
  margin: 12px 0;
}
.pos-nsp-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  color: var(--ink-3);
}
.pos-nsp-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.pos-nsp-desc {
  font-size: 13.5px;
  color: var(--ink-3);
  max-width: 440px;
  margin: 0 0 20px;
  line-height: 1.5;
}
.pos-nsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}
.pos-nsp-btn:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
}


/* ── Haute Couture Product Card ── */
.pos-tile {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(13, 15, 18, 0.09);
  background: #FFFFFF;
  padding: 0;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  user-select: none;
}
.pos-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -4px rgba(13, 15, 18, 0.1);
  border-color: var(--pink-mid);
}
.pos-tile:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 15, 18, 0.06);
}
.pos-tile:disabled {
  cursor: not-allowed;
}

/* Card Media / Image Box */
.pos-art-box {
  position: relative;
  width: 100%;
  height: 165px;
  background: linear-gradient(180deg, #F9FAFB 0%, #EEF1F5 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(13, 15, 18, 0.06);
}
body.pos-full .pos-art-box {
  height: 185px;
}
.pos-art-box .pos-art {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pos-art-box .pos-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.pos-tile:hover:not(:disabled) .pos-art-img {
  transform: scale(1.05);
}
.pos-art-box svg.art {
  height: 95px;
  width: auto;
  opacity: 0.85;
}

/* Card Floating Badges - Hide shortcut tile numbers */
.pos-tile .pt-key {
  display: none !important;
}

.pos-tile .pt-info {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #52525B;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pos-tile .pt-info:hover {
  background: #0D0F12;
  border-color: #0D0F12;
  color: #FFFFFF;
}

.pos-art-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.pos-art-badges .pt-vcode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(13, 15, 18, 0.78);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}
.pos-art-badges .pt-stock-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.pos-art-badges .pt-stock-tag.ok {
  background: rgba(16, 185, 129, 0.88);
  color: #FFFFFF;
}
.pos-art-badges .pt-stock-tag.low {
  background: rgba(245, 158, 11, 0.92);
  color: #FFFFFF;
}
.pos-art-badges .pt-stock-tag.out {
  background: rgba(225, 29, 72, 0.90);
  color: #FFFFFF;
}

/* Card Body Content */
.pos-tile-body {
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
  gap: 3px;
  background: #FFFFFF;
  flex: 1;
}
.pos-tile .pt-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: #09090B;
  min-height: 36px;
}
.pos-tile .pt-sku {
  font-size: 11.5px;
  color: #71717A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-tile .pt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #F1F3F5;
  gap: 6px;
}
.pos-tile .pt-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.pos-tile .pt-price {
  font-size: 15px;
  font-weight: 700;
  color: #09090B;
  letter-spacing: -0.02em;
}
.pos-tile .pt-action-pill {
  flex-shrink: 0;
}
.pos-tile .pt-add-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pink-ink);
  background: rgba(229, 149, 179, 0.14);
  padding: 3px 9px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.pos-tile:hover:not(:disabled) .pt-add-btn {
  background: #0D0F12;
  color: #FFFFFF;
}
.pos-tile .pt-out-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #A1A1AA;
}

/* Multi-location Inventory Footnote */
.pos-tile .pt-locs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #E4E4E7;
}
.pos-tile .pt-loc-pill {
  font-size: 10px;
  color: #71717A;
  background: #F4F4F6;
  padding: 2px 6px;
  border-radius: 4px;
}
.pos-tile .pt-loc-pill strong {
  color: #09090B;
  font-weight: 700;
}
.pos-tile .pt-loc-pill.loc-active {
  background: rgba(16, 185, 129, 0.1);
  color: #065F46;
}
.pos-tile .pt-loc-pill.loc-active strong {
  color: #047857;
}
.pos-tile .pt-loc-pill.loc-dim {
  color: #A1A1AA;
  background: #F4F4F5;
}

/* ── Haute Couture Product Card: Out of Stock Blur State ── */
.pos-tile.is-out-of-stock,
.pos-tile.is-out {
  background: #F9FAFB !important;
  border-color: rgba(13, 15, 18, 0.08) !important;
  cursor: not-allowed !important;
  user-select: none;
}

.pos-tile.is-out-of-stock:hover,
.pos-tile.is-out:hover {
  transform: none !important;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.03) !important;
  border-color: rgba(13, 15, 18, 0.1) !important;
}

/* Distinct frosted blur on image/artwork */
.pos-tile.is-out-of-stock .pos-art,
.pos-tile.is-out .pos-art {
  filter: blur(5px) grayscale(0.4) contrast(0.92);
  opacity: 0.52;
  transform: scale(0.98);
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.pos-tile.is-out-of-stock:hover .pos-art-img,
.pos-tile.is-out:hover .pos-art-img {
  transform: none !important;
}

/* Haute Couture Floating Glassmorphic "OUT OF STOCK" Pill Badge */
.pos-tile.is-out-of-stock .pos-art-box::after,
.pos-tile.is-out .pos-art-box::after {
  content: 'OUT OF STOCK';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 18, 23, 0.88);
  color: #FDA4AF;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 5;
  white-space: nowrap;
}

.pos-tile.is-out-of-stock .pos-tile-body,
.pos-tile.is-out .pos-tile-body {
  opacity: 0.72;
}

.pos-tile.is-out-of-stock .pt-title,
.pos-tile.is-out .pt-title {
  color: #71717A !important;
}

.pos-tile.is-out-of-stock .pt-price,
.pos-tile.is-out .pt-price {
  color: #71717A !important;
}

.pos-tile.is-out-of-stock .pt-key,
.pos-tile.is-out .pt-key {
  display: none !important;
}

/* Out of Stock Action Tag */
.pos-tile.is-out-of-stock .pt-add-btn,
.pos-tile.is-out .pt-add-btn {
  background: #F4F4F5 !important;
  color: #A1A1AA !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.pos-tile .pt-out-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #E11D48;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.2);
  padding: 2.5px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* Keep stock availability info button accessible & sharp */
.pos-tile.is-out-of-stock .pt-info,
.pos-tile.is-out .pt-info {
  opacity: 1 !important;
  filter: none !important;
  z-index: 6;
  cursor: pointer;
  pointer-events: auto;
}

/* ── 4. POS Cart / Register Panel ───────────────────────── */
.cart {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #FFFFFF;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
body.pos-full .cart { border-radius: 0; border-right: 0; border-bottom: 0; }
.cart .card-head {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart .card-head strong {
  font-size: 14.5px;
  font-weight: 700;
  color: #09090B;
}
.cart .card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding: 0;
  height: 100%;
}

/* Cart Items List */
.cart-lines {
  flex: 1 1 auto;
  min-height: 70px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cart-lines::-webkit-scrollbar { width: 5px; }
.cart-lines::-webkit-scrollbar-thumb { background: #E4E4E7; border-radius: 4px; }

/* Empty Cart View */
.cart-empty-lux {
  flex: 1;
  padding: 24px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #71717A;
}
.cart-empty-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F4F4F6;
  display: grid;
  place-items: center;
  color: #A1A1AA;
}
.cart-empty-lux strong {
  font-size: 13px;
  font-weight: 600;
  color: #27272A;
}
.cart-empty-lux span {
  font-size: 11px;
  color: #71717A;
  max-width: 220px;
  line-height: 1.35;
}

/* Cart Item Line */
.cart-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid #F4F4F6;
  transition: background 0.15s ease;
}
.cart-line:hover {
  background: #FAFAFC;
}
.cart-line .cl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cart-line .cl-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #09090B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-line .cl-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #71717A;
}
.cart-line .cl-sku-tag {
  font-family: ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  background: #F4F4F6;
  padding: 1px 5px;
  border-radius: 4px;
}
.cart-line .cl-unit-price {
  color: #71717A;
}
.cart-line .cl-stock-pill {
  font-size: 9.5px;
  color: #71717A;
}
.cart-line .cl-stock-low {
  color: #D97706;
  font-weight: 600;
}
.cart-line .cl-stock-none {
  color: #DC2626;
  font-weight: 700;
}

.cart-line .cl-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.cart-line .cl-amt-box {
  display: flex;
  align-items: center;
  gap: 5px;
}
.cart-line .cl-amt {
  font-size: 13px;
  font-weight: 700;
  color: #09090B;
}
.cart-line .cl-rm {
  background: none;
  border: 0;
  color: #A1A1AA;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.12s;
}
.cart-line .cl-rm:hover {
  color: #DC2626;
  background: #FEE2E2;
}

/* Quantity Stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}
.qty button {
  width: 22px;
  height: 22px;
  border: 0;
  background: #F4F4F6;
  cursor: pointer;
  color: #27272A;
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  transition: all 0.12s;
}
.qty button:hover {
  background: #0D0F12;
  color: #FFFFFF;
}
.qty span {
  min-width: 24px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #09090B;
}

/* Totals Summary */
.totals {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #FAFAFC;
  flex: 0 0 auto;
}
.tot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 2px 0;
  color: #52525B;
}
.tot-row strong {
  color: #09090B;
}
.tot-row-disc .tot-disc-val {
  color: var(--pink-ink);
  font-weight: 700;
}
/* Customer Details Box in Cart */
.pos-cust-box {
  padding: 5px 12px 6px;
  background: #FBFBFC;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}
.pos-cust-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pos-cust-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #3F3F46;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pos-cust-title svg {
  color: #71717A;
}
.pos-cust-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-cust-pill-btn {
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 600;
  color: #52525B;
  cursor: pointer;
  transition: all 0.12s ease;
}
.pos-cust-pill-btn:hover {
  background: #0D0F12;
  color: #FFFFFF;
  border-color: #0D0F12;
}
.pos-cust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.pos-cust-field {
  position: relative;
  display: flex;
  align-items: center;
}
.pos-cust-field.full-width {
  grid-column: 1 / -1;
}
.pos-cust-ico {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  color: #A1A1AA;
  pointer-events: none;
  display: flex;
  align-items: center;
}
.pos-cust-input {
  width: 100%;
  height: 24px;
  padding: 2px 7px 2px 23px;
  font-size: 11px;
  font-family: inherit;
  color: #09090B;
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  outline: none;
  transition: all 0.15s ease;
}
.pos-cust-input:focus {
  border-color: #0D0F12;
  box-shadow: 0 0 0 2px rgba(13, 15, 18, 0.08);
}
.pos-cust-input::placeholder {
  color: #A1A1AA;
  font-size: 11px;
}

/* POS Manual Discount Controls */
.tot-row-disc {
  padding: 4px 0;
  gap: 8px;
}
.pos-disc-ctrls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pos-disc-label {
  font-size: 12px;
  font-weight: 600;
  color: #52525B;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-disc-toggle {
  display: inline-flex;
  align-items: center;
  background: #F4F4F6;
  border-radius: 5px;
  padding: 2px;
  border: 1px solid var(--line-2);
}
.pos-disc-btn {
  border: 0;
  background: transparent;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  color: #71717A;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1.2;
}
.pos-disc-btn.is-active {
  background: #0D0F12;
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
.pos-disc-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pos-disc-input {
  width: 86px;
  height: 26px;
  padding: 2px 28px 2px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #FFFFFF;
  color: #09090B;
  outline: none;
  font-family: inherit;
  transition: all 0.15s ease;
  cursor: text;
}
.pos-disc-input:focus {
  border-color: #0D0F12;
  box-shadow: 0 0 0 2px rgba(13, 15, 18, 0.08);
}
.pos-disc-input::-webkit-outer-spin-button,
.pos-disc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pos-disc-input[type=number] {
  -moz-appearance: textfield;
}
.pos-disc-unit {
  position: absolute;
  right: 6px;
  font-size: 9.5px;
  font-weight: 700;
  color: #71717A;
  pointer-events: none;
}
.tot-row kbd {
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  color: #71717A;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
}
.channel-pill-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #09090B;
  background: #EEF2F6;
  padding: 2px 7px;
  border-radius: 4px;
}
.tot-row.grand {
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px dashed var(--line-2);
  font-size: 16px;
  font-weight: 800;
  color: #09090B;
  letter-spacing: -0.02em;
}
.tot-row.grand .grand-amt {
  color: #09090B;
  font-weight: 800;
}
.pos-disc-alert {
  font-size: 9.5px;
  color: #B45309;
  background: #FEF3C7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

/* Payment Mode Grid */
.cart-pay-sec {
  padding: 2px 14px 1px;
  flex: 0 0 auto;
}
.cart-pay-sec .section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 1px 12px 3px;
  flex: 0 0 auto;
}
.pay-btn {
  padding: 2px 2px;
  min-height: 32px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: #FFFFFF;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: #52525B;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.pay-btn svg { width: 12px; height: 12px; }
.pay-btn kbd {
  font-size: 7.5px;
  color: #71717A;
  background: #F4F4F6;
  border: 1px solid #E4E4E7;
  padding: 0 2px;
  border-radius: 3px;
}
.pay-btn:hover {
  border-color: #0D0F12;
  color: #09090B;
}
.pay-btn[aria-pressed="true"] {
  background: #0D0F12;
  border-color: #0D0F12;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.2);
}
.pay-btn[aria-pressed="true"] kbd {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.cart-actions-box {
  padding: 2px 12px 3px;
  display: grid;
  gap: 3px;
  flex: 0 0 auto;
}
.cart-actions-box .row .btn {
  padding: 2px 6px;
  font-size: 10.5px;
  height: 25px;
}

/* Charge & Print Primary Button */
.btn-charge-lux {
  height: 32px;
  background: linear-gradient(135deg, #18181B 0%, #09090B 100%) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  transition: all 0.15s ease !important;
  cursor: pointer;
}
.btn-charge-lux:hover:not(:disabled):not(.is-disabled) {
  background: #000000 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  transform: translateY(-1px);
}
.btn-charge-lux:disabled,
.btn-charge-lux.is-disabled,
.btn-charge-lux[disabled] {
  background: #E2E8F0 !important;
  color: #94A3B8 !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  transform: none !important;
  pointer-events: none !important;
  opacity: 0.7 !important;
}

.pos-cust-req-badge {
  font-size: 9.5px;
  font-weight: 600;
  color: #BE123C;
  background: #FFE4E6;
  border: 1px solid #FECDD3;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  margin-left: 6px;
  text-transform: none;
}

.pos-cust-req-hint {
  font-size: 11px;
  color: #991B1B;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  line-height: 1.3;
}
.pos-cust-req-hint svg {
  flex-shrink: 0;
  color: #DC2626;
}

.pos-cust-input-invalid {
  border-color: #E11D48 !important;
  background: #FFF1F2 !important;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2) !important;
}
.btn-charge-lux kbd {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 9px;
  padding: 0 4px;
  border-radius: 3px;
}

/* Clean POS: suppress all keyboard shortcut hints, badges and tags */
.cart-hint,
.pos-bar .hint,
.posbar .pb-field kbd,
.posbar .pb-actions kbd,
.pay-btn kbd,
.btn-charge-lux kbd,
.tot-row kbd,
.ab-pos-btn kbd,
.ab-search kbd {
  display: none !important;
}

@media (max-width: 1040px) {
  .pos-main { grid-template-columns: 1fr; }
  body.pos-full .pos-main { display: flex; flex-direction: column; }
  .help-body { grid-template-columns: 1fr; }
}


/* ══ Stat lists (replaced the charts) ═════════════════════ */
.stat-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.stat-head strong { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.stat-head span { font-size: 11.5px; color: var(--ink-3); }
.stat-list { display: grid; gap: 2px; }
.stat-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.8px; }
.stat-row:last-child { border-bottom: 0; }
.stat-row .sr-rank { flex: 0 0 18px; font-size: 11px; font-weight: 700; color: var(--ink-4); }
.stat-row .sr-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .sr-bar { flex: 0 0 72px; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.stat-row .sr-bar > span { display: block; height: 100%; background: var(--black); border-radius: 999px; }
.stat-row .sr-val { flex: 0 0 auto; font-weight: 600; text-align: right; white-space: nowrap; }
.stat-row .sr-pct { flex: 0 0 46px; text-align: right; color: var(--ink-3); font-size: 11.5px; }
table.data tfoot td { padding: 10px 14px; border-top: 1px solid var(--line-2); background: var(--surface-2); font-size: 12.8px; }

/* ══ Theme picker ═════════════════════════════════════════ */
.theme-grid { display: grid; gap: 8px; }
.theme-card {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; width: 100%; color: var(--ink);
}
.theme-card:hover { border-color: var(--line-3); }
.theme-card[aria-pressed="true"] { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.tc-swatch { display: flex; flex: 0 0 auto; border-radius: 6px; overflow: hidden; border: 1px solid var(--line-2); }
.tc-swatch i { width: 18px; height: 30px; display: block; }
.tc-body { flex: 1; min-width: 0; }
.tc-body strong { display: block; font-size: 13px; }
.tc-body span { font-size: 11.5px; color: var(--ink-3); }
.tc-check { opacity: 0; color: var(--black); flex: 0 0 auto; }
.theme-card[aria-pressed="true"] .tc-check { opacity: 1; }

/* ══ Density ══════════════════════════════════════════════ */
:root[data-density="compact"] table.data td { padding: 5px 11px; }
:root[data-density="compact"] table.data th { padding: 7px 11px; }
:root[data-density="compact"] .card-body { padding: 13px; }
:root[data-density="compact"] .kpi { padding: 11px 12px; }
:root[data-density="compact"] .kpi-value { font-size: 19px; }
:root[data-density="compact"] .list-item { padding: 8px 14px; }

/* ══ Filter bar (Haute Couture Luxury Theme) ═══════════════ */
.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03);
  margin-bottom: 6px;
}

.filterbar .fb-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  margin-right: 2px;
  user-select: none;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.filterbar .fb-label .fb-label-ico {
  color: var(--ink-3);
  display: inline-block;
  vertical-align: middle;
}

.filterbar input[type="search"],
.filterbar input[type="text"] {
  flex: 1 1 220px;
  min-width: 170px;
  max-width: 340px;
  height: 36px;
  padding: 0 12px 0 32px;
  font-size: 12.5px;
  font-family: var(--font-sans);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888F9E' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: all 0.15s ease;
}

.filterbar input[type="search"]:focus,
.filterbar input[type="text"]:focus {
  outline: none;
  border-color: var(--black);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.08);
}

.filterbar select {
  height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  min-width: 130px;
}

/* Filter Bar Luxury Theme Select Dropdowns */
.filterbar .theme-select {
  width: auto !important;
  min-width: 135px;
  max-width: 220px;
  flex: 0 1 auto !important;
  display: inline-block !important;
}

.filterbar .theme-select-trigger {
  height: 36px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  color: var(--ink);
  white-space: nowrap;
  gap: 8px;
  transition: all 0.15s ease;
}

.filterbar .theme-select-trigger:hover {
  background: #FAFBFD;
  border-color: #CBD0DC;
  box-shadow: 0 2px 5px rgba(16, 24, 40, 0.05);
}

.filterbar .theme-select.is-open .theme-select-trigger {
  background: #FFFFFF;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(18, 18, 18, 0.08);
}

.filterbar .theme-select-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 135px;
}

.filterbar .theme-select-pop {
  min-width: 190px;
  width: max-content;
  max-width: 300px;
  left: 0;
  right: auto;
  z-index: 1050;
}

.filterbar .fb-clear-btn,
.filterbar [data-action="fclear"] {
  height: 32px;
  padding: 0 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  background: #FFF1F2;
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #E11D48;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filterbar [data-action="fclear"]:hover {
  background: #FFE4E6;
  border-color: rgba(244, 63, 94, 0.4);
  color: #BE123C;
}

.filterbar .fb-count {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

/* ══ Inline stock editor ══════════════════════════════════ */
.stock-edit { display: flex; align-items: center; gap: 4px; }
.stock-edit input {
  width: 58px; padding: 4px 6px; font-size: 12.5px; text-align: right;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface);
}
.stock-edit input:focus { outline: none; border-color: var(--black); }
.vcode {
  font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-3); padding: 2px 7px; border-radius: 5px; display: inline-block;
}

@media print {
  .appbar, .appfoot, .page-actions, .toolbar, .toast-host, .posbar, .login-screen { display: none !important; }
  .view { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ══ Unauthenticated Full-Screen Login Page ═══════════════ */
body.is-unauthenticated {
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, #FFF2F6 0%, #F5F5F7 60%, #ECECED 100%);
}
body.is-unauthenticated .appbar,
body.is-unauthenticated .appfoot,
body.is-unauthenticated #view,
body.is-unauthenticated .menu-sheet,
body.is-unauthenticated .palette-host,
body.is-unauthenticated .help-host,
body.is-unauthenticated .drawer-host {
  display: none !important;
}

[hidden],
.login-screen[hidden],
#login-screen[hidden],
.login-screen.is-hidden,
html.is-authenticated #login-screen {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.is-unauthenticated body.is-unauthenticated .appbar,
html.is-unauthenticated .appfoot,
html.is-unauthenticated #view,
html.is-unauthenticated .posbar,
html.is-unauthenticated .drawer-host {
  display: none !important;
}

/* ══ Full-Screen Luxury Login Architecture ═════════════════ */
.login-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; overflow-y: auto;
  background-color: #060609;
  color: #FFFFFF;
  box-sizing: border-box;
  isolation: isolate;
}

.login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse at 50% 45%, rgba(8, 8, 12, 0.40) 0%, rgba(6, 6, 9, 0.70) 58%, rgba(2, 2, 4, 0.90) 100%),
    url('assets/garments_bg.jpg') center center / cover no-repeat;
  filter: contrast(1.05);
  transform: scale(1.01);
  transition: transform 12s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 900px;
  min-height: 520px;
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.15), 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: login-fade-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
  position: relative;
  z-index: 1;
}

@keyframes login-fade-up {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Left Hero Panel (Atelier Showcase) ─────────────────── */
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 34px;
  background: #0B0B0E;
  color: #FFFFFF;
  overflow: hidden;
}

.login-hero-media {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden;
}

.login-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.68) contrast(1.1);
  transform: scale(1.02);
  transition: transform 10s ease-out;
}

.login-hero:hover .login-hero-img {
  transform: scale(1.06);
}

.login-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 14, 0.55) 0%,
    rgba(10, 10, 14, 0.75) 50%,
    rgba(6, 6, 8, 0.95) 100%
  );
  backdrop-filter: blur(1px);
}

.login-hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: space-between;
  height: 100%;
  gap: 32px;
}

/* Brand Crest Top */
.login-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}

.brand-crest {
  display: flex; align-items: center; gap: 12px;
}

.crest-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, #F6D7E3 0%, #F2C3D4 60%, #E7A3BC 100%);
  color: #0C0C0D;
  display: grid; place-items: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700; font-size: 22px;
  box-shadow: 0 4px 14px rgba(242, 195, 212, 0.35), inset 0 1px 1px rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.4);
}

.crest-meta {
  display: flex; flex-direction: column;
}

.crest-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.16em; line-height: 1.1;
  color: #FFFFFF;
}

.crest-sub {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--pink); opacity: 0.95;
  margin-top: 2px;
}

.hero-live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 10.5px; font-weight: 600;
  color: #E6E6EA; letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

.live-dot.pulse {
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.login-hero-bottom-clean {
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.hero-clean-tag {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pink);
}

.hero-clean-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px; font-weight: 600;
  color: #FFFFFF; letter-spacing: 0.01em;
  line-height: 1.25; margin: 0;
}

/* ── Right Panel: Terminal & Authentication ─────────────── */
.login-terminal {
  background: #FFFFFF;
  color: var(--ink);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 40px 38px;
  overflow-y: auto;
}

.login-terminal-inner {
  width: 100%; max-width: 360px; margin: auto;
  display: flex; flex-direction: column; gap: 20px;
}

/* Terminal Header */
.terminal-header-clean {
  display: flex; flex-direction: column; gap: 5px;
}

.terminal-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 28px; font-weight: 700; line-height: 1.15;
  color: var(--black); letter-spacing: -0.01em;
  margin: 0;
}

.terminal-subtitle {
  font-size: 12.5px; line-height: 1.45; color: var(--ink-3);
  margin: 0;
}

/* ── Corporate Credentials Form ─────────────────── */
.login-form .form-group {
  margin-bottom: 14px;
}

.login-form label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11.5px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px;
}

.label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}

.caps-warning {
  font-size: 10px; font-weight: 600;
  color: #B45309; background: #FEF3C7;
  padding: 1px 5px; border-radius: 4px;
}

.input-wrap-icon {
  position: relative; display: flex; align-items: center;
}

.input-icon {
  position: absolute; left: 13px;
  color: var(--ink-3); pointer-events: none;
  display: grid; place-items: center;
}

.input-wrap-icon input {
  padding-left: 38px !important;
}

.login-form input {
  width: 100%; height: 42px;
  padding: 0 14px; font-size: 13px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 9px; color: var(--ink);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.login-form input:focus {
  outline: none; background: #FFFFFF;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(12, 12, 13, 0.08);
}

.toggle-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--ink-3); cursor: pointer;
  padding: 6px; display: grid; place-items: center; border-radius: 6px;
}

.toggle-pw:hover { color: var(--ink); background: var(--surface-3); }

/* Quick fill chips row */
.quick-fill-row {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 8px 10px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px;
  margin-top: 14px;
}

.qf-label {
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  margin-right: 2px;
}

.qf-chip {
  background: #FFFFFF; border: 1px solid var(--line-2);
  border-radius: 5px; padding: 2px 7px;
  font-size: 10.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; transition: all 0.15s ease;
}

.qf-chip:hover {
  border-color: var(--black); background: var(--surface-3);
  transform: translateY(-1px);
}

.qf-chip.is-active {
  background: var(--black);
  color: #FFFFFF;
  border-color: var(--black);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Visual pulse animation when credentials are populated */
@keyframes input-pulse-highlight {
  0% { background-color: rgba(184, 150, 90, 0.22); border-color: #B8965A; }
  50% { background-color: rgba(184, 150, 90, 0.10); }
  100% { background-color: transparent; border-color: var(--line); }
}
.input-highlight-pulse {
  animation: input-pulse-highlight 1.2s ease-out;
}

.form-options {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; font-size: 11.5px;
}

.checkbox-label {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; color: var(--ink-2);
}

.checkbox-label input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--black);
  cursor: pointer;
}

.link-muted {
  background: none; border: 0; padding: 0;
  font-size: 11.5px; color: var(--ink-3); cursor: pointer;
}

.link-muted:hover { color: var(--ink); text-decoration: underline; }

.login-error {
  padding: 9px 12px; margin-bottom: 12px;
  background: #FFF1F0; border: 1px solid #FFCCC7;
  border-radius: 7px; color: #CF1322;
  font-size: 12px; font-weight: 500; line-height: 1.4;
  animation: pop-in 0.15s ease-out;
}

.btn-login-submit {
  width: 100%; height: 44px;
  background: var(--black); color: #FFFFFF;
  border: 0; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: all 0.16s ease;
  box-shadow: 0 4px 12px rgba(12, 12, 13, 0.2);
}

.btn-login-submit:hover {
  background: #252528;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(12, 12, 13, 0.25);
}

.btn-login-submit:active {
  transform: translateY(0);
}

.btn-login-submit:disabled {
  opacity: 0.65; cursor: not-allowed; transform: none;
}

/* Terminal Footer */
.terminal-footer-clean {
  text-align: center;
  font-size: 10.5px; color: var(--ink-4);
  padding-top: 4px;
  letter-spacing: 0.02em;
}

/* ── Responsive Rules for Split Layout ─────────────────── */
@media (max-width: 860px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 440px;
    min-height: auto;
    border-radius: 18px;
  }
  .login-hero {
    min-height: 140px;
    padding: 22px 20px;
  }
  .login-hero-bottom-clean {
    display: none;
  }
  .login-terminal {
    padding: 28px 22px;
  }
}

@media (max-width: 480px) {
  .login-screen {
    padding: 12px;
  }
  .login-container {
    border-radius: 14px;
  }
  .login-hero {
    padding: 16px;
  }
  .login-terminal {
    padding: 22px 16px;
  }
}

/* ── Luxury Haute Couture Role-Based Access Governance Studio ─────── */
.perm-governance-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Unsaved Floating Changes Alert ────────────────────────── */
.perm-unsaved-alert {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  color: #92400E;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
  animation: perm-slide-down 0.25s ease;
}
.perm-unsaved-alert.show {
  display: flex;
}
@keyframes perm-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.perm-unsaved-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.perm-unsaved-left svg {
  color: #D97706;
  flex-shrink: 0;
}

/* ── Master-Detail 2-Column Luxury Workspace ────────────────── */
.perm-master-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 1024px) {
  .perm-master-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* ── LEFT COLUMN: Roles & Profiles Directory Sidebar ────────── */
.perm-roles-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.03);
  position: sticky;
  top: 80px;
}
.perm-sidebar-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.perm-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.perm-count-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.perm-sidebar-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.4;
}

.perm-roles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.perm-role-item {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.perm-role-item:hover {
  background: var(--surface);
  border-color: var(--line-3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
}
.perm-role-item.is-active {
  background: #FFFFFF;
  border-color: var(--black);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.perm-role-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: var(--black);
  border-radius: 0 4px 4px 0;
}

.perm-role-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.perm-role-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.perm-role-avatar.super-admin {
  background: #0D0F12;
  color: #F59E0B;
}
.perm-role-avatar.boutique {
  background: #FDF2F6;
  color: #9E3560;
  border: 1px solid #F7D5E2;
}
.perm-role-avatar.accounts {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.perm-role-avatar.warehouse {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}
.perm-role-avatar.wholesale {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.perm-role-item-meta {
  flex: 1;
  min-width: 0;
}
.perm-role-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.perm-role-item-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.perm-role-badge-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.perm-role-badge-tag.full-access {
  background: #0D0F12;
  color: #F59E0B;
  border-color: #0D0F12;
}

.perm-role-item-desc {
  font-size: 11px;
  color: var(--ink-3);
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.perm-role-item-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-role-meter-track {
  flex: 1;
  height: 5px;
  background: var(--surface-3);
  border-radius: 4px;
  overflow: hidden;
}
.perm-role-meter-fill {
  height: 100%;
  background: #10B981;
  border-radius: 4px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.perm-role-meter-fill.full {
  background: #0D0F12;
}
.perm-role-meter-txt {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

/* ── RIGHT COLUMN: Active Role Inspector & Permission Center ─ */
.perm-role-inspector {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Role Banner & Quick Preset Bar */
.perm-inspector-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.perm-hero-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 280px;
}
.perm-hero-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.perm-hero-info {
  flex: 1;
  min-width: 0;
}
.perm-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.perm-hero-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0;
}
.perm-hero-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 4px;
  line-height: 1.4;
  max-width: 600px;
}
.perm-hero-stats {
  margin-top: 8px;
}
.perm-hero-stat-pill {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.perm-hero-presets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
@media (max-width: 768px) {
  .perm-hero-presets {
    align-items: flex-start;
  }
}
.perm-preset-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.perm-preset-btns {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.perm-preset-btn {
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.perm-preset-btn:hover {
  background: var(--surface);
  border-color: var(--black);
  color: var(--black);
}

.perm-hero-super-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  font-size: 12.5px;
  font-weight: 500;
}

/* Category Filter Chips & Live Search Bar */
.perm-inspector-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.perm-cat-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.perm-cat-chip {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.15s ease;
}
.perm-cat-chip:hover {
  border-color: var(--line-3);
  color: var(--ink);
}
.perm-cat-chip.is-active {
  background: var(--black);
  color: #FFFFFF;
  border-color: var(--black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.perm-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 250px;
  transition: all 0.2s ease;
}
.perm-search-box:focus-within {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(13, 15, 18, 0.08);
  width: 280px;
}
.perm-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--ink);
  width: 100%;
}

/* Domain Sections & Cards */
.perm-domain-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.02);
  margin-bottom: 18px;
}
.perm-domain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  gap: 12px;
}
.perm-domain-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.perm-domain-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.perm-domain-icon-box.emerald {
  background: #ECFDF5;
  color: #059669;
}
.perm-domain-icon-box.amber {
  background: #FFFBEB;
  color: #D97706;
}
.perm-domain-icon-box.indigo {
  background: #EEF2FF;
  color: #4F46E5;
}
.perm-domain-icon-box.rose {
  background: #FDF2F6;
  color: #9E3560;
}
.perm-domain-h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.perm-domain-count {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}
.perm-domain-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.perm-btn-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}
.perm-btn-link:hover {
  color: var(--black);
}
.perm-btn-sep {
  color: var(--line-3);
}

.perm-modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 768px) {
  .perm-modules-grid {
    grid-template-columns: 1fr;
  }
}

.perm-module-tile {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.perm-module-tile:hover {
  background: var(--surface);
  border-color: var(--line-3);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
  transform: translateY(-1px);
}
.perm-module-tile.is-enabled {
  background: #FAFDFB;
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.05);
}

.perm-mod-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.perm-mod-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}
.perm-mod-text {
  flex: 1;
  min-width: 0;
}
.perm-mod-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-mod-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.perm-mod-route {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-4);
  font-family: monospace;
}
.perm-mod-desc {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.perm-mod-status-row {
  margin-top: 6px;
}
.perm-mod-status-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
}
.perm-mod-status-tag.granted {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.perm-mod-status-tag.restricted {
  background: var(--surface-3);
  color: var(--ink-4);
  border: 1px solid var(--line);
}

/* Luxury Toggle Control */
.perm-mod-toggle-box {
  flex-shrink: 0;
}
.perm-toggle-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.perm-toggle-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.perm-toggle-slider {
  width: 40px;
  height: 24px;
  background: #E4E4E7;
  border: 1.5px solid #D4D4D8;
  border-radius: 20px;
  position: relative;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}
.perm-toggle-knob {
  width: 18px;
  height: 18px;
  background: #FFFFFF;
  border-radius: 50%;
  position: absolute;
  top: 1.5px;
  left: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.perm-toggle-control input:checked + .perm-toggle-slider {
  background: #0D0F12;
  border-color: #0D0F12;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.18);
}
.perm-toggle-control input:checked + .perm-toggle-slider .perm-toggle-knob {
  transform: translateX(16px);
  background: #FFFFFF;
}
.perm-toggle-control.is-locked {
  cursor: not-allowed;
}
.perm-toggle-control input:disabled + .perm-toggle-slider {
  background: #18181B;
  border-color: #18181B;
  opacity: 0.9;
}
.perm-toggle-control input:disabled + .perm-toggle-slider .perm-toggle-knob {
  transform: translateX(16px);
  background: #FBBF24;
}

/* ── Live Navigation Experience Simulator ───────────────────── */
.perm-simulator-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.02);
}
.perm-sim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.perm-sim-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.perm-sim-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-2);
}
.perm-sim-select {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.perm-sim-mock-nav {
  background: #111827;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.perm-mock-logo {
  font-weight: 800;
  font-size: 12px;
  color: #FFFFFF;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-right: 14px;
  border-right: 1px solid #374151;
  white-space: nowrap;
}
.perm-mock-nav-items {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.perm-mock-nav-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 7px;
  color: #9CA3AF;
  background: transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.perm-mock-nav-pill.allowed {
  color: #F3F4F6;
  background: rgba(255, 255, 255, 0.08);
}
.perm-mock-nav-pill.locked {
  color: #4B5563;
  text-decoration: line-through;
  opacity: 0.45;
}

/* ── Product Photo Upload & Inward Thumbnail ──────────── */
.inward-photo-cell {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  display: inline-block;
  vertical-align: middle;
}
.inward-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.18s ease;
}
.inward-photo-cell:hover .inward-photo-img {
  transform: scale(1.08);
}
.inward-photo-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(12, 12, 13, 0.75);
  color: #fff;
  font-size: 8.5px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.inward-photo-cell:hover .inward-photo-badge {
  opacity: 1;
}

.inward-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: var(--surface-2);
  border: 1px dashed var(--line-3);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.inward-upload-btn:hover {
  background: #FFF;
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Photo Modal / Drawer Styles */
.photo-upload-drawer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.photo-dropzone {
  border: 2px dashed var(--line-3);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.photo-dropzone:hover,
.photo-dropzone.drag-over {
  border-color: var(--ink);
  background: #FFFFFF;
}
.photo-dropzone-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.photo-preview-box {
  width: 100%;
  max-height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0C0C0D;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-preview-box img {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

/* ── Inward Product Unified Cell ──────────────────────────── */
.inward-product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.inward-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  flex-shrink: 0;
  cursor: pointer;
}
.inward-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.inward-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  background: var(--surface-3);
}
.inward-thumb-hover {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 13, 0.7);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.inward-thumb:hover .inward-thumb-hover {
  opacity: 1;
}
.inward-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.inward-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inward-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
}
.meta-dot {
  color: var(--line-3);
  font-weight: bold;
}

/* ══ Luxury Theme-Based Custom Dropdowns (Global) ═══════════════ */
.theme-select-native {
  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;
  opacity: 0 !important;
  pointer-events: none !important;
}

.theme-select {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}

.theme-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.theme-select-trigger:hover {
  border-color: #CBD0DC;
  background: #FAFBFD;
  box-shadow: 0 2px 6px -1px rgba(16, 24, 40, 0.05);
}

.theme-select.is-open .theme-select-trigger,
.theme-select-trigger:focus-visible {
  outline: none;
  border-color: var(--pink-mid);
  box-shadow: 0 0 0 3.5px rgba(229, 149, 179, 0.22);
  background: #FFFFFF;
}

.theme-select-val {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-select-arrow {
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}

.theme-select.is-open .theme-select-arrow {
  transform: rotate(180deg);
  color: var(--pink-ink);
}

/* Floating Glassmorphic Popover */
.theme-select-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.16), 0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 6px;
  animation: pop-in 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 100%;
  width: max-content;
  max-width: 320px;
}

.theme-select-list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Custom Luxury Scrollbar */
.theme-select-list::-webkit-scrollbar {
  width: 5px;
}
.theme-select-list::-webkit-scrollbar-track {
  background: transparent;
}
.theme-select-list::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
}
.theme-select-list::-webkit-scrollbar-thumb:hover {
  background: var(--ink-4);
}

/* Option item */
.theme-select-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.theme-select-opt:hover,
.theme-select-opt:focus-visible {
  background: #F3F4F6;
  color: var(--black);
  outline: none;
}

.theme-select-opt.is-selected {
  background: linear-gradient(180deg, #1C1E24 0%, #0D0F12 100%);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.18);
}

.theme-select-opt.is-selected:hover {
  background: linear-gradient(180deg, #252830 0%, #13151A 100%);
  color: #FFFFFF;
}

.theme-select-opt-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-select-check {
  font-size: 13px;
  color: var(--pink);
  font-weight: 700;
}

/* Disabled state */
.theme-select.is-disabled .theme-select-trigger,
.theme-select-trigger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #F3F4F6 !important;
  border-color: var(--line-2) !important;
  color: var(--ink-3) !important;
  pointer-events: none;
}

.theme-select-opt.is-disabled,
.theme-select-opt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Inline / table compact dropdown (e.g. POS discount) */
.theme-select-compact {
  width: auto;
  display: inline-block;
  vertical-align: middle;
}
.theme-select-compact .theme-select-trigger {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 6px;
  gap: 5px;
}
.theme-select-compact .theme-select-arrow {
  flex: 0 0 12px;
}
.theme-select-compact .theme-select-arrow svg {
  width: 11px;
  height: 11px;
}
.theme-select-compact .theme-select-pop {
  min-width: 140px;
}

/* Invoices label wrapped dropdowns */
.lbl .theme-select {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Toolbar & Field Compact Dropdowns */
.field .theme-select {
  width: auto;
  min-width: 110px;
}
.field .theme-select-trigger {
  padding: 4px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12.5px;
}
.field .theme-select-trigger:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Filter Bar Compact Dropdowns */
.filterbar .theme-select {
  width: auto !important;
  min-width: 135px;
  max-width: 220px;
  flex: 0 1 auto !important;
}

/* App Bar Branch Selector Theme */
.ab-branch-theme-select {
  width: auto;
  max-width: 170px;
}
.ab-branch-theme-select .theme-select-trigger {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  box-shadow: none;
}
.ab-branch-theme-select .theme-select-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}
.ab-branch-theme-select .theme-select-arrow {
  color: rgba(255, 255, 255, 0.7);
}
.ab-branch-theme-select .theme-select-pop {
  min-width: 180px;
}

/* ══════════════════════════════════════════════════════════════
   Inward from Tally — Luxury Haute Couture Inventory Hub UI/UX
   ══════════════════════════════════════════════════════════════ */

.inward-head-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.03), 0 2px 6px -1px rgba(16, 24, 40, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.inward-head-wrap:hover {
  border-color: rgba(217, 220, 227, 0.95);
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.04), 0 6px 18px -3px rgba(16, 24, 40, 0.03);
}
.inward-head-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.inward-pretitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pink-ink);
  margin-bottom: 2px;
}
.inward-head-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.inward-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: var(--emerald-soft);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.inward-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: inward-radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes inward-radar-ping {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.inward-head-sub {
  font-size: 13.5px;
  color: var(--ink-3);
  max-width: 680px;
  line-height: 1.5;
  margin: 0;
}
.inward-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Interactive Stock Lifecycle Pipeline Stepper ──────────── */
.inward-pipeline-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-x: auto;
}
.inward-pipe-step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: all 0.16s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.inward-pipe-step:hover {
  background: #FFFFFF;
  border-color: var(--line-2);
  box-shadow: var(--shadow-subtle);
}
.inward-pipe-step.is-active {
  background: linear-gradient(135deg, #1C1E24 0%, #0D0F12 100%);
  color: #FFFFFF;
  border-color: #000;
  box-shadow: 0 4px 14px rgba(13, 15, 18, 0.16);
}
.inward-pipe-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--black);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.inward-pipe-step.is-active .inward-pipe-num {
  background: var(--pink);
  color: var(--pink-ink);
}
.inward-pipe-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.inward-pipe-title {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
}
.inward-pipe-step.is-active .inward-pipe-title {
  color: #FFFFFF;
}
.inward-pipe-sub {
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}
.inward-pipe-step.is-active .inward-pipe-sub {
  color: rgba(255, 255, 255, 0.7);
}
.inward-pipe-arrow {
  color: var(--line-3);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

/* ── Luxury KPI Grid ───────────────────────────────────────── */
.inward-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 1024px) {
  .inward-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 768px) {
  .inward-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .inward-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.inward-kpi-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  overflow: hidden;
}
.inward-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}
.inward-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.inward-kpi-card.tone-dark::before { background: var(--black); }
.inward-kpi-card.tone-pink::before { background: var(--pink-mid); }
.inward-kpi-card.tone-ok::before { background: var(--emerald); }
.inward-kpi-card.tone-blue::before { background: var(--blue); }

.inward-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.inward-kpi-lbl {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.inward-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--ink);
}
.inward-kpi-icon.tone-dark {
  background: var(--black);
  color: #FFFFFF;
}
.inward-kpi-icon.tone-pink {
  background: var(--pink-soft);
  color: var(--pink-ink);
}
.inward-kpi-icon.tone-ok {
  background: var(--emerald-soft);
  color: #065F46;
}
.inward-kpi-icon.tone-blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.inward-kpi-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.15;
}
.inward-kpi-val small {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}
.inward-kpi-footnote {
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.inward-table-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.inward-table-card .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.inward-table-card .table-pagination-bar {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: #FFFFFF;
}
.inward-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
  flex-wrap: wrap;
}
.inward-table-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inward-table-heading {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
}
.inward-table-count-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink-2);
}
.inward-toolbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.inward-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}
.inward-search-icon {
  position: absolute;
  left: 11px;
  color: var(--ink-3);
  pointer-events: none;
  display: grid;
  place-items: center;
}
.inward-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink);
  transition: all 0.15s ease;
}
.inward-search-input:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--pink-mid);
  box-shadow: 0 0 0 3px rgba(229, 149, 179, 0.2);
}
.inward-filter-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}
.inward-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-2);
  background: #FFFFFF;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.12s ease;
}
.inward-chip:hover {
  background: var(--surface-2);
  color: var(--black);
}
.inward-chip.is-active {
  background: var(--black);
  border-color: var(--black);
  color: #FFFFFF;
}

/* ── Enhanced Product Row & Cells ─────────────────────────── */
.inward-thumb {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}
.inward-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--black);
}
.inward-qty-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.inward-qty-num {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--black);
}
.inward-qty-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: #065F46;
  background: var(--emerald-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ── High-Tech Tally Telemetry Card ────────────────────────── */
.inward-telemetry-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.inward-telemetry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.inward-telemetry-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 8px;
}
.inward-telemetry-grid {
  display: grid;
  gap: 11px;
  font-size: 12.5px;
}
.inward-telemetry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}
.inward-telemetry-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.inward-telemetry-row .label {
  color: var(--ink-3);
  font-weight: 500;
}
.inward-telemetry-row .val {
  color: var(--black);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inward-sync-btn-pulse {
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.inward-sync-btn-pulse:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13, 15, 18, 0.18);
}

/* ── Stock Segregation & Channel Distribution Card ─────────── */
.inward-seg-box {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
}
.inward-seg-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}
.inward-seg-desc {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
  margin-bottom: 14px;
}
.inward-channel-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.inward-channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid var(--line);
}
.inward-channel-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}
.inward-channel-qty {
  font-weight: 700;
  color: var(--black);
}

/* ══════════════════════════════════════════════════════════════
   Global Table Action Buttons (Icon-Only + Semantic Themed Colors)
   ══════════════════════════════════════════════════════════════ */

/* Every button inside an action table cell is strictly icon-only */
table td.w-act {
  white-space: nowrap;
  vertical-align: middle;
}
table th.w-act,
table td.w-act {
  text-align: center !important;
}

table td.w-act button,
table td.w-act .btn,
.act-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  margin: 0 2px !important;
  border-radius: 8px !important;
  font-size: 0 !important;
  line-height: 0 !important;
  letter-spacing: 0 !important;
  text-indent: 0 !important;
  color: #475569 !important;
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  cursor: pointer !important;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
  flex-shrink: 0 !important;
  vertical-align: middle !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Hide any text label or non-icon elements inside the action button */
table td.w-act button > *:not(svg):not(.mi-ico),
table td.w-act .btn > *:not(svg):not(.mi-ico),
.act-icon-btn > *:not(svg):not(.mi-ico) {
  display: none !important;
}

table td.w-act button svg,
table td.w-act .btn svg,
.act-icon-btn svg {
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  display: block !important;
  flex-shrink: 0 !important;
  stroke: currentColor !important;
}

table td.w-act button:hover,
table td.w-act .btn:hover,
.act-icon-btn:hover {
  transform: translateY(-1.5px) scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14) !important;
  z-index: 2;
}

table td.w-act button:active,
table td.w-act .btn:active,
.act-icon-btn:active {
  transform: scale(0.95) !important;
}

/* ── 1. Forward / Transfer Stock (Royal Emerald Mint) ────────── */
.act-forward,
table td.w-act .btn[data-action="open-transfer-modal"],
table td.w-act .btn[data-action*="transfer"],
table td.w-act .btn[data-action*="forward"],
table td.w-act .btn[data-action*="export-csv"],
table td.w-act button[data-action*="transfer"] {
  background: #ECFDF5 !important;
  border: 1px solid #A7F3D0 !important;
  color: #047857 !important;
}
.act-forward:hover,
table td.w-act .btn[data-action="open-transfer-modal"]:hover,
table td.w-act .btn[data-action*="transfer"]:hover,
table td.w-act .btn[data-action*="forward"]:hover,
table td.w-act .btn[data-action*="export-csv"]:hover,
table td.w-act button[data-action*="transfer"]:hover {
  background: #D1FAE5 !important;
  border-color: #34D399 !important;
  color: #065F46 !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.28) !important;
}

/* ── 2. Photo / Media Upload (Rose Champagne Pink) ───────────── */
.act-photo,
table td.w-act .btn[data-action="open-photo-upload"],
table td.w-act .btn[data-action*="photo"],
table td.w-act .btn[data-action*="image"],
table td.w-act button[data-action*="photo"] {
  background: #FDF2F6 !important;
  border: 1px solid #F7D5E2 !important;
  color: #9E3560 !important;
}
.act-photo:hover,
table td.w-act .btn[data-action="open-photo-upload"]:hover,
table td.w-act .btn[data-action*="photo"]:hover,
table td.w-act .btn[data-action*="image"]:hover,
table td.w-act button[data-action*="photo"]:hover {
  background: #FCE7F0 !important;
  border-color: #F3C4D5 !important;
  color: #831843 !important;
  box-shadow: 0 3px 10px rgba(158, 53, 96, 0.28) !important;
}

/* ── 3. POS / Retail Counter / Till (Indigo Cobalt) ─────────── */
.act-pos,
table td.w-act .btn[data-action="switch-to-pos-channel"],
table td.w-act .btn[data-action*="pos"],
table td.w-act .btn[data-action*="till"],
table td.w-act button[data-action*="pos"] {
  background: #EEF2FF !important;
  border: 1px solid #C7D2FE !important;
  color: #4338CA !important;
}
.act-pos:hover,
table td.w-act .btn[data-action="switch-to-pos-channel"]:hover,
table td.w-act .btn[data-action*="pos"]:hover,
table td.w-act .btn[data-action*="till"]:hover,
table td.w-act button[data-action*="pos"]:hover {
  background: #E0E7FF !important;
  border-color: #818CF8 !important;
  color: #3730A3 !important;
  box-shadow: 0 3px 10px rgba(67, 56, 202, 0.28) !important;
}

/* ── 4. Edit / Update / Modify (Warm Amber Gold) ─────────────── */
.act-edit,
table td.w-act .btn[data-action*="edit"],
table td.w-act .btn[data-action*="update"],
table td.w-act .btn[data-action*="stock-update"],
table td.w-act button[data-action*="edit"],
table td.w-act button[data-action*="stock-update"] {
  background: #FFFBEB !important;
  border: 1px solid #FDE68A !important;
  color: #B45309 !important;
}
.act-edit:hover,
table td.w-act .btn[data-action*="edit"]:hover,
table td.w-act .btn[data-action*="update"]:hover,
table td.w-act .btn[data-action*="stock-update"]:hover,
table td.w-act button[data-action*="edit"]:hover,
table td.w-act button[data-action*="stock-update"]:hover {
  background: #FEF3C7 !important;
  border-color: #FCD34D !important;
  color: #92400E !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.28) !important;
}

/* ── 5. View / Inspect / Open Details (Azure Sky Blue) ───────── */
.act-view,
table td.w-act .btn[data-action="invoice"],
table td.w-act .btn[data-action="sync-xml"],
table td.w-act .btn[data-action*="view"],
table td.w-act .btn[data-action*="status-update"],
table td.w-act .btn[data-action="availability"],
table td.w-act .btn[data-action="product"],
table td.w-act .btn[data-action*="export-json"],
table td.w-act button[data-action*="view"] {
  background: #EFF6FF !important;
  border: 1px solid #BFDBFE !important;
  color: #1D4ED8 !important;
}
.act-view:hover,
table td.w-act .btn[data-action="invoice"]:hover,
table td.w-act .btn[data-action="sync-xml"]:hover,
table td.w-act .btn[data-action*="view"]:hover,
table td.w-act .btn[data-action*="status-update"]:hover,
table td.w-act .btn[data-action="availability"]:hover,
table td.w-act .btn[data-action="product"]:hover,
table td.w-act .btn[data-action*="export-json"]:hover,
table td.w-act button[data-action*="view"]:hover {
  background: #DBEAFE !important;
  border-color: #60A5FA !important;
  color: #1E40AF !important;
  box-shadow: 0 3px 10px rgba(29, 78, 216, 0.28) !important;
}

/* ── 6. Delete / Cancel / Void (Coral Crimson) ───────────────── */
.act-delete,
table td.w-act .btn[data-action*="delete"],
table td.w-act .btn[data-action*="cancel"],
table td.w-act .btn[data-action*="del"],
table td.w-act .btn[data-action*="void"],
table td.w-act button[data-action*="del"],
table td.w-act button[data-action*="delete"] {
  background: #FEF2F2 !important;
  border: 1px solid #FECACA !important;
  color: #DC2626 !important;
}
.act-delete:hover,
table td.w-act .btn[data-action*="delete"]:hover,
table td.w-act .btn[data-action*="cancel"]:hover,
table td.w-act .btn[data-action*="del"]:hover,
table td.w-act .btn[data-action*="void"]:hover,
table td.w-act button[data-action*="del"]:hover,
table td.w-act button[data-action*="delete"]:hover {
  background: #FEE2E2 !important;
  border-color: #F87171 !important;
  color: #991B1B !important;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.28) !important;
}

/* ── 7. Sync / Retry / Refresh (Cyan Teal) ───────────────────── */
.act-sync,
table td.w-act .btn[data-action*="sync-retry"],
table td.w-act .btn[data-action*="retry"],
table td.w-act .btn[data-action*="refresh"],
table td.w-act button[data-action*="retry"] {
  background: #ECFEFF !important;
  border: 1px solid #A5F3FC !important;
  color: #0E7490 !important;
}
.act-sync:hover,
table td.w-act .btn[data-action*="sync-retry"]:hover,
table td.w-act .btn[data-action*="retry"]:hover,
table td.w-act .btn[data-action*="refresh"]:hover,
table td.w-act button[data-action*="retry"]:hover {
  background: #CFFAFE !important;
  border-color: #22D3EE !important;
  color: #155E75 !important;
  box-shadow: 0 3px 10px rgba(14, 116, 144, 0.28) !important;
}

/* ── 8. Check / Force Sent / Approve (Forest Emerald) ────────── */
.act-check,
table td.w-act .btn[data-action*="forceSent"],
table td.w-act .btn[data-action*="approve"],
table td.w-act button[data-action*="forceSent"] {
  background: #F0FDF4 !important;
  border: 1px solid #BBF7D0 !important;
  color: #15803D !important;
}
.act-check:hover,
table td.w-act .btn[data-action*="forceSent"]:hover,
table td.w-act .btn[data-action*="approve"]:hover,
table td.w-act button[data-action*="forceSent"]:hover {
  background: #DCFCE7 !important;
  border-color: #4ADE80 !important;
  color: #166534 !important;
  box-shadow: 0 3px 10px rgba(21, 128, 61, 0.28) !important;
}

/* ── 9. Run / Report / Go (Purple Violet) ────────────────────── */
.act-run,
table td.w-act .btn[data-action*="report"],
table td.w-act button[data-action*="report"] {
  background: #F5F3FF !important;
  border: 1px solid #DDD6FE !important;
  color: #6D28D9 !important;
}
.act-run:hover,
table td.w-act .btn[data-action*="report"]:hover,
table td.w-act button[data-action*="report"]:hover {
  background: #EDE9FE !important;
  border-color: #A78BFA !important;
  color: #5B21B6 !important;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.28) !important;
}

/* ── 10. PO / MO / Plus (Dark Obsidian) ──────────────────────── */
.act-plus,
table td.w-act .btn[data-action*="form:"],
table td.w-act button[data-action*="form:"] {
  background: #111827 !important;
  border: 1px solid #111827 !important;
  color: #FFFFFF !important;
}
.act-plus:hover,
table td.w-act .btn[data-action*="form:"]:hover,
table td.w-act button[data-action*="form:"]:hover {
  background: #1F2937 !important;
  border-color: #1F2937 !important;
  color: #FFFFFF !important;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.3) !important;
}

/* ══════════════════════════════════════════════════════════
   Executive Atelier Dashboard — Luxury Design System
   ══════════════════════════════════════════════════════════ */
.dash-head-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
@media (max-width: 900px) {
  .dash-head-wrap {
    flex-direction: column;
  }
}
.dash-head-title-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink-ink);
}
.dash-spark {
  color: #D97706;
}
.dash-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}
.dash-gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.dash-time-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: #F8FAFC;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.dash-subtitle {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
  max-width: 720px;
  line-height: 1.5;
}
.dash-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.dash-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.16s ease;
}
.dash-pos-cta {
  background: var(--black) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.2);
}
.dash-pos-cta:hover {
  background: #1F2937 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(17, 24, 39, 0.28);
}

/* Tally Prime Live Connectivity Bar */
.dash-gateway-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--ink-1);
}
.dash-gw-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-gw-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dash-gw-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.dash-gw-val {
  color: var(--ink-1);
  font-weight: 700;
  font-size: 12.5px;
}
.dash-gw-sub {
  color: var(--ink-sub);
  font-size: 11px;
}
.dash-gw-right .btn {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 6px;
}
@media (max-width: 768px) {
  .dash-gateway-status-bar {
    padding: 8px 10px !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .dash-gw-left {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }
  .dash-gw-sub {
    font-size: 10px !important;
  }
}

/* 4-Column Desktop / 2x2 Mobile KPI Cards (Overall Counts) */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 1024px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (max-width: 768px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }
}

/* Split Analytics Section */
.dash-split-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}
@media (max-width: 1024px) {
  .dash-split-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}
.dash-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin: 0 0 4px 0;
  line-height: 1.3;
}
.dash-card-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0;
}

/* Stacked Multi-Color Share Bar */
.dash-stacked-bar-wrap {
  margin-bottom: 20px;
  background: #F8FAFC;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.dash-stacked-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #E2E8F0;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}
.dash-bar-slice {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}
.dash-bar-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.dash-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-legend-val {
  color: var(--black);
  font-weight: 700;
}

/* Ranked SKU Rows */
.dash-sku-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.dash-sku-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--line);
  transition: all 0.16s ease;
}
.dash-sku-row:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-subtle);
  transform: translateX(2px);
}
.dash-sku-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #F3F4F6;
  border: 1px solid var(--line);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.dash-sku-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dash-thumb-blank {
  color: var(--ink-4);
  display: grid;
  place-items: center;
}
.dash-sku-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-sku-name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.dash-sku-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-sku-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  white-space: nowrap;
}
.dash-sku-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.dash-dot {
  color: var(--line-3);
  font-size: 12px;
}
.dash-sku-progress {
  height: 5px;
  border-radius: 999px;
  background: #F1F3F7;
  overflow: hidden;
  margin-top: 3px;
}
.dash-sku-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.dash-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}
.dash-link-action {
  font-weight: 600;
  color: var(--pink-ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.14s ease;
}
.dash-link-action:hover {
  color: var(--black);
  text-decoration: underline;
}

/* Channel Distribution Column */
.dash-channel-pool-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FAF5F7 0%, #FFFFFF 100%);
  border: 1px solid var(--pink-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.dash-pool-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--pink-soft);
  color: var(--pink-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dash-pool-info {
  flex: 1;
}
.dash-pool-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.dash-pool-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}
.dash-pool-qty {
  font-size: 18px;
  color: var(--black);
  text-align: right;
  flex-shrink: 0;
}
.dash-pool-qty small {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
}

.dash-channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.dash-channel-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
}
.dash-chan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.dash-chan-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
}
.dash-chan-type {
  font-size: 10.5px;
  background: #F1F3F7;
  color: var(--ink-3);
  padding: 1px 6px;
  border-radius: 4px;
}
.dash-chan-units {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
}
.dash-chan-pct {
  font-size: 11px;
  color: var(--ink-4);
  font-weight: 500;
}
.dash-chan-progress {
  height: 5px;
  border-radius: 999px;
  background: #F1F3F7;
  overflow: hidden;
}
.dash-chan-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--black);
  transition: width 0.3s ease;
}

.dash-allocation-cta-box {
  background: #F8FAFC;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}
.dash-cta-txt strong {
  display: block;
  font-size: 12.5px;
  color: var(--black);
  margin-bottom: 2px;
}
.dash-cta-txt p {
  font-size: 11px;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.4;
}

/* 3-Column Telemetry Grid at Bottom */
.dash-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
  margin-bottom: 24px;
}
@media (max-width: 992px) {
  .dash-telemetry-grid {
    grid-template-columns: 1fr;
  }
}
.dash-telemetry-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.dash-tel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--black);
}
.dash-tel-head h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}
.dash-tel-nodes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-node-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  border: 1px solid var(--line);
}
.node-status-dot.online {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}
.dash-node-details {
  flex: 1;
  min-width: 0;
}
.dash-node-details strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}
.dash-node-details span {
  display: block;
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-tel-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.dash-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.dash-spec-row span {
  color: var(--ink-3);
}
.dash-spec-row strong,
.dash-spec-row code {
  color: var(--black);
  font-size: 12px;
}

.dash-quick-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.dash-quick-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}
.dash-quick-btn:hover {
  background: #FFFFFF;
  border-color: var(--line-2);
  box-shadow: var(--shadow-subtle);
  transform: translateX(2px);
}
.dash-qb-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--black);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.dash-qb-txt strong {
  display: block;
  font-size: 12px;
  color: var(--ink);
}
.dash-qb-txt span {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
}

/* ══════════════════════════════════════════════════════════════
   Executive Dashboard — Tally Stock Master Register & Valuation Card
   ══════════════════════════════════════════════════════════════ */
.dash-table-card {
  width: 100% !important;
  margin-top: 20px !important;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dash-table-card .table-wrap {
  width: 100% !important;
  overflow-x: auto;
}

.dash-table-card table.data {
  width: 100% !important;
  min-width: 980px;
  border-collapse: collapse;
}

/* Specific column proportioning for executive valuation register */
.dash-table-card table.data th.col-sno,
.dash-table-card table.data td.col-sno {
  width: 65px;
  min-width: 60px;
  max-width: 75px;
}

.dash-table-card table.data th.col-pic,
.dash-table-card table.data td.col-pic {
  width: 76px;
  min-width: 70px;
  max-width: 86px;
  text-align: center !important;
}

.dash-table-card table.data th:nth-child(3),
.dash-table-card table.data td:nth-child(3) {
  min-width: 260px;
}

.dash-table-card table.data th:nth-child(4),
.dash-table-card table.data td:nth-child(4) {
  min-width: 120px;
}

.dash-table-card table.data th:nth-child(5),
.dash-table-card table.data td:nth-child(5) {
  min-width: 110px;
}

.dash-table-card table.data th:nth-child(6),
.dash-table-card table.data td:nth-child(6) {
  min-width: 135px;
}

.dash-table-card table.data th:nth-child(7),
.dash-table-card table.data td:nth-child(7) {
  min-width: 140px;
}

.dash-table-card table.data th:nth-child(8),
.dash-table-card table.data td:nth-child(8) {
  min-width: 115px;
}

.dash-table-card table.data th:nth-child(9),
.dash-table-card table.data td:nth-child(9) {
  min-width: 120px;
}

.dash-table-card table.data th:nth-child(10),
.dash-table-card table.data td:nth-child(10) {
  width: 125px;
  min-width: 115px;
}

/* Luxury Executive Valuation Summary Strip */
.dash-valuation-footer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 24px;
  background: var(--surface-2, #FAFBFD);
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.dvf-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dvf-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.dvf-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.dvf-val.highlight {
  color: var(--black);
  font-size: 14.5px;
}

.dvf-divider {
  width: 1px;
  height: 28px;
  background: var(--line-2);
}

/* ── Luxury Role Creation Form (Theme-based UI/UX) ────────── */
.crf-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* 1. Dynamic Hero Live Preview Card */
.crf-hero-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFD 100%);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.03);
}

.crf-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.crf-hero-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #0D0F12;
  color: var(--pink-ink, #E595B3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.crf-hero-info {
  flex: 1;
  min-width: 0;
}

.crf-hero-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crf-hero-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.crf-hero-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2.5px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

.crf-hero-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.35;
}

.crf-hero-badge-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.crf-hero-counter {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.crf-hero-status {
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 2. Form Groups & Inputs */
.crf-section-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crf-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.crf-section-head h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
}

.crf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crf-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crf-label .req {
  color: #E11D48;
}

.crf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.crf-input-icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  color: var(--ink-3);
  pointer-events: none;
}

.crf-input {
  width: 100%;
  padding: 9.5px 14px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: #FFFFFF;
  font-size: 13px;
  color: var(--ink);
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.crf-input-wrap .crf-input {
  padding-left: 36px;
}

.crf-input:focus {
  border-color: var(--black);
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 15, 18, 0.08);
}

.crf-hint {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

/* 3. Preset Templates Bar */
.crf-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.crf-preset-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.crf-preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crf-preset-btn {
  padding: 6px 13px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #FFFFFF;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crf-preset-btn:hover {
  background: var(--surface);
  border-color: var(--black);
  color: var(--black);
  transform: translateY(-1px);
}

/* 4. Categorized Module Permission Blocks */
.crf-domains {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crf-domain-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.02);
}

.crf-domain-header {
  padding: 10px 16px;
  background: #F8FAFD;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crf-domain-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crf-domain-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.crf-domain-icon.emerald { background: #ECFDF5; color: #059669; }
.crf-domain-icon.amber   { background: #FFFBEB; color: #D97706; }
.crf-domain-icon.indigo  { background: #EEF2FF; color: #4F46E5; }
.crf-domain-icon.rose    { background: #FDF2F6; color: #9E3560; }

.crf-domain-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.crf-domain-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.crf-domain-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}

.crf-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.crf-link-btn:hover {
  color: var(--black);
}

.crf-domain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 14px;
}

@media (max-width: 720px) {
  .crf-domain-grid {
    grid-template-columns: 1fr;
  }
}

.crf-mod-tile {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.crf-mod-tile:hover {
  background: #FFFFFF;
  border-color: var(--line-3);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.04);
  transform: translateY(-1px);
}

.crf-mod-tile.is-checked {
  background: #FAFDFB;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.crf-mod-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.crf-mod-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.crf-mod-tile.is-checked .crf-mod-icon {
  background: #ECFDF5;
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.crf-mod-meta {
  flex: 1;
  min-width: 0;
}

.crf-mod-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crf-mod-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.crf-mod-route {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-4);
  font-family: monospace;
}

.crf-mod-desc {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crf-mod-status {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 1.5px 6px;
  border-radius: 4px;
  margin-top: 5px;
}

.crf-mod-status.granted {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.crf-mod-status.restricted {
  background: var(--surface-3);
  color: var(--ink-3);
  border: 1px solid var(--line);
}

/* Custom Sliding Switch */
.crf-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.crf-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.crf-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.crf-switch-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.crf-switch input:checked + .crf-switch-slider {
  background-color: #059669;
}

.crf-switch input:checked + .crf-switch-slider::before {
  transform: translateX(16px);
}

/* 5. Sticky Action Footer */
.crf-action-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

/* ══════════════════════════════════════════════════════════
   Luxury Theme-Based Confirmation & Prompt Modal System
   Aesthetic: Contemporary Haute Couture Atelier Overlay
   ══════════════════════════════════════════════════════════ */
.theme-confirm-host {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: confirmFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-confirm-host.is-closing {
  animation: confirmFadeOut 0.15s ease forwards;
  pointer-events: none;
}

.theme-confirm-scrim {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 18, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-confirm-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid rgba(217, 220, 227, 0.95);
  border-radius: 16px;
  box-shadow: 0 24px 56px -12px rgba(15, 23, 42, 0.28), 0 4px 16px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: confirmPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theme-confirm-host.is-closing .theme-confirm-card {
  animation: confirmPopOut 0.14s ease forwards;
}

.theme-confirm-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0 24px;
}

.theme-confirm-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-confirm-icon-badge.tone-danger {
  background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
  border: 1px solid #FECACA;
  color: #DC2626;
}

.theme-confirm-icon-badge.tone-warning {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1px solid #FDE68A;
  color: #D97706;
}

.theme-confirm-icon-badge.tone-primary {
  background: linear-gradient(135deg, #F8FAFD 0%, #F1F3F7 100%);
  border: 1px solid var(--line-2);
  color: var(--ink);
}

.theme-confirm-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-confirm-close:hover {
  background: var(--surface-3);
  color: var(--ink);
  border-color: var(--line-2);
}

.theme-confirm-body {
  padding: 16px 24px 22px 24px;
}

.theme-confirm-title {
  margin: 0 0 8px 0;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.theme-confirm-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.theme-confirm-tag {
  display: inline-block;
  padding: 1px 7px;
  font-weight: 700;
  font-size: 12.5px;
  border-radius: 5px;
  background: #F3F4F6;
  color: var(--ink);
  border: 1px solid var(--line-2);
  margin: 0 2px;
}

.theme-confirm-card.tone-danger .theme-confirm-tag {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
}

.theme-confirm-subnote {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.theme-confirm-card.tone-danger .theme-confirm-subnote {
  background: #FFF5F5;
  border: 1px solid #FED7D7;
  color: #B91C1C;
}

.theme-confirm-card.tone-warning .theme-confirm-subnote {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

.theme-confirm-card.tone-primary .theme-confirm-subnote {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-3);
}

.theme-confirm-input {
  width: 100%;
  margin-top: 14px;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.theme-confirm-input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.theme-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.theme-confirm-cancel {
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  background: #FFFFFF !important;
  border: 1px solid var(--line-2) !important;
  color: var(--ink-2) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04) !important;
}

.theme-confirm-cancel:hover {
  background: #F8FAFD !important;
  border-color: #CBD0DC !important;
  color: var(--ink) !important;
  transform: translateY(-1px) !important;
}

.btn-confirm-danger {
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%) !important;
  border: 1px solid #B91C1C !important;
  color: #FFFFFF !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-confirm-danger:hover {
  background: linear-gradient(180deg, #DC2626 0%, #B91C1C 100%) !important;
  border-color: #991B1B !important;
  color: #FFFFFF !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.42) !important;
}

.btn-confirm-primary {
  padding: 8px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  background: linear-gradient(180deg, #1E2127 0%, #0D0F12 100%) !important;
  border: 1px solid #0D0F12 !important;
  color: #FFFFFF !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(13, 15, 18, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-confirm-primary:hover {
  background: linear-gradient(180deg, #2D323B 0%, #15181E 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(13, 15, 18, 0.28) !important;
}

@keyframes confirmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes confirmPopIn {
  from { opacity: 0; transform: scale(0.93) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes confirmPopOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* ══════════════════════════════════════════════════════════
   Settings Section-Wise Luxury Navigation & Components
   General · Notification · Tally Integration · Text & color tone
   ══════════════════════════════════════════════════════════ */
.settings-nav-bar,
.settings-nav-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 14px !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 24px !important;
  box-shadow: none !important;
  width: 100% !important;
}

.settings-tab-btn {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px 18px !important;
  background: #FFFFFF !important;
  border: 1.5px solid var(--line, #E8EAEF) !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  position: relative !important;
  overflow: hidden !important;
  text-align: left !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.03) !important;
  width: 100% !important;
}

.settings-tab-btn:hover {
  transform: translateY(-2px) !important;
  border-color: var(--line-2, #D8DCE5) !important;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.06) !important;
}

.settings-tab-btn.is-active {
  background: #FFFFFF !important;
  border-color: var(--ink, #111827) !important;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.09) !important;
  transform: translateY(-2px) !important;
}

/* Subtle Atelier Rose Gold Accent on Active Top Edge */
.settings-tab-btn::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 3.5px !important;
  background: transparent !important;
  transition: background 0.2s ease !important;
}

.settings-tab-btn.is-active::before {
  background: linear-gradient(90deg, #111827 0%, var(--pink-mid, #E595B3) 100%) !important;
}

/* Luxury Icon Badge */
.settings-tab-btn .snc-icon-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  background: var(--surface-3, #F1F3F7) !important;
  color: var(--ink, #111827) !important;
  border: 1px solid var(--line, #E8EAEF) !important;
  flex-shrink: 0 !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.settings-tab-btn:hover .snc-icon-badge {
  border-color: var(--pink-mid, #E595B3) !important;
  transform: scale(1.05) !important;
}

.settings-tab-btn.is-active .snc-icon-badge {
  background: #111827 !important;
  color: #FFFFFF !important;
  border-color: #111827 !important;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.22) !important;
  transform: scale(1.05) !important;
}

/* Text Container */
.settings-tab-btn .snc-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.settings-tab-btn .snc-title {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: var(--ink, #111827) !important;
  letter-spacing: -0.015em !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.settings-tab-btn .snc-desc {
  font-size: 11.5px !important;
  color: var(--ink-3, #717D96) !important;
  font-weight: 450 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.settings-tab-btn.is-active .snc-desc {
  color: var(--ink-2, #374151) !important;
  font-weight: 500 !important;
}

/* Active Status Dot */
.settings-tab-btn .snc-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: transparent !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  transition: all 0.2s ease !important;
}

.settings-tab-btn.is-active .snc-dot {
  background: var(--pink-mid, #E595B3) !important;
  box-shadow: 0 0 0 3px rgba(229, 149, 179, 0.3) !important;
}

/* ── Tablet Breakpoint ────────────────────────────────── */
@media (max-width: 1080px) {
  .settings-nav-bar,
  .settings-nav-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Mobile 2x2 Grid Tile Layout ───────────────────────── */
@media (max-width: 640px) {
  .settings-nav-bar,
  .settings-nav-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }

  .settings-tab-btn {
    display: grid !important;
    grid-template-columns: 36px 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 10px 8px !important;
    align-items: center !important;
    padding: 13px 13px 12px !important;
    border-radius: 14px !important;
    text-align: left !important;
  }

  .settings-tab-btn .snc-icon-badge {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    margin: 0 !important;
  }

  .settings-tab-btn .snc-icon-badge svg {
    width: 18px !important;
    height: 18px !important;
  }

  .settings-tab-btn .snc-dot {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 !important;
    width: 8px !important;
    height: 8px !important;
  }

  .settings-tab-btn .snc-text {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }

  .settings-tab-btn .snc-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--ink, #111827) !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .settings-tab-btn .snc-desc {
    font-size: 10.5px !important;
    color: var(--ink-3, #717D96) !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 380px) {
  .settings-nav-bar,
  .settings-nav-grid {
    gap: 8px !important;
  }

  .settings-tab-btn {
    padding: 11px 11px 10px !important;
    gap: 8px 6px !important;
    border-radius: 12px !important;
  }

  .settings-tab-btn .snc-icon-badge {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .settings-tab-btn .snc-icon-badge svg {
    width: 16px !important;
    height: 16px !important;
  }

  .settings-tab-btn .snc-title {
    font-size: 12.5px !important;
  }

  .settings-tab-btn .snc-desc {
    font-size: 9.5px !important;
  }

  .settings-tab-btn .snc-dot {
    width: 7px !important;
    height: 7px !important;
  }
}

.settings-pane {
  display: none;
}

.settings-pane.is-active {
  display: block;
  animation: settingsPaneIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.settings-toggle-row:hover {
  border-color: var(--line-2);
}

.settings-toggle-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-toggle-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.settings-toggle-desc {
  font-size: 12px;
  color: var(--ink-sub);
}

/* ══════════════════════════════════════════════════════════
   MASTER MOBILE RESPONSIVE ENGINE (ALL ERP PAGES)
   ══════════════════════════════════════════════════════════ */

/* ── Tablet (<= 1024px) 2x2 KPI Count Grids ──────────────── */
@media (max-width: 1024px) {
  .dash-kpi-grid,
  .inward-kpis,
  .emp-stats-grid,
  .g-4,
  .g-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .inward-kpis > :last-child:nth-child(odd),
  .g-5 > :last-child:nth-child(odd),
  .g-4 > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .dash-kpi-grid > * {
    grid-column: auto !important;
  }
}

/* ── 1. Global Viewport, Shell & Layout Fixes ───────────── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .view {
    padding: 14px 12px 36px !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Appbar Clean Mobile Header */
  /* Appbar Clean Mobile Header */
  .appbar {
    padding: 0 12px !important;
    gap: 8px !important;
    height: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .ab-burger {
    display: grid !important;
    place-items: center !important;
    width: 34px !important;
    height: 34px !important;
    flex-shrink: 0 !important;
  }

  .ab-logo {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-right: 0 !important;
    margin-right: auto !important;
  }

  .logo-mark {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }

  .logo-text {
    font-size: 14px !important;
    font-weight: 700 !important;
  }

  .logo-text em {
    display: none !important;
  }

  .ab-right {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* Hide Branch selector on tablet/mobile screens */
  .ab-branch,
  .ab-branch-theme-select {
    display: none !important;
  }

  /* Hide physical keyboard Help icon button on touch devices */
  .ab-icon[data-action="help"] {
    display: none !important;
  }

  /* Retail POS Button - sleek mobile icon button */
  .ab-pos-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .ab-pos-btn span,
  .ab-pos-btn kbd {
    display: none !important;
  }

  /* Search button - sleek mobile icon button */
  .ab-search {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .ab-search span,
  .ab-search kbd {
    display: none !important;
  }

  /* Notifications bell */
  .ab-icon[data-action="notifications"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  /* User avatar pill */
  .ab-user {
    padding-left: 6px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin-left: 2px !important;
  }

  .user-meta {
    display: none !important;
  }

  .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }

  /* Footer */
  .appfoot {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 6px !important;
    padding: 12px 14px !important;
    font-size: 11px !important;
  }

  /* Page Headings */
  .page-head {
    padding: 16px 14px !important;
    gap: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    align-items: stretch !important;
  }

  .page-head h1 {
    font-size: 20px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.015em !important;
  }

  .page-head p {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }

  .page-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .page-actions .btn {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 120px !important;
    justify-content: center !important;
    padding: 9px 12px !important;
    font-size: 12.5px !important;
    text-align: center !important;
  }

  /* KPI & Count Grids Responsive (2 balanced columns on mobile & tablet) */
  .dash-kpi-grid,
  .inward-kpis,
  .emp-stats-grid,
  .g-4,
  .g-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .inward-kpis > :last-child:nth-child(odd),
  .g-5 > :last-child:nth-child(odd),
  .g-4 > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .dash-kpi-grid > * {
    grid-column: auto !important;
  }

  /* Compact luxury sizing for inward-kpi-card in 2x2 mode */
  .inward-kpi-card {
    padding: 12px 13px !important;
    border-radius: 12px !important;
  }

  .inward-kpi-top {
    margin-bottom: 8px !important;
    gap: 6px !important;
    align-items: flex-start !important;
  }

  .inward-kpi-lbl {
    font-size: 10px !important;
    letter-spacing: 0.03em !important;
    line-height: 1.25 !important;
    max-width: calc(100% - 34px) !important;
  }

  .inward-kpi-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 8px !important;
  }

  .inward-kpi-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  .inward-kpi-val {
    font-size: 18.5px !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
    word-break: break-word !important;
  }

  .inward-kpi-val small {
    font-size: 11.5px !important;
  }

  .inward-kpi-footnote {
    font-size: 10px !important;
    line-height: 1.3 !important;
    flex-wrap: wrap !important;
    gap: 3px !important;
  }

  .kpi {
    padding: 12px 12px !important;
    gap: 10px !important;
    border-radius: 11px !important;
  }

  .kpi-ico {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px !important;
    border-radius: 9px !important;
  }

  .kpi-ico svg {
    width: 17px !important;
    height: 17px !important;
  }

  .kpi-label {
    font-size: 10px !important;
    letter-spacing: 0.02em !important;
  }

  .kpi-value {
    font-size: 17px !important;
    line-height: 1.2 !important;
  }

  .kpi-foot {
    font-size: 10px !important;
  }

  /* Filter bars */
  .filterbar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  .filterbar .fb-label {
    display: none !important;
  }

  .filterbar input[type="search"],
  .filterbar input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    height: 38px !important;
    font-size: 13px !important;
  }

  .filterbar select,
  .filterbar .theme-select {
    flex: 1 1 calc(50% - 4px) !important;
    min-width: 115px !important;
    height: 36px !important;
    font-size: 12px !important;
  }

  .filterbar .fb-count {
    width: 100% !important;
    text-align: right !important;
    margin-top: 4px !important;
    font-size: 11px !important;
  }

  /* ── Table Pagination & Summary Bar (Responsive Mobile UI/UX) ── */
  .table-pagination-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Metric chips in balanced, clean 2-column grid */
  .tbl-pg-summary-strip {
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 8px !important;
    margin-bottom: 4px !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tbl-pg-summary-badge {
    display: none !important;
  }

  .tbl-pg-summary-chips,
  .tbl-pg-extra {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    padding-left: 0 !important;
    border-left: none !important;
    box-sizing: border-box !important;
  }

  .tbl-pg-summary-chips span,
  .tbl-pg-extra span {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    font-size: 11.5px !important;
    border-radius: 7px !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--line-2) !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tbl-pg-summary-chips > :last-child:nth-child(odd),
  .tbl-pg-extra > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  /* Main Row: Row 1 has Records Count & Page Size dropdown */
  .tbl-pg-main-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tbl-pg-info-group {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding-bottom: 8px !important;
    border-bottom: 1px dashed var(--line) !important;
    box-sizing: border-box !important;
  }

  .tbl-pg-info {
    font-size: 12px !important;
  }

  .tbl-pg-size-box {
    margin-left: auto !important;
  }

  .tbl-pg-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 8px !important;
    margin-left: 0 !important;
  }

  /* Row 2: Full-width touch-friendly pagination buttons */
  .tbl-pg-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 6px !important;
  }

  .tbl-pg-prev, .tbl-pg-next {
    flex: 1 1 0 !important;
    justify-content: center !important;
    min-height: 36px !important;
    font-size: 12.5px !important;
    border-radius: 8px !important;
  }

  .tbl-pg-current-pill {
    padding: 6px 12px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  /* Row 3: Full-width equal 50/50 action buttons, NO orphan left border! */
  .tbl-pg-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding-left: 0 !important;
    border-left: none !important;
    box-sizing: border-box !important;
  }

  .tbl-pg-actions .btn {
    flex: 1 1 0 !important;
    justify-content: center !important;
    min-height: 36px !important;
    font-size: 12px !important;
    background: var(--surface-2) !important;
    border: 1px solid var(--line-2) !important;
    border-radius: 8px !important;
  }

  /* Side Drawers full width on mobile */
  .drawer,
  .drawer.wide {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
  }

  .drawer-head {
    padding: 12px 16px !important;
  }

  .drawer-body {
    padding: 14px 16px !important;
    gap: 12px !important;
  }

  .drawer-foot {
    padding: 12px 16px !important;
  }

  /* Confirm Modal on mobile */
  .theme-confirm-card {
    width: calc(100vw - 28px) !important;
    max-width: 440px !important;
    margin: 14px !important;
    border-radius: 14px !important;
  }

  .theme-confirm-top {
    padding: 16px 16px 0 16px !important;
  }

  .theme-confirm-body {
    padding: 12px 16px 16px 16px !important;
  }

  .theme-confirm-actions {
    padding: 12px 16px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .theme-confirm-actions button {
    flex: 1 1 calc(50% - 4px) !important;
    justify-content: center !important;
  }
}

/* ── 2. POS Mobile Optimization ─────────────────────────── */
@media (max-width: 768px) {
  body.has-pos {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  body.has-pos .view {
    height: auto !important;
    min-height: calc(100vh - 54px) !important;
    overflow: visible !important;
    padding: 10px 10px 60px !important;
  }

  body.has-pos .pos-page {
    height: auto !important;
    gap: 12px !important;
  }

  .pos-header-lux {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .phl-stats {
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .phl-stat {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .posbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .posbar .pb-till {
    border-right: none !important;
    padding-right: 0 !important;
    width: 100% !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .posbar .pos-search {
    width: 100% !important;
    min-width: 0 !important;
  }

  .posbar .pos-search-input {
    width: 100% !important;
  }

  .pos {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  .pos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px !important;
    min-height: 280px !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .pos-tile-img {
    height: 140px !important;
  }

  .pos-tile-name {
    font-size: 13px !important;
  }

  .pos-tile-price {
    font-size: 13px !important;
  }

  .cart {
    width: 100% !important;
    position: static !important;
    margin-top: 8px !important;
    border-radius: 12px !important;
  }

  .cart .card-head {
    padding: 10px 14px !important;
  }
}

/* ── 3. Ultra-compact Phone screens (<= 480px) ───────────── */
@media (max-width: 480px) {
  .page-actions .btn {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .ms-panel {
    width: min(320px, 86vw) !important;
  }

  .filterbar select,
  .filterbar .theme-select {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  /* Client profile card on mobile */
  .client-profile-container {
    padding: 14px 14px !important;
    gap: 12px !important;
  }

  .client-hero-right {
    align-items: flex-start !important;
    width: 100% !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--line-2) !important;
  }
}

/* ══════════════════════════════════════════════════════════
   4. Executive Atelier Dashboard — Complete Mobile Engine
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ── A. Dashboard Container & Header ───────────────────── */
  .dash-head-wrap {
    flex-direction: column !important;
    padding: 14px 14px !important;
    gap: 14px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .dash-head-title-group {
    gap: 6px !important;
    width: 100% !important;
  }

  .dash-eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.08em !important;
    line-height: 1.3 !important;
    flex-wrap: wrap !important;
  }

  .dash-title-row {
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
  }

  .dash-title {
    font-size: 21px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
  }

  .dash-gateway-badge {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
  }

  .dash-time-badge {
    font-size: 10.5px !important;
    padding: 3px 8px !important;
    width: auto !important;
  }

  .dash-subtitle {
    font-size: 12px !important;
    line-height: 1.45 !important;
    color: var(--ink-2) !important;
    max-width: 100% !important;
  }

  /* Header action buttons: structured 2x2 grid */
  .dash-head-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .dash-head-actions .dash-act-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
    min-height: 38px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .dash-head-actions .dash-pos-cta {
    grid-column: 1 / -1 !important;
    order: -1 !important;
    min-height: 42px !important;
    font-size: 13.5px !important;
  }

  /* ── B. 4 KPI Cards in Strict 2x2 Overall Count Grid ───────────── */
  .dash-kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dash-kpi-grid > * {
    grid-column: auto !important;
    min-width: 0 !important;
  }

  .dash-kpi {
    padding: 10px 10px !important;
    border-radius: 10px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 104px !important;
  }

  .dash-kpi .inward-kpi-top {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 4px !important;
    gap: 6px !important;
  }

  .dash-kpi .inward-kpi-lbl {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    line-height: 1.25 !important;
    color: var(--ink-muted) !important;
  }

  .dash-kpi .inward-kpi-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 7px !important;
  }

  .dash-kpi .inward-kpi-icon svg {
    width: 15px !important;
    height: 15px !important;
  }

  .dash-kpi .inward-kpi-val {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .dash-kpi .inward-kpi-val small {
    font-size: 11px !important;
    font-weight: 500 !important;
  }

  .dash-kpi .inward-kpi-footnote {
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    color: var(--ink-sub) !important;
  }

  /* ── C. Split Analytics Section (Valuation & Channels) ── */
  .dash-split-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
  }

  .dash-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .dash-card-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .dash-card-title {
    font-size: 14.5px !important;
    line-height: 1.3 !important;
  }

  .dash-card-sub {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  /* Multi-color Stacked Share Bar & Legend */
  .dash-stacked-bar-wrap {
    padding: 10px 10px !important;
    margin-bottom: 14px !important;
    border-radius: 8px !important;
  }

  .dash-stacked-bar {
    height: 10px !important;
  }

  .dash-bar-legend {
    gap: 6px 12px !important;
    margin-top: 8px !important;
  }

  .dash-legend-item {
    font-size: 10.5px !important;
    gap: 5px !important;
  }

  .dash-legend-name {
    max-width: 120px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* SKU Valuation Rows */
  .dash-sku-list {
    gap: 8px !important;
  }

  .dash-sku-row {
    padding: 9px 10px !important;
    gap: 10px !important;
    align-items: center !important;
    border-radius: 8px !important;
  }

  .dash-sku-thumb {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 6px !important;
  }

  .dash-sku-details {
    min-width: 0 !important;
    gap: 3px !important;
  }

  .dash-sku-name-row {
    gap: 6px !important;
    align-items: center !important;
  }

  .dash-sku-name {
    font-size: 12.5px !important;
    max-width: calc(100vw - 220px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .dash-sku-val {
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }

  .dash-sku-meta-row {
    font-size: 10px !important;
    gap: 4px !important;
    line-height: 1.25 !important;
  }

  .dash-sku-action .btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    border-radius: 6px !important;
  }

  /* Card Footers */
  .dash-card-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding-top: 12px !important;
    margin-top: 12px !important;
    font-size: 11px !important;
  }

  .dash-foot-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .dash-foot-left .dash-dot {
    display: none !important;
  }

  .dash-link-action {
    font-size: 11.5px !important;
    padding: 4px 0 !important;
    display: inline-flex !important;
  }

  /* Right Card: Channel Pool Summary */
  .dash-channel-pool-summary {
    padding: 10px 12px !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    border-radius: 8px !important;
  }

  .dash-pool-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .dash-pool-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .dash-pool-title {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .dash-pool-sub {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }

  .dash-pool-qty {
    font-size: 15px !important;
  }

  .dash-channel-list {
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .dash-channel-item {
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }

  .dash-chan-head {
    font-size: 11.5px !important;
    margin-bottom: 5px !important;
  }

  .dash-chan-name {
    gap: 5px !important;
  }

  .dash-chan-type {
    font-size: 9.5px !important;
    padding: 1px 4px !important;
  }

  .dash-allocation-cta-box {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 8px !important;
  }

  .dash-allocation-cta-box .dash-cta-txt strong {
    font-size: 12px !important;
  }

  .dash-allocation-cta-box .dash-cta-txt p {
    font-size: 10.5px !important;
  }

  .dash-allocation-cta-box .btn {
    width: 100% !important;
    justify-content: center !important;
    height: 36px !important;
  }

  /* ── D. Master Stock Register & Valuation Table ───────── */
  .dash-table-card {
    border-radius: 12px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .inward-table-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }

  .inward-table-title-group {
    justify-content: space-between !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .inward-table-heading {
    font-size: 13.5px !important;
  }

  .inward-toolbar-controls {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .inward-toolbar-controls .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 7px 6px !important;
    font-size: 11.5px !important;
    text-align: center !important;
  }

  .inward-toolbar-controls .btn svg {
    margin-right: 2px !important;
  }

  /* Table Horizontal Scrolling container */
  .dash-table-card .tbl-wrap,
  .inward-table-card .tbl-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
  }

  /* Valuation Footer Strip in 2x2 Clean Grid on Mobile */
  .dash-valuation-footer-strip {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: #FAFBFD !important;
  }

  .dvf-divider {
    display: none !important;
  }

  .dvf-metric {
    gap: 1px !important;
  }

  .dvf-label {
    font-size: 9.5px !important;
  }

  .dvf-val {
    font-size: 12.5px !important;
  }

  .dvf-val.highlight {
    font-size: 13px !important;
  }

  .dvf-metric:last-child {
    grid-column: 1 / -1 !important;
  }

  /* ── E. Operational Telemetry Cards ────────────────────── */
  .dash-telemetry-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dash-telemetry-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .dash-tel-head {
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    gap: 6px !important;
  }

  .dash-tel-head h3 {
    font-size: 13px !important;
  }

  .dash-node-row {
    padding: 7px 8px !important;
    gap: 8px !important;
  }

  .dash-node-details strong {
    font-size: 11.5px !important;
  }

  .dash-node-details span {
    font-size: 10px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  .dash-spec-row {
    font-size: 11px !important;
    padding: 5px 0 !important;
  }

  .dash-spec-row code {
    font-size: 10.5px !important;
    word-break: break-all !important;
  }

  .dash-quick-links {
    gap: 6px !important;
  }

  .dash-quick-btn {
    padding: 8px 10px !important;
    gap: 10px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
  }

  .dash-qb-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
  }

  .dash-qb-txt strong {
    font-size: 11.5px !important;
  }

  .dash-qb-txt span {
    font-size: 10px !important;
  }
}

/* ── F. Ultra-compact phone screens (<= 380px) ──────────── */
@media (max-width: 380px) {
  .dash-head-actions {
    grid-template-columns: 1fr !important;
  }

  /* Keep 2x2 grid strictly intact on ultra-compact mobile */
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .dash-kpi {
    padding: 8px 8px !important;
    min-height: 96px !important;
  }

  .dash-kpi .inward-kpi-lbl {
    font-size: 9px !important;
    letter-spacing: 0.01em !important;
  }

  .dash-kpi .inward-kpi-val {
    font-size: 15.5px !important;
  }

  .dash-kpi .inward-kpi-val small {
    font-size: 9.5px !important;
  }

  .dash-kpi .inward-kpi-footnote {
    font-size: 8.5px !important;
  }

  .dash-valuation-footer-strip {
    grid-template-columns: 1fr !important;
  }

  .inward-toolbar-controls {
    grid-template-columns: 1fr !important;
  }

  .dash-sku-name {
    max-width: calc(100vw - 180px) !important;
  }
}




