:root {
  --bg: #081120;
  --bg-2: #0f1a2b;
  --card: rgba(13, 23, 42, 0.72);
  --card-soft: rgba(21, 32, 56, 0.82);
  --line: rgba(255,255,255,.09);
  --text: #e8eefc;
  --muted: #97a7c7;
  --primary: #6f8cff;
  --primary-2: #77e1ff;
  --success: #2dd4bf;
  --danger: #fb7185;
  --warning: #fbbf24;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 24px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, system-ui, sans-serif; color: var(--text); background: radial-gradient(circle at top, #10203d, #060b15 55%); }
body { position: relative; overflow-x: hidden; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.bg-orb { position: fixed; border-radius: 999px; filter: blur(90px); opacity: .35; z-index: 0; pointer-events: none; }
.orb-1 { width: 360px; height: 360px; background: #4f7cff; top: -60px; left: -80px; }
.orb-2 { width: 420px; height: 420px; background: #00d4ff; bottom: -140px; right: -120px; }
.bg-grid { position: fixed; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 34px 34px; opacity: .06; pointer-events: none; }
.topbar, .shell { position: relative; z-index: 1; }
.topbar { max-width: 1280px; margin: 0 auto; padding: 22px 20px; display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.brand { display: flex; gap: 14px; align-items: center; }
.brand-logo { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; font-weight: 800; box-shadow: var(--shadow); }
.brand-title { font-weight: 800; font-size: 18px; }
.brand-subtitle { color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.balance-pill { background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.balance-pill strong { color: white; }
.shell { max-width: 1280px; margin: 0 auto; padding: 8px 20px 40px; }
.card { background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(18px); border-radius: var(--radius); box-shadow: var(--shadow); }
.soft { background: var(--card-soft); }
.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; }
.hero { min-height: 72vh; display: grid; grid-template-columns: 1.2fr .9fr; gap: 28px; padding: 34px; align-items: center; }
.badge { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(111, 140, 255, .15); color: #dfe7ff; border: 1px solid rgba(111,140,255,.25); font-size: 13px; }
.badge-dark { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.08); }
.hero h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.04; margin: 18px 0 16px; max-width: 10ch; }
.hero p { color: var(--muted); max-width: 56ch; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats { display: grid; gap: 16px; }
.stat-box { padding: 22px; }
.stat-box span { color: #b3c0e2; font-size: 13px; }
.stat-box strong { display: block; font-size: 24px; margin: 8px 0 6px; }
.stat-box small { color: var(--muted); }
.btn { border: 0; border-radius: 16px; padding: 12px 18px; cursor: pointer; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 15px 22px; font-weight: 700; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; box-shadow: 0 12px 30px rgba(87,124,255,.35); }
.btn-ghost { background: rgba(255,255,255,.06); color: white; border: 1px solid var(--line); }
.btn-danger { background: rgba(251,113,133,.12); color: #ffd9df; border: 1px solid rgba(251,113,133,.28); }
.dashboard { display: grid; grid-template-columns: 290px 1fr; gap: 20px; }
.sidebar { padding: 20px; align-self: start; position: sticky; top: 20px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 12px; background: rgba(255,255,255,.04); border-radius: 18px; border: 1px solid var(--line); }
.avatar { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, #1a2f55, #3d64ff); font-weight: 800; font-size: 22px; }
.profile-card p { margin: 2px 0 0; color: var(--muted); }
.nav-list { display: grid; gap: 8px; margin-top: 18px; }
.nav-item { width: 100%; text-align: left; background: transparent; color: #dbe5ff; border: 1px solid transparent; padding: 14px 16px; border-radius: 16px; cursor: pointer; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
.content-area { min-width: 0; }
.view { display: none; }
.view.active { display: block; }
.overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.metric { padding: 22px; }
.metric span { color: var(--muted); }
.metric strong { display: block; margin-top: 12px; font-size: 32px; }
.metric small { color: var(--muted); display: block; margin-top: 8px; }
.wide { grid-column: 1 / -1; }
.promo { display: flex; justify-content: space-between; gap: 20px; padding: 26px; align-items: end; }
.promo h2 { margin: 12px 0 10px; }
.promo p { color: var(--muted); max-width: 60ch; }
.promo-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-card { padding: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.form-grid label, .stack-form label { display: grid; gap: 8px; }
.form-grid .grow { grid-column: span 1; }
input { width: 100%; background: rgba(255,255,255,.05); color: white; border: 1px solid var(--line); padding: 14px 16px; border-radius: 16px; outline: none; }
input::placeholder { color: #7d8fb4; }
input:focus { border-color: rgba(119,225,255,.5); box-shadow: 0 0 0 4px rgba(119,225,255,.12); }
.topup-result { margin-top: 22px; display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.qr-card, .invoice-card, .info-panel { padding: 20px; border: 1px solid var(--line); border-radius: 22px; }
.qr-card img { width: 100%; max-width: 280px; display: block; margin: 0 auto; background: white; padding: 14px; border-radius: 18px; }
.qr-actions { display: grid; gap: 10px; margin-top: 16px; }
.invoice-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.invoice-row:last-child { border-bottom: 0; }
.invoice-row span { color: var(--muted); }
.invoice-row.highlight strong { color: #fff1a6; }
.catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.catalog-card { padding: 18px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid var(--line); cursor: pointer; }
.catalog-card:hover { border-color: rgba(119,225,255,.3); transform: translateY(-1px); }
.catalog-card h3 { margin: 10px 0 8px; }
.catalog-card p { margin: 0; color: var(--muted); font-size: 14px; }
.purchase-form { grid-template-columns: repeat(4, 1fr) auto; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
th { color: #d8e1f6; background: rgba(255,255,255,.03); }
td { color: #bfd0f5; }
.status-pill { display: inline-flex; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-paid { background: rgba(45,212,191,.14); color: #8cf7e4; }
.status-pending { background: rgba(251,191,36,.14); color: #ffe39b; }
.status-expired, .status-cancelled { background: rgba(251,113,133,.12); color: #ffc3ce; }
.account-grid, .section-stack { display: grid; gap: 18px; }
.account-grid { grid-template-columns: 1fr 1fr; }
.stack-form { display: grid; gap: 14px; }
.panel-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.floating-panel { pointer-events: auto; position: fixed; right: 20px; top: 88px; width: min(420px, calc(100vw - 40px)); background: rgba(8,17,32,.93); border: 1px solid var(--line); border-radius: 24px; backdrop-filter: blur(20px); box-shadow: var(--shadow); padding: 24px; }
.panel-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: white; cursor: pointer; }
.divider { border: 0; height: 1px; background: rgba(255,255,255,.08); margin: 18px 0; }
.link-btn { background: transparent; color: #9dccff; border: 0; padding: 0; margin-top: 10px; cursor: pointer; }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 30; }
.toast { min-width: 280px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(8,17,32,.94); box-shadow: var(--shadow); }
.toast.success { border-color: rgba(45,212,191,.24); }
.toast.error { border-color: rgba(251,113,133,.24); }
@media (max-width: 1080px) {
  .hero, .dashboard { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .overview-grid { grid-template-columns: 1fr; }
  .catalog { grid-template-columns: 1fr 1fr; }
  .purchase-form, .form-grid, .topup-result, .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; }
  .hero { padding: 24px; min-height: auto; }
  .hero h1 { max-width: none; }
  .catalog { grid-template-columns: 1fr; }
  .floating-panel { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; }
}
