/* ═══════════════════════════════════════════════════════════════
   YIELDORA — styles.css
   Design: Institutional crypto · DM Serif Display + IBM Plex Sans
   Default: dark (Bloomberg Terminal meets private banking)
   ═══════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=IBM+Plex+Sans:wght@300;400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── Design Tokens — Dark (default) ───────────────────────────── */
:root {
  /* Base */
  --bg-base:          #080C14;
  --bg-surface:       #0D1525;
  --surface-1:        #111827;
  --surface-2:        #1A2436;
  --surface-border:   #1F2D42;
  --surface-hover:    #1E2D44;

  /* Accent */
  --c-amber:          #F0B429;
  --c-amber-dim:      rgba(240, 180, 41, 0.12);
  --c-amber-border:   rgba(240, 180, 41, 0.25);
  --c-gold:           #F0B429;  /* alias used in admin */
  --c-green:          #00D4AA;
  --c-green-dim:      rgba(0, 212, 170, 0.10);
  --c-red:            #E0556B;
  --c-red-dim:        rgba(224, 85, 107, 0.10);
  --c-blue:           #3B82F6;
  --c-blue-soft:      #60A5FA;
  --c-blue-dim:       rgba(59, 130, 246, 0.12);

  /* Text */
  --text-primary:     #E8EDF5;
  --text-secondary:   #8B9BB4;
  --text-muted:       #4E627A;
  --text-link:        #60A5FA;

  /* Typography */
  --font-display:     'DM Serif Display', Georgia, serif;
  --font-body:        'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:        'IBM Plex Mono', 'Courier New', monospace;

  /* Scale */
  --radius-sm:        4px;
  --radius-md:        8px;
  --radius-lg:        12px;
  --radius-xl:        16px;

  /* Transitions */
  --t-fast:           150ms ease;
  --t-mid:            250ms ease;
  --t-slow:           400ms ease;

  /* Shadows */
  --shadow-card:      0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25);
  --shadow-glow-amber: 0 0 20px rgba(240, 180, 41, 0.15);
  --shadow-glow-green: 0 0 16px rgba(0, 212, 170, 0.15);
}

/* ── Design Tokens — Light ─────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:          #F4F6FA;
  --bg-surface:       #FFFFFF;
  --surface-1:        #FFFFFF;
  --surface-2:        #F0F4FA;
  --surface-border:   #D8E0ED;
  --surface-hover:    #EAF0FA;

  --c-amber:          #C9860A;
  --c-amber-dim:      rgba(201, 134, 10, 0.08);
  --c-amber-border:   rgba(201, 134, 10, 0.20);
  --c-gold:           #C9860A;
  --c-green:          #0E9D7A;
  --c-green-dim:      rgba(14, 157, 122, 0.08);
  --c-red:            #C8314A;
  --c-red-dim:        rgba(200, 49, 74, 0.08);
  --c-blue:           #2563EB;
  --c-blue-soft:      #3B82F6;
  --c-blue-dim:       rgba(37, 99, 235, 0.08);

  --text-primary:     #0F1A2E;
  --text-secondary:   #4A607E;
  --text-muted:       #8B9BB4;
  --text-link:        #2563EB;

  --shadow-card:      0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-glow-amber: none;
  --shadow-glow-green: none;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background grid atmosphere ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(240,180,41,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,180,41,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
}
body > * { position: relative; z-index: 1; }

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: 0.75rem; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--t-fast), opacity var(--t-fast);
}
a:hover { opacity: 0.8; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

ul { list-style: none; }
strong { color: var(--text-primary); font-weight: 600; }
small { font-size: 0.8rem; color: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
section {
  margin-bottom: 3rem;
}

/* ── Header ────────────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.5rem;
  height: 64px;
  background: rgba(8, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
[data-theme="light"] header {
  background: rgba(244, 246, 250, 0.95);
}

.logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.site-logo {
  height: 48px;
  width: auto;
  border-radius: var(--radius-sm);
  display: block;
}

/* spacer between logo and nav */
header .desktop-nav { margin-left: auto; }

.desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.desktop-nav ul li a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.desktop-nav ul li a:hover {
  color: var(--text-primary);
  background: var(--surface-2);
  opacity: 1;
}

/* ── Theme Toggle ──────────────────────────────────────────────── */
.theme-toggle {
  flex-shrink: 0;
  width: 36px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: var(--surface-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color var(--t-fast), background var(--t-fast);
  margin-left: 0.75rem;
}
.theme-toggle:hover {
  border-color: var(--c-amber-border);
  background: var(--c-amber-dim);
}

/* ── Mobile Menu Button ────────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: auto;
  padding: 6px;
}
.mobile-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-mid);
}
.mobile-menu-btn:hover span { background: var(--text-primary); }

/* ── Mobile Sidebar ────────────────────────────────────────────── */
.mobile-sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--surface-1);
  border-left: 1px solid var(--surface-border);
  z-index: 1000;
  transition: right var(--t-slow) cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-sidebar.active { right: 0; }

.sidebar-content {
  padding: 1.5rem;
}
.sidebar-content ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar-content ul li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
  border-left: 2px solid transparent;
}
.sidebar-content ul li a:hover {
  color: var(--text-primary);
  background: var(--surface-2);
  border-left-color: var(--c-amber);
  opacity: 1;
  padding-left: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  float: right;
  transition: color var(--t-fast);
}
.close-btn:hover { color: var(--text-primary); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.card:hover {
  border-color: var(--c-amber-border);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn,
button[type="submit"],
input[type="submit"],
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bg-base);
  background: var(--c-amber);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), opacity var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn:hover,
button[type="submit"]:hover,
a.btn:hover {
  background: #F5C547;
  box-shadow: 0 0 18px rgba(240,180,41,0.4);
  transform: translateY(-1px);
  opacity: 1;
}
.btn:active { transform: translateY(0); }

.btn-danger {
  background: var(--c-red) !important;
  color: #fff !important;
}
.btn-danger:hover {
  background: #E8697A !important;
  box-shadow: 0 0 18px rgba(224,85,107,0.35) !important;
}

.btn-sm {
  padding: 0.4rem 0.9rem !important;
  font-size: 0.78rem !important;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--c-amber);
  box-shadow: 0 0 0 3px var(--c-amber-dim);
}
input::placeholder { color: var(--text-muted); }
small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234E627A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  position: relative;
  padding: 0.85rem 1rem;
  padding-right: 2.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid transparent;
  animation: slideDown 0.3s ease;
}
.alert-success {
  background: var(--c-green-dim);
  border-color: rgba(0, 212, 170, 0.3);
  color: var(--c-green);
}
.alert-danger, .alert-error {
  background: var(--c-red-dim);
  border-color: rgba(224, 85, 107, 0.3);
  color: var(--c-red);
}
.alert-info {
  background: var(--c-blue-dim);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--c-blue-soft);
}
.alert-warning {
  background: var(--c-amber-dim);
  border-color: var(--c-amber-border);
  color: var(--c-amber);
}
.alert-close {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  line-height: 1;
}
.alert-close:hover { opacity: 1; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Tables ────────────────────────────────────────────────────── */
.market-table-container,
.transaction-table-container {
  overflow-x: auto;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
}

.market-table,
.transaction-table,
.tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.market-table th,
.transaction-table th,
.tx-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--surface-border);
  white-space: nowrap;
}
.market-table th:first-child,
.transaction-table th:first-child { border-radius: var(--radius-md) 0 0 0; }
.market-table th:last-child,
.transaction-table th:last-child { border-radius: 0 var(--radius-md) 0 0; }

.market-table td,
.transaction-table td,
.tx-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.market-table tr:last-child td,
.transaction-table tr:last-child td,
.tx-table tr:last-child td { border-bottom: none; }

.market-table tr:hover td,
.transaction-table tr:hover td,
.tx-table tr:hover td {
  background: var(--surface-hover);
  color: var(--text-primary);
}

/* Price flash animations */
.market-row.up td.price { animation: priceUp 0.6s ease; }
.market-row.down td.price { animation: priceDown 0.6s ease; }
@keyframes priceUp   { 0%,100% { background: transparent; } 30% { background: var(--c-green-dim); } }
@keyframes priceDown { 0%,100% { background: transparent; } 30% { background: var(--c-red-dim); } }

.positive { color: var(--c-green) !important; }
.negative { color: var(--c-red) !important; }
.loading-row { text-align: center; padding: 2rem 1rem !important; color: var(--text-muted); font-family: var(--font-body); }

/* Loading dot animation */
.loading-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-amber);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.8); }
}

/* ── Market Stats Bar ──────────────────────────────────────────── */
.market-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.stat-item {
  flex: 1;
  min-width: 120px;
  padding: 0.85rem 1.25rem;
  border-right: 1px solid var(--surface-border);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat-item:last-child { border-right: none; }
.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ── Index — hero section ──────────────────────────────────────── */
.welcome, .approach, .features, .requirements, .leadership {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--surface-border);
}
.welcome h3, .approach h3, .features h3, .requirements h3, .leadership h3 {
  color: var(--c-amber);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.welcome ul li, .approach ul li, .features ul li, .requirements ul li {
  padding: 0.6rem 0;
  padding-left: 1.25rem;
  border-bottom: 1px solid var(--surface-border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
}
.welcome ul li::before, .approach ul li::before,
.features ul li::before, .requirements ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--c-amber);
  font-size: 1rem;
  line-height: 1.6;
}
.welcome ul li:last-child, .approach ul li:last-child,
.features ul li:last-child, .requirements ul li:last-child { border-bottom: none; }

/* ── Testimonials ──────────────────────────────────────────────── */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.testimonial-card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.testimonial-card:hover {
  border-color: var(--c-amber-border);
  transform: translateY(-2px);
}
.testimonial-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1rem;
  position: relative;
}
.testimonial-content p::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 0;
  color: var(--c-amber-border);
  position: absolute;
  top: 0.5rem;
  left: -0.75rem;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.testimonial-author strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}
.testimonial-author span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Scroll animations ─────────────────────────────────────────── */
.animate-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-section.animate-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .animate-section { opacity: 1; transform: none; transition: none; }
}

/* ── Dashboard ─────────────────────────────────────────────────── */
.dashboard-hero {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 2rem;
}
.dashboard-hero h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text-primary);
}
.dashboard-hero p { color: var(--text-secondary); font-size: 0.95rem; margin-top: 0.25rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.balance-card {
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--c-amber-dim);
  pointer-events: none;
}
.balance-card.locked::after { background: var(--c-blue-dim); }

.balance-card h3 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.balance-amount {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.2rem;
}
.balance-btc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-amber);
  display: block;
  margin-bottom: 0.5rem;
}
.balance-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.stats-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
#live-btc-price {
  font-family: var(--font-mono);
  color: var(--c-amber);
  font-weight: 500;
}

/* Activation section */
.activation-section { margin-bottom: 2rem; }
.activation-card h3 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Plans */
.plans-section { margin-bottom: 2rem; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.plan-card {
  position: relative;
  border-top: 3px solid var(--surface-border);
  transition: border-color var(--t-mid), transform var(--t-mid);
}
.plan-card:nth-child(1) { border-top-color: var(--c-blue); }
.plan-card:nth-child(2) { border-top-color: var(--c-amber); }
.plan-card:nth-child(3) { border-top-color: var(--c-green); }
.plan-card:hover { transform: translateY(-3px); }
.plan-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.plan-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--surface-border);
}
.plan-card ul li:last-child { border-bottom: none; }

.active-plan-card {
  border-left: 3px solid var(--c-green);
}
.active-plan-card h3 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--c-green);
}
.active-plan-card p {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.past-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.past-plan-card {
  opacity: 0.7;
}
.past-plan-card h4 {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.past-plan-card p { font-size: 0.82rem; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 1.25rem;
}
.tab-btn {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
  color: var(--c-amber);
  border-bottom-color: var(--c-amber);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Transaction ID styling */
.transaction-id {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty-transactions {
  text-align: center;
  padding: 2rem !important;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
}
.empty-transactions a { color: var(--c-amber); }

/* Status badges */
.amount-positive { color: var(--c-green) !important; }
.amount-negative { color: var(--c-red) !important; }
.roi-positive    { color: var(--c-green) !important; }

.status-confirmed, .status-completed {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--c-green-dim);
  color: var(--c-green);
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
}
.status-pending {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--c-amber-dim);
  color: var(--c-amber);
  border-radius: 3px;
  font-size: 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
}

/* ── Modal ─────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-content {
  background: var(--surface-1);
  border: 1px solid var(--c-amber-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  box-shadow: var(--shadow-glow-amber), var(--shadow-card);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-content .close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: color var(--t-fast);
}
.modal-content .close:hover { color: var(--text-primary); }
.modal-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

/* ── Deposit Page ──────────────────────────────────────────────── */
.deposit-info {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.deposit-info h3 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--c-amber);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.wallet-address {
  background: var(--surface-2);
  border: 1px solid var(--c-amber-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.address-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--surface-border);
  margin-bottom: 0.5rem;
  transition: background var(--t-fast);
}
.address-container:hover { background: var(--c-amber-dim); border-radius: var(--radius-sm); padding-left: 0.5rem; }
.address-container code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-amber);
  word-break: break-all;
}
.address-container span {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.qr-code {
  margin: 1rem 0;
  text-align: center;
}
.qr-code img {
  max-width: 160px;
  border: 4px solid #fff;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0.5rem auto;
}
.deposit-form {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.deposit-form h3 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.plan-note {
  background: var(--c-blue-dim);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--c-blue-soft);
}

/* ── Login Page ────────────────────────────────────────────────── */
main section.login-section {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Policy / Terms page ───────────────────────────────────────── */
.policy-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--c-amber);
  letter-spacing: 0.04em;
}
.policy-content p, .policy-content li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.policy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.policy-content ul li { margin-bottom: 0.4rem; }

/* ── Admin Panel ───────────────────────────────────────────────── */
.admin-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
}
.admin-section h2 {
  color: var(--c-gold);
  margin-top: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface-border);
  margin-bottom: 1.25rem;
}
.admin-section h3 {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 1rem 0 0.5rem;
}
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
.form-row .form-group { flex: 1; min-width: 140px; margin-bottom: 0; }
.section-divider {
  border: none;
  border-top: 1px solid var(--surface-border);
  margin: 1.25rem 0;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.checkbox-row input[type="checkbox"] {
  width: 16px; height: 16px;
  cursor: pointer;
  accent-color: var(--c-amber);
  flex-shrink: 0;
}
.checkbox-row label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.tx-mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tx-mode-tab {
  padding: 0.4rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.tx-mode-tab:hover { border-color: var(--c-amber-border); color: var(--text-primary); }
.tx-mode-tab.active {
  background: var(--c-amber);
  color: var(--bg-base);
  border-color: var(--c-amber);
  font-weight: 600;
}
.tx-panel { display: none; }
.tx-panel.active { display: block; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-body);
}
.badge-success { background: var(--c-green-dim); color: var(--c-green); }
.badge-pending { background: var(--c-amber-dim); color: var(--c-amber); }
.badge-danger  { background: var(--c-red-dim); color: var(--c-red); }
.wallet-cell code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-amber);
  word-break: break-all;
}
.no-wallet {
  color: var(--c-red);
  font-style: italic;
  font-size: 0.8rem;
}
details summary {
  cursor: pointer;
  color: var(--c-blue-soft);
  font-size: 0.82rem;
  padding: 0.3rem 0;
  font-family: var(--font-body);
  font-weight: 500;
  transition: color var(--t-fast);
}
details[open] summary { color: var(--c-amber); }
details > div { margin-top: 0.75rem; }

/* ── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--surface-border);
  padding: 1.5rem 1.5rem;
  text-align: center;
  background: var(--bg-surface);
}
footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
footer a {
  color: var(--text-muted);
  transition: color var(--t-fast);
}
footer a:hover { color: var(--c-amber); opacity: 1; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  header { padding: 0 1rem; }
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .theme-toggle { margin-left: 0; }

  main { padding: 1.5rem 1rem 3rem; }

  .market-stats-bar { flex-direction: row; flex-wrap: wrap; }
  .stat-item { min-width: 45%; border-right: none; border-bottom: 1px solid var(--surface-border); }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }

  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-grid { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }

  .form-row { flex-direction: column; gap: 0; }
  .form-row .form-group { min-width: 100%; }

  .market-table, .transaction-table, .tx-table {
    font-size: 0.8rem;
  }
  .market-table th, .market-table td,
  .transaction-table th, .transaction-table td {
    padding: 0.6rem 0.75rem;
  }
}

@media (max-width: 480px) {
  h2 { font-size: 1.4rem; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stat-item { min-width: 100%; }
  .action-buttons { flex-direction: column; }
  .action-buttons .btn { width: 100%; }
  .tx-mode-tabs { flex-wrap: wrap; }
}

/* ── Page load animation ───────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
main > section:first-child,
main > .balance-cards,
main > .activation-section,
main > .dashboard-hero {
  animation: fadeUp 0.5s ease both;
}
main > section:nth-child(2) { animation-delay: 0.08s; }
main > section:nth-child(3) { animation-delay: 0.14s; }

/* ── Scrollbar styling ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus visible (a11y) ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 2px;
}
/* ── login-prompt ──────────────────────────────────────────────── */
.login-prompt {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}
.login-prompt a { color: var(--c-amber); }

/* ── Policy / suppress JS ToC ──────────────────────────────────── */
.table-of-contents { display: none !important; }

.policy-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--surface-border);
}
.policy-section:last-of-type { border-bottom: none; }
.policy-section > h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 1rem;
  color: var(--c-amber);
}
.subsection {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--c-amber-border);
}
.subsection h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}
.subsection p, .subsection li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}
.subsection p:last-child { margin-bottom: 0; }
.subsection ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.policy-overview {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--c-amber);
}
.policy-overview h3 {
  font-family: var(--font-body);
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-amber); margin: 0 0 0.75rem;
}
.policy-overview p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 0.5rem; }
.toc-section h3 { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.75rem; }
.toc-section a { font-size: 0.8rem; color: var(--c-amber); text-decoration: none; padding: 0.15rem 0; display: block; transition: color var(--t-fast); }
.toc-section a:hover { color: var(--text-primary); text-decoration: underline; }

/* ── Request Invite Page ───────────────────────────────────────── */
.invite-section { max-width: 960px; margin: 0 auto; padding: 2rem 0; }
.invite-header { text-align: center; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--surface-border); }
.invite-header h2 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--text-primary); margin-bottom: 0.5rem; }
.invite-header p { color: var(--text-secondary); font-size: 0.925rem; max-width: 520px; margin: 0 auto; line-height: 1.7; }
.invite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.card-label { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-amber); margin: 0 0 1.25rem; }
.required { color: var(--c-red, #e74c3c); }
.optional  { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.invite-info-card { background: var(--surface-2); }
.invite-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.invite-features li { display: flex; gap: 0.85rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid var(--surface-border); }
.invite-features li:last-child { border-bottom: none; padding-bottom: 0; }
.feature-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.invite-features strong { display: block; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 0.2rem; }
.invite-features p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }
@media (max-width: 680px) { .invite-grid { grid-template-columns: 1fr; } }