/* ===== ZA-FARM-KH — Modern Premium Black & Gold Theme ===== */
:root {
  --bg: #000000;
  --surface: rgba(15, 15, 15, 0.9);
  --surface-2: rgba(25, 25, 25, 0.95);
  --surface-3: rgba(40, 40, 40, 0.98);
  --border: rgba(212, 175, 55, 0.25);
  --border-2: rgba(212, 175, 55, 0.45);
  --text: #ffffff;
  --text-2: #e2e8f0;
  --text-muted: #94a3b8;
  --gold: #d4af37;
  --gold-light: #fde047;
  --gold-dark: #b45309;
  --gold-glow: rgba(212, 175, 55, 0.2);
  --gold-gradient: linear-gradient(135deg, #fde047, #d4af37, #b45309);
  --gold-gradient-light: linear-gradient(135deg, #fef08a, #fde047, #d4af37);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.15);
  --amber: #f59e0b;
  --red: #f43f5e;
  --sidebar-w: 250px;
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans Khmer', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
}

/* ===== GLOBAL ANIMATIONS ===== */
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseScale {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes shimmerEffect {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }

  100% {
    transform: translateX(250%) skewX(-20deg);
  }
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  z-index: 100;
  transition: transform .3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  margin-bottom: 28px;
}

.sb-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(212, 160, 23, .3);
  box-shadow: 0 4px 12px rgba(212, 160, 23, .15);
}

.sb-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sidebar-brand:hover .sb-logo img {
  transform: scale(1.15) rotate(5deg);
}

.sb-info strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-light);
}

.sb-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
  transform: translateX(6px);
  border-left: 3px solid var(--gold);
}

.nav-item.active {
  color: var(--gold-light);
  background: var(--gold-glow);
  font-weight: 600;
}

.nav-item svg {
  flex-shrink: 0;
}

.sidebar-balance {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.sb-bal-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sb-bal-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  animation: pulseScale 3s infinite ease-in-out;
  display: inline-block;
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-btn {
  flex: 1;
  display: grid;
  place-items: center;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}

.sidebar-btn:hover {
  color: var(--gold);
  border-color: rgba(212, 160, 23, .3);
}

.logout-btn:hover {
  color: var(--red);
  border-color: rgba(248, 113, 113, .3);
}

.sidebar-btn .icon-moon {
  display: none;
}

.icon-sun {
  display: block;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 90;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.mobile-brand {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-light);
}

.mobile-bal {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

/* ===== MAIN CONTENT ===== */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 36px 60px;
  max-width: 1400px;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== STORE GRID (UNIFIED LAYOUT) ===== */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.store-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(212, 175, 55, 0.4);
  border-color: rgba(212, 175, 55, 0.5);
}

.sc-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.sc-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.sc-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.sc-icon.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.sc-info {
  flex: 1;
}

.sc-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.sc-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.sc-stock {
  font-size: 13px;
  color: var(--text-muted);
}

.sc-stock strong {
  font-size: 15px;
}

.sc-stock strong.red {
  color: #ef4444;
}

.sc-stock strong.green {
  color: #10b981;
}

.sc-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.sc-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.sc-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(50%);
}

.sc-btn.blue {
  background: #3b82f6;
}

.sc-btn.orange {
  background: #f97316;
}

.sc-btn.purple {
  background: #a855f7;
}

.packages-header {
  text-align: left;
  margin-bottom: 24px;
  padding: 0 10px;
}

.packages-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.packages-header p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== STATUS BAR ===== */
.status-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface-2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 28px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px rgba(74, 222, 128, .5);
  animation: blink 2s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}

.status-time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ===== PRODUCT SECTION ===== */
.product-section {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(212, 175, 55, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(212, 175, 55, 0.3), 0 0 30px rgba(212, 175, 55, 0.15);
  transform: translateY(-5px);
}

.product-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
  animation: pulseBgPremium 4s infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes pulseBgPremium {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.product-visual,
.product-details {
  position: relative;
  z-index: 2;
}

.product-visual {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
}

.product-icon-wrap {
  position: relative;
  z-index: 2;
}

.product-icon {
  width: 100px;
  height: 100px;
  border-radius: 28px;
  background: var(--gold-gradient);
  display: grid;
  place-items: center;
  color: #0a0a0a;
  box-shadow: 0 8px 32px rgba(212, 160, 23, .3);
}

.product-particles {
  position: absolute;
  inset: 0;
}

.product-particles span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-light);
  opacity: .3;
}

.product-particles span:nth-child(1) {
  top: 10%;
  left: 20%;
  animation: float 3s infinite;
}

.product-particles span:nth-child(2) {
  top: 70%;
  right: 15%;
  animation: float 4s infinite .5s;
}

.product-particles span:nth-child(3) {
  bottom: 20%;
  left: 10%;
  animation: float 3.5s infinite 1s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
    opacity: .2
  }

  50% {
    transform: translateY(-8px);
    opacity: .6
  }
}

.product-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-glow);
  border: 1px solid rgba(74, 222, 128, .2);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 12px;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.product-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.product-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.meta-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.meta-icon {
  font-size: 18px;
}

.meta-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.meta-value.highlight {
  color: var(--gold-light);
}

.meta-value.stock-green {
  color: var(--green);
}

.buy-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
}

.buy-button-quick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--gold-gradient);
  border: none;
  border-radius: 12px;
  padding: 16px 22px;
  color: #0a0a0a;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(212, 160, 23, .35);
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}

.buy-button-quick::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerEffect 2.5s infinite;
}

.buy-button-quick:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(212, 160, 23, .5);
}

.buy-button-quick:active {
  transform: translateY(0);
}

.buy-button-quick:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.buy-button-quick:disabled::after {
  display: none;
}

.quick-icon {
  font-size: 18px;
  animation: pulse-glow 2s infinite;
  position: relative;
  z-index: 1;
}

@keyframes pulse-glow {

  0%,
  100% {
    filter: brightness(1)
  }

  50% {
    filter: brightness(1.5)
  }
}

.quick-text {
  flex: 1;
  text-align: left;
  position: relative;
  z-index: 1;
}

.buy-button-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: 1px solid rgba(212, 160, 23, .3);
  border-radius: 10px;
  padding: 11px 18px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.buy-button-modal:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.buy-button-modal:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.buy-price {
  background: rgba(0, 0, 0, .18);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0a0a0a;
  white-space: nowrap;
}

/* ===== QUICK STATS ===== */
.quick-stats {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 28px;
  margin-bottom: 28px;
}

.qs-item {
  flex: 1;
  text-align: center;
}

.qs-num {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--gold-light);
}

.qs-num.success {
  color: var(--green);
}

.qs-num.pending {
  color: var(--amber);
}

.qs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.qs-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== ORDERS ===== */
.orders-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.orders-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-light);
}

.refresh-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
}

.refresh-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all .25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.order-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
  transform: translateX(4px);
}

.order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.order-status.success {
  color: var(--green);
  background: var(--green-glow);
}

.order-status.pending {
  color: var(--amber);
  background: rgba(251, 191, 36, .08);
}

.order-status.failed {
  color: var(--red);
  background: rgba(248, 113, 113, .08);
}

.order-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.order-time {
  font-size: 11px;
  color: var(--text-muted);
}

.order-mail-row,
.order-otp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}

.order-mail-label,
.order-otp-label {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 65px;
}

.order-mail-value {
  color: var(--text-2);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-otp-value {
  color: var(--text-muted);
  flex: 1;
}

.order-otp-value.has-code {
  color: var(--gold-light);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
}

.order-btn {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
  transition: all .15s;
  white-space: nowrap;
}

.order-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.order-btn.otp-copy-btn {
  border-color: rgba(212, 160, 23, .4);
  color: var(--gold-light);
  background: rgba(212, 160, 23, .08);
  font-weight: 700;
  letter-spacing: .3px;
  transition: all .15s;
}

.order-btn.otp-copy-btn:hover {
  background: rgba(212, 160, 23, .18);
  border-color: var(--gold);
}

.order-btn.copy-flash-btn {
  font-size: 13px;
  padding: 4px 8px;
  transition: all .2s;
}

.order-btn.copy-flash-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.order-btn.recheck-btn {
  border-color: rgba(96, 165, 250, .35);
  color: #60a5fa;
  background: rgba(96, 165, 250, .07);
  animation: recheck-pulse 3s infinite;
}

.order-btn.recheck-btn:hover {
  background: rgba(96, 165, 250, .15);
  border-color: #60a5fa;
  animation: none;
}

.order-btn.recheck-btn.loading {
  animation: none;
  opacity: .7;
}

@keyframes recheck-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0)
  }

  50% {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .15)
  }
}


.order-bottom {
  font-size: 11.5px;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.empty-orders {
  text-align: center;
  padding: 44px 16px;
  color: var(--text-muted);
}

.empty-orders .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-orders p {
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-orders span {
  font-size: 12px;
  opacity: .7;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
  animation: fadeIn .2s ease;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  padding: 30px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  z-index: 999;
  pointer-events: auto;
}

.modal-x:hover {
  color: var(--text);
}

.modal-top {
  text-align: center;
  margin-bottom: 24px;
}

.modal-emoji {
  font-size: 36px;
  margin-bottom: 10px;
}

.modal-top h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.modal-top p {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-content {
  margin-bottom: 22px;
}

.modal-field {
  margin-bottom: 16px;
}

.modal-field label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  background: var(--surface-2);
  border: none;
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 700;
  transition: background .15s;
}

.qty-btn:hover {
  background: var(--surface-3);
}

.qty-control input {
  width: 64px;
  height: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.qty-control input:focus {
  outline: none;
}

.modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--text-2);
}

.modal-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 0;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 17px;
  font-weight: 700;
}

.modal-total-row strong {
  color: var(--gold-light);
}

.confirm-btn {
  width: 100%;
  background: var(--gold-gradient);
  border: none;
  border-radius: 12px;
  padding: 15px;
  color: #0a0a0a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 160, 23, .3);
  transition: all .2s;
  position: relative;
  overflow: hidden;
}

.confirm-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmerEffect 2.5s infinite;
}

.confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(212, 160, 23, .4);
}

.confirm-btn:active {
  transform: translateY(0);
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== PAGE WRAP ===== */
.page-wrap {
  margin-left: var(--sidebar-w);
  padding: 32px 36px;
  max-width: 820px;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--gold-light);
}

.page-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ===== API PAGE ===== */
.api-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.api-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-method {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.api-method.get {
  background: var(--green-glow);
  color: var(--green);
}

.api-method.post {
  background: var(--gold-glow);
  color: var(--gold);
}

.code-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-2);
  line-height: 1.7;
}

/* ===== BALANCE PAGE ===== */
.balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.balance-display {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.balance-label {
  font-size: 12px;
  color: var(--text-muted);
}

.topup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.topup-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--gold-light);
}

/* ===== FORM FIELDS ===== */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: all .15s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.field input::placeholder {
  color: var(--text-muted);
  opacity: .6;
}

.btn {
  border: 0;
  cursor: pointer;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: #0a0a0a;
  transition: all .15s ease;
  width: 100%;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gold-gradient);
  box-shadow: 0 4px 16px rgba(212, 160, 23, .2);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.footer a {
  color: var(--gold);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .6);
  }

  .mobile-header {
    display: flex;
  }

  .content {
    margin-left: 0;
    padding: 74px 16px 60px;
  }

  .page-wrap {
    margin-left: 0;
    padding: 74px 16px 40px;
  }

  .product-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }

  .product-visual {
    width: 100%;
    height: 100px;
  }

  .product-meta {
    gap: 8px;
  }

  .meta-block {
    padding: 10px 12px;
  }

  .buy-actions {
    max-width: 100%;
  }

  .balance-grid {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: auto 1fr auto;
  }

  .order-time {
    display: none;
  }
}

@media (max-width: 480px) {
  .product-name {
    font-size: 22px;
  }

  .quick-stats {
    padding: 14px 16px;
  }

  .qs-num {
    font-size: 22px;
  }

  .balance-amount {
    font-size: 36px;
  }
}

/* ===== LICENSE PAGE ===== */
.license-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface-2);
}

.tab-btn.active {
  color: var(--gold-light);
  background: var(--gold-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.license-section-title {
  margin-bottom: 20px;
}

.license-section-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.license-section-title p {
  font-size: 13px;
  color: var(--text-muted);
}

.pkg-group {
  margin-bottom: 24px;
}

.pkg-group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.pkg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  transition: all .2s;
}

.pkg-card:hover {
  border-color: rgba(212, 160, 23, .4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.pkg-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.pkg-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  line-height: 1.4;
}

.pkg-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pkg-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.pkg-buy-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--gold-gradient);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.pkg-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 160, 23, .3);
}

.renew-form,
.check-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: all .15s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: .6;
}

.action-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--gold-gradient);
  color: #0a0a0a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 160, 23, .3);
}

.action-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.renew-result,
.check-result {
  margin-top: 16px;
}

.result-success,
.result-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.result-success h4 {
  color: var(--green);
  margin-bottom: 10px;
}

.result-info h4 {
  color: var(--gold-light);
  margin-bottom: 10px;
}

.result-success p,
.result-info p {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.result-success code,
.result-info code {
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--gold-light);
}

.key-result-card {
  background: var(--surface);
  border: 1px solid rgba(74, 222, 128, .3);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(74, 222, 128, .08);
}

.key-result-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 14px;
}

.key-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.key-display code {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  word-break: break-all;
}

.copy-key-btn {
  padding: 6px 14px;
  border: 1px solid rgba(212, 160, 23, .3);
  border-radius: 6px;
  background: rgba(212, 160, 23, .08);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.copy-key-btn:hover {
  background: rgba(212, 160, 23, .18);
  border-color: var(--gold);
}

.key-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.my-key-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 10px;
}

.my-key-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.my-key-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.my-key-status.active {
  color: var(--green);
  background: var(--green-glow);
}

.my-key-status.expired {
  color: var(--amber);
  background: rgba(251, 191, 36, .08);
}

.my-key-status.banned {
  color: var(--red);
  background: rgba(248, 113, 113, .08);
}

.my-key-date {
  font-size: 11px;
  color: var(--text-muted);
}

.my-key-value {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.my-key-value code {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  word-break: break-all;
}

.my-key-info {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 44px 16px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .5;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 4px;
}

.empty-state span {
  font-size: 12px;
  opacity: .7;
}

@media (max-width: 768px) {
  .license-tabs {
    flex-wrap: nowrap;
  }

  .tab-btn {
    font-size: 11.5px;
    padding: 8px 10px;
  }

  .packages-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .packages-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== PREMIUM AUTHENTIC KHQR CARD DESIGN ===== */
.khqr-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.khqr-phone-frame {
  background: linear-gradient(185deg, #2d1830 0%, #150f1c 100%);
  padding: 8px 8px;
  border-radius: 18px;
  border: 4px solid #1f1a24;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.1);
  max-width: 250px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.khqr-card {
  width: 100%;
  max-width: 234px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  text-align: center;
}

.khqr-header {
  background: #e10b17;
  padding: 8px 10px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.khqr-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.khqr-logo-text {
  font-size: 17px;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.khqr-logo-text .qr-box {
  margin-left: 3px;
  padding: 1px 5px;
  background: #ffffff;
  color: #e10b17;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.khqr-body {
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
}

.khqr-merchant-name {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.khqr-amount-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 8px;
  color: #0f172a;
}

.khqr-amount-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.khqr-currency {
  font-size: 13px;
  font-weight: 700;
  margin-left: 4px;
  color: #475569;
}

.khqr-divider {
  width: 100%;
  border-top: 1.5px dashed #cbd5e1;
  margin: 4px 0 8px 0;
  height: 0;
}

.khqr-code-wrapper {
  background: #ffffff;
  padding: 4px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 6px;
}

.khqr-qr-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.khqr-qr-container img {
  width: 145px;
  height: 145px;
  display: block;
}

/* Bakong emblem centered on the QR code */
.khqr-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e10b17;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.khqr-expiry {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}

.khqr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.khqr-status-badge.awaiting {
  background: #fffbeb;
  color: #b45309;
}

.khqr-status-badge.awaiting .khqr-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #d97706;
  animation: khqr-blink 1.5s infinite ease-in-out;
}

.khqr-status-badge.completed {
  background: #dcfce7;
  color: #15803d;
}

.khqr-status-badge.completed .khqr-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #16a34a;
}

.khqr-status-badge.expired {
  background: #fef2f2;
  color: #991b1b;
}

.khqr-status-badge.expired .khqr-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #dc2626;
}

@keyframes khqr-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@media (max-width: 768px) {
  .portal-hero {
    padding: 40px 16px;
  }

  .portal-hero-title {
    font-size: 32px;
    letter-spacing: -0.8px;
  }

  .portal-hero-subtitle {
    font-size: 13px;
  }
}

/* ===== PRO PACKAGES SECTION (HOMEPAGE) ===== */
.packages-section {
  margin-top: 40px;
  margin-bottom: 20px;
}

.packages-header {
  text-align: center;
  margin-bottom: 24px;
}

.packages-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.packages-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
}

.pkg-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pkg-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--gold);
}

.pkg-card.highlight {
  border-color: var(--gold-light);
  box-shadow: 0 8px 30px var(--gold-glow);
}

.pkg-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-gradient);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pkg-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.pkg-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pkg-duration {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.pkg-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
}

.pkg-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.pkg-features li {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feat-icon {
  color: var(--green);
  font-weight: 800;
}

.pkg-btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.pkg-btn:hover {
  background: var(--surface-2);
  color: var(--gold);
}

.packages-header {
  text-align: center;
  margin-bottom: 24px;
}

.packages-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.packages-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
}

.pkg-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pkg-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--gold);
}

.pkg-card.highlight {
  border-color: var(--gold-light);
  box-shadow: 0 8px 30px var(--gold-glow);
}

.pkg-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold-gradient);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pkg-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.pkg-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.pkg-duration {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.pkg-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-light);
}

.pkg-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.pkg-features li {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.feat-icon {
  color: var(--green);
  font-weight: 800;
}

.pkg-btn {
  display: block;
  text-align: center;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.pkg-btn:hover {
  background: var(--surface-2);
  color: var(--gold);
}

.pkg-btn.primary {
  background: var(--gold-gradient);
  color: #000;
  border: none;
}

.pkg-btn.primary:hover {
  background: var(--gold-gradient-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--gold-glow);
}

/* ===== PREMIUM PORTAL HEADER FIX ===== */
.portal-header-container {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: visible;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 50;
  /* Add higher z-index so dropdown overlaps status bar */
}

.portal-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  position: relative;
  z-index: 10;
}

@media (max-width: 900px) {
  .portal-nav-links {
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .portal-navbar {
    display: none;
  }
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  animation: logoPulse 2s infinite;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(212, 160, 23, 0);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(212, 160, 23, 0.6);
    border-color: var(--gold);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(212, 160, 23, 0);
  }
}

.portal-brand-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-nav-item {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.portal-nav-item:hover {
  color: var(--text);
  transform: translateY(-0.5px);
}

.portal-nav-dropdown {
  position: relative;
}

.portal-dropdown-btn {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.portal-dropdown-btn:hover {
  color: #fff;
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.portal-dropdown-btn.active {
  background: var(--gold-glow);
  border-color: var(--gold-light);
  color: #fff;
}

.portal-dropdown-btn .arrow {
  font-size: 9px;
  transition: transform 0.3s;
  opacity: 0.9;
}

.portal-dropdown-btn.active .arrow {
  transform: rotate(180deg);
}

.portal-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a;
  /* Premium solid black */
  border: 1px solid rgba(212, 160, 23, 0.6);
  /* Gold border */
  border-radius: 8px;
  padding: 8px 0;
  width: 240px;
  margin-top: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 160, 23, 0.15);
  /* Deep shadow with gold glow */
  z-index: 100;
}

.portal-dropdown-content.show {
  display: block;
  animation: dropdownFadeIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.portal-dropdown-content a {
  display: block;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.portal-dropdown-content a:hover {
  background: rgba(212, 160, 23, 0.12);
  /* Subtle gold tint */
  color: #fde047;
  /* Bright gold text */
  border-left-color: #d4a017;
  /* Solid gold indicator */
}

.portal-dropdown-content a.disabled-link {
  color: #64748b;
  opacity: 0.7;
}

.portal-dropdown-content a.disabled-link:hover {
  background: transparent;
  color: #64748b;
  border-left-color: transparent;
}

.portal-right-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  color: var(--text-muted);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.portal-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 18px;
  background: var(--text);
  color: var(--bg);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
}

.portal-hero {
  padding: 45px 24px;
  text-align: center;
  position: relative;
}

.portal-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.portal-hero-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 500;
}
/* ABA PayWay Styles */

    /* ABA PayWay Card */
    .aba-card-wrap { display:inline-block; text-align:center; }
    .aba-card { background:#fff; border-radius:18px; overflow:hidden; box-shadow:0 8px 32px rgba(0,0,0,0.28); width:320px; max-width:95vw; margin:0 auto; display:inline-block; text-align:left; }
    .aba-card-header { background:#C8202F; padding:16px 20px; display:flex; align-items:center; justify-content:center; }
    .aba-logo-text-static { color:#fff; font-size:24px; font-weight:900; letter-spacing:2px; font-family:'Inter',sans-serif; }
    .aba-card-body { background:#fff; padding:18px 20px 20px; }
    .aba-merchant-name { font-size:17px; font-weight:800; color:#1a1a1a; margin-bottom:2px; }
    .aba-qr-wrap { text-align:center; margin:14px 0 10px; }
    .aba-qr-img { width:210px; height:210px; border:1.5px solid #eee; border-radius:8px; display:block; margin:0 auto; }
    .aba-scan-hint { font-size:12px; color:#666; text-align:center; margin-bottom:12px; line-height:1.5; }
    .aba-amount-row { display:flex; justify-content:space-between; align-items:center; background:#f9f9f9; border-radius:10px; padding:10px 14px; margin-bottom:10px; }
    .aba-amount-label { font-size:13px; color:#555; font-weight:500; }
    .aba-amount-val { font-size:20px; font-weight:900; color:#C8202F; }
    .aba-currency { font-size:14px; font-weight:700; color:#C8202F; margin-left:3px; }
    .aba-timer-row { font-size:12px; color:#888; text-align:center; margin-bottom:8px; }
    .aba-status-row { display:flex; align-items:center; gap:8px; justify-content:center; font-size:13px; color:#555; font-weight:600; }
    .aba-status-dot { width:9px; height:9px; border-radius:50%; background:#f59e0b; display:inline-block; animation:abaPulse 1.5s infinite; flex-shrink:0; }
    .aba-status-dot.paid { background:#22c55e; animation:none; }
    @keyframes abaPulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
  