body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
}

/* Tailwind primary palette (custom, thay CDN config) */
.text-primary-500 { color: #0ea5e9; }
.text-primary-600 { color: #0284c7; }
.text-primary-700 { color: #0369a1; }
.text-primary-200 { color: #bae6fd; }
.bg-primary-50 { background-color: #f0f9ff; }
.bg-primary-100 { background-color: #e0f2fe; }
.bg-primary-200 { background-color: #bae6fd; }
.bg-primary-600 { background-color: #0284c7; }
.bg-primary-700 { background-color: #0369a1; }
.hover\:bg-primary-50:hover { background-color: #f0f9ff; }
.hover\:bg-primary-200:hover { background-color: #bae6fd; }
.hover\:bg-primary-700:hover { background-color: #0369a1; }
.hover\:text-primary-500:hover { color: #0ea5e9; }
.from-primary-500 { --tw-gradient-from: #0ea5e9 var(--tw-gradient-from-position); --tw-gradient-to: rgb(14 165 233 / 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.page-section { display: none; }
.page-section.active { display: block; }
.tab-pane { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.nav-link.active {
  color: #0ea5e9;
  font-weight: 600;
  border-bottom: 2px solid #0ea5e9;
}
header {
  background: #ffffff;
}
.plan-card { min-height: 240px; }

/* Catalog surface — chi tiết trong catalog-light.css */
.lite-catalog-surface {
  min-height: calc(100vh - 56px);
}

#page-user #view-profile.qldv-profile-root {
  min-height: calc(100vh - 56px);
}

#page-checkout #checkout-root.checkout-page {
  min-height: calc(100vh - 56px);
  padding-top: 1rem;
  padding-bottom: 2rem;
}

#checkout-root .hidden,
#page-checkout .hidden {
  display: none !important;
}

/* Critical: ẩn modal lazy (CSS popup-naptien load muộn / theo route) */
#depositModal.deposit-hidden,
.deposit-modal.deposit-hidden {
  display: none !important;
}

#luckyWheelModal.hidden,
.lucky-modal.hidden {
  display: none !important;
}

#bank-transfer-modal.hidden,
.bank-transfer-modal.hidden,
.vps-modal.hidden {
  display: none !important;
}

/* Proxy grid alias */
#view-proxy .proxy-page-surface .bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
#view-proxy .proxy-page-surface .bento-grid.hidden { display: none; }

.lite-catalog-surface .muted,
#view-proxy .proxy-page-surface .muted { color: #94a3b8; text-align: center; padding: 2rem; }
.lite-catalog-surface .err,
#view-proxy .proxy-page-surface .err { color: #f87171; text-align: center; padding: 2rem; }

/* Không định nghĩa .hidden toàn cục — phá Tailwind hidden md:flex trên header */
.api-toast-wrap {
  position: fixed;
  right: 5.5rem;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 200000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.api-toast {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
  cursor: pointer;
  width: auto;
  max-width: min(420px, calc(100vw - 24px));
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  animation: apiToastIn 0.22s ease;
}

@media (max-width: 767px) {
  .api-toast-wrap {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: 5.5rem;
    max-width: none;
    align-items: stretch;
  }
  .api-toast {
    width: 100%;
  }
}

.api-toast__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.api-toast__msg {
  flex: 1 1 auto;
  min-width: 0;
}

.api-toast--success { background: #059669; }
.api-toast--error { background: #dc2626; }
.api-toast--info { background: #0284c7; }
.api-toast--warning { background: #d97706; }
.api-toast--link { cursor: pointer; }
.api-toast--link:hover { filter: brightness(1.06); }

.api-toast.is-leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes apiToastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-lite {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: min(420px, calc(100vw - 24px));
  white-space: normal;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
}
.toast-lite.error { background: #dc2626; }
.toast-lite.success { background: #059669; }
.toast-lite.info { background: #0284c7; }


span.vps-vnc-modal__info-value {
  color: black;
}

.text-sm.text-emerald-200.leading-relaxed {
  color: black;
}