/* ============================================================================
   HxH Store · ux-next.css — interaction & theme layer.
   Loads after redesign.css (last stylesheet in shell.php).

   Contents
     1 · Six APK themes → token overrides (buttons, bg, accents follow the theme)
     2 · Icon hover animations (GPU transforms only — smooth, non-laggy)
     3 · 3-line menu button → smooth morph + silky drawer slide
     4 · Navigation bar & desktop-view improvements
     5 · Popups / typography polish
     6 · Live chat (support) UI — bubbles, agent presence, voice notes
     7 · Admin workspace detail polish
   ========================================================================== */

/* ------------------------------------------------ 1 · six APK themes ----- */
/* Every rx token the redesign layer uses is re-pointed per theme, so buttons,
   panels, backgrounds, focus rings and toasts all follow the selected theme. */

html[data-theme="ivory"] {
  --rx-bg: #f7f4ec; --rx-bg-2: #f2efe5; --rx-ink: #15211b; --rx-ink-2: #4d5b53;
  --rx-ink-3: #8d978f; --rx-card: #ffffff;
  --rx-accent: #0e7c5a; --rx-accent-2: #17a67a; --rx-accent-3: #3ecf9e;
  --rx-soft: #edf7f1; --rx-ring: #9fe8cd; --rx-line: #e7e2d5;
  --rx-glow: rgba(14, 124, 90, 0.75); --rx-glow-soft: rgba(14, 124, 90, 0.45);
  --rx-blob-a: rgba(159, 232, 205, 0.85); --rx-blob-b: rgba(62, 207, 158, 0.5);
  --rx-grad: linear-gradient(135deg, #0e7c5a 0%, #0b6a4e 55%, #095a42 100%);
  color-scheme: light;
}
html[data-theme="violet"] {
  --rx-bg: #f6f4fc; --rx-bg-2: #f0edfa; --rx-ink: #191327; --rx-ink-2: #5f5873;
  --rx-ink-3: #928ba6; --rx-card: #ffffff;
  --rx-accent: #6d3bf5; --rx-accent-2: #9b6bff; --rx-accent-3: #c5aaff;
  --rx-soft: #f1edfc; --rx-ring: #c5aaff; --rx-line: #e6e0f6;
  --rx-glow: rgba(109, 59, 245, 0.7); --rx-glow-soft: rgba(109, 59, 245, 0.4);
  --rx-blob-a: rgba(197, 170, 255, 0.7); --rx-blob-b: rgba(155, 107, 255, 0.45);
  --rx-grad: linear-gradient(135deg, #6d3bf5 0%, #5b2be0 55%, #4a1fc7 100%);
  color-scheme: light;
}
html[data-theme="sand"] {
  --rx-bg: #f4efe6; --rx-bg-2: #eee7da; --rx-ink: #2b2019; --rx-ink-2: #6b5a4c;
  --rx-ink-3: #9a8879; --rx-card: #fffdf9;
  --rx-accent: #a65b32; --rx-accent-2: #d08a57; --rx-accent-3: #eabf9b;
  --rx-soft: #f9f1e6; --rx-ring: #e5c3a4; --rx-line: #e9ddca;
  --rx-glow: rgba(166, 91, 50, 0.7); --rx-glow-soft: rgba(166, 91, 50, 0.4);
  --rx-blob-a: rgba(234, 191, 155, 0.75); --rx-blob-b: rgba(208, 138, 87, 0.45);
  --rx-grad: linear-gradient(135deg, #a65b32 0%, #93502b 55%, #7d4323 100%);
  color-scheme: light;
}
html[data-theme="ocean"] {
  --rx-bg: #eff6f7; --rx-bg-2: #e7f1f3; --rx-ink: #0b2430; --rx-ink-2: #4d6570;
  --rx-ink-3: #8398a1; --rx-card: #ffffff;
  --rx-accent: #0e7490; --rx-accent-2: #22a3b8; --rx-accent-3: #7fd6e0;
  --rx-soft: #e6f4f6; --rx-ring: #9adde8; --rx-line: #dcebee;
  --rx-glow: rgba(14, 116, 144, 0.7); --rx-glow-soft: rgba(14, 116, 144, 0.4);
  --rx-blob-a: rgba(127, 214, 224, 0.7); --rx-blob-b: rgba(34, 163, 184, 0.45);
  --rx-grad: linear-gradient(135deg, #0e7490 0%, #0c667f 55%, #0a586e 100%);
  color-scheme: light;
}
html[data-theme="rose"] {
  --rx-bg: #fcf3f2; --rx-bg-2: #f8eae9; --rx-ink: #2a151b; --rx-ink-2: #6d5259;
  --rx-ink-3: #a08a90; --rx-card: #fffdfd;
  --rx-accent: #d6436b; --rx-accent-2: #f08ca4; --rx-accent-3: #ffc2d0;
  --rx-soft: #fdeef1; --rx-ring: #ffc2d0; --rx-line: #f2dfde;
  --rx-glow: rgba(214, 67, 107, 0.65); --rx-glow-soft: rgba(214, 67, 107, 0.4);
  --rx-blob-a: rgba(255, 194, 208, 0.7); --rx-blob-b: rgba(240, 140, 164, 0.45);
  --rx-grad: linear-gradient(135deg, #d6436b 0%, #c5365d 55%, #ad2b50 100%);
  color-scheme: light;
}
html[data-theme="midnight"] {
  --rx-bg: #080c11; --rx-bg-2: #0d131a; --rx-ink: #e9f4ef; --rx-ink-2: #a4b6ae;
  --rx-ink-3: #74857e; --rx-card: #111820;
  --rx-accent: #37dda3; --rx-accent-2: #6df2c6; --rx-accent-3: #b4ffe4;
  --rx-soft: rgba(55, 221, 163, 0.09); --rx-ring: rgba(55, 221, 163, 0.4);
  --rx-line: rgba(255, 255, 255, 0.09);
  --rx-glow: rgba(55, 221, 163, 0.4); --rx-glow-soft: rgba(55, 221, 163, 0.25);
  --rx-blob-a: rgba(55, 221, 163, 0.3); --rx-blob-b: rgba(109, 242, 198, 0.18);
  --rx-grad: linear-gradient(135deg, #37dda3 0%, #23c48d 55%, #16a878 100%);
  color-scheme: dark;
}

/* base surfaces follow the theme (redesign.css set them for ivory only) */
html[data-theme="violet"] body, html[data-theme="sand"] body,
html[data-theme="ocean"] body, html[data-theme="rose"] body,
html[data-theme="ivory"] body { background: var(--rx-bg) !important; color: var(--rx-ink); }
html[data-theme="midnight"] body { background: var(--rx-bg) !important; color: var(--rx-ink); }

html[data-theme="midnight"] body::before,
html[data-theme="midnight"] body::after { opacity: 0.5; }
html[data-theme="violet"] body::before { background: radial-gradient(circle at 35% 35%, var(--rx-blob-a), transparent 65%); }
html[data-theme="sand"] body::before,
html[data-theme="rose"] body::before,
html[data-theme="ocean"] body::before { background: radial-gradient(circle at 35% 35%, var(--rx-blob-a), transparent 65%); }
html[data-theme="violet"] body::after,
html[data-theme="sand"] body::after,
html[data-theme="ocean"] body::after,
html[data-theme="rose"] body::after { background: radial-gradient(circle at 60% 40%, var(--rx-blob-b), transparent 65%); }

/* scrollbar follows the accent */
* { scrollbar-color: var(--rx-ring) transparent; }
*::-webkit-scrollbar-thumb { background: var(--rx-ring); }

/* ---------- accents that the redesign layer hard-coded to emerald --------- */
html body .btn { box-shadow: 0 14px 30px -14px var(--rx-glow), inset 0 1px 0 rgba(255,255,255,0.25); }
html body .btn:hover { box-shadow: 0 20px 40px -16px var(--rx-glow), inset 0 1px 0 rgba(255,255,255,0.3); }
html body .btn.secondary:hover { box-shadow: 0 18px 34px -18px var(--rx-glow-soft); }
html body .btn.secondary:hover, html body .btn.secondary:focus-visible { border-color: var(--rx-ring) !important; color: var(--rx-accent) !important; }
html body .tab.active, html body .tab[aria-selected="true"] { box-shadow: 0 12px 24px -12px var(--rx-glow) !important; }
html body .nav-item.active { box-shadow: 0 14px 26px -14px var(--rx-glow) !important; }
html body .mobile-nav a.active svg { filter: drop-shadow(0 4px 8px var(--rx-glow-soft)); }
html body input:focus, html body textarea:focus, html body select:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-accent) 16%, transparent) !important; }
html body .modal::before { background: linear-gradient(90deg, var(--rx-accent), var(--rx-accent-2), var(--rx-accent-3), var(--rx-accent)); background-size: 300% 100%; }
html body .toast { border-left-color: var(--rx-accent-3) !important; border-color: color-mix(in srgb, var(--rx-accent) 45%, transparent) !important; }
html body .hero h2 em { background: linear-gradient(90deg, var(--rx-accent), var(--rx-accent-2), var(--rx-accent-3)) !important; background-clip: text !important; }
html body .modal-head h2 { background: var(--rx-grad); background-clip: text; }
html body th { background: linear-gradient(180deg, var(--rx-soft), var(--rx-bg)) !important; color: var(--rx-accent) !important; border-bottom-color: color-mix(in srgb, var(--rx-accent) 20%, transparent) !important; }
html body td { border-color: color-mix(in srgb, var(--rx-accent) 9%, transparent) !important; }
html body tr:hover td { background: color-mix(in srgb, var(--rx-accent) 5%, transparent) !important; }
html body .btn.secondary { background: color-mix(in srgb, var(--rx-card) 88%, transparent) !important; border-color: var(--rx-line) !important; color: var(--rx-ink) !important; }
html body .icon-btn { background: color-mix(in srgb, var(--rx-card) 88%, transparent) !important; border-color: var(--rx-line) !important; color: var(--rx-ink-2) !important; }
html body .icon-btn:hover { background: var(--rx-soft) !important; color: var(--rx-accent) !important; }
html body .panel { background: color-mix(in srgb, var(--rx-card) 90%, transparent) !important; border-color: var(--rx-line) !important; }
html body .topbar { background: color-mix(in srgb, var(--rx-card) 85%, transparent) !important; border-bottom-color: var(--rx-line) !important; }
html body .sidebar { background: linear-gradient(180deg, var(--rx-card), var(--rx-bg-2)) !important; border-right-color: var(--rx-line) !important; }
html body .table-wrap { background: var(--rx-card) !important; }
html body .admin-tabs { background: linear-gradient(180deg, color-mix(in srgb, var(--rx-card) 96%, transparent), var(--rx-soft)) !important; }
html body .rx-admin-filter { background: var(--rx-card) !important; border-color: var(--rx-line) !important; }
html body .rx-admin-filter:focus { border-color: var(--rx-accent) !important; }
html body .product { background: linear-gradient(160deg, var(--rx-card), var(--rx-bg-2)) !important; }
html body .stat { background: linear-gradient(150deg, var(--rx-card), var(--rx-bg-2)) !important; }
html body .stat::before { background: radial-gradient(circle, color-mix(in srgb, var(--rx-accent-3) 30%, transparent), transparent 65%); }
html body .hero { background:
    radial-gradient(ellipse at 85% 15%, color-mix(in srgb, var(--rx-accent-3) 30%, transparent), transparent 55%),
    radial-gradient(ellipse at 15% 90%, color-mix(in srgb, var(--rx-accent) 14%, transparent), transparent 55%),
    linear-gradient(130deg, var(--rx-card) 0%, var(--rx-bg-2) 60%, var(--rx-soft) 100%) !important; }
html body .product-art { background:
    radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--rx-accent-3) 25%, transparent), transparent 65%),
    linear-gradient(160deg, var(--rx-bg-2), var(--rx-soft)) !important; }
html body input, html body textarea, html body select { background: var(--rx-bg-2) !important; border-color: var(--rx-line) !important; color: var(--rx-ink) !important; }
html body input:focus, html body textarea:focus, html body select:focus { background: var(--rx-card) !important; border-color: var(--rx-accent) !important; }
html body .mobile-nav { background: color-mix(in srgb, var(--rx-card) 90%, transparent) !important; border-top-color: var(--rx-line) !important; }
html body .auth-panel h2 { background: var(--rx-grad); background-clip: text; color: transparent !important; }

/* midnight-specific readability (glass + ink) */
html[data-theme="midnight"] body .btn.secondary { background: rgba(20, 28, 36, 0.85) !important; color: var(--rx-ink) !important; }
html[data-theme="midnight"] body .panel { background: rgba(20, 28, 36, 0.82) !important; }
html[data-theme="midnight"] body .modal { background: linear-gradient(165deg, #131b24 0%, #0e151d 100%) !important; border-color: rgba(255,255,255,0.08) !important; }
html[data-theme="midnight"] body .table-wrap { background: #111820 !important; }
html[data-theme="midnight"] body .btn.danger:hover { background: rgba(255, 111, 125, 0.12) !important; color: #ff6f7d !important; border-color: rgba(255,111,125,0.5) !important; }
html[data-theme="midnight"] body .toast { background: rgba(18, 26, 33, 0.96) !important; color: #e9f4ef !important; }

/* --------------------------------- 2 · icon hover animations -------------- */
/* transform/opacity only → compositor-friendly, no layout thrash, non-laggy. */
.icon-btn svg,
.icon-btn .color-icon { transition: transform 0.25s var(--rx-spring), color 0.2s var(--rx-out); }
.icon-btn:hover svg, .icon-btn:hover .color-icon { transform: translateY(-2px) scale(1.12) rotate(-4deg); }
.icon-btn:active svg { transform: scale(0.9); }

html body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
html body .btn svg, html body .btn .color-icon { transition: transform 0.25s var(--rx-spring); }
html body .btn:hover svg, html body .btn:hover .color-icon { transform: translateX(3px); }
html body .btn.secondary:hover svg, html body .btn.ghost:hover svg { transform: translateY(-2px) rotate(-6deg); }
html body .btn:active svg { transform: scale(0.88); }

/* top nav — animated pill indicator */
html body .top-link { position: relative; transition: color 0.18s var(--rx-out), transform 0.18s var(--rx-spring); }
html body .top-link::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2.5px;
  border-radius: 999px; background: var(--rx-grad);
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.28s var(--rx-spring);
}
html body .top-link:hover { color: var(--rx-accent); transform: translateY(-1px); }
html body .top-link:hover::after, html body .top-link.active::after { transform: scaleX(1); }
html body .top-link.active { color: var(--rx-accent); font-weight: 700; }

/* sidebar nav icons */
html body .nav-item svg, html body .nav-item .color-icon { transition: transform 0.25s var(--rx-spring); }
html body .nav-item:hover svg { transform: scale(1.14); }
html body .nav-item.active svg { transform: rotate(-6deg) scale(1.1); }

/* footer socials — pop + rotate */
.footer-social { transition: transform 0.25s var(--rx-spring), background 0.2s, color 0.2s, border-color 0.2s; display: inline-grid; place-items: center; }
.footer-social:hover { transform: translateY(-3px) scale(1.12) rotate(-8deg); color: var(--rx-accent) !important; border-color: var(--rx-ring) !important; background: var(--rx-soft) !important; }
.footer-social:active { transform: scale(0.94); }

/* category + brand tiles */
.category-icon { transition: transform 0.3s var(--rx-spring), box-shadow 0.3s; }
.category-card:hover .category-icon { transform: translateY(-4px) scale(1.1) rotate(-5deg); }
.fb-tile .fb-logo img { transition: transform 0.3s var(--rx-spring), filter 0.3s; }
.fb-tile:hover .fb-logo img { transform: scale(1.14) rotate(-6deg); filter: saturate(1.15); }
.brand img, .top-brand img { transition: transform 0.3s var(--rx-spring), filter 0.3s; }
.brand:hover img, .top-brand:hover img { transform: scale(1.07) rotate(-4deg); filter: drop-shadow(0 6px 14px var(--rx-glow-soft)); }

/* mobile bottom-nav bounce */
.mobile-nav a { transition: transform 0.22s var(--rx-spring), color 0.18s; }
.mobile-nav a:hover svg { transform: translateY(-3px) scale(1.1); }
.mobile-nav a:active svg { transform: scale(0.86); }
.mobile-nav a.active svg { animation: rx-nav-pop 0.45s var(--rx-spring); }
@keyframes rx-nav-pop {
  0% { transform: scale(1); } 45% { transform: scale(1.25) translateY(-3px); }
  100% { transform: scale(1); }
}

/* notification bell gets a soft ring wiggle on hover */
.notif-bell:hover svg { animation: rx-ring-wiggle 0.55s var(--rx-spring); }
@keyframes rx-ring-wiggle {
  0%, 100% { transform: rotate(0); } 25% { transform: rotate(14deg); }
  55% { transform: rotate(-10deg); } 80% { transform: rotate(5deg); }
}

/* stat + workload cards lift */
html body .stat svg, html body .workload-card svg { transition: transform 0.25s var(--rx-spring); }
html body .stat:hover svg { transform: scale(1.15) rotate(-6deg); }
html body .workload-card:hover svg { transform: translateY(-2px) scale(1.1); }

/* text links (View all →) */
.text-link { transition: color 0.18s, transform 0.18s var(--rx-spring); }
.text-link svg, .text-link .color-icon { transition: transform 0.25s var(--rx-spring); }
.text-link:hover { color: var(--rx-accent) !important; }
.text-link:hover svg { transform: translateX(4px); }

/* tabs + chips micro-motion */
html body .tab { position: relative; }
html body .tab:hover svg { transform: scale(1.12); }
html body .tab svg { transition: transform 0.2s var(--rx-spring); }

/* ------------------------- 3 · burger morph + smooth drawer --------------- */
.mobile-toggle .rx-burger {
  position: relative; display: inline-block; width: 20px; height: 14px;
}
.mobile-toggle .rx-burger i {
  position: absolute; left: 0; width: 100%; height: 2.2px; border-radius: 999px;
  background: currentColor; display: block;
  transition: transform 0.34s var(--rx-spring), opacity 0.2s var(--rx-out), width 0.3s var(--rx-spring);
}
.mobile-toggle .rx-burger i:nth-child(1) { top: 0; }
.mobile-toggle .rx-burger i:nth-child(2) { top: 6px; }
.mobile-toggle .rx-burger i:nth-child(3) { top: 12px; width: 70%; }
.mobile-toggle .rx-burger i:nth-child(3):hover { width: 100%; }
.mobile-toggle[aria-expanded="true"] .rx-burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-toggle[aria-expanded="true"] .rx-burger i:nth-child(2) { opacity: 0; transform: translateX(-8px) scale(0.5); }
.mobile-toggle[aria-expanded="true"] .rx-burger i:nth-child(3) { width: 100%; transform: translateY(-6px) rotate(-45deg); }

/* drawer: silky spring slide (mobile only — desktop sidebar is static) */
@media (max-width: 960px) {
  html body .sidebar {
    transform: translateX(-104%);
    transition: transform 0.45s var(--rx-spring), box-shadow 0.3s var(--rx-out);
    will-change: transform;
  }
  html body .sidebar.open { transform: translateX(0) !important; }
  html body .sidebar.open + .drawer-scrim {
    display: block !important; position: fixed; inset: 0; z-index: 80;
    background: rgba(8, 16, 12, 0.5); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: rx-fade-in 0.3s var(--rx-out) both;
  }
  html body .sidebar .nav-item, html body .sidebar .brand, html body .sidebar .help-card {
    animation: rx-drawer-item 0.5s var(--rx-spring) both;
  }
  html body .sidebar .nav-item:nth-child(2n) { animation-delay: 0.04s; }
  html body .sidebar .nav-item:nth-child(3n) { animation-delay: 0.07s; }
  html body .sidebar .nav-item:nth-child(4n) { animation-delay: 0.1s; }
}
@keyframes rx-drawer-item {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------- 4 · navigation & desktop view ------------------ */
html body .topbar { padding-top: 6px; padding-bottom: 6px; }
html body .breadcrumb { color: var(--rx-ink-3); letter-spacing: 0.01em; }
html body .top-nav { gap: 4px; }
html body .top-link { padding: 9px 14px; border-radius: 999px; font-weight: 600; }
html body .top-link:hover { background: var(--rx-soft); }
html body .top-link.active { background: var(--rx-soft); }
html body .top-link.active::after { left: 24px; right: 24px; bottom: 2px; }
html body .header-search { border-radius: 999px; transition: box-shadow 0.25s var(--rx-out), transform 0.25s var(--rx-spring); }
html body .header-search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-accent) 15%, transparent); transform: translateY(-1px); }
html body .top-avatar img { transition: transform 0.25s var(--rx-spring), box-shadow 0.25s; border-radius: 50%; }
html body .top-avatar:hover img { transform: scale(1.1); box-shadow: 0 8px 22px -8px var(--rx-glow); }

@media (min-width: 1200px) {
  html body .content { max-width: 1320px; }
  html body .products-grid { grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
  html body .hero { border-radius: 32px; }
  html body .section-title h2 { font-size: 24px; }
  html body .categories { gap: 16px; }
}
@media (min-width: 1600px) {
  html body .content { max-width: 1440px; }
}

/* ------------------------------ 5 · popups / typography ------------------- */
html body .modal h2 { font-weight: 800 !important; }
html body .modal .form-note { color: var(--rx-ink-2); line-height: 1.6; }
html body .modal p { color: var(--rx-ink-2); }
html body .modal .field label { letter-spacing: 0.01em; }
html body .overlay .modal { max-height: calc(100vh - 40px); }
html body .section-title p { color: var(--rx-ink-2); }
html body .eyebrow { color: var(--rx-accent); }
html body .toast { font-weight: 600; letter-spacing: 0.01em; }
html body .empty-catalog h3 { color: var(--rx-ink); }
html body .help-card { border: 1px dashed var(--rx-ring); background: linear-gradient(150deg, var(--rx-soft), var(--rx-card)); }
html body .help-card > svg:first-child { color: var(--rx-accent); transition: transform 0.3s var(--rx-spring); }
html body .help-card:hover > svg:first-child { transform: scale(1.15) rotate(-8deg); }

/* ------------------------- 6 · live chat (support) UI --------------------- */
/* Agent presence card — the agent (human + AI) is ALWAYS visible in chat. */
.hxh-agent-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rx-accent) 10%, var(--rx-card)), var(--rx-card));
  border: 1px solid var(--rx-ring); border-radius: 18px;
  animation: rx-fade-in 0.3s var(--rx-out) both;
}
.hxh-agent-card .agent-face {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--rx-grad); color: #fff; font-size: 20px; flex: none;
  box-shadow: 0 8px 20px -8px var(--rx-glow);
  position: relative;
}
.hxh-agent-card .agent-face::after {
  content: ''; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px;
  border-radius: 50%; background: #22c55e; border: 2px solid var(--rx-card);
}
.hxh-agent-card.offline .agent-face::after { background: var(--rx-ink-3); }
.hxh-agent-card .agent-copy { flex: 1; min-width: 0; }
.hxh-agent-card .agent-copy strong { display: block; font-size: 13.5px; color: var(--rx-ink); }
.hxh-agent-card .agent-copy small { color: var(--rx-ink-2); font-size: 12px; line-height: 1.45; display: block; }
.hxh-agent-card .agent-live {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px; background: var(--rx-soft);
  color: var(--rx-accent); border: 1px solid var(--rx-ring); flex: none;
}

/* thread bubbles */
.hxh-chat-thread {
  border-radius: 20px; padding: 16px; max-height: 46vh; overflow-y: auto;
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--rx-accent-3) 12%, transparent), transparent 50%),
    var(--rx-bg-2);
  border: 1px solid var(--rx-line);
  scroll-behavior: smooth;
}
.hxh-chat-msg {
  max-width: 78%; padding: 10px 14px; border-radius: 18px; margin-bottom: 10px;
  animation: rx-bubble-in 0.32s var(--rx-spring) both; line-height: 1.55;
  position: relative; font-size: 13.5px;
}
.hxh-chat-msg strong { display: block; font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.75; margin-bottom: 3px; }
.hxh-chat-msg small { display: block; font-size: 10px; opacity: 0.6; margin-top: 5px; }
.hxh-chat-msg.from-user { background: var(--rx-grad); color: #fff; margin-left: auto; border-bottom-right-radius: 6px; box-shadow: 0 10px 22px -14px var(--rx-glow); }
.hxh-chat-msg.from-admin { background: var(--rx-card); color: var(--rx-ink); border: 1px solid var(--rx-line); border-bottom-left-radius: 6px; }
.hxh-chat-msg.from-ai { background: linear-gradient(135deg, color-mix(in srgb, var(--rx-accent) 14%, var(--rx-card)), var(--rx-card)); border: 1px dashed var(--rx-ring); color: var(--rx-ink); border-bottom-left-radius: 6px; }
@keyframes rx-bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* composer + voice mic */
.hxh-chat-composer {
  display: flex; gap: 10px; align-items: flex-end; margin-top: 12px;
  background: var(--rx-card); border: 1px solid var(--rx-line);
  border-radius: 20px; padding: 10px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hxh-chat-composer:focus-within { border-color: var(--rx-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-accent) 13%, transparent); }
.hxh-chat-composer textarea { flex: 1; border: none !important; background: transparent !important; resize: none; max-height: 120px; min-height: 40px; box-shadow: none !important; }
.hxh-chat-composer .btn { flex: none; }
.voice-mic {
  flex: none; width: 42px; height: 42px; min-height: 42px; padding: 0 !important;
  border-radius: 50% !important; display: inline-grid; place-items: center;
  background: var(--rx-soft) !important; color: var(--rx-accent) !important;
  border: 1.5px solid var(--rx-ring) !important; box-shadow: none !important;
  transition: transform 0.2s var(--rx-spring), background 0.2s, border-color 0.2s;
}
.voice-mic:hover { transform: scale(1.08); }
.voice-mic.recording {
  background: #fee2e2 !important; color: #dc2626 !important; border-color: #fca5a5 !important;
  animation: rx-mic-pulse 1.1s ease-in-out infinite;
}
@keyframes rx-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(220, 38, 38, 0); }
}
.voice-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  background: var(--rx-soft); color: var(--rx-accent); border: 1px solid var(--rx-ring);
  animation: rx-pop-in 0.3s var(--rx-spring) both;
}
.voice-chip button { background: none; border: none; color: inherit; cursor: pointer; font-size: 13px; padding: 0 0 0 2px; }
.hxh-chat-msg audio { max-width: 230px; height: 34px; margin-top: 4px; filter: saturate(0.9); }
.ticket-thread .chat-bubble audio, .ticket-thread audio { max-width: 220px; height: 34px; }

/* ------------------------------ 7 · admin detail -------------------------- */
html body .admin-welcome { border-radius: 24px; }
html body .checklist-item { transition: transform 0.18s var(--rx-spring), background 0.2s, border-color 0.2s; border-radius: 16px; }
html body .checklist-item:hover { transform: translateX(4px); }
html body .connection-row { transition: transform 0.18s var(--rx-spring); border-radius: 14px; }
html body .connection-row:hover { transform: translateX(3px); }
html body .activity-entry:hover .activity-dot { transform: scale(1.5); }
html body .activity-dot { transition: transform 0.25s var(--rx-spring); }
html body .admin-tabs .rx-admin-filter::placeholder { color: var(--rx-ink-3); }
/* today-at-a-glance strip (injected by enhancements.js) */
.rx-today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.rx-today-grid .rx-today-cell {
  background: var(--rx-card); border: 1px solid var(--rx-line); border-radius: 16px;
  padding: 14px 16px; transition: transform 0.2s var(--rx-spring), border-color 0.2s;
}
.rx-today-grid .rx-today-cell:hover { transform: translateY(-3px); border-color: var(--rx-ring); }
.rx-today-grid small { display: block; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--rx-ink-3); font-weight: 700; }
.rx-today-grid strong { display: block; font-size: 20px; color: var(--rx-accent); margin-top: 4px; letter-spacing: -0.02em; }
.rx-today-grid span { font-size: 11.5px; color: var(--rx-ink-2); }

/* ---------------------------------- motion guard -------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mobile-toggle .rx-burger i { transition: none; }
  .hxh-chat-msg, .hxh-agent-card, .voice-chip { animation: none !important; }
  html body .sidebar { transition: none; }
}

/* ==========================================================================
   8 · Button colours v2 — HxH emerald family, per-theme, unmistakably new
   ========================================================================== */
html body .btn {
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--rx-accent-3) 64%, #ffffff) -18%,
      var(--rx-accent-2) 26%,
      var(--rx-accent) 62%,
      color-mix(in srgb, var(--rx-accent) 72%, #000000) 108%) !important;
  background-size: 165% 165% !important;
  border: 1px solid color-mix(in srgb, #ffffff 26%, transparent) !important;
  box-shadow:
    0 14px 32px -14px color-mix(in srgb, var(--rx-accent) 78%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -2px 6px rgba(0, 0, 0, 0.14) !important;
  letter-spacing: 0.015em;
}
html body .btn:hover {
  background-position: 88% 40% !important;
  box-shadow:
    0 20px 42px -16px color-mix(in srgb, var(--rx-accent) 88%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 8px rgba(0, 0, 0, 0.16) !important;
}
html body .btn.secondary {
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--rx-accent) 13%, var(--rx-card)) 0%,
      color-mix(in srgb, var(--rx-accent) 7%, var(--rx-card)) 100%) !important;
  border: 1.5px solid color-mix(in srgb, var(--rx-accent) 34%, var(--rx-line)) !important;
  color: color-mix(in srgb, var(--rx-accent) 68%, var(--rx-ink)) !important;
}
html body .btn.secondary:hover {
  background:
    linear-gradient(160deg,
      color-mix(in srgb, var(--rx-accent) 22%, var(--rx-card)) 0%,
      color-mix(in srgb, var(--rx-accent) 14%, var(--rx-card)) 100%) !important;
  border-color: var(--rx-accent) !important;
  color: var(--rx-accent) !important;
}
html body .btn.danger {
  background: linear-gradient(160deg, #ff7a85 0%, #ef4455 58%, #cf2436 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
html body .btn.danger:hover {
  background: linear-gradient(160deg, #ff8f99 0%, #f6586a 58%, #dc3044 100%) !important;
  color: #ffffff !important;
}
html body .btn.ghost {
  background: color-mix(in srgb, var(--rx-accent) 8%, transparent) !important;
  border: 1.5px solid color-mix(in srgb, var(--rx-accent) 30%, transparent) !important;
  color: var(--rx-accent) !important;
}
html body .icon-btn {
  border: 1.5px solid color-mix(in srgb, var(--rx-accent) 22%, var(--rx-line)) !important;
}
html body .icon-btn:hover {
  border-color: color-mix(in srgb, var(--rx-accent) 55%, var(--rx-line)) !important;
  background: color-mix(in srgb, var(--rx-accent) 10%, var(--rx-card)) !important;
}

/* ==========================================================================
   9 · Typing animation — smooth WhatsApp-style dots (web + admin modal)
   ========================================================================== */
.hxh-chat-typing { min-height: auto; }
.hxh-chat-typing strong { font-weight: 700; }
.hxh-typing-dots {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; margin-top: 4px;
  background: color-mix(in srgb, var(--rx-accent) 10%, var(--rx-card));
  border: 1px solid color-mix(in srgb, var(--rx-accent) 20%, var(--rx-line));
  border-radius: 999px;
}
.hxh-typing-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rx-accent);
  display: inline-block;
  animation: hxh-dot-bounce 1.15s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}
.hxh-typing-dots i:nth-child(2) { animation-delay: 0.15s; opacity: 0.85; }
.hxh-typing-dots i:nth-child(3) { animation-delay: 0.3s; opacity: 0.7; }
@keyframes hxh-dot-bounce {
  0%, 60%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-6px) scale(1.12); }
}
.ticket-thread .hxh-chat-typing .hxh-typing-dots { background: rgba(14, 124, 90, 0.1); border-color: rgba(14, 124, 90, 0.25); }
.ticket-thread .hxh-chat-typing .hxh-typing-dots i { background: #0e7c5a; }

/* ==========================================================================
   10 · Chat themes — support thread wallpapers (web + admin modal accent)
   ========================================================================== */
#hxh-chat-thread[data-chat-theme="ivory"] {
  background:
    radial-gradient(circle at 12% 8%, rgba(159, 232, 205, 0.28), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(62, 207, 158, 0.18), transparent 40%),
    linear-gradient(180deg, #fbfaf5, #f5f2e9);
}
#hxh-chat-thread[data-chat-theme="midnight"] {
  background:
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.24), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(56, 189, 248, 0.14), transparent 42%),
    linear-gradient(180deg, #0b1120, #0e1526 58%, #0b1120);
}
#hxh-chat-thread[data-chat-theme="ocean"] {
  background:
    radial-gradient(circle at 14% 12%, rgba(125, 211, 240, 0.32), transparent 44%),
    radial-gradient(circle at 86% 88%, rgba(45, 212, 191, 0.2), transparent 42%),
    linear-gradient(180deg, #f0f9fb, #e8f4f7 55%, #eef7f9);
}
#hxh-chat-thread[data-chat-theme="rose"] {
  background:
    radial-gradient(circle at 14% 10%, rgba(253, 186, 196, 0.4), transparent 44%),
    radial-gradient(circle at 86% 90%, rgba(251, 146, 160, 0.22), transparent 42%),
    linear-gradient(180deg, #fdf5f5, #fceef0 55%, #fdf6f5);
}
#hxh-chat-thread[data-chat-theme="mint"] {
  background:
    radial-gradient(circle at 12% 8%, rgba(167, 243, 208, 0.4), transparent 44%),
    radial-gradient(circle at 88% 92%, rgba(52, 211, 153, 0.24), transparent 42%),
    linear-gradient(180deg, #f2fbf6, #ecf8f1 55%, #f1faf4);
}
#hxh-chat-thread[data-chat-theme="midnight"] .hxh-chat-msg.from-admin {
  background: linear-gradient(150deg, #14352a, #102a3c);
  color: #e9f4ef;
  border-color: rgba(94, 234, 212, 0.22);
}
#hxh-chat-thread[data-chat-theme="midnight"] .hxh-chat-msg.from-user {
  background: linear-gradient(150deg, #5f3df7, #4c2fd4);
  color: #f5f3ff;
}
#hxh-chat-thread[data-chat-theme="midnight"] .hxh-chat-msg.from-ai {
  background: linear-gradient(150deg, #0f3d4a, #0c3040);
  color: #e0f2fe;
}
#hxh-chat-thread[data-chat-theme="midnight"] .hxh-chat-msg { border-color: rgba(255, 255, 255, 0.08); }
#hxh-chat-thread[data-chat-theme="midnight"] .hxh-chat-msg small { color: rgba(233, 244, 239, 0.55); }
#hxh-chat-thread[data-chat-theme="ocean"] .hxh-chat-msg.from-user { background: linear-gradient(150deg, #0e7490, #0c6178); }
#hxh-chat-thread[data-chat-theme="rose"] .hxh-chat-msg.from-user { background: linear-gradient(150deg, #e15c70, #c9445a); }
#hxh-chat-thread[data-chat-theme="mint"] .hxh-chat-msg.from-user { background: linear-gradient(150deg, #10b981, #0a8f66); }
#hxh-chat-thread { transition: background 0.4s ease; }

/* ==========================================================================
   11 · Admin → Customers → Agent team panel
   ========================================================================== */
.hxh-agent-create-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end; margin: 14px 0 4px;
}
.hxh-agent-create-go { display: flex; align-items: flex-end; }
.hxh-agent-create-go .btn { width: 100%; }
.hxh-agent-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.hxh-agent-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 8px; border-radius: 14px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--rx-spring);
}
.hxh-agent-row:hover {
  border-color: color-mix(in srgb, var(--rx-accent) 26%, transparent);
  background: color-mix(in srgb, var(--rx-accent) 5%, transparent);
  transform: translateY(-1px);
}
.hxh-agent-row h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hxh-agent-row p { color: var(--rx-ink-2); margin: 2px 0; overflow-wrap: anywhere; }
.hxh-agent-badge {
  width: 42px; height: 42px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #fff; letter-spacing: 0.03em;
  background: linear-gradient(150deg, var(--rx-accent-3), var(--rx-accent) 70%);
  box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--rx-accent) 80%, transparent);
}
#admin-agents-panel .field label { font-weight: 650; }

/* ==========================================================================
   12 · Bottom navigation — APK-style sliding pill + faster menu motion
   ========================================================================== */
html body .mobile-nav { position: relative; overflow: hidden; }
html body .mobile-nav-pill {
  position: absolute; top: 7px; bottom: 7px; left: 0;
  width: 20%; z-index: 0; pointer-events: none;
  border-radius: 16px;
  background: color-mix(in srgb, var(--rx-accent) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx-accent) 26%, transparent);
  transition: transform 0.4s cubic-bezier(0.22, 1.2, 0.36, 1);
}
html body .mobile-nav-pill span { display: none; }
html body .mobile-nav a { position: relative; z-index: 1; }
html body .mobile-nav a.active .mn-label { color: var(--rx-accent); font-weight: 750; }
html body .mobile-nav:has(a:nth-of-type(1).active) .mobile-nav-pill { transform: translateX(0); }
html body .mobile-nav:has(a:nth-of-type(2).active) .mobile-nav-pill { transform: translateX(100%); }
html body .mobile-nav:has(a:nth-of-type(3).active) .mobile-nav-pill { transform: translateX(200%); }
html body .mobile-nav:has(a:nth-of-type(4).active) .mobile-nav-pill { transform: translateX(300%); }
html body .mobile-nav:has(a:nth-of-type(5).active) .mobile-nav-pill { transform: translateX(400%); }
@media (prefers-reduced-motion: reduce) {
  html body .mobile-nav-pill { transition: none; }
  .hxh-typing-dots i { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════
   v1.6.22 · quality + smoothness pass
   (app-parity colors, subtle hover, faster reveal, non-laggy mobile)
   ════════════════════════════════════════════════════════════════════ */

/* ── 1 · Brand logo gets a WHITE tile, exactly like the app ───────── */
.brand img[data-brand-logo],
.top-brand img,
.auth-brand-emblem img,
.sidebar .brand img {
  background: #ffffff;
  padding: 6px;
  border-radius: 15px;
  border: 1px solid rgba(14, 124, 90, 0.16);
  box-shadow: 0 6px 16px -8px rgba(10, 30, 22, 0.3);
}
html[data-theme="midnight"] .brand img[data-brand-logo],
html[data-theme="midnight"] .top-brand img,
html[data-theme="midnight"] .auth-brand-emblem img { border-color: rgba(55, 221, 163, 0.22); }

/* ── 2 · App-like button geometry (android --r-btn: 20px / 15px) ──── */
html body .btn {
  border-radius: 20px;
  min-height: 44px;
  padding: 10px 20px;
  font-weight: 700;
  transition: transform 0.2s var(--rx-ease, ease), box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
html body .btn.small { border-radius: 15px; min-height: 34px; padding: 7px 14px; }
html body .btn:not(.secondary):hover { transform: translateY(-1px); }
html body .btn:active { transform: scale(0.97); }

/* ── 3 · Featured product hover: simple, subtle, one small lift ───── */
html body .product {
  transform: none !important;
  transition: transform 0.24s var(--rx-ease, ease), box-shadow 0.24s ease,
    border-color 0.24s ease;
}
html body .product:hover {
  transform: translateY(-3px) !important;
  border-color: color-mix(in srgb, var(--rx-accent) 40%, var(--rx-line)) !important;
  box-shadow: 0 20px 36px -24px rgba(6, 26, 20, 0.4);
}
html body .product::before { opacity: 0 !important; transform: translateX(-40%) !important; }
html body .product:hover::before { opacity: 0 !important; transform: translateX(-40%) !important; }
html body .product:hover .product-art > svg,
html body .product:hover .product-art img { transform: scale(1.03) !important; }
html body .product .product-art > svg,
html body .product .product-art img { transition: transform 0.3s var(--rx-ease, ease); }
/* product art backdrop follows the active theme accent (like in-app) */
html body .product-art {
  background:
    radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--rx-accent) 14%, transparent), transparent 65%),
    linear-gradient(160deg, var(--rx-accent-soft), var(--rx-card)) !important;
}
.product-art img,
.product-art .color-icon { animation: rx-art-in 0.34s var(--rx-out, ease) both; }
@keyframes rx-art-in { from { opacity: 0; } to { opacity: 1; } }

/* ── 4 · Scroll reveal: quick + soft, never "half-cut" ────────────── */
html.rx-armed .rx-reveal { transform: translateY(12px); }
html.rx-armed .rx-reveal.rx-in {
  transform: none;
  transition: opacity 0.32s var(--rx-out, ease), transform 0.38s var(--rx-spring, ease);
  transition-delay: min(var(--rx-delay, 0ms), 200ms);
}
@media (max-width: 860px) {
  html.rx-armed .rx-reveal { transform: translateY(8px); }
  html.rx-armed .rx-reveal.rx-in { transition-duration: 0.26s, 0.3s; transition-delay: 0ms !important; }
}

/* ── 5 · Nav bar: smooth transitions, accent burger like the app ──── */
html body .topbar { transition: background 0.25s ease, box-shadow 0.25s ease; }
html body .top-link { transition: color 0.2s ease, background 0.2s ease; }
.mobile-toggle .rx-burger i { background: var(--rx-accent); transition: transform 0.32s var(--rx-spring), width 0.32s var(--rx-spring), background 0.2s; }
.mobile-toggle[aria-expanded="true"] .rx-burger i { background: var(--rx-accent); }
html body .mobile-nav { transition: background 0.25s ease, box-shadow 0.25s ease; }
html body .mobile-nav a { transition: color 0.18s ease; }
html body .mobile-nav-pill { transition: transform 0.42s var(--rx-spring); will-change: transform; }

/* ── 6 · Menu drawer: transform-only slide, GPU-friendly ──────────── */
html body aside.sidebar { transition: transform 0.42s var(--rx-spring) !important; will-change: transform; }
html body .drawer-scrim { transition: opacity 0.3s ease !important; }

/* ── 7 · Non-laggy mobile: no backdrop blur anywhere that scrolls ─── */
@media (max-width: 860px) {
  html body .topbar,
  html body aside.sidebar,
  html body .mobile-nav,
  html body .panel,
  html body .drawer-scrim,
  html body .announcement-bar-mount,
  html body .store-announcement-bar,
  html body .header-search input,
  html body .search-suggest {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html body .topbar { background: color-mix(in srgb, var(--rx-card) 94%, transparent) !important; }
  html body .mobile-nav { background: color-mix(in srgb, var(--rx-card) 97%, transparent) !important; }
  html body .product:hover { transform: none !important; }
  html body .btn:not(.secondary):hover { transform: none; }
}
html body .hxh-install-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 8 · Sign-in / Sign-up pages: proper, polished ────────────────── */
html body .auth-panel {
  max-width: 560px;
  border-radius: 30px;
  box-shadow: 0 34px 70px -44px rgba(6, 30, 22, 0.4);
}
.auth-header-block { text-align: center; }
.auth-brand-emblem { margin-bottom: 12px; }
.auth-art {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 6px auto 2px;
  border-radius: 26px;
  filter: drop-shadow(0 18px 30px rgba(14, 124, 90, 0.18));
  animation: none !important;
}
.auth-pill-badge { margin-inline: auto; }
html body .auth-panel h2 { font-size: clamp(23px, 3vw, 29px); letter-spacing: -0.03em; }
html body .auth-panel .btn[type="submit"] {
  width: 100%;
  min-height: 50px;
  font-size: 15.5px;
  font-weight: 780;
  letter-spacing: 0.01em;
}
html body .auth-method-tabs button { border-radius: 14px; }
html body .auth-panel input,
html body .auth-panel select,
html body .auth-panel textarea { border-radius: 14px; transition: border-color 0.2s, box-shadow 0.2s; }
html body .auth-panel input:focus,
html body .auth-panel select:focus,
html body .auth-panel textarea:focus {
  border-color: var(--rx-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-accent) 16%, transparent);
}
@media (max-width: 640px) {
  .auth-art { width: 118px; height: 118px; }
}

/* ── 9 · Install popup: fully themed + generated art ──────────────── */
.hxh-install-modal {
  background: linear-gradient(160deg, var(--rx-card), var(--rx-bg-2));
  border-color: color-mix(in srgb, var(--rx-accent) 26%, var(--rx-line));
  box-shadow: 0 34px 80px -34px rgba(4, 20, 14, 0.6);
}
.hxh-install-modal h3 { color: var(--rx-ink); }
.hxh-install-modal p { color: var(--rx-ink-2); }
.hxh-install-art {
  display: block;
  width: 132px;
  height: 132px;
  object-fit: contain;
  margin: 0 auto 6px;
  border-radius: 24px;
}

/* ── 10 · Support empty state banner (generated art) ──────────────── */
.hxh-empty-art {
  display: block;
  width: min(300px, 82%);
  height: auto;
  margin: 0 auto 10px;
  border-radius: 22px;
}

/* ════════════════════════════════════════════════════════════════════
   v1.6.24 · real-not-demo pass
   (solid nav bars, themed history/stat cards, discovery search,
    app-like install card, generated background art, icon smoothness)
   ════════════════════════════════════════════════════════════════════ */

/* ── Nav bars: SOLID, never transparent ───────────────────────────── */
html body .topbar {
  background: var(--rx-card) !important;
  border-bottom: 1px solid var(--rx-line);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body .top-actions { gap: 9px; }
html body .icon-btn { border-radius: 14px; transition: background 0.2s ease, color 0.2s ease; }
html body .icon-btn:hover { background: color-mix(in srgb, var(--rx-accent) 10%, transparent); }
html body .mobile-nav {
  background: var(--rx-card) !important;
  border-top: 1px solid var(--rx-line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 -12px 32px -26px rgba(6, 26, 20, 0.45);
}
html body .mobile-nav a { color: var(--rx-ink-2) !important; }
html body .mobile-nav a.active,
html body .mobile-nav a.active .mn-label,
html body .mobile-nav a.active svg { color: var(--rx-accent) !important; }
html body .mobile-nav a.active .mn-label { font-weight: 750; }
/* pill: JS --i and :has() both agree → position always right */
html body .mobile-nav-pill {
  transform: translate3d(calc(var(--i, 0) * 100%), 0, 0);
  background: color-mix(in srgb, var(--rx-accent) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx-accent) 26%, transparent);
}
html body .mobile-nav a:active svg { transform: scale(0.9); }

/* ── Icon micro-smoothness ────────────────────────────────────────── */
html body .btn svg,
html body .icon-btn svg,
html body .nav-item svg,
html body .top-link svg,
html body .mobile-nav svg,
html body .sidebar-install svg {
  transition: transform 0.18s var(--rx-ease, ease);
}
html body .icon-btn:hover svg { transform: scale(1.08); }
html body .btn:hover svg { transform: translateX(2px); }

/* ── Dashboard + Orders stat cards: themed, light ─────────────────── */
html body .stats { gap: 14px; }
html body .stat {
  background: var(--rx-card) !important;
  border: 1px solid var(--rx-line) !important;
  border-radius: 18px !important;
  color: var(--rx-ink);
  box-shadow: 0 16px 34px -30px rgba(6, 26, 20, 0.5);
}
html body .stat small { color: var(--rx-ink-2) !important; }
html body .stat strong { color: var(--rx-ink) !important; }
html body .stat svg { color: var(--rx-accent) !important; }

/* ── Order history (history.js): note + KPI cards + toolbar ───────── */
html body .history-retention-note {
  background: var(--rx-accent-soft) !important;
  border: 1px solid var(--rx-ring) !important;
  border-radius: 16px !important;
  color: var(--rx-ink) !important;
}
html body .history-retention-note svg { color: var(--rx-accent) !important; }
html body .history-retention-note strong { color: var(--rx-ink); }
html body .history-stats { gap: 14px; }
html body .history-stats > * {
  background: var(--rx-card) !important;
  border: 1px solid var(--rx-line) !important;
  border-radius: 18px !important;
  color: var(--rx-ink);
  box-shadow: 0 16px 34px -30px rgba(6, 26, 20, 0.5);
}
html body .history-stats small,
html body .history-stats span { color: var(--rx-ink-2) !important; }
html body .history-stats strong,
html body .history-stats b { color: var(--rx-ink) !important; }
html body .history-stats svg { color: var(--rx-accent) !important; }
html body .history-panel {
  background: var(--rx-card) !important;
  border: 1px solid var(--rx-line) !important;
}
html body .history-filters {
  background: var(--rx-bg-2);
  border: 1px solid var(--rx-line);
  border-radius: 16px;
}
html body .history-search input,
html body .history-filters input,
html body .history-filters select {
  background: var(--rx-card);
  border: 1px solid var(--rx-line);
  color: var(--rx-ink);
  border-radius: 12px;
}

/* ── Discover hero search: proper, themed, inviting ───────────────── */
html body .search-field { max-width: 640px; position: relative; margin: 14px 0 18px; }
html body .search-field input {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px 14px 48px;
  border-radius: 18px;
  background: var(--rx-card);
  border: 1px solid var(--rx-line);
  color: var(--rx-ink);
  font-size: 14.5px;
  box-shadow: 0 20px 44px -36px rgba(6, 26, 20, 0.7);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
html body .search-field input:focus {
  border-color: var(--rx-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-accent) 15%, transparent),
    0 20px 44px -36px rgba(6, 26, 20, 0.7);
}
html body .search-field > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rx-accent);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* ── Catalog toolbar / chips / sort ───────────────────────────────── */
html body .catalog-toolbar {
  background: var(--rx-card);
  border: 1px solid var(--rx-line);
  border-radius: 20px;
  padding: 13px;
  box-shadow: 0 18px 38px -34px rgba(6, 26, 20, 0.55);
}
html body .tab {
  background: var(--rx-bg-2);
  border: 1px solid var(--rx-line);
  color: var(--rx-ink-2);
  border-radius: 999px;
  font-weight: 650;
}
html body .tab.active {
  background: var(--rx-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--rx-accent) 65%, transparent);
}
html body .sort-select {
  background: var(--rx-card);
  border: 1px solid var(--rx-line);
  color: var(--rx-ink);
  border-radius: 12px;
}
html body .toggle-pill {
  background: var(--rx-card) !important;
  border: 1px solid var(--rx-line) !important;
  color: var(--rx-ink-2) !important;
}
html body .toggle-pill.on {
  background: var(--rx-accent-soft) !important;
  border-color: var(--rx-ring) !important;
  color: var(--rx-accent) !important;
}
html body .toggle-pill.on svg { color: var(--rx-accent) !important; }
html body .collection-controls .text-link { color: var(--rx-accent) !important; }

/* ── Empty states: light, friendly, themed ────────────────────────── */
html body .empty-catalog {
  background: linear-gradient(180deg, var(--rx-card), var(--rx-bg-2)) !important;
  border: 1px dashed var(--rx-line) !important;
  border-radius: 22px;
  min-height: 230px;
}
html body .empty-catalog h3 { color: var(--rx-ink) !important; }
html body .empty-catalog p { color: var(--rx-ink-2) !important; }
html body .empty-icon {
  background: var(--rx-accent-soft) !important;
  border: 1px solid var(--rx-ring) !important;
  color: var(--rx-accent) !important;
  border-radius: 16px !important;
}

/* ── Sidebar Download-APK card: exactly like app buttons ──────────── */
html body .sidebar-install {
  background: var(--rx-accent-grad) !important;
  border: 1px solid transparent !important;
  color: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--rx-accent) 60%, transparent);
}
html body .sidebar-install strong { color: #fff !important; }
html body .sidebar-install small { color: rgba(255, 255, 255, 0.85) !important; }
html body .sidebar-install svg { color: #fff !important; }
html body .sidebar-install .install-glyph {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 12px;
}

/* ── Notices ──────────────────────────────────────────────────────── */
html body .notice {
  background: var(--rx-accent-soft) !important;
  border: 1px solid var(--rx-ring) !important;
  color: var(--rx-ink) !important;
}

/* ── Generated background art (bg wagaira) ────────────────────────── */
html body[data-page="login"] .content,
html body[data-page="register"] .content,
html body[data-page="setup"] .content,
html body[data-page="forgot-password"] .content,
html body[data-page="reset-password"] .content,
html body[data-page="verify-email"] .content,
html body[data-page="login-verify"] .content {
  background-image: linear-gradient(180deg,
      color-mix(in srgb, var(--rx-bg) 78%, transparent),
      color-mix(in srgb, var(--rx-bg) 92%, transparent)),
    url("/assets/generated/bg-auth-aurora.jpg");
  background-size: cover;
  background-position: center top;
}
html body[data-page="orders"] .content,
html body[data-page="deliveries"] .content {
  background-image: linear-gradient(180deg,
      transparent 0%,
      color-mix(in srgb, var(--rx-bg) 72%, transparent) 44%,
      var(--rx-bg) 88%),
    url("/assets/generated/bg-orders-band.jpg");
  background-size: cover;
  background-position: center top;
}
html body[data-page="home"] .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("/assets/generated/bg-hero-discover.jpg") center/cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
html body[data-page="home"] .hero > * { position: relative; z-index: 1; }
html body .help-card {
  background-image: linear-gradient(160deg,
      color-mix(in srgb, var(--rx-accent-soft) 75%, transparent),
      color-mix(in srgb, var(--rx-card) 88%, transparent)),
    url("/assets/generated/bg-help-texture.jpg");
  background-size: cover;
  background-position: center;
  border: 1px solid var(--rx-ring);
}

/* ── v1.6.25 · screenshot triage: transparency, overlaps, washed text ─
   Fixes from user screenshots (2026-10-26):
   · topbar/mobile-nav truly opaque (no color-mix / --nav-bg alpha survives)
   · purple gift-box blob hidden on auth cards
   · floating tab bar never covers auth forms (hidden on auth/cart views)
   · remember-me + all labels readable on light cards
   · trust/policy/contact copy theme-aware (no pale lavender on white)
   · auth showcase image renders as a banner, not a squashed strip
   · auth topbar decluttered on mobile (no search/cart noise)
   · stack order: topbar above any page heading that scrolls under it
   ─────────────────────────────────────────────────────────────────── */

/* Unbeatable solid nav bars */
html body .topbar.topbar,
html body .public-home-topbar.public-home-topbar {
  background: var(--rx-card) !important;
  border-bottom-color: var(--rx-line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 65 !important;
}
html body { --nav-bg: var(--rx-card) !important; }
html body .mobile-nav.mobile-nav {
  background: var(--rx-card) !important;
  border-color: var(--rx-line) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 -14px 34px -26px rgba(6, 26, 20, 0.5);
}
html body .mobile-nav a { color: var(--rx-ink-2) !important; }
html body .mobile-nav a.active,
html body .mobile-nav a.active .mn-label,
html body .mobile-nav a.active svg { color: var(--rx-accent) !important; }

/* Auth + cart: no floating tab bar over the form/button (matches APK login) */
@media (max-width: 760px) {
  html body[data-page="login"] .mobile-nav,
  html body[data-page="register"] .mobile-nav,
  html body[data-page="setup"] .mobile-nav,
  html body[data-page="verify-email"] .mobile-nav,
  html body[data-page="login-verify"] .mobile-nav,
  html body[data-page="forgot-password"] .mobile-nav,
  html body[data-page="reset-password"] .mobile-nav,
  html body[data-page="cart"] .mobile-nav { display: none !important; }
  html body[data-page="login"] .content,
  html body[data-page="register"] .content,
  html body[data-page="setup"] .content,
  html body[data-page="verify-email"] .content,
  html body[data-page="login-verify"] .content,
  html body[data-page="forgot-password"] .content,
  html body[data-page="reset-password"] .content,
  html body[data-page="cart"] .content { padding-bottom: 36px !important; }
  /* declutter auth topbar: burger + logo + Sign in only */
  html body[data-page="login"] .header-search,
  html body[data-page="register"] .header-search,
  html body[data-page="setup"] .header-search,
  html body[data-page="verify-email"] .header-search,
  html body[data-page="login-verify"] .header-search,
  html body[data-page="forgot-password"] .header-search,
  html body[data-page="reset-password"] .header-search,
  html body[data-page="login"] .top-actions .icon-btn,
  html body[data-page="register"] .top-actions .icon-btn,
  html body[data-page="setup"] .top-actions .icon-btn,
  html body[data-page="verify-email"] .top-actions .icon-btn,
  html body[data-page="login-verify"] .top-actions .icon-btn,
  html body[data-page="forgot-password"] .top-actions .icon-btn,
  html body[data-page="reset-password"] .top-actions .icon-btn { display: none !important; }
}

/* Form labels + remember-me readable on light cards */
html body label,
html body .field > label { color: var(--rx-ink-2) !important; }
html body .remember-me-label,
html body .remember-me-label strong { color: var(--rx-ink) !important; }
html body .remember-me-label small,
html body .field-hint,
html body .form-note { color: var(--rx-ink-3) !important; }
html body .auth-remember-field .remember-me-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--rx-line);
  border-radius: 13px;
  background: var(--rx-bg-2);
}
html body .remember-me-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--rx-accent);
}
html body .remember-me-label span { display: grid; gap: 1px; }

/* Purple gift-box decor blob off auth cards */
html body .auth-panel::after { display: none !important; }

/* Auth showcase image as a clean banner */
.auth-art {
  display: block;
  width: min(320px, 100%) !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--rx-ring);
  margin: 10px auto 4px;
}

/* Trust / policy / contact copy: theme-aware ink (light cards stay readable) */
html body .trust-feature-grid h2,
html body .about-honesty h2,
html body .contact-guidance h2,
html body .contact-guidance strong,
html body .policy-section h2,
html body .policy-help strong,
html body .policy-contents > button,
html body .trust-links > a,
html body .policy-contents > .text-link { color: var(--rx-ink) !important; }
html body .trust-feature-grid p,
html body .about-honesty p,
html body .contact-guidance p,
html body .policy-section p,
html body .policy-help p,
html body .policy-contents > button > span { color: var(--rx-ink-2) !important; }
html body .trust-feature-grid .panel > svg,
html body .trust-links > a svg,
html body .contact-guidance div > svg,
html body .policy-contents > button > svg { color: var(--rx-accent) !important; }
html body .policy-number,
html body .policy-contents > .eyebrow { color: var(--rx-ink-3) !important; }
/* self-dark trust hero keeps a light headline (theme-default keeps its own) */
html body .trust-hero h2 { color: #f4edff !important; }
html body .trust-hero .eyebrow { color: #dcc6ff !important; }
