/* =========================================================
   ASSIL MALL — DESIGN TOKENS
   Every interactive surface is "soft UI": same tone as its
   background, shaped only by paired light/dark shadows —
   no hard 1px borders anywhere in the app chrome. The one
   deliberate exception is the dashed "stitch" seam, a nod
   to garment tags, and the printed paper ticket, which
   needs real ink lines like any physical receipt.
   ========================================================= */
:root, :root[data-theme="light"]{
  --bg:#EEF2F6;
  --bg-alt:#E2E8F0;
  --surface:#FFFFFF;
  --surface-2:#E2E8F0;
  --card:#FFFFFF;
  --ink:#0F172A;
  --ink-soft:#334155;
  --ink-faint:#64748B;
  --brand:#4F46E5;
  --brand-rgb:79, 70, 229;
  --brand-deep:#3730A3;
  --brand-ink:#312E81;
  --brand-bg:rgba(79,70,229,.10);
  --danger:#D51C51;
  --danger-bg:rgba(213,28,81,.10);
  --sage:#10B981;
  --sage-bg:#ECFDF5;
  --border:rgba(15,23,42,.15);
  --border-subtle:rgba(15,23,42,.08);
  --seam:rgba(15,23,42,.12);
  --shadow-flat:none;
  --shadow-soft:0 2px 8px -1px rgba(15,23,42,0.08), 0 1px 4px -1px rgba(15,23,42,0.05);
  --shadow-sm:0 1px 3px 0 rgba(15,23,42,0.10), 0 1px 2px -1px rgba(15,23,42,0.08);
  --shadow-raised:0 10px 20px -3px rgba(15,23,42,0.10), 0 4px 6px -2px rgba(15,23,42,0.05);
  --shadow:0 10px 25px -3px rgba(15,23,42,0.10), 0 4px 10px -2px rgba(15,23,42,0.05);
  --shadow-floating:0 20px 35px -5px rgba(15,23,42,0.15), 0 10px 15px -5px rgba(15,23,42,0.08);
  --shadow-inset:inset 0 2px 4px 0 rgba(0,0,0,0.06);
  --shadow-focus:0 0 0 3px rgba(79,70,229,0.18), 0 0 0 1.5px var(--brand);
  --scrim:rgba(15,23,42,.45);
  --radius-xs:6px;
  --radius-sm:9px;
  --radius-md:13px;
  --radius-lg:16px;
  --radius-xl:22px;
  --radius-full:9999px;
}
:root[data-theme="dark"]{
  --bg:#0A0E17;
  --bg-alt:#101726;
  --surface:#151D2E;
  --surface-2:#1E293F;
  --card:#151D2E;
  --ink:#F8FAFC;
  --ink-soft:#94A3B8;
  --ink-faint:#64748B;
  --brand:#6366F1;
  --brand-rgb:99, 102, 241;
  --brand-deep:#818CF8;
  --brand-ink:#E0E7FF;
  --brand-bg:rgba(99,102,241,.18);
  --danger:#E11D48;
  --danger-bg:rgba(225,29,72,.20);
  --sage:#34D399;
  --sage-bg:#064E3B;
  --border:rgba(255,255,255,.14);
  --border-subtle:rgba(255,255,255,.08);
  --seam:rgba(248,250,252,.12);
  --shadow-flat:none;
  --shadow-soft:0 2px 10px -2px rgba(0,0,0,0.5);
  --shadow-sm:0 2px 8px -1px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  --shadow-raised:0 10px 25px -5px rgba(0,0,0,0.5);
  --shadow:0 10px 25px -5px rgba(0,0,0,0.5);
  --shadow-floating:0 20px 45px -10px rgba(0,0,0,0.7), 0 12px 20px -8px rgba(0,0,0,0.4);
  --shadow-inset:inset 0 2px 4px 0 rgba(0,0,0,0.4);
  --shadow-focus:0 0 0 3px rgba(99,102,241,0.25), 0 0 0 1.5px var(--brand);
  --scrim:rgba(0,0,0,.75);
  --radius-xs:6px;
  --radius-sm:9px;
  --radius-md:13px;
  --radius-lg:16px;
  --radius-xl:22px;
  --radius-full:9999px;
}
:root[data-theme="neumorphic"]{
  --bg:#E2E7ED;
  --bg-alt:#D5DDE6;
  --surface:#EEF2F6;
  --surface-2:#DEE4EB;
  --surface-raised:#F7F9FC;
  --surface-inset:#D5DDE6;
  --card:#EEF2F6;
  --ink:#0F172A;
  --ink-soft:#334155;
  --ink-faint:#475569;
  --brand:#4F46E5;
  --brand-deep:#3730A3;
  --brand-ink:#312E81;
  --brand-bg:rgba(79,70,229,.14);
  --danger:#E11D48;
  --danger-bg:rgba(225,29,72,.14);
  --sage:#059669;
  --sage-bg:rgba(5,150,105,.14);
  --border:rgba(148,163,184,.40);
  --border-subtle:rgba(148,163,184,.24);
  --seam:rgba(255,255,255,.85);
  --shadow-flat:none;
  --shadow-soft: 3px 3px 8px rgba(148,163,184,.60), -3px -3px 8px rgba(255,255,255,.98), 0 1px 3px rgba(15,23,42,.05);
  --shadow-sm: 2px 2px 5px rgba(148,163,184,.50), -2px -2px 5px rgba(255,255,255,.95);
  --shadow-raised: 6px 6px 14px rgba(148,163,184,.65), -5px -5px 14px rgba(255,255,255,1), 0 3px 8px rgba(15,23,42,.06);
  --shadow: 6px 6px 14px rgba(148,163,184,.65), -5px -5px 14px rgba(255,255,255,1), 0 3px 8px rgba(15,23,42,.06);
  --shadow-floating: 9px 9px 24px rgba(148,163,184,.70), -8px -8px 22px #ffffff, 0 16px 36px rgba(15,23,42,.12);
  --shadow-inset: inset 2px 2px 5px rgba(148,163,184,.65), inset -2px -2px 5px rgba(255,255,255,.95);
  --shadow-focus:0 0 0 3.5px rgba(79,70,229,0.22), 0 0 0 1.5px var(--brand);
  --scrim:rgba(15,23,42,.45);
  --radius-xs:6px;
  --radius-sm:9px;
  --radius-md:13px;
  --radius-lg:16px;
  --radius-xl:22px;
  --radius-full:9999px;
}
:root[data-theme="neumorphic-dark"]{
  --bg:#0E1117;
  --bg-alt:#141820;
  --surface:#181F2C;
  --surface-2:#222C3E;
  --surface-raised:#283448;
  --surface-inset:#12161E;
  --card:#181F2C;
  --ink:#F9FAFB;
  --ink-soft:#9CA3AF;
  --ink-faint:#6B7280;
  --brand:#6366F1;
  --brand-deep:#818CF8;
  --brand-ink:#E0E7FF;
  --brand-bg:rgba(99,102,241,.20);
  --danger:#F43F5E;
  --danger-bg:rgba(244,63,94,.20);
  --sage:#10B981;
  --sage-bg:rgba(16,185,129,.20);
  --border:rgba(255,255,255,.14);
  --border-subtle:rgba(255,255,255,.08);
  --seam:rgba(255,255,255,.10);
  --shadow-flat:none;
  --shadow-soft: 3px 3px 8px rgba(0,0,0,.75), -2px -2px 6px rgba(255,255,255,.07);
  --shadow-sm: 2px 2px 5px rgba(0,0,0,.65), -2px -2px 5px rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.08);
  --shadow-raised: 6px 6px 16px rgba(0,0,0,.85), -4px -4px 12px rgba(255,255,255,.09);
  --shadow: 6px 6px 16px rgba(0,0,0,.85), -4px -4px 12px rgba(255,255,255,.09);
  --shadow-floating: 10px 10px 24px rgba(0,0,0,.92), -6px -6px 18px rgba(255,255,255,.10), 0 20px 40px rgba(0,0,0,.60);
  --shadow-inset: inset 3px 3px 6px rgba(0,0,0,.80), inset -2px -2px 5px rgba(255,255,255,.06);
  --shadow-focus:0 0 0 3.5px rgba(99,102,241,0.25), 0 0 0 1.5px var(--brand);
  --scrim:rgba(0,0,0,.80);
  --radius-xs:6px;
  --radius-sm:9px;
  --radius-md:13px;
  --radius-lg:16px;
  --radius-xl:22px;
  --radius-full:9999px;
}
:root[data-theme="warm-ceramic"]{
  --bg:#E8E5DE;
  --bg-alt:#DFDBD2;
  --surface:#F7F6F2;
  --surface-2:#E4E0D7;
  --surface-raised:#FFFFFF;
  --surface-inset:#DFDAD1;
  --card:#F7F6F2;
  --ink:#1D2022;
  --ink-soft:#484B4E;
  --ink-faint:#7D8082;
  --brand:#2B2F31;
  --brand-rgb:43, 47, 49;
  --brand-deep:#1A1C1D;
  --brand-ink:#FFFFFF;
  --brand-bg:rgba(43,47,49,.10);
  --accent-pop:#EEF835;
  --accent-pop-ink:#1D2022;
  --danger:#E11D48;
  --danger-bg:rgba(225,29,72,.12);
  --sage:#10B981;
  --sage-bg:rgba(16,185,129,.12);
  --border:rgba(43,47,49,.10);
  --border-subtle:rgba(43,47,49,.05);
  --seam:rgba(43,47,49,.14);
  --shadow-flat:none;
  --shadow-soft: 0 4px 14px -2px rgba(60,56,48,0.07), 0 1px 4px -1px rgba(60,56,48,0.04);
  --shadow-sm: 0 2px 6px -1px rgba(60,56,48,0.08), 0 0 0 1px rgba(43,47,49,0.06);
  --shadow-raised: 0 12px 26px -4px rgba(60,56,48,0.10), 0 4px 8px -2px rgba(60,56,48,0.04);
  --shadow: 0 12px 28px -4px rgba(60,56,48,0.10);
  --shadow-floating: 0 22px 42px -6px rgba(60,56,48,0.14), 0 8px 16px -4px rgba(60,56,48,0.06);
  --shadow-inset: inset 0 2px 5px rgba(60,56,48,0.06);
  --shadow-focus: 0 0 0 3px rgba(43,47,49,0.18), 0 0 0 1.5px var(--brand);
  --scrim: rgba(29,32,34,.55);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
}
:root[data-theme="obsidian-frost"]{
  --bg:#EEF1F5;
  --bg-alt:#E4E8EE;
  --surface:#FFFFFF;
  --surface-2:#EAEFF5;
  --surface-raised:#FFFFFF;
  --surface-inset:#E5EAF1;
  --card:#FFFFFF;
  --ink:#121316;
  --ink-soft:#45484E;
  --ink-faint:#888C94;
  --brand:#141518;
  --brand-rgb:20, 21, 24;
  --brand-deep:#050506;
  --brand-ink:#FFFFFF;
  --brand-bg:rgba(20,21,24,.09);
  --danger:#DC2626;
  --danger-bg:rgba(220,38,38,.10);
  --sage:#059669;
  --sage-bg:rgba(5,150,105,.10);
  --border:rgba(18,19,22,.10);
  --border-subtle:rgba(18,19,22,.05);
  --seam:rgba(18,19,22,.12);
  --shadow-flat:none;
  --shadow-soft: 0 4px 18px -2px rgba(18,22,30,0.06), 0 1px 3px 0 rgba(18,22,30,0.03);
  --shadow-sm: 0 2px 6px -1px rgba(18,22,30,0.07), 0 0 0 1px rgba(18,19,22,0.05);
  --shadow-raised: 0 14px 30px -4px rgba(18,22,30,0.09), 0 4px 10px -2px rgba(18,22,30,0.04);
  --shadow: 0 14px 30px -4px rgba(18,22,30,0.09);
  --shadow-floating: 0 24px 48px -8px rgba(18,22,30,0.14), 0 0 0 1px rgba(18,19,22,0.05);
  --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.04);
  --shadow-focus: 0 0 0 3px rgba(20,21,24,0.18), 0 0 0 1.5px var(--brand);
  --scrim: rgba(18,19,22,.60);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}
:root[data-theme="glacier-frost"]{
  --bg:#E5EEF5;
  --bg-alt:#D9E5F0;
  --surface:#F4F8FB;
  --surface-2:#DBE6F0;
  --surface-raised:#FFFFFF;
  --surface-inset:#D5E3EE;
  --card:#F4F8FB;
  --ink:#142030;
  --ink-soft:#486076;
  --ink-faint:#7D95AA;
  --brand:#121B2A;
  --brand-rgb:18, 27, 42;
  --brand-deep:#0B111A;
  --brand-ink:#FFFFFF;
  --brand-bg:rgba(18,27,42,.10);
  --danger:#E11D48;
  --danger-bg:rgba(225,29,72,.12);
  --sage:#0D9488;
  --sage-bg:rgba(13,148,136,.12);
  --border:rgba(50,80,110,.12);
  --border-subtle:rgba(50,80,110,.06);
  --seam:rgba(50,80,110,.15);
  --shadow-flat:none;
  --shadow-soft: 3px 3px 10px rgba(158,183,204,0.50), -3px -3px 10px #FFFFFF;
  --shadow-sm: 2px 2px 6px rgba(158,183,204,0.45), -2px -2px 6px #FFFFFF, 0 0 0 1px rgba(50,80,110,0.06);
  --shadow-raised: 6px 6px 16px rgba(158,183,204,0.55), -5px -5px 16px #FFFFFF;
  --shadow: 6px 6px 16px rgba(158,183,204,0.55), -5px -5px 16px #FFFFFF;
  --shadow-floating: 10px 10px 26px rgba(158,183,204,0.60), -8px -8px 24px #FFFFFF, 0 16px 36px rgba(18,27,42,0.08);
  --shadow-inset: inset 2px 2px 5px rgba(158,183,204,0.55), inset -2px -2px 5px #FFFFFF;
  --shadow-focus: 0 0 0 3px rgba(18,27,42,0.18), 0 0 0 1.5px var(--brand);
  --scrim: rgba(20,32,48,.55);
  --radius-xs: 7px;
  --radius-sm: 11px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;
}
:root[data-theme="bento-wireframe"]{
  --bg: #181A1E;
  --bg-alt: #22252A;
  --surface: #2B2E34;
  --surface-2: #212328;
  --surface-raised: #343840;
  --surface-inset: #1A1C20;
  --card: #2B2E34;
  --ink: #FFFFFF;
  --ink-soft: #D3D7DF;
  --ink-faint: #98A2B3;
  --brand: #E4E7EC;
  --brand-rgb: 228, 231, 236;
  --brand-deep: #FFFFFF;
  --brand-ink: #141619;
  --brand-bg: rgba(255, 255, 255, 0.12);
  --danger: #FF4D6D;
  --danger-bg: rgba(255, 77, 109, 0.18);
  --sage: #2DD4BF;
  --sage-bg: rgba(45, 212, 191, 0.18);
  --border: #FFFFFF;
  --border-subtle: rgba(255, 255, 255, 0.45);
  --seam: #FFFFFF;
  --shadow-flat: none;
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45), 0 0 0 1.5px rgba(255, 255, 255, 0.4);
  --shadow-raised: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 0 2px #FFFFFF;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 0 2px #FFFFFF;
  --shadow-floating: 0 22px 48px rgba(0, 0, 0, 0.85), 0 0 0 2.5px #FFFFFF;
  --shadow-inset: inset 0 2px 6px rgba(0, 0, 0, 0.55);
  --shadow-focus: 0 0 0 3.5px rgba(255, 255, 255, 0.4), 0 0 0 2px #FFFFFF;
  --scrim: rgba(12, 13, 16, 0.85);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-full: 9999px;
}
*{box-sizing:border-box; outline:none !important; border-style:none !important;}
html,body{margin:0;padding:0;}
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Plus Jakarta Sans','Tajawal',system-ui,-apple-system,sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
.display{ font-family:'Plus Jakarta Sans','Tajawal',system-ui,-apple-system,sans-serif; font-weight:800; letter-spacing:-0.02em; }
[dir="rtl"] .display{ font-family:'Tajawal','Plus Jakarta Sans',system-ui,-apple-system,sans-serif; font-weight:800; letter-spacing:0; }
.mono{font-family:'Consolas','SFMono-Regular','Courier New',monospace;}
.ltr-num{direction:ltr; unicode-bidi:isolate; display:inline-block;}
button, input, select, textarea{font-family:inherit; color:inherit; border:none; outline:none;}
a{color:inherit;}
::selection{background:var(--brand); color:#fff;}
.flex-between{display:flex; justify-content:space-between; align-items:center;}
:focus-visible{outline:2.5px solid var(--brand); outline-offset:2px; border-radius:8px;}
@media (prefers-reduced-motion: reduce){ *{animation-duration:.001ms !important; transition-duration:.001ms !important;} }

/* Targeted micro-interactions for interactive controls only */
.nav-item, .icon-btn, .pill-btn, .btn, .product-pill, .emp-chip, .user-dropdown-item, .topbar-btn {
  transition: box-shadow 0.16s ease, transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-item:active, .icon-btn:active, .pill-btn:active, .btn:active, .product-pill:active, .emp-chip:active{ transform:scale(0.96); }

/* Blazing fast theme-switch bypass: disables CSS animation lag during theme toggle */
.theme-switching,
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: none !important;
  animation-duration: 0.001ms !important;
}
/* ---------- hide scrollbars globally ---------- */
*, *::before, *::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ---------- layout shell ---------- */
.app-shell{display:flex; min-height:100vh; background:var(--bg);}
.sidebar{
  width:238px; flex-shrink:0; background:var(--surface); padding:20px 15px;
  display:flex; flex-direction:column; gap:18px; position:sticky; top:0;
  height:100vh; overflow-y:auto; z-index:10; border-inline-end: 1px solid var(--border);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed{
  width:72px; padding:20px 10px;
}
.sidebar-brand{
  display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:16px;
  position:relative; transition:background 0.2s ease;
}
.sidebar.collapsed .sidebar-brand{
  justify-content:center; padding:8px 0; cursor:pointer;
}
.sidebar.collapsed .sidebar-brand:hover{
  background:rgba(0,0,0,0.04);
}
[data-theme="dark"] .sidebar.collapsed .sidebar-brand:hover{
  background:rgba(255,255,255,0.06);
}
.sidebar-toggle-btn{
  width:26px; height:26px; border-radius:8px; border:none; background:transparent;
  color:var(--ink-soft); display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0; transition:all 0.15s ease;
}
.sidebar-toggle-btn:hover{
  color:var(--brand); background:rgba(0,0,0,0.05);
}
[data-theme="dark"] .sidebar-toggle-btn:hover{
  background:rgba(255,255,255,0.08);
}
/* In collapsed mode, expand button on logo is visible ONLY when hovering over the logo */
.sidebar.collapsed .sidebar-brand-toggle{
  position:absolute; top:50%; left:50%; transform:translate(-50%, -50%);
  opacity:0; visibility:hidden; pointer-events:none;
  background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-sm);
  width:32px; height:32px; border-radius:10px; z-index:5;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.sidebar.collapsed .sidebar-brand:hover .sidebar-brand-toggle{
  opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%, -50%) scale(1.05);
}
.brand-mark-img{height:34px; width:auto; flex-shrink:0; display:block;}
.brand-lockup-img{height:110px; width:auto; flex-shrink:0; display:block;}
.logo-accent{fill:var(--brand, #4F46E5) !important; transition:fill 0.25s ease;}
.brand-name{font-size:16px; line-height:1.1;}
.brand-tagline{font-size:9.5px; color:var(--ink-faint); letter-spacing:.03em; margin-top:2px;}
.nav-list{display:flex; flex-direction:column; gap:3px; flex:1; overflow-y:auto;}
.nav-item{
  display:flex; align-items:center; gap:11px; padding:7px 11px; border-radius:12px;
  color:var(--ink-soft); font-size:13px; font-weight:700; cursor:pointer; border:none;
  background:transparent; text-align:start; width:100%; box-shadow:none; flex-shrink:0;
  transition:all 0.15s ease;
}
.nav-item svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
}
.nav-item:hover{color:var(--ink); background:rgba(0,0,0,0.03);}
[data-theme="dark"] .nav-item:hover{background:rgba(255,255,255,0.04);}
.nav-item.active{
  background:var(--brand-bg, rgba(79,70,229,0.1));
  color:var(--brand);
  font-weight:800;
  border-radius:12px;
  margin:0;
  padding:7px 11px;
  position:relative;
  z-index:2;
  border:1px solid rgba(79, 70, 229, 0.15);
  box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .nav-item.active{
  background:rgba(99, 102, 241, 0.18);
  color:var(--brand);
  border-color:rgba(99, 102, 241, 0.28);
}
.nav-item.active:hover{
  background:rgba(79, 70, 229, 0.16);
  color:var(--brand);
}
[data-theme="dark"] .nav-item.active:hover{
  background:rgba(99, 102, 241, 0.26);
}
[dir="rtl"] .nav-item.active{
  border-radius:12px;
  margin:0;
  padding:7px 11px;
}
/* Collapsed nav item & footer styling */
.sidebar.collapsed .nav-item{
  justify-content:center; padding:7px 0; margin-right:0 !important; margin-left:0 !important;
  border-radius:12px !important;
}
.sidebar.collapsed .nav-item svg{
  width:21px !important; height:21px !important;
}
.sidebar.collapsed .nav-item.active{
  background:rgba(79,70,229,0.12) !important; color:var(--brand) !important;
}
[data-theme="dark"] .sidebar.collapsed .nav-item.active{
  background:rgba(99,102,241,0.2) !important;
}
.sidebar.collapsed .nav-label,
.sidebar.collapsed .foot-text{
  display:none !important;
}
.sidebar.collapsed .sidebar-foot .pill-btn{
  justify-content:center; padding:0; width:100%;
}
.sidebar-foot{padding-top:6px; display:flex; flex-direction:column; gap:4px;}

.bottomnav{display:none;}

.main-col{flex:1; min-width:0; display:flex; flex-direction:column; background:var(--bg);}
.topbar{ display:flex; align-items:center; justify-content:space-between; width:100%; padding:14px 26px; background:var(--bg); position:sticky; top:0; z-index:20; box-sizing:border-box; gap:12px; border-bottom: 1px solid var(--border); }
.topbar-title{display:none;}
.topbar-center{display:none;}
.topbar-start{display:flex; align-items:center; gap:8px; flex-shrink:0;}
.topbar-end{display:flex; align-items:center; gap:8px; flex-shrink:0; margin-inline-start:auto;}
.topbar-actions{display:flex; align-items:center; gap:9px; flex-wrap:wrap;}
.icon-btn{ width:37px; height:37px; border-radius:13px; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow:var(--shadow-sm); flex-shrink:0; transition:all 0.2s ease; }
.icon-btn:hover{color:var(--brand);}
.icon-btn:active{box-shadow:var(--shadow-inset);}
.icon-btn.active{color:var(--brand); background:rgba(79, 70, 229, 0.12); box-shadow:var(--shadow-sm);}
[data-theme="dark"] .icon-btn.active{color:#818cf8; background:rgba(99, 102, 241, 0.2);}
.icon-btn-sm{width:29px; height:29px; border-radius:10px;}
.pill-btn{ height:37px; padding:0 14px; border-radius:13px; border:1px solid var(--border); background:var(--surface); color:var(--ink-soft); display:flex; align-items:center; gap:7px; cursor:pointer; font-size:12.5px; font-weight:700; box-shadow:var(--shadow-sm); }
.pill-btn:hover{color:var(--brand);}
.pill-btn:active{box-shadow:var(--shadow-inset);}
.sync-chip .pill-btn{cursor:default;}
.user-chip{display:flex; align-items:center; gap:9px; padding-inline-start:8px;}
.avatar{ width:33px;height:33px;border-radius:50%; background:var(--brand); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0; box-shadow:var(--shadow-sm); }
.user-chip-meta{line-height:1.15;}
.user-chip-name{font-size:12.5px; font-weight:700;}
.user-chip-role{font-size:10.5px; color:var(--ink-faint); text-transform:capitalize;}

/* Smooth Expanding Hover Buttons for Header Status & Account */
.pill-expandable {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 37px;
  padding: 0 11px;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.pill-expandable:hover {
  gap: 8px;
  padding: 0 14px 0 11px;
  color: var(--ink);
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.14);
}

.pill-expandable .pill-expand-text {
  max-width: 0;
  opacity: 0;
  transform: translateX(-4px);
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
}

[dir="rtl"] .pill-expandable .pill-expand-text {
  transform: translateX(4px);
}

.pill-expandable:hover .pill-expand-text {
  max-width: 220px;
  opacity: 1;
  transform: translateX(0);
}

/* User Account Expandable Pill */
.user-chip-expandable {
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 37px;
  padding: 2px 2px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}

.user-chip-expandable:hover {
  gap: 8px;
  padding-inline-end: 8px;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.14);
}

.user-chip-expandable .user-chip-meta {
  max-width: 0;
  opacity: 0;
  transform: translateX(-4px);
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  text-align: start;
}

[dir="rtl"] .user-chip-expandable .user-chip-meta {
  transform: translateX(4px);
}

.user-chip-expandable:hover .user-chip-meta {
  max-width: 160px;
  opacity: 1;
  transform: translateX(0);
}

/* Embedded logout button revealed inside expandable user chip on hover */
.user-chip-expandable .user-chip-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: var(--surface-2);
  color: var(--danger, #ef4444);
  cursor: pointer;
  max-width: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease, background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.user-chip-expandable .user-chip-logout:hover {
  background: var(--danger-bg, rgba(239, 68, 68, 0.15));
  color: var(--danger, #dc2626);
}

.user-chip-expandable:hover .user-chip-logout {
  max-width: 28px;
  opacity: 1;
  pointer-events: auto;
  margin-inline-start: 4px;
}

/* User Account Wrapper */
.user-account-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.user-chip-expandable.active-chip {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-bg, rgba(79, 70, 229, 0.2));
}

/* User Dropdown Menu Underneath (Opened on Click) */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 145px;
  min-width: 135px;
  max-width: calc(100vw - 20px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 7px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: userDropdownPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
  box-sizing: border-box;
}

[dir="rtl"] .user-dropdown-menu {
  transform-origin: top left;
}

@keyframes userDropdownPop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.user-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 2px 7px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.user-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-role {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  text-align: start;
}

.user-dropdown-item:hover {
  background: var(--brand-bg, rgba(79, 70, 229, 0.1));
  color: var(--brand);
  border-color: var(--brand);
}

.user-dropdown-item-left {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 1px 0;
  width: 100%;
}

.user-dropdown-logout-btn {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 8px;
  background: var(--danger-bg, rgba(239, 68, 68, 0.1));
  color: var(--danger, #ef4444);
  border: 1px solid rgba(239, 68, 68, 0.25);
  cursor: pointer;
  transition: all 0.18s ease;
}

.user-dropdown-logout-btn:hover {
  background: var(--danger, #ef4444);
  color: #ffffff;
  border-color: var(--danger, #ef4444);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Hotkey Badge Styling */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  user-select: none;
}

/* Universal Tactile On/Off Toggle Button Switch for Checkboxes */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  width: 44px !important;
  height: 24px !important;
  min-width: 44px;
  border-radius: 9999px !important;
  background: var(--surface-2, #E2E8F0) !important;
  border: 1.5px solid var(--border, rgba(15,23,42,.15)) !important;
  cursor: pointer;
  outline: none !important;
  display: inline-block;
  vertical-align: middle;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s ease !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 0;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.2s ease,
              width 0.15s ease;
}

/* Checked (ON) State */
input[type="checkbox"]:checked {
  background: var(--brand, #4F46E5) !important;
  border-color: var(--brand, #4F46E5) !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35) !important;
}

input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background: #ffffff;
}

/* RTL Support */
[dir="rtl"] input[type="checkbox"]::after {
  left: auto;
  right: 2.5px;
}

[dir="rtl"] input[type="checkbox"]:checked::after {
  transform: translateX(-20px);
}

/* Hover & Focus state */
input[type="checkbox"]:hover {
  filter: brightness(1.05);
}

input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.28) !important;
}

/* Pressed / Active effect */
input[type="checkbox"]:active::after {
  width: 20px;
}

.content{padding:22px 26px 90px; flex:1; min-width:0; max-width:100%; box-sizing:border-box; overflow-x:clip;}
.show-on-mobile,
.show-on-mobile-flex,
.show-on-mobile-block {
  display: none !important;
}
@media (max-width:880px){
  .sidebar{display:none !important;}
  .content{padding:12px 12px 84px !important; min-width:0; max-width:100%; box-sizing:border-box;}
  .hide-on-mobile { display: none !important; }
  .show-on-mobile { display: inline-block !important; }
  .show-on-mobile-flex { display: flex !important; }
  .show-on-mobile-block { display: block !important; }
  
  /* Separated Balanced Topbar on Small Screens */
  .topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    min-height: 58px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 8px !important;
    position: sticky !important;
  }
  .topbar-center {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5 !important;
    padding: 4px 12px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    user-select: none;
    transition: transform 0.14s ease, opacity 0.14s ease;
  }
  .topbar-center:active {
    transform: translate(-50%, -50%) scale(0.92);
  }
  .topbar-center .brand-mark-img,
  .topbar-center .brand-lockup-img,
  .topbar-center img {
    height: 38px !important;
    max-height: 40px !important;
    margin: 0 4px !important;
    width: auto !important;
    display: block !important;
    object-fit: contain !important;
  }
  .topbar-start {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    z-index: 6;
  }
  .topbar-end {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    margin-inline-start: auto !important;
    z-index: 6;
  }
  .topbar-lang-btn,
  .topbar-theme-btn,
  .topbar-settings-btn {
    display: none !important;
  }
  
  /* Cloud Sync Mini Chip */
  .sync-chip {
    display: flex !important;
  }
  .sync-chip .pill-btn {
    padding: 0 8px !important;
    height: 34px !important;
    border-radius: 11px !important;
    gap: 4px !important;
  }
  .sync-chip span:not(.badge):not(.sync-dot) {
    display: none !important;
  }

  /* Compact Header Status and User Controls */
  .pill-expandable {
    height: 34px !important;
    padding: 0 8px !important;
    border-radius: 11px !important;
  }
  .pill-expandable .pill-expand-text {
    display: none !important;
  }
  .user-account-wrapper {
    order: 99 !important;
    margin-inline-start: 2px !important;
  }
  .user-chip-expandable {
    height: 34px !important;
    padding: 2px !important;
    border-radius: 11px !important;
  }
  .user-chip-expandable:hover {
    gap: 0 !important;
    padding-inline-end: 2px !important;
  }
  .user-chip-expandable .user-chip-meta {
    display: none !important;
  }
  .user-chip-expandable .user-chip-logout {
    display: none !important;
  }
  .user-chip-meta {
    display: none !important;
  }
  .icon-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
  }
  .avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 11px !important;
  }
  
  /* Mobile Input Zoom Prevention & Form Ergonomics */
  .input, .select, select, textarea.input {
    font-size: 16px !important; /* Prevents auto-zoom jump on mobile tap */
    height: 44px;
    border-radius: 14px;
  }
  textarea.input {
    height: auto !important;
  }
  .modal-overlay {
    padding: 8px !important;
  }
  .modal {
    max-height: 92dvh !important;
    border-radius: 20px !important;
  }
  .modal-head {
    padding: 14px 16px !important;
  }
  .modal-body {
    padding: 0 16px 16px !important;
    max-height: calc(92dvh - 65px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Sleek Minimalist Mobile Bottom Navigation Bar (No Halo, Crisp Active State) */
  .bottomnav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
    z-index: 100;
    padding: 3px 6px;
    padding-bottom: max(4px, env(safe-area-inset-bottom, 4px));
    align-items: center;
    justify-content: space-around;
    gap: 2px;
    box-sizing: border-box;
  }
  .bottomnav::-webkit-scrollbar { display: none; }
  .bottomnav-item {
    flex: 1;
    min-width: 44px;
    max-width: 72px;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent !important;
    color: var(--ink-secondary);
    opacity: 0.65;
    cursor: pointer;
    position: relative;
    padding: 2px 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.18s ease, opacity 0.18s ease;
  }
  .bottomnav-item:active {
    transform: scale(0.94);
  }
  .bottomnav-item:hover {
    color: var(--ink);
    opacity: 0.9;
  }
  .bottomnav-icon-wrap {
    width: 36px;
    height: 26px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    box-shadow: none !important;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .bottomnav-item svg {
    width: 21px !important;
    height: 21px !important;
    flex-shrink: 0;
    color: inherit;
    stroke: currentColor !important;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  /* Inactive State: Icon-only, label hidden */
  .bottomnav-item:not(.active) .bottomnav-label {
    display: none !important;
  }
  /* Active State: Selected Icon is Bigger & Has Same Main Color Used in Theme (Zero Card Halo) */
  .bottomnav-item.active {
    color: var(--brand) !important;
    opacity: 1 !important;
  }
  .bottomnav-item.active .bottomnav-icon-wrap {
    width: 38px !important;
    height: 29px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: none !important;
    color: var(--brand) !important;
  }
  .bottomnav-item.active svg {
    width: 27px !important;
    height: 27px !important;
    transform: scale(1.08) translateY(-1px) !important;
    color: var(--brand) !important;
    stroke: var(--brand) !important;
    stroke-width: 2.6 !important;
    filter: drop-shadow(0 2px 5px rgba(var(--brand-rgb, 79, 70, 229), 0.4)) !important;
  }
  [data-theme="dark"] .bottomnav-item.active svg {
    color: var(--brand) !important;
    stroke: var(--brand) !important;
    filter: drop-shadow(0 2px 6px rgba(var(--brand-rgb, 99, 102, 241), 0.45)) !important;
  }
  .bottomnav-item.active .bottomnav-label {
    display: block !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    color: var(--brand) !important;
    line-height: 1 !important;
    margin-top: 1px !important;
    white-space: nowrap !important;
    text-align: center !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
    animation: bottomnavLabelPop 0.18s ease-out;
  }
  [data-theme="dark"] .bottomnav-item.active .bottomnav-label {
    color: var(--brand) !important;
  }
  @keyframes bottomnavLabelPop {
    0% { opacity: 0; transform: translateY(3px); }
    100% { opacity: 1; transform: translateY(0); }
  }


  /* Commercial Settings Row on Mobile / Tablets - Keep strictly in one horizontal line */
  .settings-commercial-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    gap: 8px !important;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .settings-commercial-row > .field {
    min-width: 0 !important;
    margin: 0 !important;
  }
  .settings-commercial-row > button {
    width: auto !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Compact Overview & KPI Cards on Small Screens (Balanced 2x2 for 4 cards, no orphan card) */
  .stat-grid,
  .client-sheet-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .client-sheet-kpis .card {
    padding: 10px 10px !important;
  }
  .client-sheet-kpis .display {
    font-size: 16px !important;
  }
  .stat-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .stat-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
  }
  .stat-label {
    font-size: 9px !important;
    letter-spacing: 0.02em !important;
  }
  .stat-value {
    font-size: 17px !important;
    margin-top: 3px !important;
  }
  .stat-delta {
    font-size: 9.5px !important;
    margin-top: 2px !important;
  }

  /* Dashboard 3 Hero KPI Cards (Refined Contrast & Simplicity on Small Screens) */
  .dash-kpi-grid,
  .stat-grid-dash {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
  }
  .dash-kpi-card {
    padding: 10px 10px !important;
    border-radius: 14px !important;
    min-width: 0 !important;
    box-shadow: var(--shadow-sm) !important;
  }
  .dash-kpi-card .display {
    font-size: 17px !important;
    font-weight: 800 !important;
  }
  .dash-kpi-card .stat-label {
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .dash-kpi-card .badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
    font-weight: 800 !important;
  }

  /* Dashboard Operations 4 KPI Badges Grid */
  .stat-grid-dash-ops,
  .dash-ops-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .dash-ops-card {
    padding: 8px 6px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    text-align: center !important;
  }
  .dash-ops-card .stat-label {
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .dash-ops-card .display {
    font-size: 15px !important;
  }

  /* Financial P&L Executive Hero KPI Layout */
  .pnl-kpi-container,
  .pnl-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding-bottom: 4px !important;
  }
  .pnl-hero-card {
    min-height: auto !important;
    padding: 16px 16px !important;
  }
  .pnl-right-stack {
    min-height: auto !important;
    gap: 8px !important;
  }
  .pnl-side-card {
    padding: 12px 14px !important;
    min-height: auto !important;
  }
  .pnl-kpi-card {
    padding: 10px 12px !important;
    border-radius: 14px !important;
    min-width: 0 !important;
  }
  .pnl-kpi-card .display {
    font-size: 17px !important;
  }
  .pnl-kpi-card .stat-label {
    font-size: 9.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .pnl-kpi-card .badge {
    font-size: 8.5px !important;
    padding: 1px 5px !important;
    margin-top: 3px !important;
  }
  .pnl-status-badge {
    display: none !important;
  }

  /* Compact Attendance Cards (Balanced 2x2 on Mobile, no orphan card) */
  .stat-grid-compact {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .stat-grid-compact > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .stat-card-sm {
    padding: 8px 10px !important;
    border-radius: 12px !important;
  }
  .stat-val-sm {
    font-size: 14.5px !important;
  }

  /* Minimal & Clean Small Screen Layout - Remove all subtitles across all screens & subpanels */
  .section-sub,
  .topbar-sub,
  .panel-sub,
  .module-sub,
  .tsub,
  .card-head p,
  .card-head .muted,
  .card-body > p.muted:first-child,
  .card > p.muted,
  .section-desc,
  .dash-sub,
  .portal-sub,
  .ticket-sub,
  p.section-sub,
  p.panel-sub {
    display: none !important;
  }

  /* Universal Icon-Only Buttons & Segmented Tabs on Small Screens */
  .btn:has(svg) {
    font-size: 0 !important;
    padding: 0 10px !important;
    min-width: 36px !important;
    height: 36px !important;
    justify-content: center !important;
    gap: 0 !important;
    text-align: center !important;
  }
  .btn:has(svg) svg {
    display: inline-block !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
  }
  .btn:has(svg) .badge {
    font-size: 9.5px !important;
    margin-inline-start: 4px !important;
  }
  .btn .btn-text,
  .btn span.btn-text,
  .btn-label,
  .btn > span:not(.badge):not(.badge-brand):not(.badge-sage):not(.badge-danger) {
    display: none !important;
  }

  .seg {
    padding: 4px !important;
    gap: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .seg button {
    flex: 1 1 0 !important;
    padding: 6px 10px !important;
    min-width: 44px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0 !important;
  }
  .seg button:has(svg) {
    font-size: 0 !important;
  }
  .seg button svg,
  .seg button:has(svg) svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    display: block !important;
    margin: 0 auto !important;
    flex-shrink: 0 !important;
    stroke-width: 2.8 !important;
  }
  .seg button.active svg,
  .seg button.active:has(svg) svg {
    stroke: #ffffff !important;
    color: #ffffff !important;
  }
  .seg button:has(svg) .badge {
    font-size: 9.5px !important;
    margin-inline-start: 4px !important;
  }
  .seg button .seg-text,
  .seg button span.seg-text,
  .seg button span:not(.badge) {
    display: none !important;
  }

  /* POS Header Bar on Small Screens: One Smooth Horizontal Line */
  .pos-action-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .pos-action-bar .pos-spacer {
    display: none !important;
  }
  .pos-action-bar .pos-seg-wrap {
    flex: 1 1 auto !important;
    width: auto !important;
  }
  .pos-action-bar .pos-dayclose-wrap {
    flex-shrink: 0 !important;
  }
  .btn-dayclose {
    height: 42px !important;
    padding: 0 12px !important;
    min-width: 44px !important;
    gap: 0 !important;
  }
  .btn-dayclose svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    stroke-width: 2.8 !important;
  }
  .btn-dayclose .btn-text,
  .btn-dayclose span.btn-text {
    display: none !important;
  }
  .btn-dayclose:hover {
    padding: 0 18px !important;
    min-width: 50px !important;
  }
  .btn-quick-pa {
    height: 42px !important;
    padding: 0 12px !important;
    min-width: 44px !important;
    gap: 0 !important;
  }
  .btn-quick-pa svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    stroke-width: 2.8 !important;
  }
  .btn-quick-pa .btn-quick-pa-text,
  .btn-quick-pa .btn-quick-pa-badge {
    display: none !important;
  }

  /* Product Stats Responsive Filter Bar & KPI Grid */
  .product-stats-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  .product-stats-filter-bar .search-box-wrap {
    width: 100% !important;
    min-width: 0 !important;
  }
  .product-stats-filter-bar .dropdowns-wrap {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .product-stats-filter-bar .dropdowns-wrap select {
    width: 100% !important;
    min-width: 0 !important;
    font-size: 11.5px !important;
    height: 38px !important;
    padding: 0 6px !important;
    padding-inline-end: 28px !important;
  }

  /* Product Stats KPI Grid & Modal KPI Grid: 2 Lines × 2 Columns on Small Screens (2x2 equal, no orphan card) */
  .product-stats-cards,
  .modal-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .product-stats-cards .stat-card,
  .modal-kpi-grid > div {
    padding: 10px 12px !important;
  }
  .product-stats-cards .stat-label {
    font-size: 10.5px !important;
  }
  .product-stats-cards .stat-value {
    font-size: 16.5px !important;
  }

  /* POS Screen on Medium Screens (500px to 880px): Compact Grid with Both Sections Visible */
  .pos-grid-products .product-pick {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
    gap: 8px !important;
  }
  .pos-grid-products .product-pill {
    padding: 10px 10px !important;
    border-radius: 14px !important;
  }
  .pos-grid-products .product-pill .pcat {
    font-size: 8.5px !important;
    margin-bottom: 2px !important;
  }
  .pos-grid-products .product-pill .pname {
    font-size: 12px !important;
    line-height: 1.25 !important;
    margin-bottom: 3px !important;
  }
  .pos-grid-products .product-pill .pprice {
    font-size: 11px !important;
    font-weight: 700 !important;
  }
  .pos-grid-products .product-pill .pstock {
    font-size: 9.5px !important;
    margin-top: 3px !important;
  }
  .pos-grid-counter .card-body {
    padding: 14px !important;
  }
  .pos-grid-counter .card-head {
    padding: 12px 14px !important;
  }
  .pos-grid-counter .cart-line {
    padding: 8px 0 !important;
    font-size: 12px !important;
    gap: 8px !important;
  }
  .pos-grid-counter .cart-line .cname {
    font-size: 12px !important;
    min-width: 80px !important;
  }
  .pos-grid-counter .qty-ctl button {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
  }
  .pos-grid-counter .cart-total-row {
    font-size: 14px !important;
    padding-top: 8px !important;
  }
  .pos-grid-counter .points-preview {
    padding: 8px 10px !important;
    font-size: 11px !important;
    margin-top: 8px !important;
  }

  /* Symmetrical Employee Access & Permission Matrix on Small Screens */
  .access-matrix-controls {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .access-matrix-controls .search-wrap {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
  .access-role-seg {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    padding: 4px !important;
  }
  .access-role-seg button {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 0 !important;
    justify-content: center !important;
    flex: 1 !important;
  }
  .access-staff-select-wrap {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-inline-start: 0 !important;
  }
  .access-staff-select-wrap select {
    flex: 1 !important;
    width: 100% !important;
  }

  /* Activity Logs Stat Cards on Small Screens (Balanced 2x2 Grid for 4 cards) */
  .stat-grid-audit,
  .audit-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  .stat-grid-audit > :last-child:nth-child(odd),
  .audit-stat-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .stat-grid-audit .card,
  .audit-stat-grid .card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    border-inline-start-width: 3px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .stat-grid-audit .stat-label,
  .audit-stat-grid .stat-label {
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .stat-grid-audit .display,
  .audit-stat-grid .display {
    font-size: 17px !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
    line-height: 1.1 !important;
  }

  /* Staff Overview Cards on Small Screens (Balanced 2x2 Grid for 4 cards) */
  .staff-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  .staff-stat-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
  }
  .staff-stat-grid .card {
    padding: 10px 12px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
  }

  /* Inventory Overview Cards on Small Screens: Single Horizontal Line */
  .stat-grid-inventory,
  .inventory-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }
  .stat-grid-inventory .card,
  .inventory-stat-grid .card,
  .inventory-stat-card {
    padding: 8px 6px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    border-inline-start-width: 3px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .stat-grid-inventory .stat-label,
  .inventory-stat-grid .stat-label {
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .stat-grid-inventory .display,
  .inventory-stat-grid .display {
    font-size: 15px !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
    line-height: 1.1 !important;
  }
  .stat-grid-inventory .muted,
  .inventory-stat-grid .muted {
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* Expenses Overview Cards on Small Screens: Single Horizontal Line */
  .stat-grid-expenses,
  .expenses-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    margin-bottom: 8px !important;
  }
  .stat-grid-expenses .card,
  .expenses-stat-grid .card,
  .expenses-stat-card {
    padding: 8px 6px !important;
    border-radius: 12px !important;
    min-width: 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .stat-grid-expenses .stat-label,
  .expenses-stat-grid .stat-label {
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .stat-grid-expenses .display,
  .expenses-stat-grid .display {
    font-size: 15px !important;
    font-weight: 800 !important;
    margin-top: 2px !important;
    line-height: 1.1 !important;
  }

  .topbar-settings-btn {
    display: none !important;
  }
}
@media (min-width: 881px) {
  .topbar-settings-btn {
    display: none !important;
  }
}
@media (max-width:420px){
  .topbar {
    padding: 8px 12px !important;
    min-height: 54px !important;
  }
  .topbar-center {
    padding: 3px 8px !important;
  }
  .topbar-center .brand-mark-img,
  .topbar-center .brand-lockup-img,
  .topbar-center img {
    height: 34px !important;
    max-height: 36px !important;
    margin: 0 2px !important;
  }
  .topbar-title{font-size:15px;}
  .icon-btn{width:33px;height:33px; border-radius:10px;}
  .pill-expandable{height:33px; padding:0 8px;}
  .user-chip-expandable{height:33px;}
  .avatar{width:29px;height:29px; font-size:11px;}
  .content{padding:10px 10px 80px !important;}
  .dash-kpi-grid,
  .stat-grid-dash {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .dash-kpi-card {
    padding: 12px 14px !important;
    border-radius: 12px !important;
  }
  .dash-kpi-card .stat-label {
    font-size: 11.5px !important;
    font-weight: 800 !important;
  }
  .dash-kpi-card .display {
    font-size: 18px !important;
    font-weight: 800 !important;
  }
  .dash-kpi-card .badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
    font-weight: 800 !important;
  }
  .stat-grid-dash-ops,
  .dash-ops-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }
  .dash-ops-card {
    padding: 6px 3px !important;
    border-radius: 10px !important;
  }
  .dash-ops-card .stat-label {
    font-size: 8px !important;
  }
  .dash-ops-card .display {
    font-size: 13px !important;
  }
  .access-role-seg {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 2px !important;
  }
  .stat-grid-audit,
  .audit-stat-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
  }
  .stat-grid-audit .card,
  .audit-stat-grid .card {
    padding: 5px 3px !important;
    border-radius: 10px !important;
  }
  .stat-grid-audit .stat-label,
  .audit-stat-grid .stat-label {
    font-size: 7.5px !important;
  }
  .stat-grid-audit .display,
  .audit-stat-grid .display {
    font-size: 13px !important;
  }
  .stat-grid-inventory,
  .inventory-stat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }
  .stat-grid-inventory .card,
  .inventory-stat-grid .card,
  .inventory-stat-card {
    padding: 6px 3px !important;
    border-radius: 10px !important;
  }
  .stat-grid-inventory .stat-label,
  .inventory-stat-grid .stat-label {
    font-size: 8px !important;
  }
  .stat-grid-inventory .display,
  .inventory-stat-grid .display {
    font-size: 13.5px !important;
  }
  .stat-grid-inventory .muted,
  .inventory-stat-grid .muted {
    font-size: 8px !important;
  }
  .pnl-kpi-container,
  .pnl-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .pnl-hero-card {
    padding: 12px 12px !important;
  }
  .pnl-hero-subgrid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  .pnl-side-card {
    padding: 10px 12px !important;
  }
  .pnl-kpi-card {
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }
  .pnl-kpi-card .stat-label {
    font-size: 8.5px !important;
  }
  .pnl-kpi-card .display {
    font-size: 15px !important;
  }
  .pnl-kpi-card .badge {
    font-size: 7.5px !important;
    padding: 1px 4px !important;
  }
  .stat-grid-expenses,
  .expenses-stat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
  }
  .stat-grid-expenses .card,
  .expenses-stat-grid .card,
  .expenses-stat-card {
    padding: 6px 3px !important;
    border-radius: 10px !important;
  }
  .stat-grid-expenses .stat-label,
  .expenses-stat-grid .stat-label {
    font-size: 8px !important;
  }
  .stat-grid-expenses .display,
  .expenses-stat-grid .display {
    font-size: 13.5px !important;
  }
}

/* ---------- generic components ---------- */
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:15px; margin-bottom:22px;}
.stat-card{ background:var(--surface); border-radius:18px; padding:17px 19px; box-shadow:var(--shadow-sm); border:1px solid var(--border); display:flex; flex-direction:column; justify-content:center; }
.stat-label{font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-faint); font-weight:700; text-align:start;}
.stat-value{font-size:24px; margin-top:6px; text-align:center;}
.stat-delta{font-size:11.5px; margin-top:4px; font-weight:700; text-align:center;}

.card{background:var(--surface); border-radius:20px; box-shadow:var(--shadow-sm); border:1px solid var(--border);}
.card-head{display:flex; align-items:center; justify-content:space-between; padding:16px 19px;}
.card-head h3{margin:0; font-size:14.5px;}
.card-body{padding:16px 19px;}
.section-title{font-size:21px; margin:0 0 4px;}
.section-sub{color:var(--ink-soft); font-size:13px; margin:0 0 18px;}

.search-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.search-wrap svg,
.search-wrap .icon { position: absolute; inset-inline-start: 14px; pointer-events: none; color: var(--ink-faint); z-index: 2; flex-shrink: 0; }
.search-wrap .input,
.search-wrap input { padding-inline-start: 44px !important; padding-inline-end: 14px !important; width: 100%; }

/* Explicit RTL spacing for search boxes so text never overlaps icons */
[dir="rtl"] .search-wrap svg,
[dir="rtl"] .search-wrap .icon { right: 14px !important; left: auto !important; }
[dir="rtl"] .search-wrap .input,
[dir="rtl"] .search-wrap input { padding-right: 44px !important; padding-left: 14px !important; }

[dir="ltr"] .search-wrap svg,
[dir="ltr"] .search-wrap .icon { left: 14px !important; right: auto !important; }
[dir="ltr"] .search-wrap .input,
[dir="ltr"] .search-wrap input { padding-left: 44px !important; padding-right: 14px !important; }


.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:41px; padding:0 16px; border-radius:14px; font-size:13px; font-weight:700; cursor:pointer; border:1px solid var(--border); background:var(--surface); box-shadow:var(--shadow-sm); color:var(--ink); }
.btn:active{box-shadow:var(--shadow-inset);}
.btn-primary{background:var(--brand); color:#fff; border-color:transparent;}
.btn-primary:hover{filter:brightness(1.05);}
.btn-ghost{color:var(--ink); border-color:transparent; background:transparent; box-shadow:none;}
.btn-ghost:hover{color:var(--brand); background:rgba(79,70,229,0.08);}
.btn-danger{background:var(--danger-bg); color:var(--danger); border-color:transparent;}
.btn-sm{height:32px; padding:0 12px; font-size:12px; border-radius:11px;}
.btn:disabled{opacity:.5; cursor:not-allowed;}
.seg{display:inline-flex; padding:4px; border-radius:15px; background:var(--surface-2); border:1px solid var(--border-subtle); box-shadow:var(--shadow-inset); gap:4px; flex-wrap:wrap; justify-content:center;}
.seg button{border:none; background:transparent; padding:8px 18px; border-radius:11px; font-size:13px; font-weight:700; color:var(--ink-soft); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:9px; flex:1 1 0; text-align:center; transition:all 0.2s ease;}
.seg button svg, .btn svg { width:18px; height:18px; min-width:18px; min-height:18px; flex-shrink:0; stroke-width:2.8 !important; }
.seg button:hover:not(.active) {
  color: var(--ink);
  background: var(--surface);
}
.seg button.active {
  background: var(--brand) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px -1px var(--brand-bg, rgba(79, 70, 229, 0.35)), var(--shadow-sm) !important;
  font-weight: 800 !important;
}
.seg button.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
.seg button.active.seg-danger,
.seg button.seg-danger.active {
  background: var(--danger) !important;
  color: #ffffff !important;
  border-color: var(--danger) !important;
  box-shadow: 0 2px 8px rgba(213, 28, 81, 0.35) !important;
}
.seg button.active.seg-danger svg,
.seg button.seg-danger.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

/* Expanding Capsule / Pill Dynamic Tabs for Header Sub-Panels */
.expanding-pill-tabs {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: var(--surface-2) !important;
  padding: 4px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
}
.expanding-pill-tab {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  border: none !important;
  background: transparent !important;
  color: var(--ink-secondary) !important;
  cursor: pointer !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  user-select: none !important;
  flex: 0 0 auto !important;
  text-decoration: none !important;
}
.expanding-pill-tab:hover:not(.active) {
  color: var(--ink) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}
.expanding-pill-tab .tab-label {
  display: inline-block !important;
  max-width: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  transition: max-width 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, margin 0.26s ease !important;
  margin-inline-start: 0 !important;
  font-size: 12px !important;
}
.expanding-pill-tab.active {
  background: var(--brand) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 0 14px !important;
  box-shadow: 0 2px 10px rgba(var(--brand-rgb, 79, 70, 229), 0.35) !important;
}
.expanding-pill-tab.active .tab-label {
  max-width: 120px !important;
  opacity: 1 !important;
  margin-inline-start: 2px !important;
}
.expanding-pill-tab svg {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  min-height: 17px !important;
  flex-shrink: 0 !important;
  color: inherit !important;
  stroke: currentColor !important;
  transition: transform 0.2s ease !important;
}
.expanding-pill-tab.active svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}
svg.icon, .icon, svg[data-icon] {
  stroke-width: 2.8px !important;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.nav-item svg,
.btn svg,
.icon-btn svg,
.seg button svg,
.tab svg,
.card svg.icon,
.modal svg.icon {
  stroke-width: 2.8px !important;
  stroke: currentColor;
}

/* POS Header Bar: Middle-Aligned Operational Tabs + Right-Aligned Smooth Stretching Day Close */
.pos-action-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  gap: 12px;
}
.pos-action-bar .pos-seg-wrap {
  grid-column: 2;
  display: flex;
  justify-content: center;
}
.pos-action-bar .pos-dayclose-wrap {
  grid-column: 3;
  display: flex;
  justify-content: flex-end;
}

/* Day Close Button: Icon-Only on Large Screens, Smoothly Stretches on Hover to Reveal Name */
.btn-dayclose {
  height: 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 0;
  border-radius: 13px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  background: rgba(217, 119, 6, 0.08);
  color: #d97706;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-dayclose svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  stroke-width: 2.2;
  transition: transform 0.3s ease;
}
.btn-dayclose .btn-text {
  max-width: 0;
  opacity: 0;
  margin-inline-start: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-dayclose:hover {
  width: auto;
  min-width: 135px;
  max-width: 180px;
  padding: 0 16px;
  gap: 8px;
  background: rgba(217, 119, 6, 0.16);
  border-color: #d97706;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
  transform: translateY(-1px);
}
.btn-dayclose:hover svg {
  transform: rotate(15deg);
}
.btn-dayclose:hover .btn-text {
  max-width: 130px;
  opacity: 1;
  margin-inline-start: 2px;
}
.btn-dayclose.active {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
}
.btn-dayclose.active:hover {
  filter: brightness(1.08);
}

/* Product Stats Filter Bar */
.product-stats-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.product-stats-filter-bar .search-box-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.product-stats-filter-bar .dropdowns-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.product-stats-filter-bar .dropdowns-wrap select {
  width: auto;
  min-width: 105px;
}

/* Product Stats KPI Grid & Modal KPI Grid */
.product-stats-cards,
.modal-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* Activity Log Hover Filter Select Styling */
.hover-filter-opt {
  transition: all 0.15s ease !important;
}
.hover-filter-opt:hover {
  background: var(--brand-bg, rgba(79, 70, 229, 0.15)) !important;
  color: var(--brand) !important;
  font-weight: 800 !important;
}
.hover-filter-opt.selected {
  background: var(--brand-bg, rgba(79, 70, 229, 0.18)) !important;
  color: var(--brand) !important;
}

/* Clean Executive Form Elements */
.input, .select, select, textarea.input {
  width: 100%;
  height: 41px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-inset);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea.input {
  height: auto;
  padding: 10px 13px;
  resize: vertical;
}
.input:focus, .select:focus, select:focus, textarea.input:focus {
  border-color: var(--brand);
  box-shadow: var(--shadow-inset), 0 0 0 2px var(--brand-bg);
  outline: none;
}

/* Refined Executive Dropdown Styling */
select, .select {
  cursor: pointer;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-inline-end: 34px !important;
  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='%237C3AED' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 13px 13px !important;
  font-weight: 700 !important;
}
[dir="rtl"] select, [dir="rtl"] .select {
  background-position: left 12px center !important;
}
select option, .select option {
  background-color: var(--surface) !important;
  color: var(--ink) !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
}

/* Remove spin-button arrows from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type=number] {
  -moz-appearance: textfield !important;
}

/* Responsive Floor & Concise Overview Labels */
.lbl-full,
.floor-lbl-full {
  display: inline !important;
}
th.lbl-full,
td.lbl-full {
  display: table-cell !important;
}
.lbl-short,
.floor-lbl-short {
  display: none !important;
}
@media (max-width: 880px) {
  .lbl-full,
  .floor-lbl-full {
    display: none !important;
  }
  th.lbl-full,
  td.lbl-full {
    display: none !important;
  }
  .lbl-short,
  .floor-lbl-short {
    display: inline !important;
  }
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.field-error { font-size: 11px; color: var(--danger); font-weight: 600; }
.pw-row{position:relative;}
.pw-row .input{padding-inline-end:40px;}
.pw-toggle{position:absolute; top:0; bottom:0; inset-inline-end:6px; margin:auto 0; height:30px; width:30px; border:none; background:transparent; color:var(--ink-faint); display:flex; align-items:center; justify-content:center; cursor:pointer;}

.badge{display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:99px; font-size:10.5px; font-weight:700;}
.badge-brand{background:var(--brand-bg); color:var(--brand-ink, var(--brand-deep));}
.badge-sage{background:var(--sage-bg); color:var(--sage);}
.badge-danger{background:var(--danger-bg); color:var(--danger);}
.badge-mut{background:var(--surface-2); color:var(--ink-soft); box-shadow:var(--shadow-inset);}
.badge-revision{display:inline-flex; align-items:center; padding:2px 7px; border-radius:99px; font-size:10px; font-weight:800; background:#FF3B30; color:#fff; box-shadow:0 1px 4px rgba(255,59,48,.5); letter-spacing:.02em;}

table{width:100%; border-collapse:collapse; font-size:13px;}
th{
  text-align:center;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--ink-faint);
  padding:10px 12px;
  font-weight:800;
  position:sticky;
  top:0;
  background:var(--surface);
  z-index:5;
  box-shadow:0 1px 0 var(--border);
}
td{padding:11px 12px; text-align:center;}
tbody tr:nth-child(odd){background:var(--surface-2); border-radius:12px;}
tbody tr td:first-child{border-start-start-radius:12px; border-end-start-radius:12px;}
tbody tr td:last-child{border-start-end-radius:12px; border-end-end-radius:12px;}
tbody tr{transition:background 0.15s ease;}
tbody tr:hover{background:rgba(79,70,229,0.05);}
[data-theme="dark"] tbody tr:hover{background:rgba(99,102,241,0.09);}
.table-wrap{overflow-x:auto; position:relative;}
.row-click{cursor:pointer;}
.row-click:hover{filter:brightness(0.97);}
.row-actions{display:flex; gap:6px; justify-content:center;}

.empty-state{display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:40px 20px; color:var(--ink-soft);}
.empty-state svg{opacity:.5;}
.empty-state h4{margin:0; font-size:14.5px; color:var(--ink);}
.empty-state p{margin:0; font-size:12.5px; max-width:320px;}

.modal-overlay{position:fixed; inset:0; background:var(--scrim); display:flex; align-items:center; justify-content:center; z-index:900000 !important; padding:16px;}
.modal{background:var(--surface); border-radius:22px; width:100%; max-width:460px; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow); border:1px solid var(--border);}
.modal-head{display:flex; align-items:center; justify-content:space-between; padding:18px 20px;}
.modal-body{padding:0 20px 20px;}

.toast-stack{position:fixed; bottom:20px; inset-inline-end:20px; z-index:950000 !important; display:flex; flex-direction:column; gap:10px; max-width:340px;}
@media (max-width:880px){.toast-stack{bottom:78px; inset-inline:12px; max-width:none;}}
.toast{ background:var(--surface); border-radius:14px; padding:12px 15px; box-shadow:var(--shadow); font-size:12.5px; display:flex; gap:10px; align-items:flex-start; animation:toastIn .22s ease; }
.toast svg{flex-shrink:0; margin-top:1px; color:var(--brand);}
.toast.error svg{color:var(--danger);} .toast.success svg{color:var(--sage);}
@keyframes toastIn{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);}}
.toast-title{font-weight:700; margin-bottom:1px;}
.toast-msg{color:var(--ink-soft); font-size:12px;}

.banner{display:flex; align-items:center; gap:10px; padding:12px 15px; border-radius:16px; font-size:12.5px; margin-bottom:16px; background:var(--surface); box-shadow:var(--shadow-inset); line-height:1.5;}
.banner svg{flex-shrink:0;}
.banner-amber{color:var(--danger);}
.banner-sage{color:var(--sage);}

/* ---------- swing tag (signature) ---------- */
.tag{ position:relative; background:var(--surface); clip-path:polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%); padding:16px 16px 14px; box-shadow:var(--shadow-sm); }
.tag::before{ content:''; position:absolute; top:8px; inset-inline-end:8px; width:8px; height:8px; border-radius:50%; box-shadow:var(--shadow-inset); }
.stitch{border-top:2px dashed var(--seam); margin:11px 0;}

/* ---------- login rack ---------- */
.login-screen{min-height:100vh; display:flex; flex-direction:column; align-items:center; padding:52px 20px 40px; background:var(--bg); overflow-x:hidden;}
.login-topbar{
  position:fixed;
  top:16px;
  inset-inline-end:18px;
  display:flex;
  gap:8px;
  z-index:10;
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-brand{display:flex; flex-direction:column; align-items:center; gap:8px; margin-bottom:4px;}
.login-brand img{height:112px; width:auto;}
.login-brand p{
  margin:2px 0 0;
  color:var(--ink-soft);
  font-size:13px;
  text-align:center;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.12s, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.12s;
}
.rack-group-title{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--ink-faint);
  font-weight:800;
  margin-top:8px;
}
.rack-section.is-waiting .rack-group-title {
  opacity: 0;
  transform: translateY(-8px);
}
.rack-section.is-animated .rack-group-title {
  animation: rackTitleFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) var(--slide-delay, 0s) both;
}
@keyframes rackTitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.rail{width:min(760px,92vw); height:5px; background:var(--brand-deep); border-radius:3px; margin:10px 0 4px; position:relative; box-shadow:var(--shadow-inset);}
.rail::before, .rail::after{content:''; position:absolute; top:-3.5px; width:12px; height:12px; border-radius:50%; background:var(--ink-faint);}
.rail::before{inset-inline-start:-4px;} .rail::after{inset-inline-end:-4px;}
.rack{width:min(760px,92vw); display:flex; flex-wrap:wrap; justify-content:center; gap:18px 16px; margin-top:6px;}

/* ---------- Rack Sections & Physical Solid Assembly ---------- */
.rack-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}
.rack-section.is-waiting {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.rack-section.is-animated {
  visibility: visible;
}
.rack-section-staff.is-animated {
  --slide-delay: 0s;
}
.rack-section-employees.is-animated {
  --slide-delay: 0.40s;
}

/* The solid physical rack assembly: rail + hangers move together as one rigid unit */
.rack-stage {
  width: min(760px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* RTL Entry: Whole rack arrives smoothly from Right with high-end fluid deceleration */
[dir="rtl"] .rack-section.is-animated .rack-stage {
  animation: rackStageSlideInRTL 0.70s cubic-bezier(0.16, 1, 0.3, 1) var(--slide-delay, 0s) both;
}

/* LTR Entry: Whole rack arrives smoothly from Left with high-end fluid deceleration */
[dir="ltr"] .rack-section.is-animated .rack-stage {
  animation: rackStageSlideInLTR 0.70s cubic-bezier(0.16, 1, 0.3, 1) var(--slide-delay, 0s) both;
}

@keyframes rackStageSlideInRTL {
  0% {
    opacity: 0;
    transform: translate3d(min(80vw, 480px), 0, 0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes rackStageSlideInLTR {
  0% {
    opacity: 0;
    transform: translate3d(max(-80vw, -480px), 0, 0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.rack.single-line-rack {
  width: min(760px, 92vw);
  display: flex;
  flex-wrap: nowrap !important;
  justify-content: center;
  align-items: flex-start;
  gap: 0 !important;
  padding: 6px 16px 20px;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.rack.single-line-rack::-webkit-scrollbar {
  display: none;
}

.hanger{display:flex; flex-direction:column; align-items:center; width:138px;}
.single-line-rack .hanger {
  flex: 0 0 138px;
  width: 138px;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), z-index 0.05s ease;
}

/* The hangers: Gathered on entry side, then slide along the rail and spread out */
.rack-section.is-animated .single-line-rack .hanger {
  /* Spread begins EXACTLY when rack-stage finishes arriving at 0.62s */
  animation: hangerSpreadOut 0.78s cubic-bezier(0.18, 0.98, 0.28, 1) calc(var(--slide-delay, 0s) + 0.62s + var(--item-stagger, 0s)) both;
}

@keyframes hangerSpreadOut {
  0% {
    transform: translate3d(var(--gather-x, 0px), 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

.hanger-string{width:2px; height:18px; background:var(--ink-faint);}

/* Tag Styling: Rich directional drop shadows and glow showing elevation */
.role-tag{
  cursor:pointer;
  text-align:start;
  width:100%;
  transform:rotate(var(--tilt,-2deg));
  color:var(--ink);
  border:none;
  padding:13px 13px 11px;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.28s ease, box-shadow 0.28s ease;
}

.single-line-rack .hanger .role-tag {
  border: 1px solid var(--border) !important;
  border-inline-start: 4px solid var(--role-color, var(--brand)) !important;
}

/* Light mode directional drop-shadow: Top card casts shadow onto overlapping card beneath */
[dir="rtl"] .single-line-rack .hanger .role-tag {
  filter: drop-shadow(-10px 4px 14px rgba(15, 23, 42, 0.18)) drop-shadow(-3px 1px 4px rgba(15, 23, 42, 0.12));
}
[dir="ltr"] .single-line-rack .hanger .role-tag {
  filter: drop-shadow(10px 4px 14px rgba(15, 23, 42, 0.18)) drop-shadow(3px 1px 4px rgba(15, 23, 42, 0.12));
}

/* Dark mode directional shadow & vibrant role-colored glow */
:root[data-theme="dark"] [dir="rtl"] .single-line-rack .hanger .role-tag {
  border-color: rgba(255, 255, 255, 0.16) !important;
  filter: drop-shadow(-12px 6px 18px rgba(0, 0, 0, 0.92)) drop-shadow(-3px 0 8px var(--role-color, #D51C51));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), inset 0 0 10px rgba(0, 0, 0, 0.35);
}
:root[data-theme="dark"] [dir="ltr"] .single-line-rack .hanger .role-tag {
  border-color: rgba(255, 255, 255, 0.16) !important;
  filter: drop-shadow(12px 6px 18px rgba(0, 0, 0, 0.92)) drop-shadow(3px 0 8px var(--role-color, #D51C51));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20), inset 0 0 10px rgba(0, 0, 0, 0.35);
}

/* Interactive Hover State: Pops to front with elevated shadow and glow */
.single-line-rack .hanger:hover {
  z-index: 99 !important;
  transform: translateY(-10px) scale(1.06) !important;
}
.single-line-rack .hanger:hover .role-tag {
  transform: rotate(0deg) !important;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.30)) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18)) !important;
}
:root[data-theme="dark"] .single-line-rack .hanger:hover .role-tag {
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 20px var(--role-color, rgba(213, 28, 81, 0.75))) !important;
}

.hanger:nth-child(2n) .role-tag{--tilt:1.5deg;}
.hanger:nth-child(3n) .role-tag{--tilt:-1deg;}
.role-tag:hover{transform:rotate(0deg) translateY(-4px);}
.role-tag .tname{font-size:13.5px; margin:0 0 2px;}
.role-tag .trole{font-size:9.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--brand-deep); font-weight:800;}
.role-tag .tuser{font-size:10.5px; color:var(--ink-faint); margin-top:6px;}
.role-tag .stitch{margin:7px 0;}
.client-portal-link{margin-top:34px; text-align:center;}
.client-portal-link button{background:none; border:none; color:var(--brand-deep); font-weight:700; font-size:13px; cursor:pointer; text-decoration:underline; text-underline-offset:3px;}
.login-error{color:var(--danger); font-size:12.5px; margin-top:14px; font-weight:700;}

/* Rack Title fade */
.rack-section.is-animated .rack-group-title {
  animation: rackTitleFadeIn 0.55s ease var(--slide-delay, 0s) both;
}
@keyframes rackTitleFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tag Drag Inertia during spread */
[dir="rtl"] .rack-section.is-animated .hanger .role-tag {
  animation: tagDragSwingRTL 0.82s cubic-bezier(0.2, 0.95, 0.3, 1) calc(var(--slide-delay, 0s) + 0.60s + var(--item-idx, 0) * 0.045s) both;
  transform-origin: top center;
}
[dir="ltr"] .rack-section.is-animated .hanger .role-tag {
  animation: tagDragSwingLTR 0.82s cubic-bezier(0.2, 0.95, 0.3, 1) calc(var(--slide-delay, 0s) + 0.60s + var(--item-idx, 0) * 0.045s) both;
  transform-origin: top center;
}

@keyframes tagDragSwingRTL {
  0% {
    transform: rotate(18deg) translateY(4px);
  }
  48% {
    transform: rotate(13deg) translateY(2px);
  }
  75% {
    transform: rotate(-8deg) translateY(-2px);
  }
  88% {
    transform: rotate(4deg);
  }
  100% {
    transform: rotate(var(--tilt, 0deg));
  }
}

@keyframes tagDragSwingLTR {
  0% {
    transform: rotate(-18deg) translateY(4px);
  }
  48% {
    transform: rotate(-13deg) translateY(2px);
  }
  75% {
    transform: rotate(8deg) translateY(-2px);
  }
  88% {
    transform: rotate(-4deg);
  }
  100% {
    transform: rotate(var(--tilt, 0deg));
  }
}

/* ---------- POS Subpanels Switcher & Layout ---------- */
/* By default (screens >= 500px): Desktop & Tablet show Products and Counter side-by-side or stacked without subpanel toggling */
.pos-sale-subpanel-switcher,
.pos-narrow-ticket-bar,
.pos-narrow-add-btn {
  display: none !important;
}

.pos-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  width: 100%;
}

.pos-grid-products,
.pos-grid-counter {
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 980px) {
  .pos-grid {
    grid-template-columns: 1fr;
  }
}

/* Narrow screens (< 500px): Separate Products and Counter into dedicated toggleable Subpanels */
@media (max-width: 499px) {
  .pos-sale-subpanel-switcher {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto 12px !important;
  }

  .pos-grid {
    display: block !important;
  }

  .pos-grid > .pos-grid-products,
  .pos-grid > .pos-grid-counter {
    width: 100% !important;
    max-width: 100% !important;
  }

  .pos-grid-products.pos-subpanel-hidden,
  .pos-grid-counter.pos-subpanel-hidden {
    display: none !important;
  }

  .pos-grid-products.pos-subpanel-visible,
  .pos-grid-counter.pos-subpanel-visible {
    display: flex !important;
    flex-direction: column !important;
  }

  .pos-narrow-ticket-bar {
    display: flex !important;
  }

  .pos-narrow-add-btn {
    display: inline-flex !important;
  }
}
.scan-row{display:flex; gap:10px; margin-bottom:14px; flex-wrap:wrap;}
.product-pick{display:grid; grid-template-columns:repeat(auto-fill,minmax(148px,1fr)); gap:12px;}
.product-pill{border-radius:16px; padding:12px 13px; background:var(--surface); cursor:pointer; text-align:start; box-shadow:var(--shadow-sm); border:1px solid var(--border); display:flex; flex-direction:column;}
.product-pill:hover{box-shadow:var(--shadow-inset);}
.product-pill .pcat{font-size:9px; text-transform:uppercase; letter-spacing:.04em; color:var(--brand-deep); font-weight:800; display:block; margin-bottom:3px;}
.product-pill .pname{font-size:12px; font-weight:700; display:block; margin-bottom:3px;}
.product-pill .pprice{font-size:11.5px; color:var(--ink-soft);}
.product-pill .pstock{font-size:10px; margin-top:4px; display:block;}
.was-price{text-decoration:line-through; color:var(--ink-faint); font-size:10.5px; margin-inline-end:4px;}
.cart-line{display:flex; align-items:center; gap:8px; padding:9px 0; border-bottom:1px dashed var(--seam); font-size:12.5px; flex-wrap:wrap;}
.cart-line .cname{flex:1; min-width:100px;}
.qty-ctl{display:flex; align-items:center; gap:6px;}
.qty-ctl button{width:26px; height:26px; border-radius:8px; border:none; background:var(--surface); box-shadow:var(--shadow-sm); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; font-size:14px; font-weight:800; line-height:1; text-align:center; padding:0;}
.qty-ctl button:active{box-shadow:var(--shadow-inset);}
.cart-total-row{display:flex; justify-content:space-between; align-items:center; padding-top:12px; font-size:15px;}
.points-preview{margin-top:10px; padding:9px 12px; border-radius:12px; background:var(--brand-bg); color:var(--brand-ink,var(--brand-deep)); font-size:12px; display:flex; flex-direction:column; gap:2px;}
.points-preview svg{display:inline; vertical-align:-2px; margin-inline-end:3px;}
.stepper{display:flex; align-items:center; gap:8px;}
.stepper button{width:25px; height:25px; border-radius:9px; border:none; background:var(--surface); box-shadow:var(--shadow-sm); cursor:pointer;}
.stepper button:disabled{opacity:.4; cursor:not-allowed;}
.emp-picker{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px;}
.emp-chip{padding:8px 14px; border-radius:13px; background:var(--surface); box-shadow:var(--shadow-sm); border:1px solid var(--border); font-size:12px; font-weight:700; color:var(--ink-soft); cursor:pointer;}
.emp-chip.active{background:var(--brand); color:#fff; border-color:var(--brand); box-shadow:var(--shadow-inset);}

/* ---------- audit log detail ---------- */
.audit-detail-box{background:var(--surface-2); border-radius:13px; padding:11px 14px; box-shadow:var(--shadow-inset); display:flex; flex-direction:column; gap:6px;}
.audit-detail-row{display:flex; gap:10px; font-size:12px; flex-wrap:wrap;}
.audit-detail-field{font-weight:700; min-width:90px; color:var(--ink-soft);}
.audit-detail-vals{color:var(--ink);}

/* ---------- ticket print ---------- */
.ticket{width:336px; margin:0 auto; background:#fff; padding:18px 8px; font-family:'Consolas','SFMono-Regular','Courier New',monospace; font-size:12px; color:#242424; box-shadow:var(--shadow);}
.ticket[dir="rtl"]{direction:rtl; text-align:right;}
.ticket[dir="ltr"]{direction:ltr; text-align:left;}
.ticket-logo{display:flex; flex-direction:column; align-items:center; gap:6px; margin-bottom:6px;}
.ticket-logo img{height:50px; width:auto;}
.ticket .tsub{font-size:10px; color:#7D6169; text-align:center;}
.ticket-meta{margin:14px 0; display:flex; flex-direction:column; gap:3px;}
.ticket-meta div{display:flex; justify-content:space-between;}
.ticket[dir="rtl"] .ticket-meta div{direction:rtl;}
.ticket[dir="ltr"] .ticket-meta div{direction:ltr;}
.ticket-items{margin:12px 0;}
.ticket-item{display:flex; justify-content:space-between; padding:4px 0;}
.ticket[dir="rtl"] .ticket-item{direction:rtl;}
.ticket[dir="ltr"] .ticket-item{direction:ltr;}
.ticket-total{display:flex; justify-content:space-between; font-weight:700; font-size:14px; padding-top:8px; border-top:1px solid #242424;}
.ticket[dir="rtl"] .ticket-total{direction:rtl;}
.ticket[dir="ltr"] .ticket-total{direction:ltr;}
.ticket-total.refund{color:#AE3A3A;}
.ticket-wish{text-align:center; margin:16px 0 8px; font-family:Georgia,serif; font-style:italic; font-size:13px;}
.ticket-note{font-size:9px; color:#7D6169; text-align:center; margin-top:2px; line-height:1.25; white-space:pre-line;}
.ticket-revnote{font-size:10.5px; background:#F1DCDC; color:#AE3A3A; text-align:center; padding:6px 8px; border-radius:8px; margin-top:8px; font-weight:700;}
.prod-checklist{max-height:160px; overflow-y:auto; border-radius:12px; background:var(--surface-2); padding:10px; box-shadow:var(--shadow-inset); display:flex; flex-direction:column; gap:6px;}
.prod-check-item{display:flex; align-items:center; gap:8px; font-size:12px; padding:4px 6px; border-radius:8px; cursor:pointer;}
.prod-check-item:hover{background:var(--surface);}

/* ---------- compact attendance calendar & side roster ---------- */
.attendance-layout{ display:grid; grid-template-columns: 240px 1fr; gap:16px; align-items:start; }
@media (max-width: 860px) { .attendance-layout{ grid-template-columns: 1fr; } }
.emp-vertical-card{ background:var(--surface); border-radius:16px; padding:12px; box-shadow:var(--shadow); border:1px solid var(--border); display:flex; flex-direction:column; gap:6px; }
.emp-vertical-title{ font-size:12px; font-weight:800; text-transform:uppercase; color:var(--ink-soft); padding:4px 6px; letter-spacing:0.5px; }
.emp-vertical-item{
  display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:12px; cursor:pointer;
  background:var(--surface-2); border:1.5px solid transparent; transition:all .15s ease;
}
.emp-vertical-item:hover{ background:var(--surface); border-color:var(--brand); }
.emp-vertical-item.active{ background:var(--brand-bg); border-color:var(--brand); }

.stat-grid-compact{ display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin-bottom:12px; }
@media (max-width: 600px) { .stat-grid-compact{ grid-template-columns:repeat(2, 1fr); } }
.stat-card-sm{ background:var(--surface); border-radius:12px; padding:8px 12px; box-shadow:var(--shadow-sm); border:1px solid var(--border); }
.stat-card-sm .stat-label{ font-size:10.5px; font-weight:700; color:var(--ink-soft); }
.stat-card-sm .stat-val-sm{ font-size:17px; font-weight:800; font-family:var(--font-display); line-height:1.2; margin-top:2px; }

.attendance-header{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.calendar-card{ background:var(--surface); border-radius:14px; padding:12px 14px; box-shadow:var(--shadow); border:1px solid var(--border); margin-bottom:14px; }
.calendar-controls{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; gap:8px; flex-wrap:wrap; }
.calendar-title{ font-size:14px; font-weight:800; }
.calendar-grid{ display:grid; grid-template-columns:repeat(7, 1fr); gap:5px; }
.calendar-day-head{ text-align:center; font-size:10.5px; font-weight:800; color:var(--ink-soft); padding:2px 0; text-transform:uppercase; }
.calendar-cell{
  min-height:40px; border-radius:10px; background:var(--surface-2); padding:4px 5px;
  display:flex; flex-direction:column; justify-content:space-between; cursor:pointer;
  box-shadow:var(--shadow-sm); border:1px solid var(--border-subtle); transition:all .15s ease; position:relative; overflow:visible;
}
.calendar-cell:hover{ transform:translateY(-1px); box-shadow:var(--shadow); border-color:var(--brand); }
.calendar-cell.today{ border-color:var(--brand); background:var(--surface); }
.calendar-cell.other-month{ opacity:.25; pointer-events:none; }
.calendar-cell.is-friday{ background:var(--brand-bg); }
.calendar-date-num{ font-size:11px; font-weight:700; color:var(--ink); display:flex; justify-content:space-between; align-items:center; line-height:1; }
.calendar-status-tag{
  font-size:9px; font-weight:800; padding:0 4px; border-radius:4px; text-align:center;
  line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;
  display:flex; align-items:center; justify-content:center; height:18px; min-height:18px;
  box-sizing:border-box; width:100%;
}
@media (max-width: 880px) {
  .calendar-status-tag {
    padding: 0 1px !important;
    min-height: 18px !important;
    height: 18px !important;
    font-size: 8.5px !important;
  }
  .calendar-cell {
    min-height: 36px !important;
    padding: 3px 2px !important;
  }
}
.status-tag-present{ background:rgba(16,185,129,.16); color:#059669; font-weight:800; }
.status-tag-absent{ background:rgba(213,28,81,.16); color:#D51C51; font-weight:800; }
.status-tag-leave{ background:rgba(245,158,11,.16); color:#D97706; font-weight:800; }
.status-tag-friday{ background:rgba(213,28,81,.12); color:var(--brand-ink); font-weight:800; }

.day-popover{
  position:absolute; bottom:100%; left:50%; transform:translateX(-50%); margin-bottom:8px;
  background:var(--surface); border-radius:999px; padding:6px 10px; box-shadow:0 12px 32px rgba(0,0,0,0.22);
  border:none; z-index:100; display:flex; align-items:center; gap:8px; width:max-content;
}
.day-popover-circle{
  width:32px; height:32px; border-radius:50%; border:none; font-size:14px; font-weight:900;
  cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition:transform 0.15s ease, box-shadow 0.15s ease; box-shadow:0 2px 6px rgba(0,0,0,0.15);
}
.day-popover-circle:hover{ transform:scale(1.15); }
.day-popover-circle:active{ transform:scale(0.92); }
.circle-present{ background:#10B981; color:#ffffff; }
.circle-leave{ background:#F59E0B; color:#ffffff; }
.circle-absent{ background:#D51C51; color:#ffffff; }

.attendance-quick-btn{ padding:6px 10px; border-radius:10px; border:none; font-size:11.5px; font-weight:700; cursor:pointer; flex:1; display:flex; align-items:center; justify-content:center; gap:4px; box-shadow:var(--shadow-sm); }
.attendance-quick-btn:active{ box-shadow:var(--shadow-inset); }
.attendance-quick-present{ background:var(--sage-bg); color:var(--sage); }
.attendance-quick-absent{ background:var(--danger-bg); color:var(--danger); }
.attendance-quick-leave{ background:rgba(212,143,56,.18); color:#B27116; }

/* Calendar Split Half-Day Leave */
.calendar-split-tag {
  display: flex;
  align-items: center;
  width: 100%;
  height: 18px;
  min-height: 18px;
  border-radius: 4px;
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 0 !important;
}
.calendar-split-half {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  padding: 0 3px;
  line-height: 1.1;
  font-size: 9px;
  font-weight: 800;
  transition: all 0.15s ease;
  box-sizing: border-box;
}
.calendar-split-half .lbl-short {
  display: none !important;
}
.calendar-split-half .lbl-full {
  display: inline !important;
}
@media (max-width: 880px) {
  .calendar-split-tag {
    min-height: 18px !important;
    height: 18px !important;
    margin-top: 2px !important;
    border-radius: 4px !important;
    padding: 0 !important;
  }
  .calendar-split-half {
    padding: 0 1px !important;
    font-size: 8.5px !important;
  }
  .calendar-split-half .lbl-full {
    display: none !important;
  }
  .calendar-split-half .lbl-short {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
}
.calendar-split-half.half-am {
  border-inline-end: 1px solid rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .calendar-split-half.half-am {
  border-inline-end: 1px solid rgba(255, 255, 255, 0.15);
}
.calendar-split-half.is-present {
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}
.calendar-split-half.is-leave {
  background: rgba(245, 158, 11, 0.16);
  color: #D97706;
}
.popover-leave-options {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.popover-leave-btn {
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.popover-leave-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.35);
}
.popover-leave-btn.is-active {
  background: #F59E0B;
  color: #ffffff;
  border-color: #D97706;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.35);
}

.print-only{display:none !important;}
@media print{
  body *{visibility:hidden;}
  #print-root, #print-root *{visibility:visible;}
  #print-root{position:absolute; top:0; inset-inline-start:0; width:100%;}
  .print-only{display:block !important;}
  .ticket{box-shadow:none; width:100%;}
  .no-print{display:none !important; visibility:hidden !important;}
}

/* Executive Boss Dashboard Styles */
.boss-dash-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap:16px; margin-top:16px; }
.boss-level2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .boss-level2-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .sales-trend-bars {
    gap: 4px !important;
    height: 110px !important;
  }
}
.boss-stat-card{
  background:var(--surface); border-radius:16px; padding:16px 18px; box-shadow:var(--shadow);
  border:1px solid var(--border); transition:all 0.2s ease; position:relative; overflow:hidden;
}
.boss-stat-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-lg); }
.boss-stat-card .boss-stat-icon{
  width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  margin-bottom:10px; background:var(--surface-2); color:var(--ink);
}
.boss-stat-card .boss-stat-val{ font-size:22px; font-weight:900; font-family:var(--font-display); line-height:1.1; margin-top:4px; }
.boss-stat-card .boss-stat-trend{ font-size:11px; font-weight:700; display:inline-flex; align-items:center; gap:4px; margin-top:6px; padding:2px 8px; border-radius:99px; }
.trend-up{ background:var(--surface-2); color:var(--ink); border:1px solid var(--border); }
.trend-down{ background:var(--surface-2); color:var(--ink); border:1px solid var(--border); }
.trend-neutral{ background:var(--surface-2); color:var(--ink-soft); }

.chart-card{ background:var(--surface); border-radius:16px; padding:18px; box-shadow:var(--shadow); border:1px solid var(--border); }
.chart-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; flex-wrap:wrap; gap:8px; }
.chart-svg-wrap{ width:100%; height:180px; position:relative; }

.leaderboard-item{
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px;
  border-radius:12px; background:var(--surface-2); margin-bottom:8px; transition:all 0.15s ease;
}
.leaderboard-item:hover{ background:var(--surface); box-shadow:var(--shadow-sm); }
.leaderboard-rank{
  width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:900; background:var(--surface); color:var(--ink); border:1px solid var(--border);
}
.rank-1, .rank-2, .rank-3, .rank-other{ background:var(--surface); color:var(--ink); }

.insight-card{
  background:linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius:14px; padding:12px 16px; border-inline-start:4px solid var(--brand);
  margin-bottom:10px; box-shadow:var(--shadow-sm); display:flex; gap:12px; align-items:flex-start;
}

/* Analytics & Velocity Badges */
.badge-stockout{ background:rgba(239, 68, 68, 0.12); color:#EF4444; border:1px solid rgba(239, 68, 68, 0.25); }
.badge-fastmover{ background:rgba(79, 70, 229, 0.12); color:var(--brand); border:1px solid rgba(79, 70, 229, 0.25); }
.badge-core{ background:rgba(16, 185, 129, 0.12); color:#10B981; border:1px solid rgba(16, 185, 129, 0.25); }
.badge-slowmover{ background:rgba(245, 158, 11, 0.12); color:#F59E0B; border:1px solid rgba(245, 158, 11, 0.25); }

@media (max-width: 640px) {
  .boss-stat-card .boss-stat-val { font-size: 18px; }
  .table-wrap table { font-size: 12px; }
}

[dir="rtl"] .icon-mirror-rtl{transform:scaleX(-1);}

/* Commercial Settings Row - Strict Single Horizontal Line */
.settings-commercial-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}
.settings-commercial-row > .field {
  margin: 0;
}

/* Settings Navigation & Architecture Overhaul */
.settings-nav-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border);
}
.settings-nav-seg button {
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.settings-nav-seg button:hover {
  color: var(--ink);
  background: var(--surface);
}
.settings-nav-seg button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .settings-nav-seg {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .settings-nav-seg::-webkit-scrollbar {
    display: none;
  }
  .settings-nav-seg button {
    flex-shrink: 0 !important;
    padding: 8px 12px !important;
    min-width: fit-content !important;
  }
  .settings-nav-seg button .seg-text {
    display: inline-block !important;
    font-size: 11.5px !important;
  }
}

/* Rewards Subpanel Horizontal Layouts */
.rewards-tier-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.rewards-inputs-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.rewards-inputs-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.rewards-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
@media (max-width: 640px) {
  .rewards-tier-row {
    gap: 8px !important;
  }
  .rewards-tier-row .card {
    padding: 10px 8px !important;
  }
  .rewards-tier-row .card .badge {
    font-size: 9px !important;
    padding: 2px 5px !important;
  }
  .rewards-tier-row .card p {
    display: none;
  }
  .rewards-inputs-row-3 {
    gap: 8px !important;
  }
  .rewards-inputs-row-3 .field label {
    font-size: 11px !important;
  }
  .rewards-inputs-row-3 .field input {
    padding: 8px 6px !important;
    font-size: 12px !important;
    height: 38px !important;
  }
  .rewards-inputs-row-3 .field p {
    display: none;
  }
  .rewards-inputs-row-2 {
    gap: 8px !important;
  }
  .rewards-inputs-row-2 .field label {
    font-size: 11px !important;
  }
  .rewards-inputs-row-2 .field input {
    padding: 8px 6px !important;
    font-size: 12px !important;
    height: 38px !important;
  }
  .rewards-inputs-row-2 .field p {
    font-size: 9.5px !important;
  }
  .rewards-bottom-bar {
    padding: 12px 14px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
  }
  .rewards-bottom-bar label {
    font-size: 12px !important;
    min-width: 0 !important;
  }
  .rewards-bottom-bar .btn-save-rewards {
    padding: 10px 18px !important;
    font-size: 13px !important;
    height: 42px !important;
    min-height: 42px !important;
  }
}

/* Employee Search Strip (Attendance & Access Matrix) */
.emp-search-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.emp-search-strip::-webkit-scrollbar {
  display: none;
}
.emp-search-strip .user-chip-expandable {
  transition: all 0.15s ease;
  border-radius: 12px;
}
.emp-search-strip .user-chip-expandable:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
}

/* Settings Nav Segment Brief vs Full Text */
.seg-text-brief {
  display: none;
}
@media (max-width: 768px) {
  .settings-nav-seg {
    gap: 3px !important;
    padding: 3px !important;
  }
  .settings-nav-seg button {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    gap: 4px !important;
  }
  .seg-text-full {
    display: none;
  }
  .seg-text-brief {
    display: inline;
    font-weight: 700;
  }
}

/* Floating Search Autocomplete Dropdowns */
.emp-search-dropdown {
  animation: fadeInDown 0.15s ease-out;
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* LAN Pair Row */
.lan-pair-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
@media (max-width: 640px) {
  .lan-pair-row {
    flex-direction: column;
    align-items: stretch !important;
  }
  .lan-pair-row > div,
  .lan-pair-row > button {
    width: 100% !important;
  }
}
/* Database & Storage Collections Grid & Cards */
.db-collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.db-collection-card {
  padding: 14px 16px;
}
.db-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.db-action-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.db-card-label .lbl-brief,
.db-card-title .lbl-brief {
  display: none;
}

/* Database & Storage Retention Row in Strictly 1 Horizontal Line */
.db-retention-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}
.db-retention-row .field {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.db-retention-btn {
  flex-shrink: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .db-collections-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .db-collection-card {
    padding: 10px 12px !important;
  }
  .db-collection-card .display.mono {
    font-size: 16px !important;
  }
  .db-card-label .lbl-full,
  .db-card-title .lbl-full {
    display: none !important;
  }
  .db-card-label .lbl-brief,
  .db-card-title .lbl-brief {
    display: inline !important;
  }
  .db-actions-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .db-action-card {
    padding: 12px !important;
    gap: 10px !important;
  }
  .db-action-card h3 {
    font-size: 13px !important;
  }
  .db-retention-row {
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }
  .db-retention-row .field {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .db-retention-btn {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 0 !important;
    flex: 0 0 42px !important;
    justify-content: center !important;
  }
  .db-retention-btn .btn-text {
    display: none !important;
  }
  .db-action-btn-responsive .btn-text {
    display: none !important;
  }
  .db-action-btn-responsive {
    padding: 0 8px !important;
    justify-content: center !important;
  }
}

@media (max-width: 380px) {
  .db-collections-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .db-collection-card {
    padding: 8px 10px !important;
  }
}

/* ═══════════ Danger Zone — Refined 2-Section Layout ═══════════ */
.dz-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section base */
.dz-section {
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dz-section-amber {
  background: rgba(245, 158, 11, 0.04);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.dz-section-danger {
  background: rgba(239, 68, 68, 0.03);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
}

/* Section Header */
.dz-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.dz-section-header-text {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dz-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.dz-section-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Safeguard Pill */
.dz-safeguard-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--sage);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Action List & Rows */
.dz-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dz-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.dz-action-row:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.dz-action-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.dz-action-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
}
.dz-action-text {
  flex: 1;
  min-width: 0;
}
.dz-action-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 3px;
}
.dz-action-desc {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.dz-action-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.dz-action-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dz-count {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-faint);
}

.dz-action-btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.dz-action-btn:hover {
  filter: brightness(0.95);
}

/* Factory Reset Card */
.dz-factory-card {
  padding: 22px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid var(--danger);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dz-factory-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dz-factory-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--danger-bg);
  color: var(--danger);
}
.dz-factory-text {
  flex: 1;
  min-width: 0;
}
.dz-factory-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--danger);
}
.dz-factory-desc {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.dz-factory-btn {
  height: 46px;
  padding: 0 28px;
  font-weight: 800;
  font-size: 14px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* Confirmation Modal */
.dz-modal {
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.dz-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dz-modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  justify-content: flex-end;
}

/* ── Responsive: Narrow screens ── */
@media (max-width: 650px) {
  .dz-section {
    padding: 16px;
    gap: 14px;
    border-radius: 12px;
  }
  .dz-section-header {
    flex-direction: column;
    gap: 10px;
  }
  .dz-section-title {
    font-size: 14px;
  }
  .dz-section-sub {
    font-size: 11.5px;
  }
  .dz-safeguard-pill {
    font-size: 10.5px;
    padding: 5px 10px;
    align-self: flex-start;
  }
  .dz-action-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .dz-action-controls {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .dz-action-desc {
    display: none;
  }
  .dz-action-title {
    font-size: 12.5px;
  }
  .dz-action-icon {
    width: 30px;
    height: 30px;
  }
  .dz-factory-card {
    padding: 16px;
  }
  .dz-factory-icon {
    width: 36px;
    height: 36px;
  }
  .dz-factory-title {
    font-size: 14px;
  }
  .dz-factory-desc {
    font-size: 11.5px;
  }
  .dz-factory-btn {
    height: 42px;
    font-size: 13px;
    padding: 0 20px;
  }
  .dz-modal {
    padding: 18px;
  }
}

@media (max-width: 380px) {
  .dz-section {
    padding: 12px;
  }
  .dz-action-row {
    padding: 10px;
  }
  .dz-btn-label {
    display: none;
  }
}

/* Network & Cloud Hero Grid (Cards Above Each Other on Small Screens) */
@media (max-width: 768px) {
  .network-hero-grid,
  .cloud-hero-grid {
    grid-template-columns: 1fr !important;
  }
  .attendance-emp-header,
  .access-emp-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 8px 12px !important;
  }
  .attendance-emp-header .avatar,
  .access-emp-header .avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 11.5px !important;
    flex-shrink: 0 !important;
  }
  .attendance-search-wrap {
    flex: 1 1 auto !important;
    max-width: 200px !important;
    min-width: 90px !important;
  }
  .attendance-search-wrap .input {
    height: 32px !important;
    font-size: 11.5px !important;
    padding-inline-start: 28px !important;
  }
}

/* ============================================================
   Internal Notifications System Styles
   ============================================================ */
.notif-bell-btn {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--danger, #ef4444);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  line-height: 1;
}

[dir="rtl"] .notif-badge {
  right: auto;
  left: -2px;
}

.notif-badge-pulse {
  animation: notif-pulse 2s infinite;
}

@keyframes notif-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
  100% { transform: scale(1); }
}

/* Notification Container: Simpler, Contrasted & Separated */
.notif-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notif-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.2s ease;
  position: relative;
}

.notif-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border-color: rgba(79, 70, 229, 0.4);
}

.notif-card.unread {
  background: var(--surface);
  border: 1.5px solid var(--brand);
  box-shadow: 0 3px 12px rgba(79, 70, 229, 0.12);
}

.notif-prio-urgent {
  border-inline-start: 4px solid var(--danger, #ef4444) !important;
}

.notif-prio-important {
  border-inline-start: 4px solid #f59e0b !important;
}

.notif-prio-normal {
  border-inline-start: 3px solid var(--brand, #4f46e5) !important;
}

.notif-chip-urgent {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.notif-chip-important {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

/* Responsive Sender Rules: Avatar + First name only on narrow screens */
.notif-sender-full {
  display: inline;
}

.notif-sender-short {
  display: none;
}

.notif-sender-role {
  display: inline-flex;
}

@media (max-width: 600px) {
  .notif-sender-full {
    display: none !important;
  }
  .notif-sender-short {
    display: inline !important;
  }
  .notif-sender-role {
    display: none !important;
  }
  .notif-target-tag {
    font-size: 10px !important;
  }
}

/* Searchable Recipient Picker Styles */
.notif-recipient-picker-wrap {
  position: relative;
  flex-shrink: 0;
}

.notif-recipient-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s ease;
  max-width: 220px;
  outline: none;
}

.notif-recipient-trigger:hover,
.notif-recipient-trigger.open {
  border-color: var(--brand);
  background: var(--surface-2);
}

.notif-recipient-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.notif-recipient-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  z-index: 1200;
  width: 310px;
  max-width: 92vw;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

[dir="rtl"] .notif-recipient-dropdown {
  left: auto;
  right: 0;
}

@keyframes notif-scale-in {
  from { opacity: 0; transform: translateY(4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-recipient-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
}

.notif-recipient-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: var(--ink);
  width: 100%;
}

.notif-recipient-menu-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-picker-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  padding-top: 4px;
}

.notif-picker-group:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.notif-picker-category-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  padding: 4px 8px;
}

.notif-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease;
}

.notif-picker-item:hover {
  background: var(--surface-2);
}

.notif-picker-item.active {
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand);
  font-weight: 700;
}

.notif-picker-group-item {
  font-weight: 700;
}

.notif-picker-sub-item {
  padding-inline-start: 16px;
}

.notif-chip-normal {
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand, #4f46e5);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.notif-chip-ack {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.notif-chip-voice {
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand, #4f46e5);
  border: 1px solid rgba(79, 70, 229, 0.25);
}

.notif-ack-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #059669;
}

/* Camera Barcode Scanner Styles (Mobile Exclusive / Dedicated) */
.camera-scanner-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.camera-scanner-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

.camera-scanner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink, #fff);
}

.camera-scanner-viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 380px;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-scanner-viewfinder video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-scanner-reticle {
  position: absolute;
  inset: 15%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.45);
}

.camera-scanner-laser {
  position: absolute;
  top: 15%;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #10b981;
  box-shadow: 0 0 10px #10b981, 0 0 4px #fff;
  animation: camera-laser-sweep 1.8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes camera-laser-sweep {
  0% { top: 18%; }
  100% { top: 82%; }
}

.camera-scanner-footer {
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Interactive Scanned Result Overlay */
.camera-scanner-result-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
  animation: scannerResultFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-sizing: border-box;
}

@keyframes scannerResultFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.scanner-result-card {
  background: var(--surface, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}


/* Responsive Day Close Table & Currency Unit Rules */
.dayclose-table-card {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Table Date & Time Center Alignment on Narrow Screens */
@media (max-width: 880px) {
  table th.col-date,
  table td.col-date,
  .table-wrap table th.col-date,
  .table-wrap table td.col-date {
    text-align: center !important;
  }
}

/* Hide Supplies Column on Narrow Screens < 600px */
@media (max-width: 600px) {
  th.col-supplies,
  td.col-supplies,
  .col-supplies {
    display: none !important;
  }
}

@media (max-width: 500px) {
  .currency-unit,
  .curr-unit {
    display: none !important;
  }
}

/* Rotate Logout Icon 180 degrees in Arabic RTL */
[dir="rtl"] .icon-logout,
[dir="rtl"] svg[data-icon="logout"],
[dir="rtl"] .icon-btn svg[data-icon="logout"],
[dir="rtl"] .pill-btn svg[data-icon="logout"],
[dir="rtl"] .btn svg[data-icon="logout"] {
  transform: rotate(180deg) !important;
  display: inline-block;
}

/* In large screens, the logout icon in the sidebar is rotated 180 degrees compared to the one in the topbar */
.sidebar svg[data-icon="logout"],
.sidebar .icon-logout,
.sidebar .nav-item svg[data-icon="logout"] {
  transform: rotate(180deg) !important;
  display: inline-block;
}

[dir="rtl"] .sidebar svg[data-icon="logout"],
[dir="rtl"] .sidebar .icon-logout,
[dir="rtl"] .sidebar .nav-item svg[data-icon="logout"] {
  transform: rotate(0deg) !important;
  display: inline-block;
}

/* ============================================================
   VOICE MESSAGE & INTERNAL NOTIFICATION STYLING
   ============================================================ */

/* Voice Recording Card */
.voice-record-card {
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.voice-recording-active {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
  animation: borderGlow 2s infinite ease-in-out;
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(239, 68, 68, 0.35); }
  50% { border-color: rgba(239, 68, 68, 0.7); }
}

.record-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: pulseRecord 1.1s ease-in-out infinite;
}

@keyframes pulseRecord {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}

/* Voice Player Bar */
.voice-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  margin: 6px 0;
  box-sizing: border-box;
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--brand, #4f46e5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.voice-play-btn:hover {
  transform: scale(1.05);
}

.voice-play-btn:active {
  transform: scale(0.95);
}

.voice-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border, #e2e8f0);
  outline: none;
  cursor: pointer;
  accent-color: var(--brand, #4f46e5);
}

.voice-timer-badge {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.voice-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.voice-expired-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 4px 0;
}

/* Notification Filter Segmented Bar */
.notif-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.notif-filter-bar::-webkit-scrollbar {
  display: none;
}

.notif-filter-chip {
  padding: 5px 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.notif-filter-chip:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.notif-filter-chip.active {
  background: var(--brand, #4f46e5);
  color: #fff;
  border-color: var(--brand, #4f46e5);
}

.notif-filter-chip.notif-filter-alert.active {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: #ef4444;
}

.notif-filter-chip.notif-filter-ack.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: #10b981;
}

.notif-filter-chip.notif-filter-sent.active {
  background: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
  border-color: #7c3aed;
}

.notif-count-pill {
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.12);
  font-weight: 800;
}

.notif-filter-chip.active .notif-count-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.notif-filter-chip.notif-filter-alert.active .notif-count-pill {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}
.notif-filter-chip.notif-filter-ack.active .notif-count-pill {
  background: rgba(16, 185, 129, 0.25);
  color: #10b981;
}
.notif-filter-chip.notif-filter-sent.active .notif-count-pill {
  background: rgba(124, 58, 237, 0.25);
  color: #7c3aed;
}

/* Notification Chat Composer Styles */
.notif-chat-composer {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.notif-chat-composer.embedded {
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.notif-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.notif-recipient-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2px 8px;
  max-width: 180px;
}

.notif-recipient-select {
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  max-width: 150px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notif-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Priority group without container */
.notif-prio-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.notif-icon-toggle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.notif-icon-toggle:hover {
  color: var(--ink);
  background: transparent;
  transform: scale(1.18);
}

.notif-icon-toggle.prio-normal.active {
  background: transparent;
  color: var(--brand, #4f46e5);
}

.notif-icon-toggle.prio-important.active {
  background: transparent;
  color: #f59e0b;
}

.notif-icon-toggle.prio-urgent.active {
  background: transparent;
  color: var(--danger, #ef4444);
}

.notif-icon-toggle.ack-toggle {
  display: none;
}

/* Chat Input Row & Embedded Mic Inside */
.notif-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.notif-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

.notif-chat-input {
  width: 100%;
  min-height: 38px;
  height: 38px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding-inline-start: 14px;
  padding-inline-end: 34px;
  font-size: 12.5px;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.notif-chat-input:focus {
  border-color: var(--brand, #4f46e5);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.notif-mic-btn {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  z-index: 2;
}

.notif-mic-btn:hover {
  background: transparent;
  color: var(--brand, #4f46e5);
  transform: translateY(-50%) scale(1.18);
}

.notif-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand, #4f46e5);
  border: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}

.notif-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--brand, #4f46e5);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

.notif-send-btn:not(:disabled):hover {
  transform: scale(1.08);
  filter: brightness(1.12);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.45);
}

/* Read Receipts Chain at bottom of notification card */
.notif-read-chain {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.notif-avatar-stack {
  display: inline-flex;
  align-items: center;
  direction: ltr !important;
}

.notif-chain-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 800;
  border: 1.5px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  margin-left: -6px;
  cursor: default;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.notif-chain-avatar:first-child {
  margin-left: 0;
}

.notif-chain-avatar:hover {
  transform: scale(1.3);
  z-index: 50 !important;
}

/* Monochrome icons in recipient selection dropdown */
.notif-recipient-dropdown .icon {
  color: var(--ink-soft) !important;
  transition: color 0.15s ease;
}

.notif-recipient-dropdown .notif-picker-item:hover .icon,
.notif-recipient-dropdown .notif-picker-item.active .icon {
  color: var(--brand) !important;
}

/* Responsive Cashier Column in Transaction Timeline Table */
.col-cashier .cashier-header-icon {
  display: none;
}
.col-cashier .cashier-header-text {
  display: inline;
}

.col-cashier .cashier-cell-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.col-cashier .cashier-cell-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.col-cashier .cashier-cell-avatar:hover {
  transform: scale(1.18);
}

.col-cashier .cashier-cell-text {
  display: inline;
}

@media (max-width: 680px) {
  .col-cashier .cashier-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand, #4f46e5);
  }
  .col-cashier .cashier-header-text {
    display: none;
  }
  .col-cashier .cashier-cell-text {
    display: none !important;
  }
  .col-cashier .cashier-cell-wrap {
    justify-content: center;
    width: 100%;
  }
  .col-cashier .cashier-cell-avatar {
    display: inline-flex;
    margin: 0 auto;
  }
}

.notif-recording-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  height: 38px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  padding: 0 10px;
  gap: 6px;
}

.notif-wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.notif-wave-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--danger, #ef4444);
  animation: notifWave 0.8s ease-in-out infinite alternate;
}

.notif-wave-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.notif-wave-bar:nth-child(2) { height: 13px; animation-delay: 0.2s; }
.notif-wave-bar:nth-child(3) { height: 9px; animation-delay: 0.4s; }
.notif-wave-bar:nth-child(4) { height: 14px; animation-delay: 0.1s; }

@keyframes notifWave {
  0% { height: 4px; }
  100% { height: 14px; }
}

.notif-rec-cancel {
  color: var(--danger, #ef4444);
}
.notif-rec-done {
  color: #10b981;
}

.pulse-send {
  animation: notifPulse 1.2s infinite;
}

@keyframes notifPulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.notif-voice-attached-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: var(--brand, #4f46e5);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  align-self: flex-start;
}

/* Remove Add Button in POS / Checkout Scan Row on Narrow Screens */
@media (max-width: 768px) {
  .scan-row .btn-primary,
  .scan-row .btn-scan-add {
    display: none !important;
  }
}

.voice-record-card {
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.voice-recording-active {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.35);
  animation: borderGlow 2s infinite ease-in-out;
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(239, 68, 68, 0.35); }
  50% { border-color: rgba(239, 68, 68, 0.7); }
}

.record-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  animation: pulseRecord 1.1s ease-in-out infinite;
}

@keyframes pulseRecord {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}

/* Voice Player Bar */
.voice-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  margin: 6px 0;
  box-sizing: border-box;
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--brand, #4f46e5);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.voice-play-btn:hover {
  transform: scale(1.05);
}

.voice-play-btn:active {
  transform: scale(0.95);
}

.voice-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--border, #e2e8f0);
  outline: none;
  cursor: pointer;
  accent-color: var(--brand, #4f46e5);
}

.voice-timer-badge {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.voice-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.voice-expired-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 4px 0;
}

/* Notification Filter Segmented Bar */
.notif-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.notif-filter-bar::-webkit-scrollbar {
  display: none;
}

.notif-filter-chip {
  padding: 5px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.notif-filter-chip:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.notif-filter-chip.active {
  background: var(--brand, #4f46e5);
  color: #fff;
  border-color: var(--brand, #4f46e5);
}

.notif-count-pill {
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.12);
  font-weight: 800;
}

.notif-filter-chip.active .notif-count-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Remove Add Button in POS / Checkout Scan Row on Narrow Screens */
@media (max-width: 768px) {
  .scan-row .btn-primary,
  .scan-row .btn-scan-add {
    display: none !important;
  }
}

/* High-Contrast Visible Progress Tubes (Never blends into background or table cell) */
.progress,
.progress-tube {
  height: 8px;
  background: #CBD5E1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
[data-theme="dark"] .progress,
[data-theme="dark"] .progress-tube,
[data-theme="neumorphic-dark"] .progress,
[data-theme="neumorphic-dark"] .progress-tube {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
[data-theme="neumorphic"] .progress,
[data-theme="neumorphic"] .progress-tube {
  background: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: inset 2px 2px 4px rgba(148, 163, 184, 0.5), inset -1px -1px 3px rgba(255, 255, 255, 0.8);
}
.progress > div,
.progress-tube > div,
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand, #4f46e5);
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.5);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none !important;
  padding: 0 !important;
  display: block;
}

/* Client Sheet KPI Cards (Desktop 4 cards, Mobile 2x2 Grid) */
.client-sheet-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
}
@media (max-width: 850px) {
  .client-sheet-kpis {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* Universal Role-Colored Avatars & Badges */
.avatar.role-boss, .role-badge.role-boss, [data-role="boss"] .avatar { background: rgba(124, 58, 237, 0.14) !important; color: #7C3AED !important; border: 1.5px solid rgba(124, 58, 237, 0.35) !important; }
.avatar.role-manager, .role-badge.role-manager, [data-role="manager"] .avatar { background: rgba(37, 99, 235, 0.14) !important; color: #2563EB !important; border: 1.5px solid rgba(37, 99, 235, 0.35) !important; }
.avatar.role-accountant, .role-badge.role-accountant, [data-role="accountant"] .avatar { background: rgba(217, 119, 6, 0.14) !important; color: #D97706 !important; border: 1.5px solid rgba(217, 119, 6, 0.35) !important; }
.avatar.role-cashier, .role-badge.role-cashier, [data-role="cashier"] .avatar { background: rgba(236, 72, 153, 0.14) !important; color: #EC4899 !important; border: 1.5px solid rgba(236, 72, 153, 0.35) !important; }
.avatar.role-employee, .role-badge.role-employee, [data-role="employee"] .avatar { background: rgba(16, 185, 129, 0.14) !important; color: #059669 !important; border: 1.5px solid rgba(16, 185, 129, 0.35) !important; }

/* Responsive Compact Tables (< 600px) — Icons Instead of Long Names, Brief & Abbreviated Text */
@media (max-width: 600px) {
  .table-wrap table th,
  .table-wrap table td,
  table.table th,
  table.table td {
    padding: 6px 4px !important;
    font-size: 11.5px !important;
  }
  .table-wrap table th .lbl-full,
  table.table th .lbl-full,
  .table-wrap table td .lbl-full,
  table.table td .lbl-full {
    display: none !important;
  }
  .table-wrap table th .lbl-short,
  table.table th .lbl-short,
  .table-wrap table td .lbl-short,
  table.table td .lbl-short {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }
  .tbl-cell-name,
  .table-wrap td .tname,
  .table-wrap td .cell-name {
    max-width: 80px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 11.5px !important;
  }
  .tbl-hide-600 {
    display: none !important;
  }
  .tbl-icon-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .access-level-td,
  .access-level-th {
    padding: 6px 3px !important;
    width: auto !important;
    max-width: 140px !important;
  }
  .access-level-seg {
    padding: 2px !important;
    gap: 2px !important;
    border-radius: 8px !important;
  }
  .access-level-seg button {
    padding: 4px 6px !important;
    font-size: 10px !important;
    gap: 2px !important;
    border-radius: 6px !important;
  }
  .col-effective-status,
  th.col-effective-status,
  td.col-effective-status {
    display: none !important;
  }
}

/* Access Level Authority Button States (Visual Indicators for None, View, Edit) */
.access-level-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-3, rgba(0,0,0,0.06));
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
  gap: 3px;
}
.access-btn {
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  color: var(--ink-faint);
}
.access-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}
.access-btn.active.access-btn-none {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #EF4444 !important;
  border-color: rgba(239, 68, 68, 0.45) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
}
.access-btn.active.access-btn-view {
  background: rgba(245, 158, 11, 0.16) !important;
  color: #D97706 !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}
.access-btn.active.access-btn-edit {
  background: rgba(16, 185, 129, 0.16) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   MODERN PROFESSIONAL NEUMORPHISM DESIGN SYSTEM
   Soft physical-surface tactile interface with accessibility,
   precise elevation levels, micro-interactions, and contrast.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Surfaces, Cards & Elevation Hierarchy ── */
[data-theme^="neumorphic"] {
  background-color: var(--bg);
  color: var(--ink);
}

/* Level 1: Soft Raised (Chips, Small Cards, Sub-panels, Tables) */
[data-theme^="neumorphic"] .tag,
[data-theme^="neumorphic"] .banner,
[data-theme^="neumorphic"] .emp-chip,
[data-theme^="neumorphic"] .product-pill,
[data-theme^="neumorphic"] .db-collection-card,
[data-theme^="neumorphic"] .dz-action-row,
[data-theme^="neumorphic"] .table-wrap {
  position: relative;
  z-index: 1;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Level 2: Raised (Main Cards, Core Panels, POS Action Bar) */
[data-theme^="neumorphic"] .card,
[data-theme^="neumorphic"] .dz-section,
[data-theme^="neumorphic"] .dz-factory-card,
[data-theme^="neumorphic"] .login-screen .card,
[data-theme^="neumorphic"] .pos-action-bar {
  position: relative;
  z-index: 1;
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.22s ease, border-color 0.2s ease;
}

/* Level 3: Floating (Modals, Popovers, Overlays) */
[data-theme^="neumorphic"] .modal,
[data-theme^="neumorphic"] .modal-box,
[data-theme^="neumorphic"] .dz-modal,
[data-theme^="neumorphic"] .toast-stack .card {
  position: relative;
  z-index: 1000;
  background: var(--surface);
  box-shadow: var(--shadow-floating) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

/* Floating Dropdown Lists & Search Autocomplete: Elevated In-Page Layer */
.custom-select-container.open,
.custom-select-container:has(.custom-select-menu.open),
.field:has(.custom-select-container.open),
.field:has(.custom-select-menu.open),
.card:has(.custom-select-container.open),
.card:has(.custom-select-menu.open),
.card.has-open-dropdown,
.dz-section:has(.custom-select-container.open),
.dz-section:has(.custom-select-menu.open),
.dz-section.has-open-dropdown,
.table-wrap:has(.custom-select-container.open),
.table-wrap:has(.custom-select-menu.open),
.table-wrap.has-open-dropdown,
.dropdowns-wrap:has(.custom-select-container.open),
.dropdowns-wrap:has(.custom-select-menu.open),
.dropdowns-wrap.has-open-dropdown {
  z-index: 1000 !important;
  position: relative !important;
}

.custom-select-menu,
[data-theme^="neumorphic"] .custom-select-menu,
.emp-search-dropdown,
[data-theme^="neumorphic"] .emp-search-dropdown {
  position: absolute !important;
  z-index: 1200 !important;
  background: var(--surface) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22), var(--shadow-floating) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}

.custom-select-menu.open,
[data-theme^="neumorphic"] .custom-select-menu.open {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

[data-theme^="neumorphic"] .custom-select-menu .hover-filter-opt {
  transition: all 0.16s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  border-radius: var(--radius-sm) !important;
  margin: 2px 0 !important;
}

[data-theme^="neumorphic"] .custom-select-menu .hover-filter-opt:hover {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-sm) !important;
  transform: translateY(-1px);
}

[data-theme^="neumorphic"] .custom-select-menu .hover-filter-opt.selected {
  background: var(--brand-bg) !important;
  color: var(--brand) !important;
  box-shadow: var(--shadow-inset) !important;
  font-weight: 800 !important;
}

/* ── 2. Interactive Buttons Model (Elevated Forward with Tactile Neumorphic 3D Effect) ── */
[data-theme^="neumorphic"] .btn,
[data-theme^="neumorphic"] .icon-btn,
[data-theme^="neumorphic"] .pill-btn,
[data-theme^="neumorphic"] .pill-expandable,
[data-theme^="neumorphic"] .user-chip-expandable {
  position: relative;
  z-index: 2; /* Sits forward above containers, cards, and tables */
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-soft); /* Direct outer 3D bevel cast onto underlying surfaces */
  transition: box-shadow 0.22s ease, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, color 0.2s ease;
}

/* Hover: Further Elevation Forward */
[data-theme^="neumorphic"] .btn:not(:disabled):hover,
[data-theme^="neumorphic"] .icon-btn:not(:disabled):hover,
[data-theme^="neumorphic"] .pill-btn:not(:disabled):hover,
[data-theme^="neumorphic"] .pill-expandable:hover,
[data-theme^="neumorphic"] .user-chip-expandable:hover {
  z-index: 3;
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
  color: var(--ink);
}

/* Active / Pressed: Depressed Inset into Surface */
[data-theme^="neumorphic"] .btn:not(:disabled):active,
[data-theme^="neumorphic"] .btn.active,
[data-theme^="neumorphic"] .icon-btn:not(:disabled):active,
[data-theme^="neumorphic"] .icon-btn.active,
[data-theme^="neumorphic"] .pill-btn:not(:disabled):active {
  z-index: 2;
  transform: translateY(1px);
  box-shadow: var(--shadow-inset) !important;
}

/* ── Colored Buttons: Harmonized Matching Glow (No Harsh White Glow) ── */

/* 1. Primary / Brand Buttons (Indigo/Violet Glow) */
[data-theme^="neumorphic"] .btn-primary {
  background: var(--brand);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
  box-shadow: 3px 4px 10px rgba(79, 70, 229, 0.40), -2px -2px 8px rgba(165, 180, 252, 0.55), 0 0 14px rgba(79, 70, 229, 0.28);
}
[data-theme^="neumorphic"] .btn-primary:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 16px rgba(79, 70, 229, 0.50), -2px -2px 10px rgba(165, 180, 252, 0.75), 0 0 20px rgba(79, 70, 229, 0.40);
  filter: brightness(1.05);
}
[data-theme^="neumorphic"] .btn-primary:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: inset 2px 2px 6px rgba(30, 27, 75, 0.6), inset -2px -2px 6px rgba(129, 140, 248, 0.35) !important;
}

[data-theme="neumorphic-dark"] .btn-primary {
  box-shadow: 4px 5px 14px rgba(0, 0, 0, 0.85), -2px -2px 8px rgba(99, 102, 241, 0.40), 0 0 18px rgba(99, 102, 241, 0.35);
}
[data-theme="neumorphic-dark"] .btn-primary:not(:disabled):hover {
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.95), -2px -2px 10px rgba(99, 102, 241, 0.55), 0 0 24px rgba(99, 102, 241, 0.55);
}
[data-theme="neumorphic-dark"] .btn-primary:not(:disabled):active {
  box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.8), inset -2px -2px 6px rgba(99, 102, 241, 0.3) !important;
}

/* 2. Danger Buttons (Rose/Crimson Glow) */
[data-theme^="neumorphic"] .btn-danger {
  background: var(--danger);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 3px 4px 10px rgba(225, 29, 72, 0.38), -2px -2px 8px rgba(254, 205, 211, 0.65), 0 0 14px rgba(225, 29, 72, 0.28);
}
[data-theme^="neumorphic"] .btn-danger:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 16px rgba(225, 29, 72, 0.50), -2px -2px 10px rgba(254, 205, 211, 0.85), 0 0 20px rgba(225, 29, 72, 0.40);
  filter: brightness(1.05);
}
[data-theme^="neumorphic"] .btn-danger:not(:disabled):active {
  transform: translateY(1px);
  box-shadow: inset 2px 2px 6px rgba(136, 19, 55, 0.6), inset -2px -2px 6px rgba(251, 113, 133, 0.35) !important;
}

[data-theme="neumorphic-dark"] .btn-danger {
  box-shadow: 4px 5px 14px rgba(0, 0, 0, 0.85), -2px -2px 8px rgba(244, 63, 94, 0.40), 0 0 18px rgba(244, 63, 94, 0.35);
}
[data-theme="neumorphic-dark"] .btn-danger:not(:disabled):hover {
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.95), -2px -2px 10px rgba(244, 63, 94, 0.55), 0 0 24px rgba(244, 63, 94, 0.55);
}

/* 3. Day Close & Amber Buttons (Warm Amber Glow) */
[data-theme^="neumorphic"] .btn-dayclose {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(217, 119, 6, 0.45);
  box-shadow: 3px 4px 10px rgba(217, 119, 6, 0.35), -2px -2px 8px rgba(254, 243, 199, 0.70), 0 0 12px rgba(217, 119, 6, 0.25);
}
[data-theme^="neumorphic"] .btn-dayclose:hover {
  transform: translateY(-2px);
  box-shadow: 4px 6px 16px rgba(217, 119, 6, 0.48), -2px -2px 10px rgba(254, 243, 199, 0.90), 0 0 20px rgba(217, 119, 6, 0.40);
}
[data-theme^="neumorphic"] .btn-dayclose.active {
  box-shadow: 0 0 18px rgba(217, 119, 6, 0.45) !important;
}

[data-theme="neumorphic-dark"] .btn-dayclose {
  box-shadow: 4px 5px 14px rgba(0, 0, 0, 0.85), -2px -2px 8px rgba(245, 158, 11, 0.40), 0 0 16px rgba(245, 158, 11, 0.35);
}
[data-theme="neumorphic-dark"] .btn-dayclose:hover {
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.95), -2px -2px 10px rgba(245, 158, 11, 0.55), 0 0 24px rgba(245, 158, 11, 0.55);
}

/* Ghost Button */
[data-theme^="neumorphic"] .btn-ghost {
  background: transparent;
  box-shadow: none;
  border: 1px solid transparent;
}
[data-theme^="neumorphic"] .btn-ghost:not(:disabled):hover {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

/* Disabled State */
[data-theme^="neumorphic"] .btn:disabled,
[data-theme^="neumorphic"] .icon-btn:disabled {
  opacity: 0.45;
  box-shadow: none !important;
  cursor: not-allowed;
  transform: none !important;
}

/* ── 3. Sunken Inset Form Inputs & Focus Ring ── */
[data-theme^="neumorphic"] .input,
[data-theme^="neumorphic"] input[type="text"],
[data-theme^="neumorphic"] input[type="password"],
[data-theme^="neumorphic"] input[type="number"],
[data-theme^="neumorphic"] input[type="date"],
[data-theme^="neumorphic"] input[type="email"],
[data-theme^="neumorphic"] select,
[data-theme^="neumorphic"] textarea,
[data-theme^="neumorphic"] .custom-select-trigger {
  background: var(--surface-inset, var(--surface-2)) !important;
  box-shadow: var(--shadow-inset) !important;
  color: var(--ink);
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

/* High-Contrast Accessible Focus State */
[data-theme^="neumorphic"] .input:focus,
[data-theme^="neumorphic"] input:focus,
[data-theme^="neumorphic"] select:focus,
[data-theme^="neumorphic"] textarea:focus,
[data-theme^="neumorphic"] .custom-select-trigger:focus,
[data-theme^="neumorphic"] .btn:focus-visible {
  outline: none !important;
  box-shadow: var(--shadow-inset), var(--shadow-focus) !important;
  border-color: var(--brand) !important;
}

/* ── 4. Segmented Controls & Switches ── */
[data-theme^="neumorphic"] .seg {
  background: var(--surface);
  box-shadow: var(--shadow-inset);
  padding: 5px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  gap: 4px;
}

[data-theme^="neumorphic"] .seg button {
  position: relative;
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

[data-theme^="neumorphic"] .seg button:hover:not(.active) {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
  z-index: 2;
}

[data-theme^="neumorphic"] .seg button.active {
  position: relative;
  z-index: 2; /* Elevated forward above the sunken track */
  background: var(--brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--brand) !important;
  box-shadow: 0 4px 14px -2px var(--brand-bg, rgba(79, 70, 229, 0.45)), var(--shadow-soft) !important;
  font-weight: 800 !important;
}
[data-theme^="neumorphic"] .seg button.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
[data-theme^="neumorphic"] .seg button.active.seg-danger,
[data-theme^="neumorphic"] .seg button.seg-danger.active {
  background: var(--danger) !important;
  color: #ffffff !important;
  border-color: var(--danger) !important;
  box-shadow: 0 4px 14px -2px rgba(213, 28, 81, 0.45), var(--shadow-soft) !important;
}
[data-theme^="neumorphic"] .seg button.active.seg-danger svg,
[data-theme^="neumorphic"] .seg button.seg-danger.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

/* ── 5. Sidebar & Navigation ── */
[data-theme^="neumorphic"] .sidebar {
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
}

[data-theme^="neumorphic"] .nav-item {
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

[data-theme^="neumorphic"] .nav-item:hover {
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border-color: var(--border);
  color: var(--ink);
}

[data-theme^="neumorphic"] .nav-item.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-inset);
  border-color: var(--border);
  font-weight: 800;
}

/* ── 6. Tables & Data Presentation ── */
[data-theme^="neumorphic"] table {
  color: var(--ink);
  position: relative;
  z-index: 1;
}

[data-theme^="neumorphic"] th {
  color: var(--ink-faint);
  font-weight: 800;
}

[data-theme^="neumorphic"] tbody tr:nth-child(odd) {
  background: var(--surface-2);
}

[data-theme^="neumorphic"] .table-wrap {
  border-radius: var(--radius-md);
  position: relative;
  z-index: 1;
}

[data-theme^="neumorphic"] td .btn,
[data-theme^="neumorphic"] td .icon-btn,
[data-theme^="neumorphic"] td .pill-btn {
  position: relative;
  z-index: 2;
}

/* ── 7. Badges & Indicators ── */
[data-theme^="neumorphic"] .badge {
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

[data-theme^="neumorphic"] .badge-brand {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--brand-bg);
}

[data-theme^="neumorphic"] .badge-sage {
  background: var(--sage);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--sage-bg);
}

[data-theme^="neumorphic"] .badge-danger {
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--danger-bg);
}

[data-theme^="neumorphic"] .badge-amber {
  background: #d97706;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS THEMES SUBPANEL STYLES
   ═══════════════════════════════════════════════════════════════ */
.theme-subpanel-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Theme Presets Grid */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.theme-preset-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.theme-preset-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-raised);
}

/* Theme Mini Visual Simulation Preview */
.theme-mini-preview {
  height: 94px;
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  user-select: none;
}

.theme-mini-light {
  background: #F8FAFC;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}
.theme-mini-light .mini-card {
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.theme-mini-dark {
  background: #0B0F19;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.theme-mini-dark .mini-card {
  background: #111827;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.theme-mini-neumorphic {
  background: #EBEEF3;
  box-shadow: inset 2px 2px 5px rgba(163,177,198,0.45), inset -2px -2px 5px #FFFFFF;
}
.theme-mini-neumorphic .mini-card {
  background: #EBEEF3;
  box-shadow: 3px 3px 8px rgba(163,177,198,0.6), -3px -3px 8px #FFFFFF;
}

.theme-mini-neumorphic-dark {
  background: #181B20;
  box-shadow: inset 2px 2px 5px #101216, inset -2px -2px 5px #20242B;
}
.theme-mini-neumorphic-dark .mini-card {
  background: #181B20;
  box-shadow: 3px 3px 8px #0E1013, -3px -3px 8px #23272F;
}

.theme-mini-warm-ceramic {
  background: #E8E5DE;
  box-shadow: inset 0 1px 3px rgba(60, 56, 48, 0.08);
}
.theme-mini-warm-ceramic .mini-card {
  background: #F7F6F2;
  border-radius: 12px !important;
  box-shadow: 0 3px 8px rgba(60, 56, 48, 0.08);
}

.theme-mini-obsidian-frost {
  background: #EEF1F5;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}
.theme-mini-obsidian-frost .mini-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 3px 10px rgba(18, 22, 30, 0.05);
}

.theme-mini-glacier-frost {
  background: #E5EEF5;
  box-shadow: inset 1px 1px 3px rgba(158, 183, 204, 0.40);
}
.theme-mini-glacier-frost .mini-card {
  background: #F4F8FB;
  box-shadow: 2px 2px 6px rgba(158, 183, 204, 0.45), -2px -2px 6px #FFFFFF;
}

.theme-mini-bento-wireframe {
  background: #181A1E;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}
.theme-mini-bento-wireframe .mini-card {
  background: #2B2E34;
  border-radius: 12px !important;
  box-shadow: 0 0 0 1.5px #FFFFFF, 0 3px 8px rgba(0, 0, 0, 0.65);
}

/* ============================================================
   BENTO WIREFRAME THEME APP SKIN OVERRIDES
   High-contrast matte slate bento modules, stark white borders
   ============================================================ */
[data-theme="bento-wireframe"] body {
  background: radial-gradient(circle at 80% 15%, #2B2E35 0%, #17191C 65%);
  color: #FFFFFF;
}
[data-theme="bento-wireframe"] .app-shell {
  background: transparent;
}
[data-theme="bento-wireframe"] .sidebar {
  background: #25272D;
  border: 2px solid #FFFFFF !important;
  border-radius: 26px;
  margin: 14px 0 14px 14px;
  height: calc(100vh - 28px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.3);
}
[dir="rtl"][data-theme="bento-wireframe"] .sidebar,
[data-theme="bento-wireframe"] [dir="rtl"] .sidebar {
  margin: 14px 14px 14px 0;
}
[data-theme="bento-wireframe"] .sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 12px;
}
[data-theme="bento-wireframe"] .nav-item {
  border-radius: 9999px;
  color: #D3D7DF;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="bento-wireframe"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  transform: translateX(2px);
}
[dir="rtl"][data-theme="bento-wireframe"] .nav-item:hover {
  transform: translateX(-2px);
}
[data-theme="bento-wireframe"] .nav-item.active {
  background: #E2E4E9 !important;
  color: #141619 !important;
  font-weight: 800;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
[data-theme="bento-wireframe"] .nav-item.active svg {
  color: #141619 !important;
  stroke: #141619 !important;
}
[data-theme="bento-wireframe"] .topbar {
  background: rgba(25, 27, 31, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}
[data-theme="bento-wireframe"] .icon-btn {
  background: #25282E;
  border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 9999px;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
[data-theme="bento-wireframe"] .icon-btn:hover {
  border-color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.06);
}
[data-theme="bento-wireframe"] .card,
[data-theme="bento-wireframe"] .pos-panel,
[data-theme="bento-wireframe"] .metric-card,
[data-theme="bento-wireframe"] .stat-card,
[data-theme="bento-wireframe"] .kpi-card,
[data-theme="bento-wireframe"] .modal {
  background: #2C2F35 !important;
  border: 2px solid #FFFFFF !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65) !important;
}
[data-theme="bento-wireframe"] .btn-primary {
  background: #E2E4E9 !important;
  color: #141619 !important;
  font-weight: 800 !important;
  border-radius: 9999px !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="bento-wireframe"] .btn-primary:hover {
  background: #FFFFFF !important;
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25) !important;
}
[data-theme="bento-wireframe"] .btn-ghost,
[data-theme="bento-wireframe"] .btn-secondary,
[data-theme="bento-wireframe"] .pill-btn,
[data-theme="bento-wireframe"] .btn:not(.btn-primary):not(.btn-danger) {
  border-radius: 9999px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #FFFFFF !important;
}
[data-theme="bento-wireframe"] .btn-ghost:hover,
[data-theme="bento-wireframe"] .btn-secondary:hover,
[data-theme="bento-wireframe"] .pill-btn:hover {
  border-color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.16) !important;
}
[data-theme="bento-wireframe"] input,
[data-theme="bento-wireframe"] select,
[data-theme="bento-wireframe"] textarea,
[data-theme="bento-wireframe"] .search-input {
  border-radius: 9999px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  background: #202227 !important;
  color: #FFFFFF !important;
}
[data-theme="bento-wireframe"] input:focus,
[data-theme="bento-wireframe"] select:focus,
[data-theme="bento-wireframe"] .search-input:focus {
  border-color: #FFFFFF !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35) !important;
}
[data-theme="bento-wireframe"] .seg,
[data-theme="bento-wireframe"] .tab-bar,
[data-theme="bento-wireframe"] .settings-nav-seg {
  border-radius: 9999px !important;
  background: #212328 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  padding: 4px !important;
}
[data-theme="bento-wireframe"] .seg button,
[data-theme="bento-wireframe"] .tab-bar button,
[data-theme="bento-wireframe"] .settings-nav-seg button {
  border-radius: 9999px !important;
  color: #D3D7DF !important;
}
[data-theme="bento-wireframe"] .seg button.active,
[data-theme="bento-wireframe"] .tab-bar button.active,
[data-theme="bento-wireframe"] .settings-nav-seg button.active {
  background: #E2E4E9 !important;
  color: #141619 !important;
  font-weight: 800 !important;
  border: 1.5px solid #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
[data-theme="bento-wireframe"] .badge {
  border-radius: 9999px !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
[data-theme="bento-wireframe"] .badge-brand {
  background: #E2E4E9 !important;
  color: #141619 !important;
  border-color: #FFFFFF !important;
  font-weight: 800 !important;
}
[data-theme="bento-wireframe"] .product-card,
[data-theme="bento-wireframe"] .product-pill {
  border-radius: 18px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.45) !important;
  background: #2B2E34 !important;
}
[data-theme="bento-wireframe"] .product-card:hover,
[data-theme="bento-wireframe"] .product-pill:hover {
  border-color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================================
   BENTO WIREFRAME UI KIT SHOWCASE COMPONENT
   Faithful reproduction of the tactile wireframe aesthetic
   ============================================================ */
.wireframe-kit-stage {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 28px;
  background: radial-gradient(circle at 80% 15%, #383B42 0%, #15171A 75%);
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-sizing: border-box;
}
.wireframe-kit-stage::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,0.09) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Master White Outer Capsule Frame */
.wireframe-outer-frame {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border-radius: 30px;
  padding: 5px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  display: flex;
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* Slim Left Rail */
.wireframe-rail {
  width: 58px;
  flex-shrink: 0;
  background: #2B2D32;
  border-radius: 25px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.wireframe-rail-circle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: #24262A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.wireframe-rail-circle-btn:hover {
  border-color: #FFFFFF;
  background: #383B42;
  transform: scale(1.08);
}
.wireframe-rail-icons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.wireframe-rail-squircle {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #35383F;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D3D7DF;
  transition: all 0.2s ease;
}
.wireframe-rail-squircle:hover {
  border-color: #FFFFFF;
  background: #42464E;
}
.wireframe-rail-squircle.active {
  background: #E2E4E9;
  color: #141619;
  border-color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Main Bento Grid */
.wireframe-main-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

/* Top Section (Hero + Side Drawer) */
.wireframe-top-row {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 5px;
}
@media (max-width: 768px) {
  .wireframe-top-row {
    grid-template-columns: 1fr;
  }
  .wireframe-outer-frame {
    flex-direction: column;
  }
  .wireframe-rail {
    width: 100%;
    flex-direction: row;
    height: 52px;
  }
  .wireframe-rail-icons-stack {
    flex-direction: row;
  }
}

/* Bento Modules */
.wireframe-bento-box {
  background: #2B2D32;
  border-radius: 22px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
  min-height: 140px;
  transition: all 0.2s ease;
}
.wireframe-bento-box:hover {
  background: #303339;
}

/* Bottom 3 Bento Row */
.wireframe-bottom-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 5px;
}
@media (max-width: 768px) {
  .wireframe-bottom-row {
    grid-template-columns: 1fr;
  }
}

/* Wireframe Elements */
.wireframe-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  user-select: none;
}
.wireframe-pill-subtle {
  background: #3B3E45;
  color: #D3D7DF;
  padding: 5px 12px;
}
.wireframe-pill-primary {
  background: #E2E4E9;
  color: #141619;
  padding: 8px 18px;
  cursor: pointer;
}
.wireframe-pill-primary:hover {
  background: #FFFFFF;
  transform: translateY(-1px);
}
.wireframe-pill-track {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #3B3E45;
  position: relative;
  overflow: hidden;
}
.wireframe-pill-fill {
  height: 100%;
  border-radius: 9999px;
  background: #E2E4E9;
  transition: width 0.3s ease;
}

/* Wireframe Switch Toggle */
.wireframe-switch {
  width: 36px;
  height: 20px;
  border-radius: 9999px;
  background: #3B3E45;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}
.wireframe-switch.active {
  background: #E2E4E9;
}
.wireframe-switch-knob {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #FFFFFF;
  position: absolute;
  top: 1.5px;
  left: 2px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.wireframe-switch.active .wireframe-switch-knob {
  transform: translateX(15px);
  background: #141619;
}

/* Floating Glass Dock */
.wireframe-floating-dock {
  margin: 22px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  background: rgba(35, 38, 43, 0.75);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  font-size: 12.5px;
  user-select: none;
}

/* Color Accent Palette Swatches */
.accent-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.accent-swatch {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid transparent;
}

.accent-swatch:hover {
  transform: scale(1.12);
  box-shadow: var(--shadow-raised);
}

.accent-swatch.active {
  transform: scale(1.15);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px var(--brand), var(--shadow-raised);
}

/* Interactive Playground Card */
.theme-playground-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid var(--border);
}

.playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: center;
}

.playground-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme^="neumorphic"] .playground-box {
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

/* Responsive Rules for Small Devices */
@media (max-width: 650px) {
  .theme-presets-grid {
    grid-template-columns: 1fr;
  }
  .playground-grid {
    grid-template-columns: 1fr;
  }
  [data-theme^="neumorphic"] .card {
    border-radius: var(--radius-md);
  }
}

/* ============================================================
   ELECTRON DESKTOP FRAMELESS WINDOW INTEGRATION
   Borderless & frameless edge-to-edge layout with draggable topbar
   ============================================================ */
:root {
  --desktop-titlebar-h: 0px;
}

body.is-electron {
  padding-top: 0 !important;
  box-sizing: border-box;
}

body.is-electron .sidebar {
  top: 0 !important;
  height: 100vh !important;
}

body.is-electron .topbar {
  top: 0 !important;
  -webkit-app-region: drag;
}

body.is-electron .topbar button,
body.is-electron .topbar a,
body.is-electron .topbar input,
body.is-electron .topbar select,
body.is-electron .topbar .pill-expandable,
body.is-electron .topbar .user-chip-expandable,
body.is-electron .topbar-start,
body.is-electron .topbar-center,
body.is-electron .topbar-end {
  -webkit-app-region: no-drag;
}

body.is-electron .login-screen {
  min-height: 100vh !important;
}

body.is-electron .login-topbar {
  top: 14px !important;
  -webkit-app-region: drag;
}

body.is-electron .login-topbar button {
  -webkit-app-region: no-drag;
}

/* Hide legacy desktop titlebar completely */
.desktop-titlebar {
  display: none !important;
}

/* ============================================================
   RESPONSIVE MOTIVATION RANKING TABLE:
   Large screen: horizontal pillars with dots, full tier labels, /100 score, account avatar
   Narrow screen: vertically stacked pillars, icon-only tier, no /100 score, no avatar
   ============================================================ */
.ranking-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0 6px;
  font-size: 12.5px;
}
.pillars-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
}
.pillars-wrap .pillar-dot {
  color: var(--border);
}

.tier-badge-responsive {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 999px;
}

.rank-badge-responsive {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-sm, 6px);
}
.rank-badge-responsive .rank-icon {
  order: 0;
}
.rank-badge-responsive .rank-num {
  order: 1;
}

.trend-badge-responsive {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-sm, 6px);
}
.trend-badge-responsive .trend-icon {
  order: 0;
}
.trend-badge-responsive .trend-num {
  order: 1;
}
.trend-badge-responsive .trend-label-stable {
  order: 2;
}
.trend-badge-responsive .trend-num-stable {
  display: none;
}

.actions-wrap {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

@media (max-width: 880px) {
  .ranking-table {
    min-width: 100% !important;
    border-spacing: 0 3px !important;
    font-size: 11px !important;
  }
  .ranking-table th {
    padding: 3px 2px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  .ranking-table td {
    padding: 4px 2px !important;
  }
  .ranking-table th:first-child,
  .ranking-table td:first-child {
    padding-inline-start: 4px !important;
    width: 24px !important;
    text-align: center !important;
  }
  .ranking-table th:last-child,
  .ranking-table td:last-child {
    padding-inline-end: 4px !important;
    width: 26px !important;
    text-align: center !important;
  }

  /* Employee column optimum narrowing */
  .ranking-table .emp-name-cell {
    max-width: 90px !important;
    gap: 4px !important;
  }
  .ranking-table .emp-name-text {
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }
  .ranking-table .emp-role-text {
    font-size: 9px !important;
    color: var(--ink-secondary) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.1 !important;
  }

  /* # Col: Number above icon */
  .rank-badge-responsive {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 2px 3px !important;
    min-width: 20px !important;
    border-radius: 5px !important;
    line-height: 1 !important;
  }
  .rank-badge-responsive .rank-num {
    order: 0 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .rank-badge-responsive .rank-icon {
    order: 1 !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
  .rank-badge-responsive .rank-hash {
    font-size: 8px !important;
    opacity: 0.6 !important;
  }

  /* Tier: Circular icon only */
  .tier-badge-responsive {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 50% !important;
  }

  /* Score: Compact bold */
  .score-num-responsive {
    font-size: 13px !important;
    font-weight: 900 !important;
  }

  /* Pillars: Vertically stacked */
  .pillars-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
  }
  .pillars-wrap .pillar-dot {
    display: none !important;
  }

  /* Trend: Number above icon */
  .trend-badge-responsive {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    padding: 2px 3px !important;
    min-width: 22px !important;
    border-radius: 5px !important;
    line-height: 1 !important;
  }
  .trend-badge-responsive .trend-num {
    order: 0 !important;
    font-size: 9.5px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
  .trend-badge-responsive .trend-icon {
    order: 1 !important;
    margin: 0 !important;
  }
  .trend-badge-responsive .trend-num-stable {
    display: inline-block !important;
  }

  /* Actions: Vertically stacked icons */
  .actions-wrap {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
  }
  .actions-wrap .btn-xs {
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    border-radius: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .actions-wrap .btn-xs span {
    display: none !important;
  }
}


/* ============================================================
   SIMPLE & MODERN VOICE MESSAGE PLAYER
   ============================================================ */
.voice-modern-player {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 5px 12px 5px 6px;
  margin: 5px 0;
  max-width: 330px;
  width: auto;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  direction: ltr !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

[dir="rtl"] .voice-modern-player {
  direction: ltr !important;
}

.voice-modern-player:hover {
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
}

.voice-modern-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.voice-modern-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.45);
}

.voice-modern-btn:active {
  transform: scale(0.94);
}

.voice-modern-btn.playing {
  animation: voicePulse 1.6s infinite ease-in-out;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(79, 70, 229, 0.32); }
  50% { box-shadow: 0 0 16px rgba(79, 70, 229, 0.6); }
}

.voice-waveform-track {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 28px;
  cursor: pointer;
  padding: 0 4px;
  flex: 1;
}

.voice-wave-bar {
  width: 2.5px;
  border-radius: 2px;
  background: var(--ink-soft);
  opacity: 0.28;
  transition: background 0.1s ease, opacity 0.1s ease, transform 0.1s ease;
}

.voice-waveform-track:hover .voice-wave-bar {
  opacity: 0.45;
}

.voice-wave-bar.filled {
  background: var(--brand, #4f46e5);
  opacity: 1;
}

.voice-modern-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.voice-modern-time {
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--ink-soft);
  white-space: nowrap;
  min-width: 22px;
}

.voice-speed-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand, #4f46e5);
  border: 1px solid rgba(79, 70, 229, 0.2);
  cursor: pointer;
  font-family: var(--mono);
  line-height: 1.2;
  transition: all 0.15s ease;
}

.voice-speed-pill:hover {
  background: var(--brand, #4f46e5);
  color: #fff;
  border-color: var(--brand, #4f46e5);
}

/* =========================================================
   FINANCIAL P&L EXECUTIVE HERO KPI LAYOUT
   Left: Big Merged Net Benefit Card (Daily hero + Monthly/Yearly sub-stats)
   Right: 3 Vertical Compact Stat Cards
   ========================================================= */
.pnl-kpi-container {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.pnl-hero-card {
  min-height: 240px;
  border-radius: var(--radius-lg, 16px);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pnl-hero-card:hover {
  box-shadow: var(--shadow-raised);
}

.pnl-hero-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pnl-right-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
  min-height: 240px;
}

.pnl-side-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md, 13px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pnl-side-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised);
}

/* =========================================================
   POS PAYMENT TENDER COUNTER BOARD & INPUT CONSOLE
   Left: Big Hero Purchasing Card
   Right: Vertical Stack of 2 Compact Cards (Tendered & Change Due)
   ========================================================= */
.tender-counter-layout {
  display: grid;
  grid-template-columns: 1.28fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
  align-items: stretch;
}

/* Big Hero Purchasing Card (Left) */
.tender-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 5px solid var(--brand);
  border-radius: var(--radius-lg, 16px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  min-height: 146px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tender-hero-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised);
}

/* Small Cards Vertical Stack (Right) */
.tender-side-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}

.tender-side-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tender-side-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-raised);
}

/* Cash Tender Input & Actions */
.tender-field-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.tender-field-wrap .tender-prefix-icon {
  position: absolute;
  inset-inline-start: 14px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.tender-field-wrap input {
  width: 100%;
  height: 48px;
  padding-inline-start: 42px !important;
  padding-inline-end: 68px !important;
  font-size: 22px;
  font-weight: 900;
  border-radius: var(--radius-md, 12px);
  background: var(--surface);
  box-sizing: border-box;
}

.tender-field-wrap .tender-currency-tag {
  position: absolute;
  inset-inline-end: 36px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--ink-faint);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.tender-field-wrap .tender-clear-btn {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  z-index: 3;
  transition: color 0.15s ease, background 0.15s ease;
}

.tender-field-wrap .tender-clear-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.tender-field-wrap .tender-clear-btn svg {
  position: static !important;
  right: auto !important;
  left: auto !important;
  display: block;
}

@media (max-width: 520px) {
  .tender-counter-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .tender-hero-card {
    min-height: auto !important;
    padding: 12px 14px !important;
  }
  .tender-side-stack {
    gap: 8px !important;
  }
}

/* ==========================================================================
   DAY CLOSE RECONCILIATION STATION
   ========================================================================== */
.dayclose-wrap {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.dayclose-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 4px 0 14px 0;
  border-bottom: 1px solid var(--border);
}

.dayclose-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Custom DatePicker Popover Calendar */
.custom-datepicker-wrap {
  position: relative;
  display: inline-block;
}

.custom-datepicker-trigger {
  user-select: none;
}

.custom-datepicker-trigger:hover {
  background: var(--surface-2) !important;
  border-color: var(--brand) !important;
}

[data-theme="dark"] .custom-datepicker-trigger:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.custom-calendar-popover {
  animation: calendarPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top start;
}

[dir="rtl"] .custom-calendar-popover {
  transform-origin: top end;
}

@keyframes calendarPopIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.calendar-day-btn {
  user-select: none;
  border: none;
}

.calendar-day-btn:hover {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  transform: scale(1.08);
}

.calendar-day-btn.selected {
  background: var(--brand) !important;
  color: #ffffff !important;
}

.calendar-day-btn.selected:hover {
  background: var(--brand) !important;
  color: #ffffff !important;
  transform: scale(1.05);
}

.calendar-day-btn.today {
  border: 1.5px solid var(--brand) !important;
}

[data-theme="dark"] .custom-calendar-popover {
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.6), 0 6px 14px -2px rgba(0, 0, 0, 0.4) !important;
}

.dayclose-cashier-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px 12px;
  box-shadow: var(--shadow-sm);
}

/* 3-Pillar KPI Grid */
.dayclose-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.dayclose-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dayclose-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dayclose-kpi-card .kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dayclose-kpi-card .kpi-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dayclose-kpi-card .kpi-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dayclose-kpi-card .icon-brand {
  background: var(--brand-bg);
  color: var(--brand);
}

.dayclose-kpi-card .icon-neutral {
  background: var(--surface-2);
  color: var(--ink);
}

.dayclose-kpi-card .kpi-value {
  font-size: 22px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 4px;
}

.dayclose-kpi-card .kpi-footer {
  font-size: 11.5px;
  color: var(--ink-faint);
  font-weight: 600;
}

/* Variance Status Themes */
.dayclose-kpi-card.status-balanced {
  background: var(--sage-bg, rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 185, 129, 0.3);
}
.dayclose-kpi-card.status-balanced .kpi-value {
  color: var(--sage, #10b981);
}
.dayclose-kpi-card.status-balanced .icon-balanced {
  background: rgba(16, 185, 129, 0.2);
  color: var(--sage, #10b981);
}

.dayclose-kpi-card.status-over {
  background: var(--brand-bg, rgba(79, 70, 229, 0.08));
  border-color: rgba(79, 70, 229, 0.3);
}
.dayclose-kpi-card.status-over .kpi-value {
  color: var(--brand);
}
.dayclose-kpi-card.status-over .icon-over {
  background: rgba(79, 70, 229, 0.2);
  color: var(--brand);
}

.dayclose-kpi-card.status-short {
  background: var(--danger-bg, rgba(239, 68, 68, 0.08));
  border-color: rgba(239, 68, 68, 0.3);
}
.dayclose-kpi-card.status-short .kpi-value {
  color: var(--danger, #ef4444);
}
.dayclose-kpi-card.status-short .icon-short {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger, #ef4444);
}

/* Workspace 2-Column Grid */
.dayclose-workspace {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
}

.dayclose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.dayclose-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dayclose-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.dayclose-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Ledger Items */
.dayclose-ledger-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dayclose-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.dayclose-ledger-row:hover {
  background: var(--surface-2);
}

.dayclose-ledger-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dayclose-ledger-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--ink-soft);
  flex-shrink: 0;
}

.dayclose-ledger-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.dayclose-ledger-sub {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 1px;
}

.dayclose-ledger-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
}

.dayclose-expected-box {
  background: var(--brand-bg, rgba(79, 70, 229, 0.06));
  border: 1.5px solid rgba(79, 70, 229, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

/* Physical Count Section */
.dayclose-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dayclose-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.dayclose-count-input {
  width: 100%;
  height: 52px;
  font-size: 22px;
  font-weight: 900;
  border-radius: 12px;
  background: var(--surface);
  border: 2px solid var(--border);
  padding: 0 16px;
  padding-inline-end: 180px;
  box-sizing: border-box;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dayclose-count-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
  outline: none;
}

.dayclose-input-actions {
  position: absolute;
  inset-inline-end: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.dayclose-match-btn {
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.dayclose-match-btn:hover {
  background: var(--brand-bg);
  color: var(--brand);
  border-color: var(--brand);
}

.dayclose-curr-tag {
  font-size: 12px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--ink-faint);
  user-select: none;
  padding: 0 4px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .dayclose-kpi-grid {
    grid-template-columns: 1fr;
  }
  .dayclose-workspace {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   APP INTRO & SPLASH SCREEN STYLES
   Ultra-luxurious, theme-aware brand reveal with
   hierarchical entrance & cascading exit animations
   ========================================================= */
.app-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  cursor: pointer;
}

/* Background Layer that stays solid during initial ascent, dissolving right as the logo docks */
.intro-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.65s;
}

.app-intro-overlay.is-ascending .intro-bg-layer {
  opacity: 0;
  pointer-events: none;
}

/* Ambient Radial Aurora Glow behind logo: serenely fades out as logo departs */
.intro-ambient-aurora {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(54px);
  pointer-events: none;
  z-index: 1;
  animation: introAuroraPulse 4s ease-in-out infinite alternate;
}

.app-intro-overlay.is-ascending .intro-ambient-aurora {
  animation: introGlowFadeOut 1.35s cubic-bezier(0.25, 0.1, 0.25, 1) forwards !important;
  pointer-events: none;
}

/* Central Brand Box */
.intro-brand-box {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 90vw;
  padding: 24px;
}

/* Logo container: First to appear in hierarchy */
.intro-logo-container {
  position: relative;
  display: inline-block;
  height: 130px;
  width: 332px;
  max-width: 85vw;
  aspect-ratio: 351.72 / 137.73;
  margin-bottom: 22px;
  animation: introLogoReveal 1.0s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
  transition: transform 1.35s cubic-bezier(0.25, 1, 0.35, 1);
  will-change: transform;
}

.intro-logo-container.is-ascending {
  animation: none !important;
}

.app-intro-overlay.is-ascending.is-light .intro-logo-container {
  animation: introLogoGlowFadeLight 1.35s cubic-bezier(0.25, 0.1, 0.25, 1) forwards !important;
}

.app-intro-overlay.is-ascending.is-dark .intro-logo-container {
  animation: introLogoGlowFadeDark 1.35s cubic-bezier(0.25, 0.1, 0.25, 1) forwards !important;
}

.intro-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Sub-elements container */
.intro-sub-elements {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 1. Title: Top Tier in hierarchy — Stays visible during early exit, dissolves last (0.60s - 1.15s) */
.intro-title-ar {
  font-family: 'Tajawal', -apple-system, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 0 0 8px 0;
  animation: introItemReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.app-intro-overlay.is-exiting-text .intro-title-ar,
.app-intro-overlay.is-ascending .intro-title-ar {
  animation: introExitTier3 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.60s both !important;
  pointer-events: none;
}

/* 2. Tagline: Middle Tier in hierarchy — Dissolves after track (0.28s - 0.68s) */
.intro-tagline {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 24px;
  animation: introItemReveal 0.52s cubic-bezier(0.16, 1, 0.3, 1) 0.58s both;
}

.app-intro-overlay.is-exiting-text .intro-tagline,
.app-intro-overlay.is-ascending .intro-tagline {
  animation: introExitTier2 0.40s cubic-bezier(0.4, 0, 0.2, 1) 0.28s both !important;
  pointer-events: none;
}

/* 3. Progress Track: Bottom Tier in hierarchy — Dissolves immediately on exit start (0.0s - 0.30s) */
.intro-progress-track {
  width: 150px;
  height: 2.5px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  animation: introItemReveal 0.50s cubic-bezier(0.16, 1, 0.3, 1) 0.80s both;
}

.app-intro-overlay.is-exiting-text .intro-progress-track,
.app-intro-overlay.is-ascending .intro-progress-track {
  animation: introExitTier1 0.30s cubic-bezier(0.4, 0, 0.2, 1) 0s both !important;
  pointer-events: none;
}

.intro-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--brand, #4F46E5) 40%, rgba(var(--brand-rgb, 79, 70, 229), 0.7) 70%, transparent);
  border-radius: 999px;
  animation: introBarTravel 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* 4. Bottom Version Tag: Bottom Tier in hierarchy — Dissolves immediately with progress track (0.0s - 0.30s) */
.intro-version-tag {
  position: absolute;
  bottom: 24px;
  font-family: var(--mono, monospace);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  user-select: none;
  z-index: 2;
  animation: introItemReveal 0.50s ease 0.95s both;
}

.app-intro-overlay.is-exiting-text .intro-version-tag,
.app-intro-overlay.is-ascending .intro-version-tag {
  animation: introExitTier1 0.30s cubic-bezier(0.4, 0, 0.2, 1) 0s both !important;
  pointer-events: none;
}

/* Cascading Exit Keyframes */
@keyframes introExitTier1 {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@keyframes introExitTier2 {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes introExitTier3 {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px);
  }
}

@keyframes introGlowFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes introLogoGlowFadeLight {
  0% {
    filter: drop-shadow(0 12px 28px rgba(var(--brand-rgb, 79, 70, 229), 0.20)) drop-shadow(0 4px 10px rgba(15, 23, 42, 0.07));
  }
  100% {
    filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 0 transparent);
  }
}

@keyframes introLogoGlowFadeDark {
  0% {
    filter: drop-shadow(0 14px 32px rgba(var(--brand-rgb, 79, 70, 229), 0.38)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 0 transparent);
  }
}

/* =========================================================
   THEME ADAPTATION: DARK MODE (Matches login screen #0B0F19)
   ========================================================= */
.app-intro-overlay.is-dark .intro-bg-layer {
  background: #0B0F19;
}
.app-intro-overlay.is-dark .intro-ambient-aurora {
  background: radial-gradient(circle, rgba(var(--brand-rgb, 79, 70, 229), 0.28) 0%, rgba(var(--brand-rgb, 79, 70, 229), 0.08) 45%, transparent 70%);
}
.app-intro-overlay.is-dark .intro-logo-container {
  filter: drop-shadow(0 14px 32px rgba(var(--brand-rgb, 79, 70, 229), 0.38)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}
.app-intro-overlay.is-dark .intro-title-ar {
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.app-intro-overlay.is-dark .intro-tagline {
  color: rgba(255, 255, 255, 0.72);
}
.app-intro-overlay.is-dark .intro-progress-track {
  background: rgba(255, 255, 255, 0.12);
}
.app-intro-overlay.is-dark .intro-version-tag {
  color: rgba(255, 255, 255, 0.35);
}

/* =========================================================
   THEME ADAPTATION: LIGHT MODE (Matches login screen #EEF2F6)
   ========================================================= */
.app-intro-overlay.is-light .intro-bg-layer {
  background: #EEF2F6;
}
.app-intro-overlay.is-light .intro-ambient-aurora {
  background: radial-gradient(circle, rgba(var(--brand-rgb, 79, 70, 229), 0.14) 0%, rgba(var(--brand-rgb, 79, 70, 229), 0.04) 45%, transparent 70%);
}
.app-intro-overlay.is-light .intro-logo-container {
  filter: drop-shadow(0 12px 28px rgba(var(--brand-rgb, 79, 70, 229), 0.20)) drop-shadow(0 4px 10px rgba(15, 23, 42, 0.07));
}
.app-intro-overlay.is-light .intro-title-ar {
  color: #0F172A;
  text-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.app-intro-overlay.is-light .intro-tagline {
  color: #475569;
}
.app-intro-overlay.is-light .intro-progress-track {
  background: rgba(15, 23, 42, 0.09);
}
.app-intro-overlay.is-light .intro-version-tag {
  color: rgba(15, 23, 42, 0.40);
}

/* While intro is active, keep underlying login elements transparent so handoff is seamless */
body.intro-active .login-brand img,
body.intro-active .login-brand .brand-lockup-img,
body.intro-active .login-brand svg,
body.intro-active .login-brand p,
body.intro-active .login-topbar,
body.intro-active .client-portal-link {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.intro-active .client-portal-link {
  transform: translateY(10px) !important;
}

.client-portal-link {
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.30s, transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.30s;
}

/* Keyframes */
@keyframes introLogoReveal {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes introItemReveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes introAuroraPulse {
  0% {
    transform: scale(0.95);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes introBarTravel {
  0% {
    left: -40%;
    width: 25%;
  }
  50% {
    width: 50%;
  }
  100% {
    left: 120%;
    width: 25%;
  }
}

/* ============================================================
   MALL BROADCAST CENTER & QUICK CASHIER PA STYLES
   ============================================================ */

/* Quick PA Button: Exact Same Height & Size as other buttons, High Contrast in Light and Dark */
.btn-quick-pa {
  height: 42px;
  padding: 0 14px;
  border-radius: 13px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-quick-pa svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-shrink: 0;
  stroke-width: 2.8 !important;
  stroke: currentColor;
  transition: transform 0.25s ease;
}

.btn-quick-pa .btn-quick-pa-text {
  font-weight: 800;
}

.btn-quick-pa .btn-quick-pa-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* Dark Mode Contrast */
[data-theme="dark"] .btn-quick-pa,
[data-theme="neumorphic-dark"] .btn-quick-pa {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(96, 165, 250, 0.45);
  color: #93c5fd;
}
[data-theme="dark"] .btn-quick-pa .btn-quick-pa-badge,
[data-theme="neumorphic-dark"] .btn-quick-pa .btn-quick-pa-badge {
  background: rgba(96, 165, 250, 0.22);
  color: #bfdbfe;
}

/* Hover States */
.btn-quick-pa:hover {
  background: rgba(37, 99, 235, 0.16);
  border-color: #2563eb;
  color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-quick-pa:hover svg {
  transform: scale(1.1);
}
[data-theme="dark"] .btn-quick-pa:hover,
[data-theme="neumorphic-dark"] .btn-quick-pa:hover {
  background: rgba(59, 130, 246, 0.26);
  border-color: #60a5fa;
  color: #dbeafe;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

/* Active State (Open Drawer) */
.btn-quick-pa.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
}
.btn-quick-pa.active svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
.btn-quick-pa.active .btn-quick-pa-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

.quick-pa-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 60px;
}

.quick-pa-drawer {
  animation: slideDownFade 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.88);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Universal High-Contrast Range Slider "Tubes" (Scrubber & Volume Tubes) */
.music-scrubber,
.voice-slider,
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #CBD5E1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
  outline: none;
  transition: all 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

[data-theme="dark"] .music-scrubber,
[data-theme="dark"] .voice-slider,
[data-theme="dark"] input[type="range"],
[data-theme="neumorphic-dark"] .music-scrubber,
[data-theme="neumorphic-dark"] .voice-slider,
[data-theme="neumorphic-dark"] input[type="range"] {
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="neumorphic"] .music-scrubber,
[data-theme="neumorphic"] .voice-slider,
[data-theme="neumorphic"] input[type="range"] {
  background: #CBD5E1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: inset 2px 2px 4px rgba(148, 163, 184, 0.5), inset -1px -1px 3px rgba(255, 255, 255, 0.8);
}

.music-scrubber::-webkit-slider-thumb,
.voice-slider::-webkit-slider-thumb,
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand, #4f46e5);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 0 8px rgba(79,70,229,0.5);
  border: 2px solid #FFFFFF;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.music-scrubber::-webkit-slider-thumb:hover,
.voice-slider::-webkit-slider-thumb:hover,
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--brand-deep, #3730a3);
}

.music-scrubber::-moz-range-thumb,
.voice-slider::-moz-range-thumb,
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: var(--brand, #4f46e5);
  box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 0 8px rgba(79,70,229,0.5);
  cursor: pointer;
}

.pc-upload-zone {
  border: 2px dashed var(--border, rgba(255,255,255,0.15));
  border-radius: var(--radius-md, 12px);
  padding: 22px 18px;
  text-align: center;
  background: var(--surface-2, rgba(255,255,255,0.02));
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pc-upload-zone:hover, .pc-upload-zone.dragover {
  border-color: var(--brand, #4f46e5);
  background: var(--brand-bg, rgba(79,70,229,0.08));
  transform: translateY(-1px);
}

/* Soundwave Equalizer Bars for Audio Player & Mini-Player */
.audio-equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  padding: 0 2px;
}
.audio-equalizer-bars span {
  width: 3.5px;
  background: var(--brand, #4f46e5);
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}
.audio-equalizer-bars.playing span {
  animation: eq-bounce 1.2s ease-in-out infinite alternate;
}
.audio-equalizer-bars.playing span:nth-child(1) {
  animation-duration: 0.9s;
  animation-delay: 0.1s;
}
.audio-equalizer-bars.playing span:nth-child(2) {
  animation-duration: 1.3s;
  animation-delay: 0.3s;
}
.audio-equalizer-bars.playing span:nth-child(3) {
  animation-duration: 0.75s;
  animation-delay: 0.05s;
}
.audio-equalizer-bars.playing span:nth-child(4) {
  animation-duration: 1.1s;
  animation-delay: 0.25s;
}
@keyframes eq-bounce {
  0% { height: 4px; }
  50% { height: 18px; }
  100% { height: 6px; }
}

.player-art-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-bg, rgba(79, 70, 229, 0.1));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}

.player-hero-card {
  transition: border-color 0.2s ease, background 0.2s ease;
}
.player-hero-card.dragover {
  border-color: var(--brand, #4f46e5) !important;
  background: var(--brand-bg, rgba(79, 70, 229, 0.06)) !important;
}

.vinyl-disc {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    #111827 0,
    #111827 3px,
    #1f2937 4px,
    #111827 7px
  );
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 0 0 2px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease;
}

.vinyl-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand, #4f46e5), var(--brand-deep, #3730a3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  border: 3px solid #111827;
}

.perm-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  font-size: 13px;
}

.perm-matrix-table th {
  background: var(--surface-2, rgba(255,255,255,0.04));
  padding: 10px 12px;
  font-weight: 700;
  color: var(--ink-soft, inherit);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  text-align: center;
}

.perm-matrix-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04));
  text-align: center;
  background: var(--card, transparent);
}

.perm-matrix-table tr:last-child td {
  border-bottom: none;
}

.perm-matrix-table td:first-child, .perm-matrix-table th:first-child {
  text-align: start;
  font-weight: 700;
}

/* Responsive UI/UX Optimizations for Mall Broadcast Center & Quick PA */
.broadcast-center-wrap {
  width: 100% !important;
  max-width: 1200px !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.broadcast-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: var(--card, var(--surface)) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .broadcast-card {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border) !important;
}

[data-theme="neumorphic-dark"] .card,
[data-theme="neumorphic-dark"] .broadcast-card {
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.7), -2px -2px 8px rgba(255, 255, 255, 0.05), 0 0 0 1px var(--border) !important;
}

[data-theme="light"] .card,
[data-theme="light"] .broadcast-card {
  box-shadow: 0 2px 10px -1px rgba(15, 23, 42, 0.08), 0 1px 3px -1px rgba(15, 23, 42, 0.06), 0 0 0 1px var(--border) !important;
}

[data-theme="warm-ceramic"] .card,
[data-theme="warm-ceramic"] .broadcast-card {
  box-shadow: 0 4px 16px -2px rgba(60, 56, 48, 0.08), 0 1px 3px rgba(60, 56, 48, 0.04), 0 0 0 1px var(--border) !important;
  border-radius: var(--radius-lg);
}
[data-theme="warm-ceramic"] .nav-item.active {
  background: #2B2F31 !important;
  color: #FFFFFF !important;
  border-radius: var(--radius-full) !important;
  border-color: #2B2F31 !important;
  box-shadow: 0 4px 14px rgba(43, 47, 49, 0.22) !important;
}
[data-theme="warm-ceramic"] .nav-item.active svg {
  color: #EEF835 !important;
}
[data-theme="warm-ceramic"] .badge-brand {
  background: #EEF835 !important;
  color: #1D2022 !important;
  font-weight: 800;
}
[data-theme="warm-ceramic"] .btn-primary {
  background: #2B2F31;
  color: #FFFFFF;
  border-radius: var(--radius-full);
}
[data-theme="warm-ceramic"] .btn-primary:hover {
  background: #1A1C1D;
  box-shadow: 0 4px 14px rgba(43, 47, 49, 0.25);
}

[data-theme="obsidian-frost"] .card,
[data-theme="obsidian-frost"] .broadcast-card {
  box-shadow: 0 4px 20px -3px rgba(18, 22, 30, 0.07), 0 0 0 1px var(--border) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
[data-theme="obsidian-frost"] .nav-item.active {
  background: #141518 !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  border-color: #141518 !important;
  box-shadow: 0 4px 16px rgba(20, 21, 24, 0.20) !important;
}
[data-theme="obsidian-frost"] .btn-primary {
  background: #141518;
  color: #FFFFFF;
  border-radius: 10px;
}
[data-theme="obsidian-frost"] .btn-primary:hover {
  background: #000000;
  box-shadow: 0 4px 16px rgba(20, 21, 24, 0.25);
}

[data-theme="glacier-frost"] .card,
[data-theme="glacier-frost"] .broadcast-card {
  box-shadow: 3px 3px 12px rgba(158, 183, 204, 0.45), -3px -3px 12px #FFFFFF, 0 0 0 1px var(--border) !important;
  border-radius: var(--radius-lg);
}
[data-theme="glacier-frost"] .nav-item.active {
  background: #121B2A !important;
  color: #FFFFFF !important;
  border-radius: 12px !important;
  border-color: #121B2A !important;
  box-shadow: 0 4px 16px rgba(18, 27, 42, 0.22) !important;
}
[data-theme="glacier-frost"] .btn-primary {
  background: #121B2A;
  color: #FFFFFF;
  border-radius: 10px;
}
[data-theme="glacier-frost"] .btn-primary:hover {
  background: #090E17;
  box-shadow: 0 4px 16px rgba(18, 27, 42, 0.28);
}

.broadcast-tabs-strip {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 6px;
  padding: 6px;
  background: var(--surface-2);
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.broadcast-tabs-strip::-webkit-scrollbar {
  display: none;
}
.broadcast-tabs-strip button {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-matrix-table {
  width: 100%;
  border-collapse: collapse;
}
.perm-matrix-table th,
.perm-matrix-table td {
  white-space: nowrap;
  padding: 10px 14px;
  text-align: center;
}
.perm-matrix-table th:first-child,
.perm-matrix-table td:first-child {
  text-align: start;
}

@media (max-width: 768px) {
  .quick-pa-drawer-backdrop {
    padding: 10px 8px !important;
    align-items: center !important;
  }
  .quick-pa-drawer {
    width: 100% !important;
    padding: 16px 14px !important;
    max-height: 94vh !important;
    border-radius: 14px !important;
  }
  .broadcast-center-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .broadcast-card {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }
  .vinyl-disc {
    width: 96px !important;
    height: 96px !important;
  }
  .vinyl-center {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 480px) {
  .broadcast-tabs-strip {
    padding: 4px !important;
    gap: 4px !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
  }
  .broadcast-tabs-strip button {
    padding: 6px 10px !important;
    font-size: 12px !important;
    min-height: 34px !important;
    gap: 5px !important;
  }
  .broadcast-card {
    padding: 14px 12px !important;
    border-radius: 12px !important;
  }
  .broadcast-card h1 {
    font-size: 18px !important;
  }
  .broadcast-card h2 {
    font-size: 18px !important;
  }
  .broadcast-card h3 {
    font-size: 15px !important;
  }
}

/* ============================================================
   MALL BROADCAST SUBPANEL & LOCAL DEVICE AUDIO PLAYER STYLES
   ============================================================ */
.broadcast-mini-player {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.broadcast-mini-player:hover {
  border-color: var(--brand);
}
.broadcast-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 10px;
}
.broadcast-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 10px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.broadcast-preset-btn:hover {
  border-color: var(--brand);
  background: var(--brand-bg, rgba(79,70,229,0.08));
  color: var(--brand);
  transform: translateY(-1px);
}
.broadcast-preset-btn:active {
  transform: translateY(0);
}
.broadcast-day-pill {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
}
.broadcast-day-pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.broadcast-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  box-sizing: border-box;
}
.broadcast-day-pill-grid {
  padding: 7px 2px !important;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--border);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
}
.broadcast-day-pill-grid:hover {
  border-color: var(--brand);
}
.broadcast-day-pill-grid.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}
.broadcast-day-pill-grid .day-text-full {
  display: inline;
}
.broadcast-day-pill-grid .day-text-brief {
  display: none;
}
@media (max-width: 900px) {
  .broadcast-day-pill-grid {
    padding: 6px 1px !important;
    font-size: 11px;
  }
  .broadcast-day-pill-grid .day-text-full {
    display: none;
  }
  .broadcast-day-pill-grid .day-text-brief {
    display: inline;
  }
}
@media (max-width: 480px) {
  .broadcast-mini-player {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  .broadcast-preset-btn {
    padding: 8px 6px !important;
    font-size: 11px !important;
  }
}


/* ============================================================
   RESPONSIVE ACTION BUTTONS:
   Text only on wide screens, '+' icon ONLY on narrow screens
   ============================================================ */
.btn-plus-responsive .btn-plus-icon {
  display: none !important;
}
.btn-plus-responsive .btn-plus-label {
  display: inline;
}

@media (max-width: 768px) {
  .btn-plus-responsive {
    padding: 0 10px !important;
    min-width: 38px !important;
    height: 36px !important;
    justify-content: center !important;
  }
  .btn-plus-responsive.btn-sm {
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 6px !important;
  }
  .btn-plus-responsive .btn-plus-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }
  .btn-plus-responsive .btn-plus-label {
    display: none !important;
  }
}

/* ============================================================
   TOP NAVBAR MINIMIZED AUDIO PLAYER & BROADCAST CONTROLS
   ============================================================ */
.topbar-mini-player {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 6px 0 10px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-sizing: border-box;
}

[dir="rtl"] .topbar-mini-player {
  padding: 0 10px 0 6px;
}

[data-theme^="neumorphic"] .topbar-mini-player {
  box-shadow: var(--shadow-soft);
}

.topbar-mini-player:hover {
  border-color: var(--brand);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.12);
}

.topbar-mini-player-disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-bg, rgba(79, 70, 229, 0.12));
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.topbar-mini-player-disc.is-playing {
  animation: spin 7s linear infinite;
}

.topbar-mini-player-disc:hover {
  transform: scale(1.12);
}

.topbar-mini-player-info {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 140px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}

.topbar-mini-player-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
}

.topbar-mini-player-info:hover .topbar-mini-player-title {
  color: var(--brand);
}

.topbar-mini-player-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-inline-start: 4px;
  padding-inline-start: 6px;
  border-inline-start: 1px solid var(--border);
}

.topbar-player-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.topbar-player-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
  transform: scale(1.08);
}

.topbar-player-btn:active {
  transform: scale(0.92);
}

.topbar-player-btn.btn-play-pause {
  background: var(--brand);
  color: #fff;
}

.topbar-player-btn.btn-play-pause:hover {
  background: var(--brand-hover, var(--brand));
  color: #fff;
}

.topbar-player-btn.btn-stop {
  color: var(--danger, #ef4444);
}

.topbar-player-btn.btn-stop:hover {
  background: var(--danger-bg, rgba(239, 68, 68, 0.12));
  color: var(--danger, #ef4444);
}

.topbar-player-btn.btn-mute {
  color: var(--ink-soft);
}

.topbar-player-btn.btn-mute:hover {
  color: var(--ink);
}

@media (max-width: 768px) {
  .topbar-mini-player {
    height: 34px !important;
    padding: 0 4px !important;
    gap: 3px !important;
    border-radius: 11px !important;
  }
  .topbar-mini-player-info {
    display: none !important;
  }
  .topbar-mini-player-actions {
    margin-inline-start: 2px !important;
    padding-inline-start: 2px !important;
    border-inline-start: none !important;
    gap: 2px !important;
  }
  .topbar-player-btn {
    width: 25px !important;
    height: 25px !important;
  }
}

@media (max-width: 480px) {
  .topbar-mini-player .btn-mute {
    display: none !important;
  }
}


/* ============================================================
   RESPONSIVE MALL BROADCAST SUBPANEL TABS
   ============================================================ */
.broadcast-subnav-strip {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.broadcast-subnav-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.broadcast-subnav-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-bg, rgba(79, 70, 229, 0.12));
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.broadcast-subnav-title {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.25;
}

.broadcast-subnav-desc {
  font-size: 11.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 420px;
}

@media (max-width: 768px) {
  .broadcast-subnav-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }
  .broadcast-subnav-desc {
    max-width: 100% !important;
  }
  .broadcast-subnav-strip .settings-nav-seg {
    width: 100% !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .broadcast-subnav-strip .settings-nav-seg button {
    flex-shrink: 0 !important;
  }
}



