/* =====================================================================
   style.css - Main UI components, layouts, responsive
   Tách từ index.html. Bao gồm:
     - Reset + buttons + topbar + header + nav (dòng 13-170)
     - Hero + sections + categories + filters + product grid (170-352)
     - Features + steps + footer (314-356)
     - Cart drawer + modal frame + acc detail + service detail (358-1028)
     - Auth form + deposit + history (1029-1167)
     - Main responsive @media (1373-1396)
     - Small layout tweaks Y/c 1-2 (1605-1672)
     - Theme picker + audit log (2425-2454)
     - Responsive max-600 (2455-2471)
     - V2 layout overrides shopplay24h style (2473-2772)
     - V2 notice block + live toast + responsive (3110-3193)
   ===================================================================== */

/* ============ 1. RESET, BUTTONS, TOPBAR, HEADER, NAV ============ */
/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Chặn double-tap zoom + chỉ cho phép pan, không pinch zoom (mobile) */
  touch-action: pan-x pan-y;
  -ms-content-zooming: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0f1020;
  color: #e7e8f3;
  line-height: 1.6;
  overflow-x: hidden;
  touch-action: pan-x pan-y;
}
/* Không cần ép font-size 16px cho input vì đã có user-scalable=no + JS chặn pinch.
   iOS auto-zoom focus input chỉ xảy ra khi user-scalable=yes — đã tắt nên bỏ rule
   này để giữ nguyên design font các form. */
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ============ BUTTONS ============ */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  cursor: pointer; transition: all 0.2s;
  border: none; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #ff4d6d 0%, #c9184a 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(255,77,109,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,77,109,0.5); }
.btn-ghost { background: rgba(255,255,255,0.06); color: #fff; border: 1px solid rgba(255,255,255,0.12); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-primary.lg, .btn-ghost.lg { padding: 14px 28px; font-size: 15px; }

/* ============ TOPBAR ============ */
.topbar {
  background: linear-gradient(90deg, #1a0a2e 0%, #16213e 100%);
  font-size: 13px; color: #b8b9d4;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.topbar__inner { display: flex; justify-content: space-between; }
.topbar strong { color: #ffd166; }

/* ============ HEADER ============ */
.header { background: #1a0a2e; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.header__inner { display: flex; align-items: center; gap: 24px; padding: 16px 20px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; }
.logo__mark {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #ff4d6d, #ff8c42);
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 900; color: #fff; font-size: 16px;
  box-shadow: 0 6px 16px rgba(255,77,109,0.4);
}
.logo__text { color: #fff; letter-spacing: 1px; }
.logo__text span { color: #ffd166; }

.search {
  flex: 1; display: flex; max-width: 520px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; transition: border 0.2s;
}
.search:focus-within { border-color: #ff4d6d; }
.search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; padding: 12px 16px; font-size: 14px; font-family: inherit;
}
.search input::placeholder { color: #888aa8; }
.search button {
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff; border: none; padding: 0 22px;
  cursor: pointer; font-weight: 600; font-family: inherit;
}

.header__actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; width: 44px; height: 44px;
  background: rgba(255,255,255,0.08); border-radius: 10px;
  display: grid; place-items: center; font-size: 20px; transition: 0.2s;
}
.cart-btn:hover { background: rgba(255,255,255,0.15); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  background: #ff4d6d; color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 10px;
  display: grid; place-items: center; padding: 0 5px;
}

/* ============ AUTH HEADER ============ */
.auth-guest { display: flex; gap: 8px; align-items: center; }
.auth-user  { display: flex; gap: 10px; align-items: center; }
.btn-deposit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #00c896 0%, #00a878 100%);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 22px rgba(0,200,150,0.35);
  transition: transform .2s, box-shadow .2s;
}
.btn-deposit:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,200,150,0.5); }
.btn-account {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.08);
  color: #fff; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit;
  transition: background .2s, transform .2s;
}
.btn-account:hover { background: rgba(255,255,255,0.16); transform: translateY(-1px); }
.user-chip {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 30px; cursor: pointer; transition: background .2s;
}
.user-chip:hover { background: rgba(255,255,255,0.12); }
.user-chip__avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #6557ff);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; text-transform: uppercase;
}
.user-chip__info { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__name { color: #fff; font-size: 13px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip__balance { color: #ffd166; font-size: 13px; font-weight: 700; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 220px; background: #1a0a2e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 8px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .2s; z-index: 250;
}
.user-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu a {
  display: block; padding: 10px 12px;
  color: #d6d7ee; font-size: 14px;
  border-radius: 8px; transition: background .15s;
}
.user-menu a:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* ============ NAV ============ */
.nav { background: rgba(0,0,0,0.3); border-top: 1px solid rgba(255,255,255,0.05); }
.nav__inner { display: flex; gap: 4px; padding: 0 20px; overflow-x: auto; }
.nav a {
  padding: 14px 18px; font-size: 14px; font-weight: 500;
  color: #b8b9d4; white-space: nowrap;
  transition: 0.2s; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: #fff; border-color: #ff4d6d; }
.nav a.hot { color: #ffd166; }
.nav a.hot::after { content: '🔥'; margin-left: 4px; }

/* ============ 2. HERO, SECTIONS, CATEGORIES, FILTERS, PRODUCT GRID ============ */

/* ============ HERO ============ */
.hero {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,77,109,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(101,87,255,0.15) 0%, transparent 50%),
    linear-gradient(180deg, #1a0a2e 0%, #0f1020 100%);
  padding: 60px 0 80px; position: relative; overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero__tag {
  display: inline-block; background: rgba(255,209,102,0.15);
  color: #ffd166; padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 16px;
}
.hero h1 { font-size: 48px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; color: #fff; }
.hero h1 span {
  background: linear-gradient(135deg, #ff4d6d, #ffd166);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__text p { font-size: 16px; color: #b8b9d4; margin-bottom: 28px; max-width: 540px; }
.hero__btns { display: flex; gap: 12px; margin-bottom: 36px; }
.hero__stats { display: flex; gap: 32px; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 26px; color: #ffd166; font-weight: 800; }
.hero__stats span { font-size: 13px; color: #888aa8; }
.hero__visual { position: relative; height: 400px; }
.hero__card {
  position: absolute; width: 130px; height: 160px;
  background: linear-gradient(135deg, rgba(255,77,109,0.2), rgba(101,87,255,0.2));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; display: grid; place-items: center;
  font-size: 60px; backdrop-filter: blur(10px);
  animation: float 4s ease-in-out infinite;
}
.hero__card.c1 { top: 0; left: 20%; animation-delay: 0s; transform: rotate(-8deg); }
.hero__card.c2 { top: 30px; right: 10%; animation-delay: 1s; transform: rotate(6deg); }
.hero__card.c3 { bottom: 30px; left: 5%; animation-delay: 2s; transform: rotate(4deg); }
.hero__card.c4 { bottom: 0; right: 25%; animation-delay: 3s; transform: rotate(-5deg); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -15px; } }

/* ============ SECTIONS ============ */
.section { padding: 70px 0; }
.section--alt { background: linear-gradient(180deg, #0f1020 0%, #161731 100%); }
.section__head { text-align: center; margin-bottom: 40px; }
.section__head h2 { font-size: 34px; color: #fff; margin-bottom: 8px; font-weight: 800; }
.section__head p { color: #888aa8; }

/* ============ CATEGORY GRID ============ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.cat-card {
  background: linear-gradient(135deg, rgba(255,77,109,0.08), rgba(101,87,255,0.08));
  border: 1px solid rgba(255,255,255,0.08); border-radius: 16px;
  padding: 24px 16px; text-align: center; transition: 0.3s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-card:hover { transform: translateY(-4px); border-color: #ff4d6d; box-shadow: 0 12px 30px rgba(255,77,109,0.2); }
.cat-icon { font-size: 42px; }
.cat-card h3 { font-size: 16px; color: #fff; font-weight: 600; }
.cat-card span { font-size: 13px; color: #888aa8; }

/* ============ FILTERS ============ */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 28px; }
.chip {
  padding: 8px 18px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #b8b9d4; border-radius: 20px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: 0.2s;
}
.chip:hover { background: rgba(255,255,255,0.12); }
.chip.active {
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff; border-color: transparent;
}
.select {
  margin-left: auto; padding: 9px 14px;
  background: rgba(255,255,255,0.06); color: #fff;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 10px;
  font-size: 13px; font-family: inherit; cursor: pointer; outline: none;
}

/* ============ PRODUCT GRID ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product {
  background: linear-gradient(180deg, #1a0a2e 0%, #161731 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; overflow: hidden;
  transition: 0.3s; display: flex; flex-direction: column;
}
.product:hover { transform: translateY(-4px); border-color: rgba(255,77,109,0.4); box-shadow: 0 16px 36px rgba(0,0,0,0.4); }
.product__img {
  aspect-ratio: 16 / 10;      /* TẤT CẢ card có ảnh cùng tỉ lệ */
  height: auto;               /* override chiều cao cố định cũ */
  width: 100%;
  background: linear-gradient(135deg, #ff4d6d22, #6557ff22);
  display: grid; place-items: center; font-size: 70px; position: relative;
  overflow: hidden;          /* CHẶN ảnh tràn ra ngoài đè lên giá/nút */
  flex-shrink: 0;
}
.product__badge {
  position: absolute; top: 10px; left: 10px;
  background: #ffd166; color: #1a0a2e;
  font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 6px;
}
.product__id {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.5); color: #fff;
  font-size: 11px; padding: 4px 8px; border-radius: 6px;
}
.product__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product__game {
  font-size: 12px; color: #ff4d6d; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.product__title {
  font-size: 15px; color: #fff; font-weight: 600; margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product__attrs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.product__attrs span {
  font-size: 11px; background: rgba(255,255,255,0.06);
  color: #b8b9d4; padding: 3px 8px; border-radius: 6px;
}
.product__price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; margin-bottom: 12px; }
.product__svc-stat {
  margin-top: auto; margin-bottom: 12px;
  font-size: 13px; color: var(--c-text-mute);
}
.product__svc-stat b { color: var(--c-text); font-weight: 700; }
.product__price { font-size: 20px; font-weight: 800; color: #ffd166; }
.product__price-old { font-size: 13px; color: #888aa8; text-decoration: line-through; }
.product__buy {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, #ff4d6d, #c9184a);
  color: #fff; border: none; border-radius: 10px;
  font-weight: 600; cursor: pointer;
  font-family: inherit; font-size: 14px; transition: 0.2s;
}
.product__buy:hover { filter: brightness(1.1); }
.load-more { text-align: center; margin-top: 32px; }


/* ============ 3. FEATURES, STEPS, FOOTER ============ */
/* ============ FEATURES & STEPS ============ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  padding: 28px 24px; border-radius: 16px; text-align: center;
}
.f-icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #ff4d6d, #ff8c42);
  border-radius: 16px; font-size: 28px; margin-bottom: 16px;
}
.feature h3 { color: #fff; font-size: 17px; margin-bottom: 8px; font-weight: 700; }
.feature p { color: #b8b9d4; font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.step {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  padding: 28px 20px; border-radius: 16px; text-align: center; position: relative;
}
.step__num {
  display: inline-grid; place-items: center;
  width: 50px; height: 50px;
  background: linear-gradient(135deg, #6557ff, #4361ee);
  color: #fff; border-radius: 50%;
  font-weight: 800; font-size: 20px; margin-bottom: 14px;
}
.step h3 { color: #fff; font-size: 17px; margin-bottom: 6px; font-weight: 700; }
.step p { color: #b8b9d4; font-size: 14px; }

/* ============ FOOTER ============ */
.footer { background: #0a0817; padding: 60px 0 0; border-top: 1px solid rgba(255,255,255,0.05); }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; font-weight: 700; }
.footer ul li { margin-bottom: 10px; }
.footer ul li, .footer ul li a { color: #888aa8; font-size: 14px; transition: 0.2s; }
.footer ul li a:hover { color: #ffd166; }
.footer p { color: #888aa8; margin-top: 12px; font-size: 14px; }
.logo--footer { margin-bottom: 0; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 20px 0; text-align: center;
  color: #555776; font-size: 13px;
}


/* ============ 4. CART PAGE (full-screen, không còn drawer) ============ */
/* ============ CART PAGE ============ */
.cart-drawer {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh; height: 100dvh; /* 100dvh fix cho iOS Safari */
  max-width: 100%;
  background: #0f1020; z-index: 200;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.cart-drawer.open { transform: translateX(0); }
/* Desktop: vẫn full-screen nhưng giới hạn nội dung ở giữa cho dễ đọc */
@media (min-width: 900px) {
  .cart-drawer__body, .cart-drawer__foot {
    max-width: 920px;
    width: 100%;
    margin: 0 auto;
  }
}
/* Overlay không cần nữa (cart full-screen che hết) — giữ class để JS không lỗi */
.cart-overlay { display: none !important; }
.cart-drawer__head {
  padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0;
  background: linear-gradient(180deg, #1a0a2e 0%, #0f1020 100%);
  z-index: 10;
  /* iOS notch safe area */
  padding-top: max(16px, env(safe-area-inset-top));
}
.cart-drawer__head h3 { color: #fff; font-size: 20px; font-weight: 700; flex: 1; text-align: center; }
.cart-drawer__head button {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-size: 18px; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.cart-drawer__head button:hover { background: rgba(255,255,255,0.12); }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px; }
.cart-item {
  display: flex; gap: 12px; padding: 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px; margin-bottom: 10px;
}
.cart-item__img {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #ff4d6d22, #6557ff22);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 28px; flex-shrink: 0;
}
.cart-item__info { flex: 1; }
.cart-item__title { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cart-item__price { color: #ffd166; font-weight: 700; font-size: 14px; }
.cart-item__remove { background: none; border: none; color: #888aa8; cursor: pointer; font-size: 18px; }
.cart-qty {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 2px;
}
.cart-qty__btn {
  background: rgba(255,255,255,0.08);
  border: none; color: #fff;
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cart-qty__btn:hover:not(:disabled) { background: #ff4d6d; }
.cart-qty__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.cart-qty__num {
  min-width: 36px; width: 40px; text-align: center;
  font-weight: 700; font-size: 14px; color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 3px 4px;
  font-family: inherit;
  outline: none;
  -moz-appearance: textfield;
}
.cart-qty__num::-webkit-outer-spin-button,
.cart-qty__num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-qty__num:focus { border-color: #ff4d6d; }
.cart-qty__max { font-size: 11px; color: #888aa8; margin-left: 4px; }
.cart-item__line-total { font-size: 11px; color: #888aa8; margin-top: 2px; }
.cart-empty { text-align: center; color: #888aa8; padding: 40px 20px; }
.cart-drawer__foot { padding: 20px; border-top: 1px solid rgba(255,255,255,0.08); }
/* Coupon input dùng chung cho acc detail và cart */
.acc-coupon, .cart-coupon { margin: 12px 0 6px; }
.acc-coupon label, .cart-coupon label {
  display: block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.3px; margin-bottom: 6px; color: #ffd166;
}
.acc-coupon__row, .cart-coupon__row {
  display: flex; gap: 8px;
}
.acc-coupon__row input, .cart-coupon__row input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 10px 12px;
  color: #fff; font-family: inherit; font-size: 13px;
  outline: none; text-transform: uppercase; letter-spacing: 0.5px;
}
.acc-coupon__row input:focus, .cart-coupon__row input:focus { border-color: #ff4d6d; }
.acc-coupon__row button, .cart-coupon__row button {
  padding: 10px 16px; font-size: 13px;
  white-space: nowrap;
}
.acc-coupon__msg, .cart-coupon__msg {
  font-size: 12px; margin-top: 6px; min-height: 16px;
}
.acc-coupon__msg.ok, .cart-coupon__msg.ok { color: #00c896; }
.acc-coupon__msg.err, .cart-coupon__msg.err { color: #ff6b6b; }
.cart-coupon__hint { margin-top: 6px; color: #888aa8; font-size: 11px; line-height: 1.45; font-style: italic; }
.cart-coupon.disabled .cart-coupon__row { opacity: .4; pointer-events: none; }

/* Cart summary block */
.cart-summary { margin: 12px 0; padding: 12px 0; border-top: 1px dashed rgba(255,255,255,0.08); }
.cart-summary__row {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 14px; color: #b8b9d4;
}
.cart-summary__row--total { font-size: 16px; padding-top: 8px; color: #fff; }
.cart-summary__row--total strong { color: #ffd166; font-size: 18px; font-weight: 800; }
#cartDiscount { color: #00c896; font-weight: 700; }

/* Light theme overrides */
body.is-light-theme .acc-coupon label, body.is-light-theme .cart-coupon label { color: var(--c-primary); }
body.is-light-theme .acc-coupon__row input, body.is-light-theme .cart-coupon__row input {
  background: var(--c-bg-2); border-color: var(--c-border); color: var(--c-text);
}
body.is-light-theme .cart-summary__row { color: var(--c-text-soft); }
body.is-light-theme .cart-summary__row--total { color: var(--c-text); }
body.is-light-theme .cart-summary__row--total strong { color: var(--c-primary); }
body.is-light-theme #cartDiscount { color: var(--c-success); }
.total { display: flex; justify-content: space-between; color: #fff; margin-bottom: 14px; font-size: 15px; }
.total strong { color: #ffd166; font-size: 20px; }


/* ============ 5. MODAL FRAMES, ACC DETAIL, SERVICE DETAIL ============ */
/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0;
  background: rgba(5,3,15,0.75); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 400; padding: 20px;
}
.modal.open { display: flex; }
.modal__box {
  background: linear-gradient(180deg, #1a0a2e 0%, #161731 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px; width: 100%; max-width: 440px;
  padding: 28px; position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
  max-height: 92vh; overflow-y: auto;
}
.modal__box--lg { max-width: 680px; }
.modal__box--xl { max-width: 980px; padding: 28px 32px; }

/* ============ ACC DETAIL MODAL ============ */
.acc-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .acc-detail { grid-template-columns: 1fr; gap: 18px; } }
.acc-detail__gallery { display: flex; flex-direction: column; gap: 10px; }
.acc-detail__main {
  position: relative;
  width: 100%; aspect-ratio: 4/3;
  border-radius: 14px; overflow: hidden;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--c-border);
  cursor: zoom-in;
}
.acc-detail__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-detail__main-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 80px; opacity: .5;
}
.acc-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
}
.acc-detail__thumb {
  aspect-ratio: 1/1;
  border-radius: 8px; overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: rgba(0,0,0,0.25);
  transition: border-color .15s;
}
.acc-detail__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acc-detail__thumb.active { border-color: var(--c-primary); }
.acc-detail__thumb:hover { border-color: rgba(255,77,109,0.6); }

.acc-detail__info h3 {
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.25;
  margin-bottom: 8px; color: var(--c-text);
}
.acc-detail__game {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--c-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.acc-detail__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.acc-detail__badges span {
  background: rgba(255,77,109,0.15); color: var(--c-primary);
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 6px;
  text-transform: uppercase;
}
.acc-detail__price {
  display: flex; gap: 12px; align-items: baseline;
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.acc-detail__price b { font-size: 26px; color: var(--c-primary); font-weight: 800; }
.acc-detail__price s { color: var(--c-text-mute); font-size: 15px; }
.acc-detail__price-disc {
  background: rgba(80,200,120,0.2); color: #50c878;
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.acc-detail__desc {
  white-space: pre-wrap;
  color: var(--c-text-soft);
  font-size: 14px; line-height: 1.6;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  max-height: 240px; overflow-y: auto;
  margin-bottom: 18px;
}
.acc-detail__stock {
  font-size: 13px; color: var(--c-text-mute);
  margin-bottom: 14px;
}
.acc-detail__stock b { color: var(--c-text); }
.acc-detail__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-detail__actions button { flex: 1; min-width: 140px; }
.acc-detail__qty {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 14px;
}
.acc-detail__qty-label {
  font-size: 13px; font-weight: 600; color: var(--c-text-soft);
}
.acc-detail__qty-stepper {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px; padding: 3px;
}
.acc-detail__qty-stepper button {
  background: rgba(255,255,255,0.08);
  border: none; color: var(--c-text);
  width: 32px; height: 32px;
  border-radius: 7px;
  cursor: pointer; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.acc-detail__qty-stepper button:hover:not(:disabled) { background: var(--c-primary); color: #fff; }
.acc-detail__qty-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.acc-detail__qty-stepper input {
  width: 56px; text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  color: var(--c-text); font-weight: 700; font-size: 15px;
  padding: 6px 4px;
  font-family: inherit;
  outline: none;
  -moz-appearance: textfield;
}
.acc-detail__qty-stepper input::-webkit-outer-spin-button,
.acc-detail__qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.acc-detail__qty-stepper input:focus { border-color: var(--c-primary); }
.acc-detail__qty-hint { font-size: 12px; color: var(--c-text-mute); }

/* ============ SERVICE DETAIL MODAL (Cày thuê - layout giống ảnh mẫu) ============ */
.svc-detail__banner {
  background: linear-gradient(180deg, rgba(80,200,120,0.08), rgba(80,200,120,0.02));
  border: 1px solid rgba(80,200,120,0.25);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 18px;
  font-size: 13.5px; line-height: 1.7;
  color: var(--c-text-soft);
}
.svc-detail__banner-title {
  display: inline-block;
  background: #50c878; color: #0a1f12;
  font-weight: 800; font-size: 13px;
  padding: 4px 10px; border-radius: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
.svc-detail__banner-body { white-space: pre-wrap; }
.svc-detail__banner-body.collapsed {
  max-height: 96px; overflow: hidden;
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.svc-detail__toggle {
  display: inline-flex; align-items: center; gap: 4px;
  color: #4dc4ff; font-size: 13px; cursor: pointer;
  margin-top: 8px; user-select: none;
}
.svc-detail__toggle:hover { color: #7ad6ff; }

.svc-detail__grid {
  display: grid; grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: flex-start;
}
@media (max-width: 800px) { .svc-detail__grid { grid-template-columns: 1fr; } }

.svc-detail__card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 18px 18px 20px;
}
.svc-detail__card h4 {
  font-size: 16px; font-weight: 700; color: var(--c-text);
  margin-bottom: 14px;
  font-family: var(--font-display, inherit);
}
.svc-detail__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 600px) { .svc-detail__form-row { grid-template-columns: 1fr; } }
.svc-detail__field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--c-text-soft); margin-bottom: 6px;
}
.svc-detail__field input,
.svc-detail__field select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--c-text);
  font-family: inherit; font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.svc-detail__field input:focus,
.svc-detail__field select:focus { border-color: var(--c-primary); }

.svc-detail__packages { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.svc-detail__pkg {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.svc-detail__pkg:hover { border-color: rgba(255,77,109,0.5); background: rgba(255,255,255,0.06); }
.svc-detail__pkg.checked { border-color: var(--c-primary); background: rgba(255,77,109,0.08); }
.svc-detail__pkg input { width: 18px; height: 18px; accent-color: var(--c-primary); cursor: pointer; }
.svc-detail__pkg-name { flex: 1; font-size: 14px; color: var(--c-text); }
.svc-detail__pkg-price {
  font-weight: 700; color: var(--c-text); font-size: 14px;
  display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap;
}
.svc-detail__pkg-empty {
  text-align: center; color: var(--c-text-mute);
  font-size: 13px; padding: 24px 8px;
  border: 1px dashed var(--c-border); border-radius: 10px;
}

.svc-detail__summary {
  margin-top: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  padding: 16px 18px;
}
.svc-detail__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: var(--c-text-soft);
}
.svc-detail__row b { color: var(--c-text); font-weight: 600; }
.svc-detail__row--disc b { color: #50c878; }
.svc-detail__promo {
  display: flex; gap: 8px; margin: 12px 0 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 4px 4px 4px 12px;
  align-items: center;
}
.svc-detail__promo::before { content: "🎟"; font-size: 16px; }
.svc-detail__promo input {
  flex: 1; background: transparent; border: none;
  color: var(--c-text); font-family: inherit; font-size: 14px;
  outline: none; padding: 8px 0;
}
.svc-detail__promo input::placeholder { color: var(--c-text-mute); }
.svc-detail__promo button {
  background: #1a0a2e; color: #fff;
  border: 1px solid var(--c-border);
  padding: 8px 16px; border-radius: 8px;
  font-weight: 700; font-size: 12px; cursor: pointer;
  font-family: inherit; letter-spacing: 1px;
}
.svc-detail__promo button:hover { background: var(--c-primary); border-color: var(--c-primary); }
.svc-detail__total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid var(--c-border);
}
.svc-detail__total span { font-size: 15px; font-weight: 700; color: var(--c-text); }
.svc-detail__total b { font-size: 22px; font-weight: 800; color: var(--c-primary); }
.svc-detail__confirm {
  width: 100%; margin-top: 16px;
  background: #0d0d18; color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px;
  font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit;
  letter-spacing: 0.5px;
  transition: all .15s;
}
.svc-detail__confirm:hover { background: var(--c-primary); border-color: var(--c-primary); }
.svc-detail__confirm:disabled { opacity: .5; cursor: not-allowed; }
.svc-detail__actions-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-top: 16px;
}
@media (max-width: 480px) { .svc-detail__actions-row { grid-template-columns: 1fr; } }
.svc-detail__btn {
  padding: 13px 10px;
  border-radius: 10px;
  font-weight: 700; font-size: 13.5px;
  cursor: pointer; font-family: inherit;
  letter-spacing: 0.3px;
  transition: all .15s;
  border: 1px solid transparent;
}
.svc-detail__btn--cart {
  background: #0d0d18; color: #fff;
  border-color: rgba(255,255,255,0.14);
}
.svc-detail__btn--cart:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.3);
}
.svc-detail__btn--buy {
  background: linear-gradient(135deg, #ff4d6d 0%, #c9184a 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255,77,109,0.35);
}
.svc-detail__btn--buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255,77,109,0.5);
}
.svc-detail__btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* Admin product form - khối service-only */
.svc-pkg-row {
  display: grid; grid-template-columns: 1fr 140px 36px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.svc-pkg-row input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--c-text); font-family: inherit; font-size: 13px;
  outline: none;
}
.svc-pkg-row button {
  background: rgba(239,68,68,0.15); color: #ef4444;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px; cursor: pointer; height: 34px;
  font-family: inherit; font-size: 14px;
}
.svc-pkg-row button:hover { background: rgba(239,68,68,0.3); }
#pfServiceBlock { display: none; }
#pfServiceBlock.show { display: block; }
#pfAccBlock { display: none; }
#pfAccBlock.show { display: block; }

/* Type picker - 2 thẻ chọn loại sản phẩm */
.pf-type-picker {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 14px 16px;
}
.pf-type-picker__label {
  display: block; font-weight: 700; font-size: 13px;
  margin-bottom: 10px; letter-spacing: 0.3px;
}
.pf-type-picker__options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.pf-type-opt {
  position: relative; cursor: pointer;
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 14px 14px 14px 44px;
  transition: .15s;
  display: flex; flex-direction: column; gap: 2px;
}
.pf-type-opt input[type=radio] {
  position: absolute; top: 14px; left: 14px;
  width: 18px; height: 18px; cursor: pointer; accent-color: #ff4d6d;
}
.pf-type-opt__icon { font-size: 22px; line-height: 1; }
.pf-type-opt__title { font-weight: 800; font-size: 14px; color: #fff; }
.pf-type-opt__desc  { font-size: 12px; color: #888aa8; }
.pf-type-opt:hover { border-color: rgba(255,77,109,0.4); }
.pf-type-opt:has(input:checked) {
  border-color: #ff4d6d;
  background: linear-gradient(135deg, rgba(255,77,109,0.12), rgba(255,140,66,0.08));
}
.pf-type-opt:has(input:checked) .pf-type-opt__title { color: #ffd166; }

/* Order detail modal */
.od-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
@media (max-width: 800px) { .od-grid { grid-template-columns: 1fr; } }
.od-section {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.od-section h4 {
  font-size: 13px; font-weight: 700; color: var(--c-text-soft);
  letter-spacing: 0.5px; margin-bottom: 12px;
  text-transform: uppercase;
}
.od-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 4px 0; font-size: 13.5px;
  gap: 14px;
}
.od-row + .od-row { border-top: 1px solid rgba(255,255,255,0.04); padding-top: 8px; margin-top: 4px; }
.od-row__label { color: var(--c-text-mute); flex-shrink: 0; }
.od-row__val { color: var(--c-text); text-align: right; word-break: break-word; }
.od-cred {
  background: #0c0d1d; border-radius: 6px;
  padding: 8px 10px; font-family: 'Courier New', monospace;
  font-size: 13px; color: #9ee3a8;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-top: 4px;
}
.od-cred-copy {
  background: rgba(255,255,255,0.08); color: #fff;
  border: none; padding: 4px 10px; border-radius: 5px;
  cursor: pointer; font-size: 11px; font-family: inherit;
}
.od-pkg {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.od-pkg + .od-pkg { border-top: 1px dashed rgba(255,255,255,0.06); }
.od-status-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin: 14px 0 8px;
}
.od-status-step {
  text-align: center;
  padding: 8px 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 11px; color: var(--c-text-mute);
  transition: all .2s;
}
.od-status-step.active {
  background: var(--c-primary); color: #fff; border-color: var(--c-primary);
  font-weight: 700;
}
.od-status-step.done {
  background: rgba(80,200,120,0.15);
  color: #50c878; border-color: rgba(80,200,120,0.3);
}
.od-history-item {
  display: flex; gap: 12px; padding: 8px 0;
  font-size: 13px;
}
.od-history-item + .od-history-item { border-top: 1px solid rgba(255,255,255,0.04); }
.od-history-time { color: var(--c-text-mute); font-size: 12px; min-width: 110px; flex-shrink: 0; }
.od-status-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.od-status-actions button {
  padding: 8px 14px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  color: var(--c-text); cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  transition: all .15s;
}
.od-status-actions button:hover { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.od-status-actions button:disabled { opacity: .35; cursor: not-allowed; background: rgba(80,200,120,0.1); color: #50c878; border-color: rgba(80,200,120,0.25); }

/* Order ID clickable */
.order-id-link {
  cursor: pointer; color: var(--c-primary);
  text-decoration: underline; text-decoration-style: dotted;
  text-underline-offset: 3px;
}
.order-id-link:hover { color: #ff8fa3; }

/* Promo admin */
.promo-row {
  display: grid; grid-template-columns: 130px 80px 130px 80px 60px;
  gap: 10px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.promo-row--head { font-weight: 700; color: var(--c-text-soft); background: rgba(255,255,255,0.02); }
@media (max-width: 700px) {
  .promo-row { grid-template-columns: 1fr 60px; row-gap: 4px; }
}

/* Lightbox - phóng to ảnh */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 40px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox__close, .lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,77,109,0.5); }
.lightbox__counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px; border-radius: 20px;
}

/* Two-button CTA cho acc card */
.product__actions { display: flex; gap: 6px; }
.product__actions button { flex: 1; padding: 10px 8px; font-size: 13px; }
.product__info-btn {
  background: rgba(255,255,255,0.06);
  color: var(--c-text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all .15s;
}
.product__info-btn:hover { background: rgba(255,255,255,0.12); }
.modal__close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.06); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; font-size: 14px; transition: background .2s;
}
.modal__close:hover { background: rgba(255,77,109,0.3); }


/* ============ 6. AUTH FORM, DEPOSIT, HISTORY ============ */
/* ============ AUTH FORM ============ */
.auth-tabs { display: flex; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 4px; margin-bottom: 22px; }
.auth-tab {
  flex: 1; padding: 10px; background: transparent; border: none;
  color: #b8b9d4; font-weight: 600; font-size: 14px;
  cursor: pointer; border-radius: 8px; font-family: inherit; transition: .2s;
}
.auth-tab.active { background: linear-gradient(135deg, #ff4d6d, #c9184a); color: #fff; }
.auth-form h3, .deposit-step h3 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.auth-sub { color: #888aa8; font-size: 14px; margin-bottom: 22px; }
.auth-form label {
  display: block; color: #d6d7ee;
  font-size: 13px; font-weight: 600; margin: 12px 0 6px;
}
.auth-form input[type=text],
.auth-form input[type=email],
.auth-form input[type=password],
.auth-form input[type=number] {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
  padding: 12px 14px; color: #fff;
  font-family: inherit; font-size: 14px; outline: none; transition: border-color .2s;
}
.auth-form input:focus { border-color: #ff4d6d; }
.auth-form .btn-primary { width: 100%; margin-top: 20px; }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }
.auth-row .check { display: flex; align-items: center; gap: 6px; color: #b8b9d4; font-weight: 400; margin: 0; }
.auth-row .link { color: #ff4d6d; }
.auth-foot { text-align: center; color: #888aa8; font-size: 13px; margin-top: 16px; }
.auth-foot a { color: #ffd166; font-weight: 600; }

/* ============ DEPOSIT ============ */
.amount-input { position: relative; margin-bottom: 12px; }
.amount-input input {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 16px 70px 16px 16px; color: #ffd166;
  font-family: inherit; font-size: 22px; font-weight: 800; outline: none;
}
.amount-input input:focus { border-color: #00c896; }
.amount-input span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: #888aa8; font-weight: 600; }
.quick-amounts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.quick-amounts button {
  padding: 10px 6px; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08); color: #fff;
  font-weight: 600; font-size: 13px; border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: .2s;
}
.quick-amounts button:hover { background: rgba(0,200,150,0.15); border-color: #00c896; }
.deposit-note {
  background: rgba(255,209,102,0.08); border: 1px solid rgba(255,209,102,0.3);
  border-radius: 10px; padding: 12px 14px;
  font-size: 13px; color: #d6d7ee; margin-bottom: 18px; line-height: 1.6;
}
.deposit-note b { color: #ffd166; }
.deposit-step .btn-primary { width: 100%; }
.qr-wrap { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin: 20px 0; }
.qr-img { background: #fff; border-radius: 14px; padding: 10px; display: grid; place-items: center; aspect-ratio: 1; }
.qr-img img { width: 100%; height: 100%; object-fit: contain; }
.qr-info { display: flex; flex-direction: column; gap: 10px; }
.qr-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: rgba(255,255,255,0.04);
  border-radius: 10px; font-size: 13px;
}
.qr-row span { color: #888aa8; min-width: 110px; }
.qr-row b { color: #fff; flex: 1; }
.qr-row b.hl { color: #ffd166; font-size: 15px; }
.qr-row .copy {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff; width: 32px; height: 32px;
  border-radius: 6px; cursor: pointer; font-size: 13px;
}
.qr-row .copy:hover { background: rgba(0,200,150,0.2); }
.qr-warn {
  margin-top: 6px;
  background: rgba(255,77,109,0.1); border: 1px solid rgba(255,77,109,0.3);
  color: #ffb3c0; padding: 10px 12px;
  border-radius: 10px; font-size: 12px; line-height: 1.5;
}
.qr-status {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 14px;
  background: rgba(101,87,255,0.1); border: 1px solid rgba(101,87,255,0.3);
  border-radius: 10px; color: #d6d7ee;
  font-size: 14px; margin-bottom: 16px;
}
.qr-status.success { background: rgba(0,200,150,0.12); border-color: rgba(0,200,150,0.4); color: #66e3c0; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #ff4d6d;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qr-actions { display: flex; justify-content: space-between; gap: 10px; }
.success-icon {
  width: 80px; height: 80px; margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c896, #00a878);
  color: #fff; display: grid; place-items: center;
  font-size: 42px; font-weight: 800;
  box-shadow: 0 14px 30px rgba(0,200,150,0.4);
  animation: pop 0.4s ease-out;
}
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.success-amount { text-align: center; font-size: 32px; font-weight: 800; color: #ffd166; margin: 16px 0 24px; }
#depositStep3, #cardStep3 { text-align: center; }

/* ============ DEPOSIT TABS (QR vs Card) ============ */
.deposit-tabs {
  display: flex; gap: 6px; margin: 0 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0;
}
.deposit-tab {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #b8b9d4;
  font-family: inherit;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  border-radius: 8px 8px 0 0;
}
.deposit-tab:hover { color: #fff; background: rgba(255,255,255,0.04); }
.deposit-tab.active {
  color: #fff;
  border-bottom-color: var(--c-primary, #ff4d6d);
  background: rgba(255,77,109,0.08);
}

/* ============ CARD FORM (Nạp thẻ cào the9p.com) ============ */
.card-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin: 12px 0 10px;
}
.card-form > div { display: flex; flex-direction: column; gap: 6px; }
.card-form__full { grid-column: 1 / -1; }
.card-form label { font-size: 13px; color: var(--c-text-soft, #b8b9d4); font-weight: 600; }
.card-form input,
.card-form select {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.card-form input:focus,
.card-form select:focus {
  outline: none;
  border-color: var(--c-primary, #ff4d6d);
  background: rgba(255,255,255,0.06);
}
/* ============ GLOBAL SELECT OPTIONS ============
   Browser default render <option> với nền trắng OS, không kế thừa style
   của <select> cha. Force về nền tối + chữ theo theme. */
select option,
select optgroup {
  background: var(--c-bg-2);
  color: var(--c-text);
}

.card-receive {
  margin: 14px 0 6px;
  padding: 12px 14px;
  background: rgba(255,209,102,0.08);
  border: 1px dashed rgba(255,209,102,0.4);
  border-radius: 10px;
  color: #ffd166;
  font-size: 14px;
}
.card-receive b { font-size: 18px; color: #ffd166; }
.card-receive small { display: block; margin-top: 4px; color: rgba(255,209,102,0.7); font-size: 12px; }

/* Biểu phí hiển thị cho khách (auto-load từ getfee.php khi mở tab thẻ cào) */
.card-fees-public {
  margin: 12px 0 8px;
  padding: 12px 14px;
  background: rgba(80, 200, 120, 0.06);
  border: 1px solid rgba(80, 200, 120, 0.25);
  border-radius: 10px;
  overflow: hidden;
}
.card-fees-public__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; gap: 8px; flex-wrap: wrap;
  font-weight: 600; color: #50c878; font-size: 13px;
}
.card-fees-public__head small { font-weight: 400; color: rgba(80, 200, 120, 0.75); font-size: 11px; }
.card-fees-public__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -14px; padding: 0 14px;
}
.card-fees-public__scroll::-webkit-scrollbar { height: 4px; }
.card-fees-public__scroll::-webkit-scrollbar-thumb { background: rgba(80,200,120,.3); border-radius: 2px; }
.card-fees-public table {
  width: 100%; min-width: 460px;
  border-collapse: collapse;
  font-size: 12px; color: var(--c-text-soft, #b8b9d4);
}
.card-fees-public th, .card-fees-public td {
  padding: 6px 6px; text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.card-fees-public th:first-child, .card-fees-public td:first-child {
  text-align: left;
  position: sticky; left: 0;
  background: rgba(20, 30, 40, 0.95);
  z-index: 1;
  padding-left: 14px;
}
.card-fees-public thead th {
  font-weight: 600; color: #50c878;
  background: rgba(20, 35, 30, 0.95);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px;
}
.card-fees-public tbody td:first-child { font-weight: 600; color: #fff; }
.card-fees-public tbody td.best { color: #50c878; font-weight: 700; }
.card-fees-public tbody td.dim { opacity: 0.35; }
/* Cell hiển thị 2 dòng: số tiền nhận + phí % */
.card-fees__cell-receive {
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
}
.card-fees__cell-fee {
  color: #ff8c9b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
  opacity: 0.85;
}
.card-fees-public__loading { padding: 6px 0; opacity: 0.65; font-size: 12px; }
@media (max-width: 480px) {
  .card-fees-public { padding: 10px 12px; }
  .card-fees-public__scroll { margin: 0 -12px; padding: 0 12px; }
  .card-fees-public table { font-size: 11px; }
  .card-fees-public th, .card-fees-public td { padding: 5px 5px; }
  .card-fees-public__head { font-size: 12px; }
}

/* ============ ADMIN PANEL — NẠP THẺ CÀO ============ */
.card-admin-status {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 22px 18px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 13px;
}
.card-admin-status__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #888;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.card-admin-status.is-ok    .card-admin-status__dot { background: #50c878; box-shadow: 0 0 0 3px rgba(80,200,120,0.18); }
.card-admin-status.is-warn  .card-admin-status__dot { background: #ffd166; box-shadow: 0 0 0 3px rgba(255,209,102,0.18); }
.card-admin-status.is-error .card-admin-status__dot { background: #ff8c9b; box-shadow: 0 0 0 3px rgba(255,140,155,0.18); }
.card-admin-status__text { flex: 1; }
.card-admin-status.is-ok    .card-admin-status__text { color: #50c878; }
.card-admin-status.is-warn  .card-admin-status__text { color: #ffd166; }
.card-admin-status.is-error .card-admin-status__text { color: #ff8c9b; }

.card-admin-row {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px;
  align-items: start;
  padding: 0 22px;
  margin-bottom: 16px;
}
.card-admin-row__field { display: flex; flex-direction: column; gap: 6px; }
.card-admin-row__field label { font-size: 13px; color: var(--c-text-soft, #b8b9d4); font-weight: 600; }
.card-admin-row__field input {
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--c-text, #fff);
  font-size: 14px;
}

.card-admin-block {
  padding: 12px 22px;
  margin-bottom: 16px;
}
.card-admin-block__label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--c-text-soft, #b8b9d4); margin-bottom: 6px;
}

.card-admin-fees {
  margin: 8px 22px 18px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
}
.card-admin-fees__head {
  display: flex; justify-content: space-between; gap: 14px;
  align-items: flex-start; flex-wrap: wrap;
  margin-bottom: 12px;
}
.card-admin-fees__head h4 { margin: 0 0 4px; font-size: 15px; }
.card-admin-fees__head .hint { margin: 0; max-width: 460px; }
.card-admin-fees__actions { display: flex; gap: 6px; flex-wrap: wrap; }

.card-admin-advanced {
  margin: 0 22px 22px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.card-admin-advanced > summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600; font-size: 13px;
  color: var(--c-text-soft, #b8b9d4);
  user-select: none;
  list-style: none;
}
.card-admin-advanced > summary::-webkit-details-marker { display: none; }
.card-admin-advanced > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform .15s ease;
}
.card-admin-advanced[open] > summary::before { transform: rotate(90deg); }
.card-admin-advanced[open] > summary { border-bottom: 1px solid rgba(255,255,255,0.06); }
.card-admin-advanced .settings-grid,
.card-admin-advanced .settings-preview { padding: 0 16px 16px; }

@media (max-width: 720px) {
  .card-admin-row { grid-template-columns: 1fr; }
  .card-admin-fees__head { flex-direction: column; }
}

.card-detail {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 13px;
  color: var(--c-text-soft, #b8b9d4);
}
.card-detail .row { display: flex; justify-content: space-between; padding: 4px 0; }
.card-detail .row b { color: #fff; font-weight: 600; }

@media (max-width: 520px) {
  .card-form { grid-template-columns: 1fr; }
  .deposit-tab { font-size: 13px; padding: 10px 8px; }
}

/* ============ HISTORY ============ */
.history-tabs { display: flex; gap: 8px; margin: 20px 0 14px; }
.history-tab {
  padding: 8px 16px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #b8b9d4; border-radius: 20px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.history-tab.active { background: linear-gradient(135deg, #ff4d6d, #c9184a); color: #fff; border-color: transparent; }
.history-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.history-item__title { color: #fff; font-size: 14px; font-weight: 600; }
.history-item__meta { color: #888aa8; font-size: 12px; margin-top: 2px; }
.history-item__amount { color: #ffd166; font-weight: 700; }
.history-item__amount.minus { color: #ff8c9b; }
.status-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; text-transform: uppercase; }
.status-pending { background: rgba(255,209,102,0.15); color: #ffd166; }
.status-success { background: rgba(0,200,150,0.15); color: #66e3c0; }
.status-failed  { background: rgba(255,77,109,0.15); color: #ff8c9b; }
.history-empty { text-align: center; color: #888aa8; padding: 40px 20px; }


/* ============ 7. MAIN RESPONSIVE @media (max-width: 900px) ============ */
/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero__visual { height: 280px; }
  .hero__card { width: 100px; height: 130px; font-size: 45px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .header__inner { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: 100%; }
  .admin-app { grid-template-columns: 1fr; }
  .admin-side {
    position: relative; height: auto;
    flex-direction: row; flex-wrap: wrap; padding: 12px;
  }
  .logo--side { margin: 0 12px 0 0; }
  .side-nav { flex-direction: row; flex-wrap: wrap; flex: 1; }
  .side-nav a { padding: 8px 12px; font-size: 13px; }
  .side-nav a.active { border-left: none; border-bottom: 2px solid #ff4d6d; padding-left: 12px; }
  .side-foot { flex-direction: row; border-top: none; padding: 0; }
  .dash-grid { grid-template-columns: 1fr; }
  .admin-main { padding: 20px 16px 40px; }
  .settings-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ============ 8. SMALL LAYOUT TWEAKS (hero ẩn icon, sidebar admin) ============ */
/* ============================================================
   Y/c 2,3,4,5: PRODUCT IMAGE + COMPACT + SERVICE
   ============================================================ */
.product__img img {
  position: absolute; inset: 0;     /* phủ kín container, không thể tràn */
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: rgba(0,0,0,0.15);
}
.product__icon-fallback {
  font-size: 60px;
  opacity: .65;
  filter: grayscale(.2);
}
.product__desc {
  font-size: 13px;
  color: var(--c-text-soft);
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
/* Badges variants */
.product__badge--disc {
  left: auto; right: 10px; top: auto; bottom: 10px;
  background: var(--c-success) !important; color: #fff !important;
}
.product__badge--qty {
  left: 10px; right: auto; top: auto; bottom: 10px;
  background: rgba(0,0,0,0.55) !important; color: #fff !important;
  backdrop-filter: blur(4px);
}
.product__badge--svc {
  left: 10px; right: auto; top: auto; bottom: 10px;
  background: var(--c-info) !important; color: #fff !important;
  letter-spacing: .5px;
}
/* COMPACT - khi type=acc + quantity>1 (batch random) */
/* compact: bỏ override chiều cao để giữ aspect-ratio đồng nhất với card thường */
.product--compact .product__icon-fallback { font-size: 42px; }
.product--compact .product__body       { padding: 12px 14px; }
.product--compact .product__game       { font-size: 11px; margin-bottom: 2px; }
.product--compact .product__title      { font-size: 13px; margin-bottom: 8px; -webkit-line-clamp: 2; min-height: 34px; }
.product--compact .product__price      { font-size: 17px; }
.product--compact .product__price-old  { font-size: 12px; }
.product--compact .product__buy        { padding: 8px; font-size: 13px; }
/* SERVICE - viền nhấn nhẹ */
.product--service { border-color: rgba(110,150,200,0.25); }
.product--service .product__buy {
  background: linear-gradient(135deg, var(--c-info), color-mix(in srgb, var(--c-info) 70%, black));
}

/* ============================================================
   Y/c 2: BỚT ICON cho gọn
   ============================================================ */
.hero__visual { display: none; }          /* bỏ 4 thẻ emoji float */
.hero__inner { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; text-align: center; }
.hero__btns { justify-content: center; }
.hero__text p { margin-left: auto; margin-right: auto; }
.hero__stats { justify-content: center; }
.nav a.hot::after { content: ''; margin: 0; }     /* bỏ icon 🔥 trên "Nạp thẻ ưu đãi" */
/* Sidebar admin: bớt emoji, giữ chữ */
.side-nav a { letter-spacing: 0.2px; }


/* ============ 9. THEME PICKER GRID + AUDIT LOG + MAX-600 RESPONSIVE ============ */
/* ===== Theme picker grid ===== */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; padding: 22px; }
.theme-card {
  cursor: pointer; padding: 14px;
  border-radius: 12px; border: 2px solid var(--c-border);
  background: rgba(255,255,255,0.03); transition: .2s;
  display: flex; flex-direction: column; gap: 10px;
}
.theme-card:hover { transform: translateY(-2px); }
.theme-card.active { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(192,138,46,0.18); }
.theme-card__name { color: var(--c-text); font-weight: 700; font-size: 14px; }
.theme-card__desc { color: var(--c-text-mute); font-size: 11px; }
.theme-card__swatches { display: flex; gap: 6px; height: 38px; border-radius: 8px; overflow: hidden; border: 1px solid var(--c-border); }
.theme-card__swatches div { flex: 1; }

/* Audit log */
.audit-entry {
  padding: 10px 22px;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px; display: grid; grid-template-columns: 130px 90px 1fr; gap: 12px;
}
.audit-entry:last-child { border-bottom: none; }
.audit-entry__time { color: var(--c-text-mute); font-size: 12px; }
.audit-entry__actor {
  font-size: 11px; padding: 2px 8px; border-radius: 8px;
  background: rgba(192,138,46,0.18); color: var(--c-primary-2);
  align-self: center; text-align: center; font-weight: 600;
}
.audit-entry__text { color: var(--c-text-soft); }

@media (max-width: 600px) {
  .topbar__right { display: none; }
  .section__head h2 { font-size: 26px; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 28px; }
  .hero__stats { gap: 16px; }
  .hero__stats strong { font-size: 20px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .btn-primary, .btn-ghost { padding: 9px 16px; font-size: 13px; }
  .user-chip__info { display: none; }
  .btn-deposit span { display: none; }
  .btn-deposit::before { content: "💰"; }
  .btn-account span { display: none; }
  .btn-account::before { content: "👤"; }
  .qr-wrap { grid-template-columns: 1fr; }
  .quick-amounts { grid-template-columns: repeat(3, 1fr); }
}

/* ============ 10. V2 LAYOUT (shopplay24h style: topbar/header/nav/hero/category/subcats) ============ */
/* ============ V2: TOPBAR / HEADER ICONS (shopplay24h style) ============ */
.topbar__inner { align-items: center; }
.topbar__hotline { display: inline-flex; align-items: center; gap: 6px; font-style: italic; }
.topbar__hotline strong { font-style: normal; }
.topbar__right { display: flex; align-items: center; gap: 22px; }
.topbar__menu { position: relative; cursor: pointer; padding: 4px 0; }
.topbar__menu > span { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text-soft); transition: color .2s; }
.topbar__menu:hover > span { color: var(--c-accent); }
.topbar__menu .caret { font-size: 10px; opacity: 0.7; }
.topbar__dropdown {
  position: absolute; top: 100%; right: 0; min-width: 200px;
  background: var(--c-bg-deep); border: 1px solid var(--c-border);
  border-radius: 10px; padding: 6px; margin-top: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: .2s; z-index: 120;
}
.topbar__menu:hover .topbar__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.topbar__dropdown a {
  display: block; padding: 8px 12px; font-size: 13px; color: var(--c-text-soft);
  border-radius: 6px; transition: background .15s;
}
.topbar__dropdown a:hover { background: color-mix(in srgb, var(--c-primary) 18%, transparent); color: var(--c-text); }

/* Header icon buttons (theme / view / wishlist / user) */
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--c-bg-2); border: 1px solid var(--c-border);
  color: var(--c-accent); cursor: pointer; transition: .2s; position: relative;
  display: inline-grid; place-items: center; font-size: 16px;
}
.icon-btn:hover {
  background: color-mix(in srgb, var(--c-primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--c-primary) 40%, transparent);
  color: var(--c-text);
}
.icon-btn .dot {
  position: absolute; top: 2px; right: 2px; width: 14px; height: 14px;
  background: var(--c-primary); color: #fff; font-size: 9px; font-weight: 800;
  border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--c-bg-deep);
}

/* Theme popover (cho user đổi màu trang web) */
.theme-pop { position: relative; }
.theme-pop__menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 260px; max-height: 480px; overflow-y: auto;
  background: #1a0a2e;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  padding: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: .2s; z-index: 250;
}
.theme-pop__menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-pop__title {
  color: #ffd166; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.theme-pop__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.theme-pop__item {
  padding: 8px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 2px solid transparent; transition: .15s;
}
.theme-pop__item:hover { background: rgba(255,255,255,0.08); }
.theme-pop__item.active { border-color: #ff4d6d; background: rgba(255,77,109,0.12); }
.theme-pop__item__swatches {
  display: flex; gap: 4px; height: 22px;
  border-radius: 6px; overflow: hidden; margin-bottom: 6px;
}
.theme-pop__item__swatches div { flex: 1; }
.theme-pop__item__name { font-size: 11px; color: #fff; font-weight: 600; }
.theme-pop__group {
  grid-column: 1 / -1;        /* span 2 cột */
  padding: 4px 0 2px;
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  color: #ffd166; text-transform: uppercase;
  border-top: 1px dashed rgba(255,255,255,0.1);
  margin-top: 6px;
}
.theme-pop__group:first-child { border-top: none; margin-top: 0; }
body.is-light-theme .theme-pop__group {
  color: var(--c-primary);
  border-top-color: var(--c-border);
}

/* Wider search bar like the reference */
.search { max-width: 720px; border-radius: 999px; }
.search button { border-radius: 0 999px 999px 0; padding: 0 26px; }
.search input { padding: 14px 22px; }

/* ============ V2: NAV PILL ============ */
.nav {
  background: linear-gradient(90deg, var(--c-bg-deep) 0%, var(--c-bg-2) 50%, var(--c-bg-deep) 100%);
  border-top: none;
  border-bottom: 1px solid var(--c-border);
}
.nav__inner { gap: 0; padding: 0 20px; justify-content: center; }
.nav a {
  padding: 16px 22px; border-bottom: none; position: relative;
  font-weight: 600; color: var(--c-text-soft); text-transform: uppercase; font-size: 13px;
  letter-spacing: 0.6px;
}
.nav a:hover, .nav a.active {
  color: var(--c-accent);
  background: color-mix(in srgb, var(--c-primary) 12%, transparent);
  border-color: transparent;
}
.nav a.has-caret::after { content: ' ▾'; font-size: 10px; opacity: 0.7; }

/* ============ V2: HERO LAYOUT (theme-aware via CSS vars) ============ */
.hero-v2 {
  background:
    radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--c-primary) 15%, transparent) 0%, transparent 55%),
    radial-gradient(circle at 90% 80%, color-mix(in srgb, var(--c-info)    15%, transparent) 0%, transparent 55%),
    linear-gradient(180deg, var(--c-bg-deep) 0%, var(--c-bg) 100%);
  padding: 32px 0 40px;
}
.hero-v2__inner {
  display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: stretch;
}

/* Top-Nạp card — dùng var để adapt mọi theme */
.top-nap {
  background: linear-gradient(180deg, var(--c-bg-2) 0%, var(--c-bg-deep) 100%);
  border: 1px solid var(--c-border);
  border-radius: 16px; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.top-nap__tabs { display: grid; grid-template-columns: 1fr 1fr; }
.top-nap__tab {
  padding: 14px 8px; text-align: center;
  background: var(--c-bg-darker); color: var(--c-text-soft);
  font-weight: 700; font-size: 14px; cursor: pointer;
  border: none; font-family: inherit; letter-spacing: 0.4px;
  transition: .2s;
}
.top-nap__tab.active {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff;
}
.top-nap__list { padding: 8px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.top-nap__row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 6px; border-bottom: 1px dashed var(--c-border);
}
.top-nap__row:last-child { border-bottom: none; }
.top-nap__rank {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: #1a0a2e;
  flex-shrink: 0;
}
.top-nap__rank.r1 { background: linear-gradient(135deg, #ffd700, #ffa500); }
.top-nap__rank.r2 { background: linear-gradient(135deg, #d8d8e0, #a4a4b0); }
.top-nap__rank.r3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }
.top-nap__rank.r4, .top-nap__rank.r5 { background: var(--c-surface); color: var(--c-text-soft); }
.top-nap__name { flex: 1; color: var(--c-text); font-weight: 600; font-size: 14px; }
.top-nap__amount { color: var(--c-primary); font-weight: 800; font-size: 15px; }
.top-nap__cta {
  margin: 10px 14px 14px;
  padding: 12px;
  background: var(--c-bg-2);
  border: 1px solid var(--c-primary);
  color: var(--c-text); border-radius: 10px; font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit; transition: .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.top-nap__cta:hover {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff; border-color: transparent;
}

/* Banner */
.hero-banner {
  position: relative; border-radius: 16px; overflow: hidden;
  background: linear-gradient(135deg, var(--c-bg-2) 0%, var(--c-bg-deep) 100%);
  min-height: 340px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.hero-banner__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 50%, color-mix(in srgb, var(--c-primary) 30%, transparent) 0%, transparent 40%),
    radial-gradient(circle at 70% 50%, color-mix(in srgb, var(--c-accent)  30%, transparent) 0%, transparent 40%);
}
.hero-banner__content {
  position: relative; text-align: center; padding: 30px;
}
.hero-banner__brand {
  font-family: 'Playfair Display', serif;
  font-size: 56px; font-weight: 900; color: var(--c-accent);
  text-shadow: 0 4px 16px color-mix(in srgb, var(--c-primary) 45%, transparent);
  letter-spacing: 2px; margin-bottom: 8px; line-height: 1;
}
.hero-banner__tag {
  display: inline-block; padding: 6px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-primary) 18%, transparent);
  color: var(--c-text); font-weight: 700;
  font-size: 13px; letter-spacing: 1.5px; margin-bottom: 18px;
}
.hero-banner__title {
  font-size: 28px; color: var(--c-text); font-weight: 800; margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-banner__sub { color: var(--c-accent); font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.hero-banner__icons { display: flex; justify-content: center; gap: 14px; font-size: 48px; }
.hero-banner__icons span { animation: float 4s ease-in-out infinite; }
.hero-banner__icons span:nth-child(2) { animation-delay: 0.5s; }
.hero-banner__icons span:nth-child(3) { animation-delay: 1s; }
.hero-banner__icons span:nth-child(4) { animation-delay: 1.5s; }
.hero-banner.has-image { padding: 0; }
.hero-banner.has-image .hero-banner__bg { display: none; }
.hero-banner.has-image img.hero-banner__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hero-banner.has-image .hero-banner__content {
  display: none;
}

/* ============ V2: CATEGORY STRIP ============ */
.cat-strip {
  padding: 28px 0 12px;
  background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
}
.cat-strip__grid {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  justify-content: center;
}
.cat-strip__item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; cursor: pointer; width: 130px;
  transition: transform .2s;
}
.cat-strip__item:hover { transform: translateY(-3px); }
.cat-strip__icon {
  width: 86px; height: 86px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d 0%, #ff8c42 100%);
  border: 3px solid #ffd166;
  display: grid; place-items: center;
  font-size: 38px;
  box-shadow: 0 8px 22px rgba(255,77,109,0.35);
  position: relative; overflow: hidden;
}
.cat-strip__icon img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; display: block;
}
.cat-strip__icon .cat-strip__emoji {
  position: relative; z-index: 1;
}
.cat-strip__icon::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none; z-index: 2;
}
.cat-strip__item:hover .cat-strip__icon {
  box-shadow: 0 14px 28px rgba(255,77,109,0.55);
}
.cat-strip__label {
  font-size: 12px; color: var(--c-text); font-weight: 600;
  line-height: 1.3; max-width: 130px;
}
@media (max-width: 600px)  {
  .cat-strip__grid { gap: 14px 16px; }
  .cat-strip__item { width: 96px; }
}

/* ============ V2: SUBCATS VIEW (danh mục con) ============ */
.subcats-view {
  padding: 36px 0 50px;
  background: linear-gradient(180deg, var(--c-bg) 0%, var(--c-bg-2) 100%);
  min-height: 60vh;
}
.subcats-view__head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  flex-wrap: wrap;
}
.subcats-view__back {
  background: var(--c-bg-2); border: 1px solid var(--c-border);
  color: var(--c-text); padding: 8px 16px; border-radius: 10px;
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .2s;
}
.subcats-view__back:hover {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  color: #fff; border-color: transparent;
}
.subcats-view__crumb { font-size: 13px; color: var(--c-text-mute); display: flex; gap: 8px; }
.subcats-view__crumb .sep { color: var(--c-border); }
.subcats-view__crumb .cur { color: var(--c-accent); font-weight: 600; }


/* ============ 11. V2 NOTICE BLOCK + LIVE PURCHASE TOAST + V2 RESPONSIVE ============ */
/* ============ V2: NOTICE BLOCK ============ */
.notice {
  margin: 8px auto 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c-accent) 8%, transparent),
    color-mix(in srgb, var(--c-primary) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--c-accent) 35%, transparent);
  border-radius: 14px;
  padding: 22px 26px;
  color: var(--c-text); font-size: 14px; line-height: 1.85;
}
.notice h3 {
  color: var(--c-accent); font-size: 17px; font-weight: 800;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
  text-decoration: underline; text-underline-offset: 4px;
}
.notice h3 .flame { font-size: 18px; }
.notice__row { color: var(--c-text); }
.notice__row a { color: var(--c-accent); text-decoration: underline; }
.notice__row strong { color: var(--c-danger); }
.notice__cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-primary); font-weight: 700; margin-top: 6px;
}

/* ============ RECENT ORDERS TICKER (FOMO) ============ */
.ro-ticker {
  background: linear-gradient(90deg, rgba(255,77,109,0.10), rgba(255,140,66,0.06) 60%, transparent);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 8px 0;
  overflow: hidden;
}
.ro-ticker__wrap {
  display: flex; align-items: center; gap: 14px;
}
.ro-ticker__label {
  flex-shrink: 0;
  font-size: 12px; font-weight: 800; letter-spacing: 0.5px;
  color: var(--c-text); text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: linear-gradient(135deg, #ff4d6d, #ff8c42);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,77,109,0.35);
}
.ro-ticker__viewport {
  flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ro-ticker__track {
  display: inline-flex; gap: 28px;
  white-space: nowrap;
  animation: ro-ticker-scroll 45s linear infinite;
}
.ro-ticker__track:hover { animation-play-state: paused; }
.ro-ticker__item {
  font-size: 13px; color: var(--c-text-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.ro-ticker__item b { color: var(--c-text); font-weight: 700; }
.ro-ticker__item .amt { color: var(--c-primary); font-weight: 700; }
.ro-ticker__item .ago { color: var(--c-text-mute); font-size: 12px; font-style: italic; }
.ro-ticker__item .dot { color: var(--c-border); margin: 0 4px; }
@keyframes ro-ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 600px) {
  .ro-ticker__label { font-size: 11px; padding: 3px 8px; }
  .ro-ticker__item  { font-size: 12px; }
}

/* ============ V2: LIVE PURCHASE TOAST ============ */
.live-toast {
  position: fixed; bottom: 24px; left: 24px;
  min-width: 260px; max-width: 320px;
  background: #fff; color: #1a0a2e;
  padding: 12px 36px 12px 14px;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.32);
  display: flex; align-items: center; gap: 12px;
  z-index: 200; font-family: inherit;
  opacity: 0; transform: translateX(-20px);
  pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.live-toast.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
.live-toast__icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4d6d, #ff8c42);
  color: #fff; display: grid; place-items: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255,77,109,0.35);
}
.live-toast__body { flex: 1; min-width: 0; line-height: 1.35; }
.live-toast__top { font-size: 13px; color: #555; }
.live-toast__top strong { color: #ffb800; font-weight: 800; letter-spacing: 1px; }
.live-toast__mid {
  font-size: 14px; font-weight: 800; color: #1a0a2e;
  text-transform: uppercase; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-toast__time { font-size: 12px; color: #888; margin-top: 2px; font-style: italic; }
.live-toast__close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: #aaa;
  font-size: 14px; cursor: pointer; line-height: 1;
}
.live-toast__close:hover { color: #333; }
@media (max-width: 600px) {
  .live-toast { left: 12px; right: 12px; bottom: 12px; min-width: 0; max-width: none; }
}

/* ============ V2: RESPONSIVE TWEAKS ============ */
@media (max-width: 900px) {
  .hero-v2__inner { grid-template-columns: 1fr; }
  .hero-banner { min-height: 260px; }
  .hero-banner__brand { font-size: 38px; }
  .hero-banner__title { font-size: 22px; }
  .nav__inner { justify-content: flex-start; }
  .nav a { padding: 12px 14px; font-size: 12px; }
  .search { max-width: none; }
}
@media (max-width: 600px) {
  .topbar__right { display: flex; gap: 10px; font-size: 12px; }
  .topbar__menu { font-size: 12px; }
  .cat-strip__icon { width: 64px; height: 64px; font-size: 28px; }
  .cat-strip__label { font-size: 11px; }
  .hero-banner__brand { font-size: 28px; }
  /* Header: logo + actions cùng một hàng, search xuống dòng */
  .header__inner { gap: 6px; padding: 10px 12px; align-items: center; }
  .logo { font-size: 15px; gap: 6px; flex-shrink: 1; min-width: 0; }
  .logo__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .logo__mark { transform: scale(0.8); flex-shrink: 0; }
  .header__actions { gap: 4px; flex-shrink: 0; margin-left: auto; }
  .icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .btn-deposit { padding: 6px 10px; font-size: 13px; box-shadow: 0 4px 12px rgba(0,200,150,0.3); }
  .user-chip { padding: 4px 8px 4px 4px; gap: 6px; }
  .user-chip__avatar { width: 28px; height: 28px; font-size: 12px; }
  /* Mobile: vẫn cho user đổi giao diện. Popover canh phải mép màn hình. */
  .theme-pop__menu { right: 0; min-width: 240px; max-width: calc(100vw - 24px); }
  /* Mobile: input ≥16px để iOS Safari không auto-zoom & khoá focus */
  input[type=text], input[type=email], input[type=password],
  input[type=number], input[type=tel], input[type=search],
  textarea, select,
  .auth-form input[type=text],
  .auth-form input[type=email],
  .auth-form input[type=password],
  .auth-form input[type=number] {
    font-size: 16px !important;
  }
  /* Modal: chừa chỗ cho bàn phím + scroll mượt trong iOS */
  .modal { align-items: flex-start; padding: 20px 12px; }
  .modal__box { max-height: calc(100dvh - 40px); -webkit-overflow-scrolling: touch; }
}

/* ============ Account page: header gọn chỉ giữ logo ============ */
.header--account .nav,
.header--account .search,
.header--account .header__actions { display: none !important; }
.header--account .header__inner { justify-content: center; }

