/* ================================================================
   Web Shop V3 — Main Design System
   Dark mode, glassmorphism, modern & premium
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  /* Background layers */
  --bg-base: #060810;
  --bg-1: #0b0e1c;
  --bg-2: #0f1220;
  --bg-3: #13162a;
  --bg-card: rgba(15, 18, 32, 0.8);

  /* Borders */
  --bd: #1a1f35;
  --bd-2: #222840;
  --bd-glow: rgba(99, 102, 241, .3);

  /* Brand colors */
  --primary: #6366f1;
  /* Indigo */
  --primary-d: #4f46e5;
  --primary-g: linear-gradient(135deg, #6366f1, #8b5cf6);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  /* Accent palette */
  --sky: #38bdf8;
  --violet: #a78bfa;
  --emerald: #34d399;
  --orange: #fb923c;
  --pink: #f472b6;
  --yellow: #facc15;

  /* Text */
  --tx: #e2e8f0;
  --tx-m: #94a3b8;
  --tx-d: #475569;

  /* Spacing */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
}

:root[data-theme="light"] {
  /* Background layers */
  --bg-base: #f5f7fa;
  --bg-1: #ffffff;
  --bg-2: #f1f5f9;
  --bg-3: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.85);

  /* Borders */
  --bd: #e2e8f0;
  --bd-2: #cbd5e1;
  --bd-glow: rgba(99, 102, 241, .2);

  /* Text */
  --tx: #1e293b;
  --tx-m: #475569;
  --tx-d: #94a3b8;

  /* Buttons/Links overrides */
  --primary: #4f46e5;
  --primary-d: #4338ca;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--bg-base);
  color: var(--tx);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ── Focus Visible (Accessibility) ──────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.tab-btn:focus-visible,
.udrop-item:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
}

a:hover {
  color: var(--violet);
}

img {
  max-width: 100%;
}

code,
.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Background mesh ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 0% 0%, rgba(99, 102, 241, .07), transparent),
    radial-gradient(ellipse 600px 500px at 100% 30%, rgba(167, 139, 250, .06), transparent),
    radial-gradient(ellipse 500px 400px at 50% 100%, rgba(16, 185, 129, .05), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bd);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: var(--primary-g);
  -webkit-background-clip: text;
  background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.navbar-brand span {
  -webkit-text-fill-color: var(--tx);
}

/* Top-up pages */
.topup-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.topup-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--bd);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
  color: var(--tx);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.topup-nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--bd-glow);
  box-shadow: 0 14px 36px rgba(2, 6, 23, .22);
  color: var(--tx);
}

.topup-nav-link.active {
  border-color: rgba(99, 102, 241, .38);
  background: linear-gradient(180deg, rgba(99, 102, 241, .16), rgba(99, 102, 241, .08));
  box-shadow: 0 14px 36px rgba(79, 70, 229, .16);
}

.topup-nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, .14);
  color: var(--primary);
  font-size: 15px;
  flex-shrink: 0;
}

.topup-nav-link.active .topup-nav-icon {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.topup-nav-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.topup-nav-copy strong {
  font-size: 14px;
  color: var(--tx);
}

.topup-nav-copy small {
  font-size: 11px;
  color: var(--tx-m);
}

.topup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .95fr);
  gap: 20px;
}

.topup-grid > * {
  min-width: 0;
}

.topup-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.topup-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(245, 158, 11, .16);
  background: rgba(245, 158, 11, .06);
  color: var(--tx-m);
}

.topup-note i {
  color: var(--warning);
  margin-top: 2px;
}

.topup-field-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topup-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--bd);
  background: var(--bg-2);
  min-width: 0;
}

.topup-field-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.topup-field-label {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tx-d);
  font-weight: 700;
}

.topup-field-value {
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
  word-break: break-word;
}

.topup-field-value.mono {
  font-size: 15px;
  font-family: 'JetBrains Mono', monospace;
}

.topup-qr-wrap {
  margin: 0 auto 18px;
  width: min(240px, 100%);
  aspect-ratio: 1;
  border-radius: 22px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
    var(--bg-2);
  border: 1px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topup-qr-wrap img {
  width: 100%;
  max-width: 210px;
  border-radius: 16px;
  display: block;
}

.topup-qr-caption {
  text-align: center;
  font-size: 12px;
  color: var(--tx-m);
  margin-bottom: 16px;
}

.topup-side-card {
  position: sticky;
  top: 84px;
}

.topup-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.topup-filter-grid .topup-filter-span-2 {
  grid-column: span 2;
}

.topup-filter-grid .topup-filter-span-5 {
  grid-column: 1 / -1;
}

.topup-filter-grid .btn,
.topup-filter-grid .btn-outline,
.topup-filter-grid .btn-ghost {
  width: 100%;
  justify-content: center;
}

.topup-summary-bar {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topup-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: rgba(255, 255, 255, .02);
  font-size: 12px;
  color: var(--tx-m);
}

.topup-chip strong {
  color: var(--tx);
}

.topup-chip.success strong {
  color: var(--success);
}

.topup-chip.warning strong {
  color: var(--warning);
}

.topup-chip.info strong {
  color: var(--info);
}

.topup-empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--tx-d);
}

.topup-empty i {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.topup-inline-muted {
  font-size: 12px;
  color: var(--tx-m);
}

.topup-description {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topup-card-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.topup-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.topup-choice-grid-amount {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.topup-choice-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)),
    rgba(18, 24, 44, .92);
  color: var(--tx-m);
  font-size: 13px;
  font-weight: 700;
  font-family: 'Be Vietnam Pro', sans-serif;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.topup-choice-button:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, .42);
  color: var(--tx);
  box-shadow: 0 10px 24px rgba(10, 14, 30, .24);
}

.topup-choice-button.is-active {
  border-color: rgba(129, 140, 248, .78);
  background:
    linear-gradient(135deg, rgba(99, 102, 241, .32), rgba(167, 139, 250, .18)),
    rgba(27, 32, 59, .96);
  color: #f5f7ff;
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, .24),
    0 14px 30px rgba(78, 86, 192, .18);
}

.topup-card-form .full {
  grid-column: 1 / -1;
}

.topup-form-hint {
  font-size: 12px;
  color: var(--tx-d);
}

.topup-preview {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(56, 189, 248, .16);
  background: rgba(56, 189, 248, .06);
}

.topup-preview-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--tx-d);
  margin-bottom: 6px;
}

.topup-preview-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--info);
}

.topup-poll-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--tx-d);
}

.topup-poll-hint i {
  color: var(--success);
}

.floating-contact {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-contact-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.floating-contact-btn:hover {
  transform: scale(1.08);
}

.floating-contact-btn.zalo {
  background: #0068ff;
  box-shadow: 0 8px 24px rgba(0, 104, 255, .4);
}

.floating-contact-btn.phone {
  background: #10b981;
  box-shadow: 0 8px 24px rgba(16, 185, 129, .4);
  font-size: 20px;
}

.floating-contact-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 19px;
  font-weight: 900;
  font-family: 'Be Vietnam Pro', sans-serif;
  line-height: 1;
  color: #fff;
}

@media (max-width: 1100px) {
  .topup-grid {
    grid-template-columns: 1fr;
  }

  .topup-side-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .topup-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topup-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topup-filter-grid .topup-filter-span-2,
  .topup-filter-grid .topup-filter-span-5 {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .topup-nav {
    grid-template-columns: 1fr;
  }

  .topup-card-form,
  .topup-filter-grid {
    grid-template-columns: 1fr;
  }

  .topup-field {
    flex-direction: column;
    align-items: stretch;
  }

  .topup-field .copy-btn {
    width: 100%;
    justify-content: center;
  }

  .topup-field-value,
  .topup-field-value.mono,
  .topup-inline-muted,
  .topup-description {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .topup-qr-wrap {
    width: 100%;
    max-width: 260px;
  }

  .topup-preview-value {
    font-size: 20px;
  }

  .floating-contact {
    left: auto;
    right: 14px;
    bottom: 16px;
    gap: 10px;
  }

  .floating-contact-btn {
    width: 44px;
    height: 44px;
  }
}

.nav-links-shell {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links-shell::-webkit-scrollbar {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex: 1;
  min-width: max-content;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: 40px;
  min-width: 0;
  max-width: 180px;
  border-radius: var(--r-md);
  color: var(--tx-m);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(99, 102, 241, .12);
  color: var(--tx);
}

.nav-links a.active {
  color: var(--primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--success);
}

.wallet-badge i {
  font-size: 12px;
}

.btn-topup {
  background: var(--primary-g);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .2s, transform .15s;
  white-space: nowrap;
}

.btn-topup:hover {
  opacity: .85;
  transform: translateY(-1px);
}

/* ── Main layout ────────────────────────────────────────────── */
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-wrapper.wide {
  max-width: 100%;
  padding: 0;
}

/* ── Glassmorphism Card ─────────────────────────────────────── */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
}

.glass:hover {
  border-color: var(--bd-glow);
}

/* ── Card Component ─────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}

.card:hover {
  border-color: var(--bd-2);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}

.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, var(--bg-2), var(--bg-1));
  position: relative;
}

.card-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--card-accent, var(--primary));
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--card-accent, var(--primary));
}

.card-subtitle {
  font-size: 11px;
  color: var(--tx-m);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

.card-body {
  padding: 24px;
}

.card-icon {
  font-size: 22px;
  flex-shrink: 0;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-1);
  border: 1px solid var(--bd);
  border-radius: var(--r-xl);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--stat-color, var(--primary));
}

.stat-card:hover {
  border-color: var(--bd-glow);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 11px;
  color: var(--tx-m);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--stat-color, var(--tx));
  letter-spacing: -.5px;
  line-height: 1;
}

.stat-sub {
  font-size: 11px;
  color: var(--tx-m);
  margin-top: 6px;
}

.stat-icon {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  opacity: .12;
}

/* ── Grid ───────────────────────────────────────────────────── */
.g2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.shop-listing-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-margin-top: 110px;
}

.shop-filter-card {
  overflow: hidden;
}

.shop-category-disclosure {
  display: block;
}

.shop-category-summary {
  display: block;
  list-style: none;
  cursor: pointer;
}

.shop-category-summary::-webkit-details-marker {
  display: none;
}

.shop-category-summary:focus-visible {
  outline: none;
}

.shop-category-summary:focus-visible .shop-filter-head {
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .35);
}

.shop-filter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd);
}

.shop-category-disclosure .shop-filter-head {
  margin: 0;
  border-bottom: none;
  user-select: none;
}

.shop-category-disclosure[open] .shop-filter-head {
  border-bottom: 1px solid var(--bd);
}

.shop-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--tx-d);
}

.shop-filter-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, .12);
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: 999px;
  padding: 4px 10px;
}

.shop-category-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .18);
  background: rgba(99, 102, 241, .08);
  color: var(--primary);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.shop-category-disclosure[open] .shop-category-chevron {
  transform: rotate(180deg);
  background: rgba(99, 102, 241, .14);
  border-color: rgba(99, 102, 241, .3);
}

.shop-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 14px;
}

.shop-category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--bd);
  background: var(--bg-2);
  color: var(--tx-m);
  text-decoration: none;
  transition: transform .2s, border-color .2s, background .2s, color .2s;
}

.shop-category-chip:hover {
  color: var(--tx);
  border-color: rgba(99, 102, 241, .28);
  background: rgba(99, 102, 241, .08);
  transform: translateY(-2px);
}

.shop-category-chip.active {
  color: var(--primary);
  border-color: rgba(99, 102, 241, .3);
  background: rgba(99, 102, 241, .14);
  box-shadow: 0 10px 24px rgba(99, 102, 241, .14);
}

.shop-category-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.shop-category-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-category-chip .cat-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(99, 102, 241, .16);
  border-radius: 999px;
  padding: 3px 10px;
}

.shop-category-chip.active .cat-count {
  color: #fff;
  background: var(--primary);
}

.catalog-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px;
}

.catalog-choice-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(10, 14, 28, .98), rgba(6, 9, 18, .98));
  color: var(--tx);
  text-decoration: none;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}

.catalog-choice-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, rgba(129, 140, 248, .95), transparent 72%);
  opacity: .95;
}

.catalog-choice-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .34);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .24);
}

.catalog-choice-card.active {
  border-color: rgba(129, 140, 248, .46);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, .16), 0 24px 46px rgba(44, 53, 110, .24);
}

.catalog-choice-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 36%),
    linear-gradient(140deg, rgba(79, 70, 229, .42), rgba(30, 41, 59, .88));
  color: #fff;
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.catalog-choice-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.catalog-choice-card .shop-category-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--tx);
}

.catalog-choice-card .shop-category-label > span:first-child,
.catalog-choice-content > span:first-child {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 36%),
    linear-gradient(140deg, rgba(79, 70, 229, .42), rgba(30, 41, 59, .88));
  color: #fff;
  font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.catalog-choice-label {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--tx);
}

.catalog-choice-card .shop-category-label-text {
  display: block;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.28;
  color: var(--tx);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.catalog-choice-desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--tx-d);
}

.catalog-choice-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .14);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.catalog-choice-card.active .catalog-choice-count {
  background: rgba(129, 140, 248, .24);
  color: #fff;
}

.catalog-choice-card .cat-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .14);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.catalog-choice-card.active .cat-count {
  background: rgba(129, 140, 248, .24);
  color: #fff;
}

.catalog-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  padding: 16px;
}

.catalog-media-grid.is-single {
  grid-template-columns: minmax(260px, 360px);
  justify-content: start;
}

.catalog-media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(10, 14, 28, .98), rgba(6, 9, 18, .98));
  color: var(--tx);
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.catalog-media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .34);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .24);
}

.catalog-media-card.active {
  border-color: rgba(129, 140, 248, .46);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, .16), 0 24px 46px rgba(44, 53, 110, .24);
}

.catalog-media-figure {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #111827, #312e81);
  overflow: hidden;
}

.catalog-media-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .32s ease;
}

.catalog-media-card:hover .catalog-media-figure img {
  transform: scale(1.04);
}

.catalog-media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, .2), transparent 32%),
    linear-gradient(135deg, #312e81, #0f172a);
}

.catalog-media-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  min-height: 96px;
  padding: 18px 18px 20px;
}

.catalog-media-title {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--tx);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.catalog-media-meta {
  font-size: 13px;
  line-height: 1.45;
  color: var(--tx-d);
  font-weight: 600;
}

.catalog-media-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .14);
  color: #c7d2fe;
  font-size: 11px;
  font-weight: 700;
}

.catalog-media-card.active .catalog-media-count {
  background: rgba(129, 140, 248, .24);
  color: #fff;
}

.catalog-media-card .shop-category-label,
.catalog-media-card .cat-count {
  display: none;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shop-search-form {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-search-form .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

.shop-search-submit {
  flex-shrink: 0;
  padding: 0 16px;
}

.shop-sort-select {
  width: 210px;
  flex: 0 0 auto;
}

.shop-toolbar-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--tx-d);
  white-space: nowrap;
}

.shop-results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1280px) {
  .shop-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.g3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.g4 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}

.g52 {
  display: grid;
  gap: 16px;
  grid-template-columns: 3fr 2fr;
}

.grid-product {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.grid-product-sm {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media(max-width:900px) {

  .g3,
  .g4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .g52 {
    grid-template-columns: 1fr;
  }

  .grid-product,
  .grid-product-sm {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .page-wrapper {
    padding: 20px 16px;
  }

  .shop-filter-head {
    padding: 13px 16px;
  }

  .shop-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .catalog-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .catalog-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }

  .catalog-media-grid.is-single {
    grid-template-columns: 1fr;
  }

  .catalog-media-card {
    border-radius: 18px;
  }

  .catalog-media-body {
    padding: 14px 14px 15px;
  }

  .catalog-media-title {
    font-size: 14px;
  }

  .catalog-choice-card {
    min-height: 104px;
    padding: 16px;
    border-radius: 18px;
  }

  .catalog-choice-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 20px;
  }

  .catalog-choice-card .shop-category-label > span:first-child,
  .catalog-choice-content > span:first-child {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 20px;
  }

  .catalog-choice-label {
    font-size: 14px;
  }

  .catalog-choice-card .shop-category-label-text {
    font-size: 14px;
  }

  .shop-search-form {
    flex-basis: 100%;
  }

  .shop-sort-select {
    width: 180px;
  }

  .shop-toolbar-meta {
    width: 100%;
    margin-left: 0;
  }

  .shop-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media(max-width:600px) {

  .g2,
  .g3,
  .g4,
  .g52,
  .grid-product,
  .grid-product-sm {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 22px;
  }

  .card-header {
    padding: 16px;
  }

  .card-body {
    padding: 16px;
  }

  .shop-filter-head {
    padding: 12px 14px;
  }

  .shop-filter-badge {
    margin-left: 0;
  }

  .shop-category-grid {
    gap: 8px;
    padding: 10px;
  }

  .catalog-choice-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .catalog-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .catalog-media-grid.is-single {
    grid-template-columns: 1fr;
  }

  .catalog-media-card {
    border-radius: 16px;
  }

  .catalog-media-body {
    padding: 12px;
    align-items: flex-start;
  }

  .catalog-media-title {
    font-size: 13px;
  }

  .catalog-media-count {
    min-width: 34px;
    padding: 5px 10px;
    font-size: 10px;
  }

  .catalog-choice-card {
    min-height: 94px;
    padding: 14px;
    border-radius: 16px;
    gap: 12px;
  }

  .catalog-choice-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .catalog-choice-card .shop-category-label > span:first-child,
  .catalog-choice-content > span:first-child {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

  .catalog-choice-label {
    font-size: 13px;
  }

  .catalog-choice-card .shop-category-label-text {
    font-size: 13px;
  }

  .catalog-choice-desc {
    font-size: 11px;
  }

  .catalog-choice-count {
    margin-top: 10px;
    font-size: 10px;
  }

  .shop-category-chip {
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 12px;
  }

  .shop-category-label {
    font-size: 12px;
  }

  .shop-sort-select {
    width: 100%;
  }

  .shop-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .btn-topup,
  .btn-primary,
  .btn-outline {
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Modal resize for mobile */
  .modal-box {
    width: 95%;
    padding: 20px;
    border-radius: 16px;
  }
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn i {
  font-size: 12px;
}

.btn-primary {
  background: var(--primary-g);
  color: #fff;
}

.btn-primary:hover {
  opacity: .85;
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .3);
}

.btn-success {
  background: rgba(16, 185, 129, .15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .3);
}

.btn-success:hover {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, .1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, .2);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--tx-m);
  border: 1px solid var(--bd-2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--tx-m);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--tx);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  min-height: 36px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

/* ── Form elements ──────────────────────────────────────────── */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-m);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.form-control,
.form-select {
  width: 100%;
  padding: 11px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)),
    var(--bg-2);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: var(--r-md);
  color: var(--tx);
  font-size: 14px;
  font-family: 'Be Vietnam Pro', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  padding-right: 44px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 14px center;
  cursor: pointer;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

.form-control::placeholder {
  color: var(--tx-d);
}

.form-select option,
select.form-control option {
  background: #111525;
  color: #e5e7eb;
}

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--bd);
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl thead tr {
  background: var(--bg-2);
}

.tbl th {
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tx-m);
  border-bottom: 1px solid var(--bd-2);
}

.tbl td {
  padding: 12px 16px;
  color: var(--tx-m);
  border-bottom: 1px solid rgba(255, 255, 255, .03);
}

.tbl td:first-child {
  color: var(--tx);
  font-weight: 500;
}

.tbl tbody tr:hover td {
  background: rgba(255, 255, 255, .02);
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  font-family: 'JetBrains Mono', monospace;
}

.badge-success {
  background: rgba(16, 185, 129, .1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, .2);
}

.badge-warning {
  background: rgba(245, 158, 11, .1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, .2);
}

.badge-danger {
  background: rgba(239, 68, 68, .1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, .2);
}

.badge-info {
  background: rgba(56, 189, 248, .1);
  color: var(--info);
  border: 1px solid rgba(56, 189, 248, .2);
}

.badge-primary {
  background: rgba(99, 102, 241, .1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, .2);
}

/* ── Tab component ──────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--bd-2);
  color: var(--tx-m);
  cursor: pointer;
  transition: all .2s;
}

.tab-btn.active {
  background: rgba(99, 102, 241, .15);
  border-color: rgba(99, 102, 241, .4);
  color: var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ── Alert ──────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-info {
  background: rgba(56, 189, 248, .08);
  border: 1px solid rgba(56, 189, 248, .2);
  color: var(--info);
}

.alert-success {
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .2);
  color: var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .2);
  color: var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .2);
  color: var(--danger);
}

/* ── Section heading ────────────────────────────────────────── */
.section-heading {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bd);
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tx-d);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bd);
}

/* ── QR Container ───────────────────────────────────────────── */
.qr-wrap {
  background: white;
  border-radius: var(--r-lg);
  padding: 16px;
  display: inline-block;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}

.qr-wrap img {
  display: block;
  width: 200px;
  height: 200px;
}

/* ── Copy button ────────────────────────────────────────────── */
.copy-btn {
  cursor: pointer;
  padding: 4px 10px;
  background: rgba(99, 102, 241, .1);
  border: 1px solid rgba(99, 102, 241, .2);
  border-radius: var(--r-sm);
  color: var(--primary);
  font-size: 11px;
  transition: all .2s;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, .2);
}

/* ── Toast notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-1);
  border: 1px solid var(--bd-2);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideIn .3s ease;
}

@media (max-width: 480px) {
  .toast-container {
    right: 12px;
    left: 12px;
    top: 70px;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── Page header ────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--bd);
  border-radius: var(--r-2xl);
  padding: 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 300px 200px at 0% 50%, rgba(99, 102, 241, .08), transparent),
    radial-gradient(ellipse 200px 200px at 100% 0%, rgba(167, 139, 250, .06), transparent);
  pointer-events: none;
}

.page-header-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--primary);
  opacity: .7;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--tx), var(--tx-m));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.page-header-desc {
  font-size: 13px;
  color: var(--tx-m);
  margin-top: 8px;
  position: relative;
}

.recent-feed {
  margin-bottom: 40px;
  gap: 24px;
  align-items: start;
}

.recent-feed-block {
  min-width: 0;
}

.recent-feed-title {
  margin-bottom: 16px;
}

.activity-list {
  padding: 0;
  max-height: 350px;
  overflow-y: auto;
  scroll-behavior: auto;
}

.activity-list.is-auto-scrolling {
  will-change: scroll-position;
}

.activity-empty {
  padding: 30px;
  text-align: center;
  color: var(--tx-d);
  font-size: 13px;
}

.activity-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--bd);
}

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

.activity-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 16px;
  flex-shrink: 0;
}

.activity-icon-wrap.success {
  background: rgba(16, 185, 129, .1);
  color: var(--success);
}

.activity-icon-wrap.primary {
  background: rgba(99, 102, 241, .1);
  color: var(--primary);
}

.activity-content {
  min-width: 0;
}

.activity-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--tx);
  margin-bottom: 2px;
}

.activity-meta {
  font-size: 11px;
  color: var(--tx-d);
}

.activity-value {
  margin-left: auto;
  text-align: right;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-value.success {
  color: var(--success);
}

.activity-value.primary {
  color: var(--primary);
}

.home-hero {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
}

.home-hero-badge {
  display: inline-block;
  background: rgba(99, 102, 241, .1);
  border: 1px solid rgba(99, 102, 241, .2);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.home-hero-subtitle {
  font-size: 16px;
  color: var(--tx-m);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.home-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-showcase-card {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--bd);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border-color: var(--bd-2);
}

.category-showcase-card-body {
  padding: 14px 16px;
}

.category-showcase-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.category-showcase-card-icon {
  font-size: 22px;
}

.category-showcase-card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--tx);
}

.category-showcase-card-desc {
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tx-m);
}

.service-order-header {
  margin-bottom: 28px;
}

.service-order-layout {
  gap: 20px;
}

.service-order-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-order-summary {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--bd);
  border-radius: 12px;
  background: var(--bg-2);
}

.service-order-summary-title {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
}

.service-order-summary-desc {
  font-size: 12px;
  color: var(--tx-m);
}

.service-order-summary-price {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.service-price-preview {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.07);
  transform: translateY(6px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.service-price-preview.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.service-price-preview-label {
  font-size: 12px;
  color: var(--tx-m);
}

.service-price-preview-inline {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.service-price-preview-robux {
  font-size: 15px;
  font-weight: 800;
  color: var(--tx);
}

.service-price-preview-equals {
  font-size: 14px;
  font-weight: 700;
  color: var(--tx-d);
}

.service-price-preview-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
}

.service-price-preview-meta {
  margin-top: 4px;
  font-size: 11px;
  color: var(--tx-d);
}

.service-price-preview-meta span {
  color: var(--success);
}

.service-price-preview-meta strong {
  color: var(--warning);
  font-weight: 800;
}

.service-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.delivery-option {
  display: block;
  padding: 12px;
  border: 1px solid var(--bd-2);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.delivery-option:hover {
  transform: translateY(-2px);
}

.delivery-option.is-active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.delivery-option input {
  display: none;
}

.delivery-option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
}

.delivery-option-desc {
  margin-top: 2px;
  font-size: 11px;
  color: var(--tx-m);
}

.service-form-divider {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
}

.service-inline-note {
  margin-top: 5px;
  font-size: 11px;
  color: var(--tx-d);
}

.service-otp-input {
  font-size: 16px;
  text-align: center;
  letter-spacing: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.service-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 15px;
}

.service-note-card {
  border-color: rgba(245, 158, 11, 0.3);
}

.service-note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: var(--tx-m);
}

.service-balance-card {
  background: rgba(99, 102, 241, 0.04);
}

.service-balance-body {
  text-align: center;
}

.service-balance-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--success);
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--bd);
  padding: 28px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--tx-d);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  margin-top: 60px;
}

/* ── Utility ────────────────────────────────────────────────── */
.text-success {
  color: var(--success) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-info {
  color: var(--info) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.text-muted {
  color: var(--tx-m) !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.mono {
  font-family: 'JetBrains Mono', monospace !important;
}

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mt-4 {
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.btn-favorite {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background: linear-gradient(180deg, rgba(24, 27, 45, 0.96), rgba(15, 19, 34, 0.96));
  color: var(--tx);
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(7, 10, 20, 0.28);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.btn-favorite:hover {
  transform: translateY(-1px);
  border-color: rgba(129, 140, 248, 0.5);
  color: #fff;
  box-shadow: 0 16px 30px rgba(11, 15, 30, 0.34);
}

.btn-favorite.active,
.btn-favorite.is-active {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.24), rgba(236, 72, 153, 0.2));
  border-color: rgba(167, 139, 250, 0.58);
  color: #c4b5fd;
}

.btn-favorite-sm {
  width: 32px;
  height: 32px;
  box-shadow: 0 10px 18px rgba(7, 10, 20, 0.22);
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--bd-2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tx-d);
}

/* ── Animations ─────────────────────────────────────────────── */
.fade-in {
  animation: fadeIn .4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.slide-up {
  animation: slideUp .5s ease;
}

.scale-in {
  animation: scaleIn .3s ease;
}

.pulse {
  animation: pulse 2s infinite;
}

/* Staggered fade-in for cards */
.card:nth-child(1) {
  animation-delay: .05s;
}

.card:nth-child(2) {
  animation-delay: .10s;
}

.card:nth-child(3) {
  animation-delay: .15s;
}

.card:nth-child(4) {
  animation-delay: .20s;
}

.card:nth-child(5) {
  animation-delay: .25s;
}

.card:nth-child(6) {
  animation-delay: .30s;
}

/* ── Mobile Hamburger ──────────────────────────────────────── */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tx-m);
  font-size: 20px;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
}

/* ── Nạp Tiền Button (Navbar) ──────────────────────────────── */
.btn-topup-nav {
  background: var(--primary-g);
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  transition: all .25s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, .3);
  position: relative;
  overflow: hidden;
}

.btn-topup-nav::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .15), transparent);
  transform: translateX(-100%);
  transition: transform .6s;
}

.btn-topup-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, .45);
  color: #fff;
}

.btn-topup-nav:hover::after {
  transform: translateX(100%);
}

/* ── Dropdown Click Support ────────────────────────────────── */
.dropdown-wrap {
  position: relative;
}

.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 9999;
  padding-top: 8px;
}

.dropdown-wrap.open>.dropdown-panel {
  display: block;
  animation: dropdownIn .2s ease;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile Quick Actions ──────────────────────────────────── */
.mobile-quick-actions {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 12px 12px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    row-gap: 0;
  }

  .mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding: 12px 0 0;
  }

  .mobile-quick-actions a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    min-height: 48px;
    background: var(--bg-2);
    border: 1px solid var(--bd);
    border-radius: 12px;
    color: var(--tx);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .mobile-quick-actions a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .mobile-quick-actions a i {
    font-size: 16px;
  }

  .mobile-quick-actions a.qa-primary {
    background: var(--primary-g);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
  }

  .mobile-quick-actions a.qa-success {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .25);
    color: var(--success);
  }

  .mobile-quick-actions a.qa-warning {
    background: rgba(245, 158, 11, .12);
    border-color: rgba(245, 158, 11, .25);
    color: var(--warning);
  }

  .mobile-quick-actions a.qa-violet {
    background: rgba(167, 139, 250, .12);
    border-color: rgba(167, 139, 250, .25);
    color: var(--violet);
  }

  .desktop-auth-actions {
    display: none !important;
  }
}

/* ── User dropdown ─────────────────────────────────────────── */
.udrop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx-m);
  transition: all .15s;
  text-decoration: none;
}

.udrop-item:hover {
  background: rgba(255, 255, 255, .05);
  color: var(--tx);
}

/* ── Sidebar (Admin) ─────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 20px 12px;
}

.sidebar-logo {
  font-size: 16px;
  font-weight: 800;
  padding: 8px 12px 20px;
  background: var(--primary-g);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tx-d);
  padding: 16px 12px 6px;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--tx-m);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
}

.sidebar a:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--tx);
}

.sidebar a.active {
  background: rgba(99, 102, 241, .12);
  color: var(--primary);
}

.sidebar a i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.sidebar-summary {
  padding: 0 12px 16px;
  font-size: 11px;
  color: var(--tx-d);
}

.sidebar-summary strong {
  color: var(--primary);
}

.sidebar-summary-balance {
  color: var(--success);
  font-weight: 700;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-badge-warning {
  background: var(--warning);
  color: #111827;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
}

.sidebar-footer-link {
  color: var(--tx-m);
}

.sidebar-footer-link-danger {
  color: var(--danger) !important;
}

.sidebar-mobile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.sidebar-mobile-head .sidebar-logo {
  flex: 1;
  min-width: 0;
}

.sidebar-close {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--bd-2);
  background: var(--bg-2);
  color: var(--tx);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Client Sidebar (slide-in from hamburger) ───────────────── */
.client-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(5px);
  z-index: 1090;
}

.client-sidebar-backdrop.is-visible {
  display: block;
}

.client-sidebar {
  width: min(320px, 88vw);
  height: 100vh;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-right: 1px solid var(--bd);
  transform: translateX(-100%);
  transition: transform .24s ease;
  padding: 18px 14px 22px;
  overflow-x: hidden;
  overflow-y: auto;
}

.client-sidebar.is-open {
  transform: translateX(0);
}

.client-sidebar .sidebar-mobile-head {
  display: flex;
}

.client-sidebar .sidebar-close {
  display: flex;
}

.client-sidebar .sidebar-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tx-d);
  padding: 16px 12px 6px;
}

.client-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--tx-m);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
  text-decoration: none;
}

.client-sidebar a:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--tx);
}

.client-sidebar a.active {
  background: rgba(99, 102, 241, .12);
  color: var(--primary);
}

.client-sidebar a i {
  width: 16px;
  text-align: center;
  font-size: 14px;
}

.client-sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--bd);
}

.panel-mobile-bar,
.sidebar-backdrop {
  display: none;
}

.panel-mobile-bar {
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-mobile-toggle,
.panel-mobile-link {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--bd);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)), var(--bg-1);
  color: var(--tx);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.panel-mobile-toggle {
  cursor: pointer;
}

.panel-mobile-link:hover,
.panel-mobile-toggle:hover {
  color: var(--tx);
  border-color: var(--bd-glow);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(5px);
  z-index: 1090;
}

.admin-content {
  flex: 1;
  padding: 32px;
  background: var(--bg-base);
  overflow-x: hidden;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

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

.health-list {
  display: grid;
  gap: 12px;
}

.health-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.health-mono {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
}

.health-log {
  margin: 0;
  padding: 14px;
  min-height: 220px;
  max-height: 340px;
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 10, 20, 0.8);
  color: var(--tx-2);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.table-scroll,
.table-wrap {
  overflow-x: auto;
}

.table-cell-subtle {
  font-size: 12px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.panel-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-sticky {
  position: sticky;
  top: 80px;
}

.panel-center {
  text-align: center;
}

.panel-value-xl {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -2px;
}

.panel-value-lg {
  font-size: 28px;
  font-weight: 900;
}

.panel-subline {
  font-size: 12px;
  color: var(--tx-m);
  margin-top: 6px;
}

.panel-note {
  background: rgba(245, 158, 11, .07);
  border: 1px solid rgba(245, 158, 11, .2);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--warning);
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: min(700px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--bd-2);
  border-radius: 20px;
}

.modal-card-sm {
  width: min(480px, 95vw);
}

.modal-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tx-m);
  font-size: 20px;
}

.form-grid-2,
.form-grid-3 {
  display: grid;
  gap: 12px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-banner {
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.panel-banner-danger {
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .15);
}

.panel-banner-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.panel-item {
  background: var(--bg-1);
  border: 1px solid var(--bd-2);
  border-radius: 12px;
  padding: 16px;
}

.panel-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-item-meta {
  font-size: 12px;
  color: var(--tx-m);
  margin-top: 3px;
}

.panel-item-time {
  font-size: 11px;
  color: var(--tx-d);
  margin-top: 3px;
}

.panel-item-side {
  text-align: right;
}

.panel-code {
  background: var(--bg-2);
  border: 1px solid var(--bd-2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

.inline-form {
  display: inline-flex;
}

.panel-slider-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--warning);
}

.panel-slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--tx-d);
  margin-top: 4px;
}

.panel-highlight-box {
  background: rgba(16, 185, 129, .07);
  border: 1px solid rgba(16, 185, 129, .15);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  text-align: center;
}

.panel-form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Mobile Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links-shell {
    position: relative;
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    overflow: visible;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Menu trượt xuống dưới navbar như dropdown */
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--bg-1);
    border-bottom: 1px solid var(--bd);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    padding: 0;
    gap: 0;
    min-width: 100%;
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
    animation: mobileNavSlideDown .25s ease forwards;
  }

  @keyframes mobileNavSlideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 15px;
    padding: 14px 20px;
    min-height: 48px;
    border-radius: 0;
    border-bottom: 1px solid var(--bd);
  }

  .nav-links a i {
    width: 20px;
    font-size: 16px;
    text-align: center;
  }

  .nav-links a.active {
    background: rgba(99, 102, 241, .08);
    color: var(--primary);
    border-left: 3px solid var(--primary);
  }

  .navbar {
    padding: 0 12px 12px;
    height: auto;
    min-height: 56px;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    position: relative;
  }

  .navbar-brand {
    font-size: 15px;
    flex: 1;
    min-width: 0;
  }

  .home-hero {
    padding: 56px 14px 44px;
  }

  .home-hero-subtitle {
    font-size: 15px;
    margin-bottom: 28px;
  }

  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }

  .navbar-right {
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* Số tiền hiện rõ trên mobile */
  .wallet-badge {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 20px;
  }

  .wallet-badge span {
    display: inline !important;
  }

  .page-wrapper {
    padding: 20px 14px;
  }

  .page-header {
    padding: 24px 20px;
    margin-bottom: 20px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .section-heading {
    font-size: 17px;
  }

  .card-body {
    padding: 16px;
  }

  .card-header {
    padding: 14px 16px 12px;
  }

  .stat-card {
    padding: 14px 16px;
  }

  .stat-value {
    font-size: 20px;
  }

  .g3,
  .g4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .g52 {
    grid-template-columns: 1fr;
  }

  footer {
    margin-top: 40px;
    padding: 20px 14px;
  }

  /* Admin/CTV sidebar responsive */
  .admin-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
    border-right: none;
    border-bottom: 1px solid var(--bd);
  }

  .sidebar-logo {
    display: none;
  }

  .sidebar-section {
    display: none;
  }

  .sidebar-summary {
    display: none;
  }

  .sidebar a {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
    min-height: 36px;
  }

  .panel-sticky {
    position: static;
  }

  .panel-item-side {
    text-align: left;
  }

  .page-header-actions {
    margin-left: 0;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .admin-content {
    padding: 16px;
  }

  /* Dropdown panels điều chỉnh cho mobile */
  .dropdown-panel {
    position: fixed;
    top: 56px;
    left: 8px;
    right: 8px;
    width: auto;
  }
}

@media (max-width: 480px) {

  .g2,
  .g3,
  .g4 {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 18px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 14px;
  }

  .tbl {
    font-size: 11px;
  }

  .tbl th,
  .tbl td {
    padding: 8px 10px;
  }
}

/* ── Custom App Responsive Layouts ──────────────────────────── */
.home-hero-title {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .home-hero-title {
    font-size: 36px !important;
  }

  .home-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .home-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .service-delivery-grid {
    grid-template-columns: 1fr;
  }

  .service-order-layout {
    gap: 16px;
  }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {

  .navbar,
  footer,
  .mobile-toggle,
  .toast-container {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card {
    border: 1px solid #ddd;
    box-shadow: none;
    background: #fff;
  }
}

.shop-cart-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .4);
  color: #fff;
  font-size: 20px;
  z-index: 4900;
  transition: transform .2s ease;
}

.shop-cart-trigger:hover {
  transform: scale(1.1);
}

.affiliate-layout {
  gap: 20px;
  align-items: start;
}

.affiliate-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.affiliate-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.affiliate-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.affiliate-step {
  display: flex;
  align-items: center;
  gap: 14px;
}

.affiliate-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, .1);
  border: 1px solid rgba(99, 102, 241, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.affiliate-sticky-card {
  position: sticky;
  top: 80px;
}

.affiliate-balance-box {
  background: rgba(16, 185, 129, .07);
  border: 1px solid rgba(16, 185, 129, .15);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .affiliate-sticky-card {
    position: static;
    top: auto;
  }

  .shop-cart-trigger {
    bottom: 18px;
    right: 18px;
  }
}

@media (max-width: 900px) {
  body.panel-sidebar-open {
    overflow: hidden;
  }

  body.module-panel .panel-mobile-bar {
    z-index: 1115;
  }

  .admin-layout {
    display: block;
  }

  .panel-mobile-bar {
    display: flex;
    position: fixed;
    left: 14px;
    bottom: 22px;
    z-index: 1040;
    padding: 0;
    margin: 0;
    background: transparent;
  }

  .panel-mobile-toggle {
    flex: 0 0 auto;
    min-width: 150px;
    justify-content: center;
    box-shadow: 0 16px 34px rgba(2, 6, 23, .34);
  }

  .panel-mobile-link {
    display: none;
  }

  .sidebar-backdrop.is-visible {
    display: block;
  }

  .sidebar {
    width: min(320px, 88vw);
    height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    transform: translateX(-100%);
    transition: transform .24s ease;
    padding: 18px 14px 22px;
    border-right: 1px solid var(--bd);
    border-bottom: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  body.panel-sidebar-open .panel-mobile-bar {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-mobile-head,
  .sidebar-summary,
  .sidebar-section,
  .sidebar a,
  .sidebar-footer {
    width: 100%;
  }

  .sidebar-close {
    display: inline-flex;
  }

  .sidebar-logo {
    padding: 8px 6px 12px;
  }

  .sidebar-section {
    display: block;
    padding-top: 14px;
  }

  .sidebar-summary {
    display: block;
    padding-bottom: 14px;
  }

  .sidebar a {
    margin-bottom: 4px;
    min-height: 44px;
    padding: 10px 12px;
  }

  .sidebar-footer {
    margin-top: 18px;
    padding-top: 18px;
  }

  .admin-content {
    padding: 18px 14px 20px;
  }

  .page-header {
    padding: 22px 18px;
  }

  .page-header-actions {
    width: 100%;
    margin-top: 14px;
    gap: 10px;
  }

  .page-header-actions > *,
  .page-header-actions form,
  .page-header-actions .table-actions,
  .page-header-actions .panel-form-inline {
    width: 100%;
  }

  .page-header-actions .form-control,
  .page-header-actions .form-select {
    width: 100% !important;
    min-width: 0;
    flex: 1 1 100%;
  }

  .page-header-actions .btn,
  .page-header-actions .btn-sm {
    justify-content: center;
  }

  .page-tabs {
    gap: 10px;
    margin-bottom: 18px;
  }

  .page-tabs .btn {
    min-height: 42px;
  }

  .card-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .card-header > .btn,
  .card-header > a.btn {
    width: 100%;
    margin-left: 0 !important;
    justify-content: center;
  }

  .panel-form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .table-wrap,
  .table-scroll,
  .table-responsive,
  .table-wrapper {
    overflow: visible;
    border: none;
    background: transparent;
  }

  table.table-mobile-cards {
    width: 100%;
    min-width: 0 !important;
    border-collapse: separate;
  }

  table.table-mobile-cards thead {
    display: none;
  }

  table.table-mobile-cards tbody,
  table.table-mobile-cards tr,
  table.table-mobile-cards td,
  table.table-mobile-cards th {
    display: block;
    width: 100%;
  }

  table.table-mobile-cards tbody tr {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--bd);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)),
      var(--bg-1);
    box-shadow: 0 12px 30px rgba(2, 6, 23, .18);
  }

  table.table-mobile-cards tbody tr:last-child {
    margin-bottom: 0;
  }

  table.table-mobile-cards td,
  table.table-mobile-cards th {
    padding: 8px 0;
    border: none;
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    text-align: left !important;
  }

  table.table-mobile-cards td::before,
  table.table-mobile-cards th::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tx-d);
    line-height: 1.5;
  }

  table.table-mobile-cards td[data-label=""]::before,
  table.table-mobile-cards th[data-label=""]::before,
  table.table-mobile-cards td[colspan]::before,
  table.table-mobile-cards th[colspan]::before {
    content: none;
  }

  table.table-mobile-cards td[colspan],
  table.table-mobile-cards th[colspan] {
    display: block;
    text-align: center !important;
  }

  table.table-mobile-cards .table-actions,
  table.table-mobile-cards .inline-form {
    width: 100%;
    justify-content: flex-start;
  }

  table.table-mobile-cards .btn,
  table.table-mobile-cards .btn-sm {
    min-height: 40px;
  }
}

@media (max-width: 520px) {
  .panel-mobile-bar {
    left: 12px;
    bottom: 18px;
  }

  .g4 {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 20px;
  }

  table.table-mobile-cards td,
  table.table-mobile-cards th {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  table.table-mobile-cards td::before,
  table.table-mobile-cards th::before {
    margin-bottom: 2px;
  }
}

/* Homepage mobile layout tuning */
.home-stats-grid .stat-card {
  min-width: 0;
}

.home-recent-grid .recent-feed-block,
.home-recent-grid .recent-feed-card,
.home-method-card {
  min-width: 0;
}

.home-feed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--bd);
}

.home-activity-list .home-feed-item:last-child {
  border-bottom: none;
}

.home-feed-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--home-feed-icon-bg, rgba(99, 102, 241, .1));
  color: var(--home-feed-icon-color, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.home-feed-item-icon i {
  color: var(--home-feed-icon-color, currentColor);
}

.home-feed-item-copy {
  min-width: 0;
  flex: 1;
}

.home-feed-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx);
  line-height: 1.45;
  margin-bottom: 2px;
  word-break: normal;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-feed-item-meta {
  font-size: 11px;
  color: var(--tx-m);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-feed-item-amount {
  margin-left: auto;
  text-align: right;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 14px;
}

.home-method-card {
  height: 100%;
}

.home-method-card-header {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.home-method-card-copy {
  min-width: 0;
}

.home-method-card-header .badge {
  flex-shrink: 0;
}

.home-method-card-body {
  color: var(--tx-m);
  font-size: 13px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 10px;
  word-break: break-word;
}

.home-method-card-body > :last-child {
  margin-top: auto;
}

.home-method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-method-tag {
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .15);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--success);
  font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 768px) {
  .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }

  .home-recent-grid .recent-feed-title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .home-recent-grid .recent-feed-title::after {
    display: none;
  }

  .home-recent-grid .home-activity-list {
    max-height: 320px;
  }

  .home-recent-grid .activity-empty {
    padding: 24px 12px;
    font-size: 12px;
  }

  .home-feed-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    padding: 12px;
  }

  .home-feed-item-icon {
    width: 32px;
    height: 32px;
    font-size: 13px;
    grid-row: 1 / span 2;
  }

  .home-feed-item-title {
    font-size: 12px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  .home-feed-item-meta {
    font-size: 10px;
  }

  .home-feed-item-copy,
  .home-feed-item-amount {
    grid-column: 2;
    min-width: 0;
  }

  .home-feed-item-amount {
    margin-left: 0;
    text-align: left;
    font-size: 13px;
  }

  .home-methods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-methods-grid.home-methods-grid-single {
    grid-template-columns: 1fr;
  }

  .home-method-card-header {
    padding: 14px 14px 12px;
    gap: 10px;
  }

  .home-method-card .card-icon {
    font-size: 18px;
  }

  .home-method-card .card-title {
    font-size: 14px;
    line-height: 1.35;
  }

  .home-method-card .card-subtitle {
    font-size: 10px;
    line-height: 1.4;
  }

  .home-method-card-body {
    padding: 14px;
    font-size: 12px;
    line-height: 1.6;
    gap: 8px;
  }

  .home-method-tag {
    padding: 2px 6px;
    font-size: 9px;
  }
}

@media (max-width: 520px) {
  .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-recent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-recent-grid .recent-feed-title {
    font-size: 14px;
    line-height: 1.35;
    align-items: flex-start;
  }

  .home-recent-grid .recent-feed-title i {
    margin-top: 2px;
  }

  .home-feed-item {
    padding: 10px;
    gap: 8px;
  }

  .home-feed-item-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .home-feed-item-title {
    font-size: 11px;
    line-height: 1.3;
  }

  .home-feed-item-meta {
    font-size: 10px;
  }

  .home-feed-item-amount {
    font-size: 12px;
  }

  .home-methods-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-methods-grid.home-methods-grid-single {
    grid-template-columns: 1fr;
  }

  .home-method-card-header {
    padding: 12px 12px 10px;
  }

  .home-method-card-body {
    padding: 12px;
    font-size: 11px;
    line-height: 1.55;
  }

  .home-method-card .badge {
    font-size: 9px;
    padding: 4px 7px;
  }

  .home-method-tag {
    padding: 1px 5px;
    font-size: 8px;
  }
}

.mobile-bottom-dock {
  display: none;
}

.mobile-auth-inline {
  display: none;
}

@media (max-width: 768px) {
  .mobile-toggle,
  .mobile-quick-actions,
  .nav-links-shell {
    display: none !important;
  }

  body.module-panel .mobile-bottom-dock {
    display: none !important;
  }

  .navbar {
    padding: 10px 12px;
    min-height: 64px;
    height: auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .navbar-brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .navbar-right {
    margin-left: auto;
    gap: 6px;
  }

  .mobile-auth-inline {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-auth-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, color .18s ease, background .18s ease;
  }

  .mobile-auth-chip-login {
    border-color: rgba(148, 163, 184, .22);
    background: rgba(15, 23, 42, .68);
    color: var(--tx);
  }

  .mobile-auth-chip-register {
    background: var(--primary-g);
    color: #fff;
    box-shadow: 0 10px 22px rgba(99, 102, 241, .24);
  }

  body {
    padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .page-wrapper {
    padding-bottom: 110px;
  }

  footer {
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }

  .floating-contact {
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    padding: 12px 10px 10px;
    border-radius: 26px;
    border: 1px solid rgba(99, 102, 241, .16);
    background: rgba(8, 12, 24, .94);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 36px rgba(2, 6, 23, .45);
  }

  .mobile-bottom-dock-item,
  .mobile-bottom-dock-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 54px;
    padding: 8px 4px;
    border-radius: 18px;
    color: var(--tx-m);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: transform .18s ease, color .18s ease, background .18s ease;
  }

  .mobile-bottom-dock-item i,
  .mobile-bottom-dock-menu i {
    font-size: 18px;
  }

  .mobile-bottom-dock-item span,
  .mobile-bottom-dock-menu span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
  }

  .mobile-bottom-dock-item.active,
  .mobile-bottom-dock-menu.active {
    color: var(--primary);
    background: rgba(99, 102, 241, .08);
  }

  .mobile-bottom-dock-item-primary {
    min-height: 54px;
    border-radius: 18px;
    background: var(--primary-g);
    color: #fff;
    transform: none;
    box-shadow: 0 16px 30px rgba(99, 102, 241, .35);
  }

  .mobile-bottom-dock-item-primary i {
    font-size: 18px;
  }

  .mobile-bottom-dock-item-primary span {
    font-size: 11px;
  }

  .home-recent-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-recent-grid .recent-feed-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .home-recent-grid .recent-feed-title::after {
    display: block;
  }

  .home-recent-grid .home-activity-list {
    max-height: none;
    overflow: visible;
    padding: 18px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .home-feed-item {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, .04);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01)),
      rgba(9, 14, 26, .76);
  }

  .home-feed-item-icon {
    width: 44px;
    height: 44px;
    font-size: 16px;
    grid-row: auto;
  }

  .home-feed-item-copy {
    grid-column: 2;
  }

  .home-feed-item-title {
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 1;
  }

  .home-feed-item-meta {
    font-size: 11px;
  }

  .home-feed-item-amount {
    grid-column: 3;
    margin-left: auto;
    text-align: right;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .home-hero {
    max-width: 460px;
    margin: 0 auto 32px;
    padding: 24px 20px 28px;
    text-align: left;
    border: 1px solid var(--bd);
    border-radius: 30px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02)),
      var(--bg-1);
    box-shadow: 0 18px 36px rgba(2, 6, 23, .24);
  }

  .home-hero-badge {
    margin-bottom: 16px;
    padding: 8px 16px;
    border-radius: 18px;
    letter-spacing: .22em;
  }

  .home-hero-title {
    font-size: clamp(34px, 11vw, 58px) !important;
    line-height: 1.05;
    letter-spacing: -1.4px;
    margin-bottom: 14px;
  }

  .home-hero-subtitle {
    max-width: none;
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
  }

  .home-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .mobile-bottom-dock {
    left: 10px;
    right: 10px;
    gap: 6px;
    padding: 10px 8px 8px;
  }

  .mobile-bottom-dock-item,
  .mobile-bottom-dock-menu {
    min-height: 50px;
  }

  .mobile-auth-chip {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .mobile-bottom-dock-item span,
  .mobile-bottom-dock-menu span {
    font-size: 10px;
  }

  .home-recent-grid .home-activity-list {
    padding: 16px !important;
    gap: 10px;
  }

  .home-feed-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 14px;
    border-radius: 18px;
  }

  .home-feed-item-icon {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .home-feed-item-title {
    font-size: 13px;
  }

  .home-feed-item-meta {
    font-size: 10px;
  }

  .home-feed-item-amount {
    font-size: 13px;
  }
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--tx);
  font-weight: 600;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
}

.table-empty-state {
  padding: 32px 18px;
  border: 1px dashed var(--bd-2);
  border-radius: 18px;
  text-align: center;
  color: var(--tx-d);
  font-size: 13px;
  background: rgba(255, 255, 255, .02);
}

.checkback-grid {
  margin-bottom: 18px;
}

@media (max-width: 920px) {
  .checkback-grid {
    grid-template-columns: 1fr !important;
  }
}

.category-admin-list {
  display: grid;
  gap: 18px;
}

.category-admin-group-bar {
  --category-group-accent: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-left: 3px solid var(--category-group-accent);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .01)),
    rgba(10, 12, 28, .68);
}

.category-admin-group-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.category-admin-group-title {
  color: var(--tx);
  font-size: 14px;
  font-weight: 700;
}

.category-admin-group-desc {
  color: var(--tx-d);
  font-size: 12px;
  line-height: 1.55;
}

.category-admin-group-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: var(--tx);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.category-admin-card {
  overflow: hidden;
}

.category-admin-header {
  gap: 16px;
  align-items: center;
}

.category-admin-summary {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.category-admin-media,
.category-preview-media {
  width: 108px;
  height: 108px;
  border-radius: 22px;
  border: 1px solid var(--bd);
  background:
    radial-gradient(circle at top left, rgba(112, 104, 255, .22), transparent 55%),
    rgba(255, 255, 255, .03);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-admin-media-image,
.category-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-admin-media-fallback,
.category-preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx);
  font-size: 42px;
  font-weight: 700;
}

.category-admin-meta {
  min-width: 0;
  flex: 1;
}

.category-admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.category-admin-editor {
  border-top: 1px solid var(--bd);
}

.category-admin-form {
  gap: 16px;
}

.category-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--bd);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .015)),
    rgba(10, 12, 28, .72);
}

.category-preview-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 8px;
}

.category-preview-title {
  color: var(--tx);
  font-size: 15px;
  font-weight: 700;
}

.category-preview-note,
.category-inline-note {
  color: var(--tx-d);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.category-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  color: var(--tx);
  font-size: 13px;
}

.category-inline-check input {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 920px) {
  .category-admin-group-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-admin-group-count {
    min-width: 0;
  }

  .category-admin-header,
  .category-admin-summary,
  .category-preview {
    flex-direction: column;
    align-items: stretch;
  }

  .category-admin-actions {
    justify-content: flex-start;
  }

  .category-admin-media,
  .category-preview-media {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .category-form-grid {
    grid-template-columns: 1fr;
  }
}
