/* ==========================================================================
   EARNHEX · Premium Brand Stylesheet
   Theme: Deep purple + honey gold + hexagonal motifs
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* === BRAND COLORS === */
  /* Primary: Deep royal purple (trust, premium, network) */
  --brand-50:       #f5f3ff;
  --brand-100:      #ede9fe;
  --brand-200:      #ddd6fe;
  --brand-300:      #c4b5fd;
  --brand-400:      #a78bfa;
  --brand-500:      #8b5cf6;   /* main */
  --brand-600:      #7c3aed;
  --brand-700:      #6d28d9;
  --brand-800:      #5b21b6;
  --brand-900:      #4c1d95;
  --brand-950:      #2e1065;

  /* Accent: Honey gold (earnings, hexagon, premium) */
  --gold-50:        #fffbeb;
  --gold-100:       #fef3c7;
  --gold-200:       #fde68a;
  --gold-300:       #fcd34d;
  --gold-400:       #fbbf24;
  --gold-500:       #f59e0b;   /* main */
  --gold-600:       #d97706;
  --gold-700:       #b45309;

  /* Surfaces */
  --bg-page:        #0a0817;
  --bg-elev:        #14102b;
  --bg-card:        #ffffff;
  --bg-card-dark:   #1c1538;
  --bg-soft:        #faf8ff;

  /* Lines & shadows */
  --line:           #ece8f7;
  --line-dark:      #2a2150;
  --line-strong:    #ddd6fe;

  /* Text */
  --text:           #1a1235;
  --text-muted:     #6b6488;
  --text-soft:      #9b95b5;
  --text-inv:       #f9f7ff;
  --text-muted-inv: #b5adcf;

  /* Status */
  --success:        #10b981;
  --success-bg:     #d1fae5;
  --warning:        #f59e0b;
  --warning-bg:     #fef3c7;
  --danger:         #ef4444;
  --danger-bg:      #fee2e2;
  --info:           #3b82f6;
  --info-bg:        #dbeafe;

  /* === GRADIENTS === */
  --grad-hero:      linear-gradient(135deg, #4c1d95 0%, #7c3aed 40%, #f59e0b 100%);
  --grad-brand:     linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
  --grad-gold:      linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --grad-purple-gold: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #f59e0b 100%);

  /* Geometry */
  --radius:         14px;
  --radius-sm:      8px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  /* Shadows */
  --shadow-sm:      0 1px 3px rgba(76, 29, 149, 0.08);
  --shadow:         0 4px 12px -2px rgba(76, 29, 149, 0.12), 0 2px 4px -1px rgba(76, 29, 149, 0.06);
  --shadow-lg:      0 20px 40px -12px rgba(76, 29, 149, 0.20);
  --shadow-glow:    0 0 32px rgba(139, 92, 246, 0.35);
  --shadow-gold:    0 8px 24px -8px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   Hexagon background patterns
   ========================================================================== */
.hex-bg {
  background-color: var(--bg-page);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245, 158, 11, 0.10), transparent),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60' opacity='0.04'><polygon points='30,2 56,16 56,44 30,58 4,44 4,16' fill='none' stroke='%23a78bfa' stroke-width='1'/></svg>");
  background-size: auto, auto, 60px 60px;
}

/* ==========================================================================
   Base
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-700); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-900); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--brand-50);
  color: var(--brand-800);
  border-radius: 4px;
  border: 1px solid var(--brand-100);
}

.muted     { color: var(--text-muted); }
.small     { font-size: 0.85rem; }
.text-ok   { color: var(--success); }
.text-err  { color: var(--danger); }
.text-gold { color: var(--gold-600); }
.num       { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.brand-text {
  background: var(--grad-purple-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

/* ==========================================================================
   Hexagonal logo
   ========================================================================== */
.hex-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.hex-logo:hover { text-decoration: none; }

.hex-logo-mark {
  width: 32px;
  height: 36px;
  background: var(--grad-brand);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}
.hex-logo-mark::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 16px;
  background: var(--grad-gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  z-index: 1;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  border: 0;
  box-shadow: 0 4px 14px -2px rgba(124, 58, 237, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.55);
  filter: brightness(1.05);
  color: #fff;
}

.btn-gold {
  background: var(--grad-gold);
  color: #4c1d95;
  font-weight: 700;
  border: 0;
  box-shadow: var(--shadow-gold);
}
.btn-gold:hover { filter: brightness(1.05); box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.55); color: #4c1d95; }

.btn-success { background: var(--success); color: #fff; border: 0; }
.btn-success:hover { background: #059669; color: #fff; }

.btn-danger { background: var(--danger); color: #fff; border: 0; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; border: 0; }
.btn-warning:hover { background: var(--gold-600); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--text-inv);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-ghost { background: transparent; border: 0; color: var(--brand-700); }
.btn-ghost:hover { background: var(--brand-50); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ==========================================================================
   Forms
   ========================================================================== */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: all 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}
textarea { resize: vertical; min-height: 80px; }

input::placeholder, textarea::placeholder { color: var(--text-soft); }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover { box-shadow: var(--shadow); }

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 4px solid;
}
.alert-success { background: var(--success-bg); border-color: var(--success); color: #065f46; }
.alert-error,
.alert-danger  { background: var(--danger-bg); border-color: var(--danger); color: #991b1b; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); color: #92400e; }
.alert-info    { background: var(--info-bg); border-color: var(--info); color: #1e40af; }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--brand-100);
  color: var(--brand-800);
}
.badge-success { background: var(--success-bg); color: #047857; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger  { background: var(--danger-bg);  color: #b91c1c; }
.badge-info    { background: var(--info-bg);    color: #1e40af; }
.badge-muted   { background: #f1f0f5; color: var(--text-muted); }
.badge-gold    { background: var(--grad-gold); color: #4c1d95; }

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(139, 92, 246, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(245, 158, 11, 0.20), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(168, 85, 247, 0.15), transparent 60%);
  position: relative;
  overflow: hidden;
}
.auth-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80' opacity='0.04'><polygon points='40,4 74,22 74,58 40,76 6,58 6,22' fill='none' stroke='%23ffffff' stroke-width='1'/></svg>");
  background-size: 80px 80px;
  pointer-events: none;
}

.auth-card {
  background: #fff;
  width: 100%;
  max-width: 460px;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.auth-card .hex-logo {
  margin: 0 auto 1.5rem;
  justify-content: center;
}
.auth-card h1 {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 0.25em;
}
.auth-card p.muted { text-align: center; margin-bottom: 1.5rem; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .btn { margin-top: 8px; }
.auth-card .meta {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   APP TOPBAR (logged-in)
   ========================================================================== */
.app-body { background: var(--bg-soft); min-height: 100vh; }

.topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.topbar .brand {
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  background: var(--grad-purple-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.topbar-nav a {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
}
.topbar-nav a:hover { background: var(--brand-50); color: var(--brand-700); text-decoration: none; }
.topbar-nav a.admin-link {
  background: var(--grad-brand);
  color: #fff;
  font-weight: 600;
}
.topbar-nav a.admin-link:hover { filter: brightness(1.1); color: #fff; }
.topbar-nav a.logout-link { color: var(--danger); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header { margin-bottom: 28px; }
.page-header h1 {
  font-size: 1.85rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.page-header p { color: var(--text-muted); margin: 0; font-size: 15px; }

/* ==========================================================================
   WALLET CARDS — dashboard headline
   ========================================================================== */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.wallet-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wallet-card.referral {
  background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 60%, #a855f7 100%);
  box-shadow: 0 12px 28px -10px rgba(76, 29, 149, 0.5);
}
.wallet-card.event {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 60%, #fbbf24 100%);
  color: #1a1235;
  box-shadow: 0 12px 28px -10px rgba(245, 158, 11, 0.5);
}
.wallet-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 160px;
  height: 180px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'><polygon points='40,4 74,22 74,58 40,76 6,58 6,22' fill='none' stroke='%23ffffff' stroke-width='2' opacity='0.18'/></svg>");
  background-size: 80px 80px;
  pointer-events: none;
}
.wallet-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin-bottom: 6px;
}
.wallet-amount {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.wallet-sub { font-size: 13px; opacity: 0.85; margin-top: 6px; }

/* Generic metric grid */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.metric {
  background: #fff;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--grad-brand);
}
.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 6px;
}
.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--brand-50); }
.table.compact th, .table.compact td { padding: 8px 12px; font-size: 13px; }

.table .empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Tabs / pager / filters
   ========================================================================== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--line);
}
.tab {
  padding: 10px 18px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
}
.tab:hover { color: var(--brand-700); text-decoration: none; }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }

.pager {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 20px;
}
.pager a {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.pager a:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-300); text-decoration: none; }
.pager a.active { background: var(--grad-brand); color: #fff; border-color: transparent; }

.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar input {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
  min-width: 200px;
}

/* Definition lists */
dl.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 16px;
  margin: 0;
}
dl.kv dt { color: var(--text-muted); font-size: 13px; font-weight: 500; }
dl.kv dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }

/* Copy row */
.copy-row {
  display: flex;
  align-items: stretch;
  background: var(--brand-50);
  border: 1.5px solid var(--brand-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.copy-row code {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  color: var(--brand-800);
  font-weight: 600;
  overflow-x: auto;
  white-space: nowrap;
}
.copy-row button {
  padding: 0 18px;
  background: var(--grad-brand);
  color: #fff;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.copy-row button:hover { filter: brightness(1.1); }

/* ==========================================================================
   EVENT CARDS
   ========================================================================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.event-card {
  background: #fff;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.event-card::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 110px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'><polygon points='40,4 74,22 74,58 40,76 6,58 6,22' fill='none' stroke='%23a78bfa' stroke-width='1.5' opacity='0.25'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-300);
}
.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.event-card h3 { margin: 0; font-size: 16px; flex: 1; line-height: 1.3; }
.event-points {
  background: var(--grad-gold);
  color: #4c1d95;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow-gold);
}
.event-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  flex: 1;
  min-height: 40px;
  line-height: 1.55;
}
.event-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.file-label {
  display: block;
  padding: 14px;
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.file-label:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
.file-label input { display: none; }

/* ==========================================================================
   PRODUCT CARDS
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}
.product-card:hover {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.product-category {
  background: var(--brand-100);
  color: var(--brand-800);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text);
}
.product-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
  flex: 1;
  min-height: 40px;
  line-height: 1.55;
}
.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.product-price strong {
  font-size: 18px;
  background: var(--grad-purple-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lic-key { font-size: 11px; color: var(--text-muted); width: 100%; }
.lic-key code {
  background: var(--brand-50);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  border-color: var(--brand-100);
}

/* ==========================================================================
   PROFILE
   ========================================================================== */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-grid .card { padding: 26px; }
.profile-grid .card h3 {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
}
.profile-grid .card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-grid .card .btn { margin-top: 18px; width: 100%; }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */
.landing-body {
  margin: 0;
  background: var(--bg-page);
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
}

.landing-hero {
  min-height: 100vh;
  background: var(--bg-page);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 92, 246, 0.30), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(245, 158, 11, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 0% 50%, rgba(168, 85, 247, 0.15), transparent 60%);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><polygon points='50,5 90,28 90,72 50,95 10,72 10,28' fill='none' stroke='%23ffffff' stroke-width='1' opacity='0.04'/></svg>");
  background-size: 100px 100px;
  pointer-events: none;
  animation: float 60s linear infinite;
}
@keyframes float {
  from { background-position: 0 0; }
  to   { background-position: 100px 100px; }
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px 80px;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-300);
  margin-bottom: 24px;
}
.hero-badge::before {
  content: "";
  width: 8px;
  height: 9px;
  background: var(--grad-gold);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.hero-content h1 {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  color: #fff;
}
.hero-content h1 .accent {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 620px;
  line-height: 1.55;
  margin: 0 0 40px;
}
.hero-cta { margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-large { padding: 16px 36px; font-size: 16px; }
.btn-hero {
  background: var(--grad-gold);
  color: #4c1d95;
  font-weight: 700;
  box-shadow: 0 12px 30px -8px rgba(245, 158, 11, 0.5);
}
.btn-hero:hover {
  box-shadow: 0 16px 40px -8px rgba(245, 158, 11, 0.65);
  filter: brightness(1.05);
  color: #4c1d95;
}
.hero-note { font-size: 13px; color: rgba(255, 255, 255, 0.5); }

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  max-width: 700px;
}
.hero-stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.features {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.features-title {
  text-align: center;
  margin-bottom: 50px;
}
.features-title h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: #fff;
}
.features-title p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}
.feature-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-purple-gold);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(255, 255, 255, 0.05);
}
.feature-card:hover::after { opacity: 1; }

.feature-hex {
  width: 56px;
  height: 64px;
  background: var(--grad-brand);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 26px;
  box-shadow: 0 8px 24px -6px rgba(139, 92, 246, 0.4);
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}
.feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;
}

.landing-cta {
  padding: 80px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(245, 158, 11, 0.1));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.landing-cta h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  margin: 0 0 16px;
  color: #fff;
}
.landing-cta p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 28px;
  font-size: 17px;
}

.landing-footer {
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}
.landing-footer p { margin: 4px 0; }
.footer-note { font-size: 12px; }

/* ==========================================================================
   Misc utilities
   ========================================================================== */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
  background: #fff;
  border-radius: var(--radius);
  border: 2px dashed var(--line);
  grid-column: 1 / -1;
}
.empty-state::before {
  content: "";
  display: block;
  width: 56px;
  height: 64px;
  margin: 0 auto 16px;
  background: var(--brand-100);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.credit { color: var(--success); font-weight: 700; }
.debit  { color: var(--danger);  font-weight: 700; }

details.action-pop { display: inline-block; position: relative; }
details.action-pop summary { list-style: none; cursor: pointer; }
details.action-pop summary::-webkit-details-marker { display: none; }
.popover-form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  padding: 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  min-width: 240px;
  z-index: 10;
  display: grid;
  gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .container { padding: 20px 16px; }
  .topbar-inner { padding: 12px 16px; gap: 8px; }
  .topbar-nav { gap: 0; }
  .topbar-nav a { padding: 6px 8px; font-size: 12px; }
  .topbar .brand { font-size: 1rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .wallet-amount { font-size: 1.9rem; }
  .landing-nav { padding: 16px 20px; }
  .features { padding: 60px 20px; }
  .hero-stats { gap: 24px; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 8px 10px; }
}
