/* ============================================================================
   HxH Store · APK parity layer — loaded LAST, after hxh-v15.css.
   Mirrors android-src: theme.css (Ivory + Midnight), ui.css (buttons/tabbar),
   motion.css (riseIn/popIn/sheetUp timing). Everything here either aligns the
   web with the Android app or overrides leftover per-theme hard-coded values.
   ========================================================================== */

/* APK variable fonts (Plus Jakarta Sans + Sora), copied from the app bundle. */
@font-face{font-family:'APK Jakarta';src:url('/fonts/PlusJakartaSans.woff2') format('woff2');font-style:normal;font-weight:200 800;font-display:swap}
@font-face{font-family:'APK Sora';src:url('/fonts/Sora.woff2') format('woff2');font-style:normal;font-weight:400 800;font-display:swap}

/* --- Design tokens (theme.css) ------------------------------------------- */
:root,
html[data-theme="white"],
html[data-theme="default"] {
  --font-text: 'APK Jakarta', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'APK Sora', 'SpaceGrotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-fast: 0.2s;
  --motion-base: 0.36s;
  --motion-slow: 0.56s;
  --nav-h: 68px;
  --accent: #0e7c5a;
  --accent-2: #17a67a;
  --accent-3: #5fd3a8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(14, 124, 90, 0.08);
  --accent-soft-2: rgba(23, 166, 122, 0.16);
  --accent-ring: rgba(23, 166, 122, 0.34);
  --accent-shadow: rgba(14, 124, 90, 0.42);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --ink-2: #5b675f;
  --ink-3: #8d978f;
  --line-strong: rgba(19, 45, 34, 0.16);
  --shadow-1: 0 1px 2px rgba(24, 40, 32, 0.05), 0 8px 24px rgba(24, 40, 32, 0.06);
  --shadow-2: 0 18px 50px rgba(24, 40, 32, 0.16);
}

html[data-theme="black"] {
  --font-text: 'APK Jakarta', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'APK Sora', 'SpaceGrotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-fast: 0.2s;
  --motion-base: 0.36s;
  --motion-slow: 0.56s;
  --nav-h: 68px;
  --accent: #37dda3;
  --accent-2: #6df2c6;
  --accent-3: #b4ffe4;
  --accent-ink: #042019;
  --accent-soft: rgba(55, 221, 163, 0.09);
  --accent-soft-2: rgba(109, 242, 198, 0.16);
  --accent-ring: rgba(55, 221, 163, 0.4);
  --accent-shadow: rgba(0, 0, 0, 0.55);
  --nav-bg: rgba(12, 18, 24, 0.85);
  --ink-2: #a4b6ae;
  --ink-3: #74857e;
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 24px 60px rgba(0, 0, 0, 0.55);
}

body { letter-spacing: 0.01px; }

/* --- Motion vocabulary (motion.css keyframes) ---------------------------- */
@keyframes hxh-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes hxh-rise-in {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes hxh-pop-in {
  0% { opacity: 0; transform: scale(0.82); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes hxh-sheet-up {
  from { transform: translate3d(0, 100%, 0); opacity: 0.6; }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}
@keyframes tabbar-in {
  from { opacity: 0; transform: translate3d(0, 26px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes pill-in {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes hxh-shine {
  0% { transform: translateX(-140%) skewX(-18deg); }
  60%, 100% { transform: translateX(240%) skewX(-18deg); }
}

/* --- Buttons (ui.css .btn family) ---------------------------------------- */
html[data-theme] .btn,
html[data-theme] .btn:visited {
  height: 46px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.008em;
  background: linear-gradient(135deg, #0e7c5a, #17a67a);
  border: 1px solid transparent;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 26px -10px rgba(14, 124, 90, 0.5);
  isolation: isolate;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform var(--motion-fast) var(--ease-spring),
    box-shadow var(--motion-fast) var(--ease-out),
    filter var(--motion-fast) linear,
    background var(--motion-fast) var(--ease-out);
}
html[data-theme] .btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 16px 32px -12px rgba(14, 124, 90, 0.55);
}
html[data-theme] .btn:active { transform: scale(0.955) translateY(1px); transition-duration: 0.09s; }
html[data-theme] .btn.secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line-strong);
  color: var(--text, #15211b);
  box-shadow: 0 1px 2px rgba(24, 40, 32, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-theme] .btn.secondary:hover {
  background: #ffffff;
  border-color: rgba(14, 124, 90, 0.4);
  color: #0b6a4e;
  filter: none;
}
html[data-theme] .btn.danger {
  background: rgba(207, 75, 69, 0.08);
  border-color: rgba(207, 75, 69, 0.4);
  color: #cf4b45;
  box-shadow: none;
}
html[data-theme] .btn.danger:hover { background: rgba(207, 75, 69, 0.14); filter: none; }
html[data-theme] .btn.small { height: 36px; min-height: 36px; padding: 0 15px; font-size: 12px; border-radius: 11px; }
html[data-theme] .btn.xs { height: 30px; min-height: 30px; padding: 0 12px; font-size: 11px; border-radius: 10px; }
html[data-theme] .btn.busy, html[data-theme] .btn:disabled {
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}
html[data-theme] .btn:focus-visible,
html[data-theme] a:focus-visible,
html[data-theme] button:focus-visible,
html[data-theme] .tab:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}
html[data-theme="black"] .btn {
  background: linear-gradient(135deg, #37dda3, #6df2c6);
  color: #042019;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 26px -10px rgba(55, 221, 163, 0.4);
}
html[data-theme="black"] .btn:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 16px 32px -12px rgba(55, 221, 163, 0.45); }
html[data-theme="black"] .btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e9f4ef;
  box-shadow: none;
}
html[data-theme="black"] .btn.secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(55, 221, 163, 0.45); color: #6df2c6; }
html[data-theme="black"] .btn.danger { background: rgba(255, 111, 125, 0.1); border-color: rgba(255, 111, 125, 0.4); color: #ff8d98; }
@media (max-width: 760px) {
  html[data-theme] .btn { height: 50px; font-size: 14.5px; }
  html[data-theme] .btn.small { height: 38px; font-size: 12.5px; }
}

/* --- Panels / cards (ui.css .card curve family) -------------------------- */
html[data-theme] .panel,
html[data-theme] .stat,
html[data-theme] .auth-panel { border-radius: 20px; }
html[data-theme] .panel { box-shadow: 0 1px 2px rgba(24, 40, 32, 0.04); }
html[data-theme="black"] .panel { box-shadow: var(--shadow-1); }

/* Light theme: sweep away leftover dark hard-coded surfaces (polish.css). */
html[data-theme="white"] .product,
html[data-theme="default"] .product {
  background: #ffffff !important;
  border-color: #e7e2d5 !important;
  box-shadow: 0 1px 2px rgba(24, 40, 32, 0.04) !important;
}
html[data-theme="white"] .product-art,
html[data-theme="default"] .product-art {
  background: radial-gradient(ellipse at 50% 85%, rgba(23, 166, 122, 0.14), transparent 65%), #f4f0e6 !important;
}
html[data-theme="white"] .product .save-product,
html[data-theme="default"] .product .save-product {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: #e7e2d5 !important;
  color: #5b675f !important;
}
html[data-theme="white"] .mini-banner,
html[data-theme="default"] .mini-banner {
  background: radial-gradient(ellipse at right, rgba(14, 124, 90, 0.1), transparent), #ffffff !important;
  border-color: #e7e2d5 !important;
}
html[data-theme="white"] .mini-banner.green,
html[data-theme="default"] .mini-banner.green {
  background: radial-gradient(ellipse at right, rgba(23, 166, 122, 0.16), transparent), #f2f7f3 !important;
  border-color: rgba(14, 124, 90, 0.25) !important;
}
html[data-theme="white"] .journey-step,
html[data-theme="default"] .journey-step {
  background: #ffffff !important;
  border-color: #e7e2d5 !important;
}
html[data-theme="white"] .faq-section,
html[data-theme="default"] .faq-section {
  background: #ffffff !important;
  border-color: #e7e2d5 !important;
}
html[data-theme="white"] .faq-section details,
html[data-theme="default"] .faq-section details { border-color: #e7e2d5 !important; }
html[data-theme="white"] .faq-section summary,
html[data-theme="default"] .faq-section summary { color: #22302a !important; }
html[data-theme="white"] .faq-section details p,
html[data-theme="default"] .faq-section details p { color: #5b675f !important; }
html[data-theme="white"] .faq-section summary::after,
html[data-theme="default"] .faq-section summary::after { color: #0e7c5a !important; }
html[data-theme="white"] .journey-step p,
html[data-theme="default"] .journey-step p,
html[data-theme="white"] .step-number,
html[data-theme="default"] .step-number { color: #5b675f !important; }
html[data-theme="white"] .glow,
html[data-theme="default"] .glow { background: rgba(14, 124, 90, 0.14) !important; }
html[data-theme="white"] .table-wrap,
html[data-theme="default"] .table-wrap { border-color: #e7e2d5 !important; }
html[data-theme="white"] th,
html[data-theme="default"] th { background: rgba(14, 124, 90, 0.05) !important; color: #5b675f !important; border-color: #e7e2d5 !important; }
html[data-theme="white"] td,
html[data-theme="default"] td { color: #22302a !important; border-color: #eee9dc !important; }
html[data-theme="white"] tr:hover td,
html[data-theme="default"] tr:hover td { background: rgba(14, 124, 90, 0.04) !important; }
html[data-theme="white"] .toggle-pill,
html[data-theme="default"] .toggle-pill {
  background: #ffffff !important;
  border-color: #e7e2d5 !important;
  color: #5b675f !important;
}
html[data-theme="white"] .toggle-pill.on,
html[data-theme="default"] .toggle-pill.on {
  background: rgba(14, 124, 90, 0.1) !important;
  border-color: rgba(14, 124, 90, 0.4) !important;
  color: #0b6a4e !important;
}
html[data-theme="white"] .palette-list p,
html[data-theme="default"] .palette-list p { color: #5b675f !important; }
html[data-theme="white"] .palette-item,
html[data-theme="default"] .palette-item {
  background: #ffffff !important;
  border-color: #e7e2d5 !important;
  color: #22302a !important;
}
html[data-theme="white"] .palette-item:hover,
html[data-theme="white"] .palette-item:focus,
html[data-theme="default"] .palette-item:hover,
html[data-theme="default"] .palette-item:focus {
  background: rgba(14, 124, 90, 0.07) !important;
  border-color: rgba(14, 124, 90, 0.35) !important;
}
html[data-theme="white"] .palette-item > svg,
html[data-theme="white"] .palette-item small,
html[data-theme="default"] .palette-item > svg,
html[data-theme="default"] .palette-item small { color: #5b675f !important; }
html[data-theme="white"] .toast,
html[data-theme="default"] .toast {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(14, 124, 90, 0.3) !important;
  color: #22302a !important;
  box-shadow: 0 15px 40px rgba(24, 40, 32, 0.16) !important;
}
html[data-theme="white"] .toast svg,
html[data-theme="default"] .toast svg { color: #0e7c5a !important; }
html[data-theme="white"] .toast.error,
html[data-theme="default"] .toast.error { border-color: rgba(207, 75, 69, 0.5) !important; }
html[data-theme="white"] .toast.error svg,
html[data-theme="default"] .toast.error svg { color: #cf4b45 !important; }

/* Sidebar active pill: replace leftover violet accents (polish.css). */
html[data-theme] .nav-item.active {
  background: linear-gradient(135deg, rgba(14, 124, 90, 0.14), rgba(23, 166, 122, 0.06));
  border-color: rgba(14, 124, 90, 0.22);
  color: #0b6a4e;
  box-shadow: none;
  font-weight: 750;
}
html[data-theme] .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 22px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-ring);
  transform: translateY(-50%);
}
html[data-theme="black"] .nav-item.active {
  background: linear-gradient(135deg, rgba(55, 221, 163, 0.16), rgba(109, 242, 198, 0.05));
  border-color: rgba(55, 221, 163, 0.3);
  color: #6df2c6;
}
html[data-theme] .nav-item { transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s; border-radius: 14px; }
html[data-theme] .brand img { box-shadow: 0 4px 18px rgba(14, 124, 90, 0.18); border-radius: 12px; }

/* Tabs (catalog + admin) — rounded pills like the app. */
html[data-theme] .tab {
  border-radius: 999px;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s, transform 0.2s var(--ease-spring);
}
html[data-theme] .tab:hover { transform: translateY(-1px); }
html[data-theme] .tab.active {
  background: var(--accent-soft-2);
  border-color: var(--accent-ring);
  color: var(--accent);
}

/* Inputs (ui.css .input-wrap feel). */
html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea { transition: border-color 0.2s, box-shadow 0.2s; }
html[data-theme] input:focus,
html[data-theme] select:focus,
html[data-theme] textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
html[data-theme="white"] input, html[data-theme="white"] select, html[data-theme="white"] textarea,
html[data-theme="default"] input, html[data-theme="default"] select, html[data-theme="default"] textarea {
  background: #ffffff !important;
  border-color: rgba(19, 45, 34, 0.16) !important;
  color: #15211b !important;
}
html[data-theme="white"] input::placeholder, html[data-theme="white"] textarea::placeholder,
html[data-theme="default"] input::placeholder, html[data-theme="default"] textarea::placeholder { color: #8d978f !important; }
html[data-theme="black"] input, html[data-theme="black"] select, html[data-theme="black"] textarea {
  background: #0b1016 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e9f4ef !important;
}
html[data-theme] label { color: var(--ink-2); }

/* --- Password strength box (polish.css .pw-security-*) -------------------- */
html[data-theme] .pw-security-meter {
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(14, 124, 90, 0.05);
  border: 1px solid rgba(14, 124, 90, 0.16);
  box-shadow: 0 1px 2px rgba(24, 40, 32, 0.05);
}
html[data-theme="black"] .pw-security-meter {
  background: rgba(55, 221, 163, 0.07);
  border-color: rgba(55, 221, 163, 0.2);
}
html[data-theme] .pw-security-caption { color: var(--ink-2); font-weight: 650; }
html[data-theme] .pw-security-badge { background: rgba(19, 45, 34, 0.06); color: var(--ink-2); }
html[data-theme="black"] .pw-security-badge { background: rgba(255, 255, 255, 0.08); color: var(--ink-2); }
html[data-theme] .pw-security-badge.is-weak { background: rgba(207, 75, 69, 0.12); color: #c8443e; }
html[data-theme] .pw-security-badge.is-fair { background: rgba(181, 122, 16, 0.14); color: #a06a0c; }
html[data-theme] .pw-security-badge.is-strong { background: rgba(14, 124, 90, 0.14); color: #0c6d50; }
html[data-theme] .pw-security-badge.is-very-strong { background: rgba(14, 124, 90, 0.2); color: #0a5d44; }
html[data-theme="black"] .pw-security-badge.is-weak { background: rgba(255, 111, 125, 0.14); color: #ff8d98; }
html[data-theme="black"] .pw-security-badge.is-fair { background: rgba(255, 196, 107, 0.14); color: #ffc46b; }
html[data-theme="black"] .pw-security-badge.is-strong,
html[data-theme="black"] .pw-security-badge.is-very-strong { background: rgba(55, 221, 163, 0.16); color: #6df2c6; }
html[data-theme] .pw-security-bars span { background: rgba(19, 45, 34, 0.14); }
html[data-theme="black"] .pw-security-bars span { background: rgba(255, 255, 255, 0.12); }
html[data-theme] .pw-security-bars span.on.is-weak { background: #cf4b45; }
html[data-theme] .pw-security-bars span.on.is-fair { background: #d99a1a; }
html[data-theme] .pw-security-bars span.on.is-strong { background: #17a67a; }
html[data-theme] .pw-security-bars span.on.is-very-strong { background: linear-gradient(90deg, #0e7c5a, #17a67a); }
html[data-theme] .pw-security-rules span { background: rgba(19, 45, 34, 0.05); border-color: rgba(19, 45, 34, 0.12); color: var(--ink-2); }
html[data-theme] .pw-security-rules span.met {
  background: rgba(14, 124, 90, 0.12);
  border-color: rgba(14, 124, 90, 0.35);
  color: #0b6a4e;
}
html[data-theme="black"] .pw-security-rules span { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: var(--ink-3); }
html[data-theme="black"] .pw-security-rules span.met { background: rgba(55, 221, 163, 0.14); border-color: rgba(55, 221, 163, 0.4); color: #6df2c6; }
html[data-theme] .password-toggle { color: var(--ink-3); background: transparent; }
html[data-theme] .password-toggle:hover { background: var(--accent-soft); color: var(--accent); }

/* --- Mobile navigation = APK floating TabBar ------------------------------ */
@media (max-width: 760px) {
  .content { padding-bottom: 124px !important; }
  .mobile-nav {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    align-items: stretch;
    position: fixed !important;
    inset: auto 12px calc(env(safe-area-inset-bottom, 0px) + 10px) 12px !important;
    top: auto;
    height: var(--nav-h);
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 26px !important;
    background: var(--nav-bg) !important;
    border: 1px solid var(--line-strong) !important;
    box-shadow:
      0 20px 44px -22px rgba(10, 18, 14, 0.5),
      0 2px 8px rgba(10, 18, 14, 0.06),
      0 1px 0 rgba(255, 255, 255, 0.55) inset !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.25);
    backdrop-filter: blur(16px) saturate(1.25);
    z-index: 70 !important;
    isolation: isolate;
    animation: tabbar-in 0.5s var(--ease) both;
    overflow: visible;
  }
  html[data-theme="black"] .mobile-nav {
    box-shadow:
      0 20px 44px -22px rgba(0, 0, 0, 0.65),
      0 1px 0 rgba(255, 255, 255, 0.06) inset !important;
  }
  .mobile-nav a {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px !important;
    min-width: 0 !important;
    padding: 8px 2px 7px !important;
    font-size: 9.5px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink-3) !important;
    transition: color 0.2s var(--ease-out);
    filter: none !important;
  }
  .mobile-nav a svg { width: 21px; height: 21px; }
  .mobile-nav a.active { color: var(--accent) !important; font-weight: 800 !important; background: none !important; filter: none !important; }
  .mobile-nav a.active svg { filter: none !important; }
  .mobile-nav-pill {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 20%;
    pointer-events: none;
    transform: translate3d(calc(var(--i, 0) * 100%), 0, 0);
    transition: transform 0.52s var(--ease-spring);
    will-change: transform;
    z-index: 0;
  }
  .mobile-nav-pill > span {
    display: block;
    height: 100%;
    margin: 0 5px;
    border-radius: 20px;
    background:
      radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.7), transparent 62%),
      var(--accent-soft-2);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      0 10px 20px -14px var(--accent);
    animation: pill-in 0.36s var(--ease-spring) both;
  }
  html[data-theme="black"] .mobile-nav-pill > span {
    background:
      radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 62%),
      var(--accent-soft-2);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06) inset,
      0 10px 20px -14px rgba(55, 221, 163, 0.8);
  }
}

/* --- Admin console: grouped tabs (arrange jumbled features) -------------- */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.admin-tab-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 16px;
  background: rgba(14, 124, 90, 0.05);
  border: 1px solid rgba(14, 124, 90, 0.12);
}
html[data-theme="black"] .admin-tab-group {
  background: rgba(55, 221, 163, 0.06);
  border-color: rgba(55, 221, 163, 0.14);
}
.admin-tab-group-label {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 4px 0 3px;
  white-space: nowrap;
}
.admin-tabs .tab { min-height: 34px; margin: 0; }

/* --- Product grid: smooth, non-laggy ------------------------------------- */
.products-grid > .product {
  content-visibility: auto;
  contain-intrinsic-size: auto 380px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.25s;
}
.products-grid > .product:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px -20px rgba(24, 40, 32, 0.28);
}
html[data-theme="black"] .products-grid > .product:hover {
  box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.7);
}
.product-art > svg, .product-art .brand-svg, .product-art .generic-product-mark {
  transition: transform 0.35s var(--ease-spring);
}
.product:hover .product-art > svg { transform: scale(1.07); }
.products-grid img { content-visibility: auto; }

/* --- Modal / toast animation parity -------------------------------------- */
.overlay { animation: hxh-fade-in 0.24s var(--ease-out) both; }
.modal { animation: hxh-pop-in 0.36s var(--ease-spring) both; }
.toast { animation: hxh-rise-in 0.3s var(--ease) both; }
@media (max-width: 760px) {
  .modal { animation: hxh-sheet-up 0.4s var(--ease) both; border-radius: 24px 24px 18px 18px; }
}

/* Page-change stagger (added by apk-parity.js when the view switches). */
.hxh-page-enter > .page-heading,
.hxh-page-enter > section,
.hxh-page-enter > .split,
.hxh-page-enter > .stats,
.hxh-page-enter > .products-grid,
.hxh-page-enter > .banners,
.hxh-page-enter > .admin-workspace,
.hxh-page-enter > div {
  animation: hxh-rise-in 0.44s var(--ease) both;
}
.hxh-page-enter > *:nth-child(2) { animation-delay: 0.05s; }
.hxh-page-enter > *:nth-child(3) { animation-delay: 0.1s; }
.hxh-page-enter > *:nth-child(4) { animation-delay: 0.15s; }
.hxh-page-enter > *:nth-child(n + 5) { animation-delay: 0.18s; }

/* Sidebar drawer on phones: same slide easing as the app. */
@media (max-width: 760px) {
  .sidebar { transition: transform 0.32s var(--ease); }
  .drawer-scrim { transition: opacity 0.28s var(--ease); }
}

/* Support chat bubbles (web chat = APK support chat). */
.hxh-chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px; scroll-behavior: smooth; }
.hxh-chat-msg {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  animation: hxh-rise-in 0.3s var(--ease) both;
  word-break: break-word;
}
.hxh-chat-msg strong { display: block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; margin-bottom: 3px; }
.hxh-chat-msg small { display: block; font-size: 9.5px; opacity: 0.6; margin-top: 5px; }
.hxh-chat-msg.from-user { align-self: flex-end; background: linear-gradient(135deg, #0e7c5a, #17a67a); color: #fff; border-bottom-right-radius: 6px; }
.hxh-chat-msg.from-admin { align-self: flex-start; background: var(--accent-soft); border: 1px solid var(--accent-ring); color: var(--text); border-bottom-left-radius: 6px; }
.hxh-chat-msg.from-ai { align-self: flex-start; background: var(--panel2); border: 1px dashed var(--line-strong); color: var(--text); border-bottom-left-radius: 6px; }
html[data-theme="black"] .hxh-chat-msg.from-user { background: linear-gradient(135deg, #37dda3, #6df2c6); color: #042019; }
.hxh-chat-composer { display: flex; gap: 9px; align-items: flex-end; margin-top: 12px; }
.hxh-chat-composer textarea { min-height: 54px; max-height: 140px; resize: vertical; }
.hxh-support-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.hxh-support-tabs .tab { border: 1px solid transparent; }
.hxh-agent-status { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.hxh-agent-status.online { background: rgba(14, 124, 90, 0.12); color: #0c6d50; }
.hxh-agent-status.offline { background: rgba(181, 122, 16, 0.14); color: #a06a0c; }
.hxh-agent-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pill-in 0.4s var(--ease-spring) both; }
html[data-theme="black"] .hxh-agent-status.online { background: rgba(55, 221, 163, 0.14); color: #6df2c6; }
html[data-theme="black"] .hxh-agent-status.offline { background: rgba(255, 196, 107, 0.14); color: #ffc46b; }

/* Orders detail timeline (same as the app's order tracking). */
.hxh-order-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.hxh-order-detail-grid > div { background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: 13px; padding: 10px 12px; }
.hxh-order-detail-grid small { display: block; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.hxh-order-detail-grid strong { font-size: 12.5px; }

/* /app download page (APK landing, same art direction as the app). */
.hxh-app-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--accent-ring);
  background:
    radial-gradient(ellipse at 82% 16%, rgba(23, 166, 122, 0.22), transparent 55%),
    radial-gradient(ellipse at 12% 110%, rgba(201, 138, 18, 0.12), transparent 55%),
    linear-gradient(115deg, #f7f4ec, #eef6f1 58%, #f6f1e2);
  padding: 44px 44px 40px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: center;
  animation: hxh-rise-in 0.5s var(--ease) both;
}
html[data-theme="black"] .hxh-app-hero {
  background:
    radial-gradient(ellipse at 82% 16%, rgba(55, 221, 163, 0.16), transparent 55%),
    linear-gradient(115deg, #080c11, #0d131a 60%, #101820);
}
.hxh-app-hero h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; line-height: 1.08; margin: 14px 0 12px; font-weight: 800; }
.hxh-app-hero p { font-size: 13.5px; line-height: 1.8; color: var(--ink-2); max-width: 520px; }
.hxh-app-hero .hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hxh-app-hero .hero-badges span { font-size: 10.5px; font-weight: 700; padding: 6px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--accent-ring); color: #0b6a4e; }
html[data-theme="black"] .hxh-app-hero .hero-badges span { background: rgba(55, 221, 163, 0.1); color: #6df2c6; }
.hxh-app-hero-art { position: relative; display: grid; place-items: center; }
.hxh-app-hero-art img { width: min(100%, 420px); border-radius: 22px; box-shadow: var(--shadow-2); animation: hxh-rise-in 0.6s 0.12s var(--ease) both; }
.hxh-app-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hxh-app-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 22px; }
.hxh-app-feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 18px;
  animation: hxh-rise-in 0.45s var(--ease) both;
}
.hxh-app-feature:nth-child(2) { animation-delay: 0.06s; }
.hxh-app-feature:nth-child(3) { animation-delay: 0.12s; }
.hxh-app-feature:nth-child(4) { animation-delay: 0.18s; }
.hxh-app-feature:nth-child(5) { animation-delay: 0.24s; }
.hxh-app-feature:nth-child(6) { animation-delay: 0.3s; }
.hxh-app-feature .fe-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.hxh-app-feature strong { display: block; font-family: var(--font-display); font-size: 14.5px; margin-bottom: 6px; }
.hxh-app-feature p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0; }
@media (max-width: 900px) {
  .hxh-app-hero { grid-template-columns: 1fr; padding: 30px 24px; }
  .hxh-app-hero-art { order: -1; }
}

/* Reduced motion: honor the OS setting like the app does. */
@media (prefers-reduced-motion: reduce) {
  .overlay, .modal, .toast, .hxh-page-enter > *,
  .mobile-nav, .mobile-nav-pill > span,
  .hxh-chat-msg, .hxh-app-hero, .hxh-app-feature { animation: none !important; }
  .btn, .products-grid > .product, .tab { transition: none !important; }
  .products-grid > .product:hover, .btn:hover, .tab:hover { transform: none !important; }
}

/* --- Repeated APK download popup (install-suggest.js) --------------------- */
.hxh-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 12, 9, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.24s var(--ease-out);
}
.hxh-install-overlay.is-open { opacity: 1; }
.hxh-install-modal {
  position: relative;
  width: min(420px, 100%);
  border-radius: 26px;
  padding: 30px 26px 24px;
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #f6f3ea 100%);
  border: 1px solid rgba(14, 124, 90, 0.22);
  box-shadow: 0 30px 80px rgba(10, 18, 14, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: scale(0.82);
  opacity: 0;
  transition: transform 0.36s var(--ease-spring), opacity 0.24s var(--ease-out);
}
.hxh-install-overlay.is-open .hxh-install-modal { transform: scale(1); opacity: 1; }
html[data-theme="black"] .hxh-install-modal {
  background: linear-gradient(160deg, #111820 0%, #0a0f14 100%);
  border-color: rgba(55, 221, 163, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.hxh-install-modal h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; margin: 8px 0 6px; }
.hxh-install-modal p { font-size: 12.5px; line-height: 1.7; color: var(--ink-2); margin: 0 auto 12px; max-width: 320px; }
.hxh-install-modal .eyebrow { display: inline-block; font-size: 8.5px; letter-spacing: 0.16em; font-weight: 800; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); padding: 5px 10px; border-radius: 999px; }
.hxh-install-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #0e7c5a, #17a67a);
  box-shadow: 0 14px 30px -12px rgba(14, 124, 90, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hxh-install-icon svg { width: 30px; height: 30px; }
.hxh-install-points { list-style: none; margin: 12px 0 16px; padding: 12px 14px; text-align: left; border-radius: 14px; background: rgba(14, 124, 90, 0.06); border: 1px solid rgba(14, 124, 90, 0.14); display: grid; gap: 6px; }
.hxh-install-points li { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.hxh-install-points li::before { content: '✓ '; color: var(--accent); font-weight: 800; }
.hxh-install-actions { display: flex; gap: 10px; justify-content: center; }
.hxh-install-actions .btn { flex: 1; }
.hxh-install-hint { display: block; margin-top: 12px; font-size: 10px; color: var(--ink-3); line-height: 1.6; }
.hxh-install-close { position: absolute; top: 12px; right: 12px; border-radius: 50%; color: var(--ink-3); }
.hxh-install-close:hover { background: var(--accent-soft); color: var(--accent); }
.hxh-install-chip {
  position: fixed;
  left: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, #0e7c5a, #17a67a);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 30px -12px rgba(14, 124, 90, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: pill-in 0.4s var(--ease-spring) both;
  cursor: pointer;
}
.hxh-install-chip svg { width: 16px; height: 16px; }
.hxh-install-chip:active { transform: scale(0.955); }
@media (min-width: 761px) { .hxh-install-chip { bottom: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .hxh-install-overlay, .hxh-install-modal, .hxh-install-chip { transition: none; animation: none; }
}
