/* ============ THEME TOKENS ============ */
:root {
  --bg: #0b0e14;
  --bg-2: #10141f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(212, 161, 68, 0.16);
  --text: #e8eaf0;
  --text-muted: #8791a8;
  --primary: #d4a144;
  --primary-2: #b8863a;
  --accent: #4c8dff;
  --success: #3fbf7f;
  --error: #e85c5c;
  --warning: #d4a144;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 8px 32px rgba(212, 161, 68, 0.22);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

html[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-2: #ffffff;
  --surface: rgba(23, 20, 14, 0.04);
  --surface-border: rgba(184, 134, 58, 0.18);
  --text: #17140e;
  --text-muted: #6b6455;
  --shadow-glow: 0 8px 32px rgba(184, 134, 58, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.stat-value, .order-summary, .payment-summary, .data-table td,
.hero-stats strong, .otp-input, .wallet-address-box code,
.tag, .status-pill {
  font-family: var(--font-mono);
}

body {
  font-family: var(--font);
  background: radial-gradient(ellipse at top, var(--bg-2) 0%, var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

.grad-text {
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }

.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(120deg, var(--primary-2), var(--primary));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 12px 40px rgba(168, 85, 247, 0.4); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
}
.btn-outline:hover { background: var(--surface); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

.btn.lg { padding: 15px 30px; font-size: 1.05rem; }
.btn.sm { padding: 7px 14px; font-size: 0.85rem; }
.full-width { width: 100%; }

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 7, 20, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
}
html[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.7); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.15rem;
}
.main-nav { display: flex; gap: 28px; }
.main-nav a { font-weight: 500; color: var(--text-muted); transition: color 0.15s; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--surface-border);
}
.mobile-nav a { padding: 10px 0; color: var(--text-muted); }
.mobile-nav.open { display: flex; }

/* ============ HERO ============ */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; }
.hero-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center;
  position: relative; z-index: 1;
}
.badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-border);
  font-size: 0.85rem; margin-bottom: 20px; color: var(--accent);
}
.hero h1 { font-size: 3rem; line-height: 1.15; font-weight: 800; margin-bottom: 20px; }
.lead { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 28px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; }
.hero-stats span { color: var(--text-muted); font-size: 0.85rem; }

.hero-panel { padding: 20px; min-height: 380px; animation: floatIn 0.8s ease; }
.ticker-widget { width: 100%; height: 360px; border-radius: var(--radius-sm); overflow: hidden; }

@keyframes floatIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============ QUICK CARDS ============ */
.quick-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px 24px; }
.quick-card {
  padding: 30px; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.quick-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; margin-bottom: 16px; color: #fff;
}
.buy-icon { background: linear-gradient(120deg, #34d399, #22d3ee); }
.sell-icon { background: linear-gradient(120deg, #f87171, #fb923c); }
.exchange-icon { background: linear-gradient(120deg, var(--primary), var(--accent)); }
.quick-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.quick-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ============ PARTNERS ============ */
.partners-row { padding: 40px 24px; text-align: center; }
.section-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 24px; }
.partners-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }
.partner-logo {
  color: var(--text-muted); font-weight: 700; font-size: 1.05rem;
  padding: 10px 18px; border: 1px solid var(--surface-border); border-radius: 10px;
  opacity: 0.8; transition: opacity 0.2s;
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
}
.partner-logo:hover { opacity: 1; color: var(--text); }
.partner-logo img { height: 24px; width: auto; max-width: 120px; object-fit: contain; filter: grayscale(1) brightness(1.6); }
.partner-logo:hover img { filter: grayscale(0) brightness(1); }
.partner-logo-preview { height: 28px; width: 28px; object-fit: contain; border-radius: 4px; background: #fff; padding: 2px; }

/* ============ HOW IT WORKS ============ */
.how-it-works { padding: 60px 24px; text-align: center; }
.how-it-works h2, .testimonials h2 { font-size: 2.2rem; margin-bottom: 40px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: left; }
.step { padding: 26px; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(120deg, var(--primary-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; margin-bottom: 16px;
}
.step h3 { margin-bottom: 8px; font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: 0.92rem; }

/* ============ TESTIMONIALS ============ */
.testimonials { padding: 40px 24px 80px; text-align: center; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; margin-bottom: 50px; }
.testimonial { padding: 26px; }
.testimonial p { font-style: italic; margin-bottom: 16px; }
.testimonial-author { color: var(--text-muted); font-size: 0.9rem; font-weight: 600; }

.cta-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 36px 40px; text-align: left; flex-wrap: wrap; gap: 20px;
}
.cta-banner h3 { font-size: 1.4rem; margin-bottom: 6px; }
.cta-banner p { color: var(--text-muted); }

/* ============ TRADE PAGES ============ */
.trade-section { padding: 60px 24px; display: flex; justify-content: center; }
.trade-card { width: 100%; max-width: 520px; padding: 36px; }
.trade-card h1 { font-size: 1.7rem; margin-bottom: 6px; }
.trade-tabs { display: flex; gap: 6px; margin-bottom: 26px; background: var(--surface); border-radius: 999px; padding: 4px; }
.trade-tabs .tab { flex: 1; text-align: center; padding: 9px; border-radius: 999px; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; }
.trade-tabs .tab.active { background: linear-gradient(120deg, var(--primary-2), var(--primary)); color: #fff; }

.trade-form { margin-top: 20px; }
.form-row { margin-bottom: 4px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border); background: var(--surface);
  color: var(--text); font-size: 1rem; font-family: var(--font);
}
.form-group input:focus, .form-group select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
/* Native <option> popups render with OS/browser defaults unless explicitly
   styled - without this, dark theme text can end up unreadable against a
   default-light options list. */
select option {
  background-color: #171426;
  color: #e8eaf0;
}

.input-with-select { display: flex; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--surface-border); background: var(--surface); }
.input-with-select input { border: none; flex: 1; background: transparent; }
.input-with-select select { border: none; border-left: 1px solid var(--surface-border); background: transparent; color: var(--text); padding: 0 12px; font-weight: 600; }
.input-with-select input:focus { outline: none; }

.swap-arrow { text-align: center; font-size: 1.3rem; color: var(--accent); margin: 6px 0 14px; }
.swap-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--surface-border); cursor: pointer; margin: 6px auto 14px; display: block; color: var(--text); }
.swap-btn:hover { color: var(--accent); }

.order-summary {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; font-size: 0.9rem;
}
.order-summary div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--text-muted); }
.order-summary .total { font-weight: 700; color: var(--text); border-top: 1px solid var(--surface-border); margin-top: 6px; padding-top: 10px; }
.summary-input {
  background: var(--bg); border: 1px solid var(--surface-border); border-radius: 6px;
  color: var(--text); font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem;
  text-align: right; width: 140px; padding: 4px 8px;
}
.summary-input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.92rem; }
.alert-error { background: rgba(248, 113, 113, 0.12); color: var(--error); border: 1px solid rgba(248, 113, 113, 0.3); }
.alert-success { background: rgba(52, 211, 153, 0.12); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.3); }

/* ============ HUMAN CHECK ============ */
.human-check { margin: 20px 0; }
.human-check-box { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.human-checkbox-input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.human-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: default; color: var(--text-muted); font-size: 0.92rem; }
.check-mark {
  width: 20px; height: 20px; border-radius: 5px; border: 1px solid var(--surface-border);
  background: var(--surface); display: inline-block; position: relative;
}
.human-checkbox-input:checked + .human-checkbox-label .check-mark { background: var(--success); border-color: var(--success); }
.human-checkbox-input:checked + .human-checkbox-label .check-mark::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.slider-puzzle { user-select: none; }
.slider-track {
  position: relative; height: 46px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-border); overflow: hidden;
}
.slider-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(52, 211, 153, 0.25); transition: width 0.05s linear; }
.slider-handle {
  position: absolute; left: 3px; top: 3px; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(120deg, var(--primary-2), var(--primary)); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: grab; font-weight: 700;
  box-shadow: var(--shadow-glow); touch-action: none;
}
.slider-handle.done { background: linear-gradient(120deg, #10b981, #34d399); cursor: default; }
.slider-label {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.88rem; pointer-events: none;
}

/* ============ PAYMENT ============ */
.payment-section { padding: 60px 24px; display: flex; justify-content: center; }
.payment-card { width: 100%; max-width: 520px; padding: 36px; }
.payment-summary { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 16px; margin: 20px 0; }
.payment-summary div { display: flex; justify-content: space-between; padding: 7px 0; }
.payment-summary .total { border-top: 1px solid var(--surface-border); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.payment-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 20px; }
.method-btn {
  display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--surface-border); color: var(--text);
  cursor: pointer; font-weight: 600; font-size: 0.92rem; transition: border-color 0.15s;
}
.method-btn.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3); }
.method-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }

.wallet-panel { margin-bottom: 20px; }
.wallet-address-box { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 12px; margin: 10px 0; }
.wallet-address-box code { flex: 1; overflow-x: auto; font-size: 0.82rem; }
.qr-placeholder {
  width: 140px; height: 140px; margin: 0 auto;
  background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 6px, var(--surface-border) 6px, var(--surface-border) 12px);
  border-radius: var(--radius-sm); border: 1px solid var(--surface-border);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--text-muted); text-align: center;
}

.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--surface-border); font-size: 0.78rem; font-weight: 700; text-transform: capitalize; }
.tag-buy { color: var(--success); }
.tag-sell { color: var(--error); }
.tag-exchange { color: var(--accent); }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-transform: capitalize; }
.status-pending, .status-waiting, .status-confirming, .status-sending, .status-partially_paid { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.status-completed, .status-approved, .status-finished, .status-confirmed { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.status-failed, .status-rejected, .status-expired, .status-refunded { background: rgba(248, 113, 113, 0.15); color: var(--error); }
.np-status-box { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); margin: 16px 0; }
.status-not_submitted { background: var(--surface); color: var(--text-muted); }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal[hidden] { display: none; }
.modal-content { padding: 40px; text-align: center; width: 320px; }
.spinner { width: 44px; height: 44px; border: 4px solid var(--surface-border); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 20px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success-check { width: 60px; height: 60px; border-radius: 50%; background: var(--success); color: #fff; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; animation: popIn 0.35s ease; }
@keyframes popIn { from { transform: scale(0); } to { transform: scale(1); } }

/* ============ AUTH ============ */
.auth-section { padding: 60px 24px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 440px; padding: 36px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 20px 0 16px; }
.google-btn-container { display: flex; justify-content: center; margin: 20px 0 16px; min-height: 44px; }
.g-icon { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #444; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--surface-border); }
.auth-form { margin-top: 6px; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--text-muted); font-size: 0.92rem; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.otp-input { letter-spacing: 8px; font-size: 1.4rem; text-align: center; }
.demo-notice { background: rgba(34, 211, 238, 0.1); border: 1px solid rgba(34, 211, 238, 0.3); color: var(--accent); padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 0.9rem; }
.otp-demo { font-weight: 800; letter-spacing: 3px; }

/* ============ KYC ============ */
.kyc-section { padding: 60px 24px; display: flex; justify-content: center; }
.kyc-card { width: 100%; max-width: 560px; padding: 36px; }
.dropzone {
  border: 2px dashed var(--surface-border); border-radius: var(--radius); padding: 40px 20px;
  text-align: center; cursor: pointer; margin: 20px 0; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: rgba(168, 85, 247, 0.05); }
.dropzone-icon { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.file-name { margin-top: 10px; font-weight: 600; color: var(--accent); }
.progress-bar { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(120deg, var(--primary-2), var(--accent)); transition: width 0.2s ease; }
.kyc-history-title { margin: 30px 0 12px; font-size: 1.1rem; }
.kyc-history-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--surface-border); }

/* ============ DASHBOARD ============ */
.dashboard-section { padding: 50px 24px 80px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 14px; }
.dashboard-header h1 { font-size: 1.8rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.dash-stat, .admin-stat { padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { color: var(--text-muted); font-size: 0.85rem; }
.stat-value { font-size: 1.8rem; font-weight: 800; }
.dashboard-actions { display: flex; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.dashboard-actions .btn { flex: 1; min-width: 140px; }

.empty-state { padding: 40px; text-align: center; color: var(--text-muted); }

.table-wrap { overflow-x: auto; padding: 6px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th { text-align: left; padding: 14px 16px; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--surface-border); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--surface-border); font-size: 0.92rem; }
.data-table tr:last-child td { border-bottom: none; }

/* ============ CONTACT SALES ============ */
.contact-section { padding: 60px 24px 80px; max-width: 720px; margin: 0 auto; }
.contact-intro { text-align: center; margin-bottom: 30px; }
.contact-intro h1 { font-size: 2.1rem; margin-bottom: 10px; }
.contact-card { padding: 36px; }
.contact-form h3 { margin: 20px 0 14px; font-size: 1.05rem; color: var(--accent); }
.contact-form h3:first-child { margin-top: 0; }

/* ============ ERROR ============ */
.error-section { padding: 100px 24px; display: flex; justify-content: center; }
.error-card { padding: 50px; text-align: center; max-width: 460px; }
.error-code { font-size: 4rem; font-weight: 900; background: linear-gradient(120deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-card h1 { margin: 10px 0; }
.error-card p { margin-bottom: 24px; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--surface-border); padding: 60px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-brand p { margin: 14px 0 16px; max-width: 280px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input { flex: 1; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--surface-border); background: var(--surface); color: var(--text); }
.form-note { margin-top: 8px; font-size: 0.82rem; color: var(--success); min-height: 1em; }
.footer-col h4 { margin-bottom: 14px; font-size: 0.9rem; }
.footer-col a { display: block; padding: 6px 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--surface-border); flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: 0.85rem; }
.social-icons { display: flex; gap: 14px; }
.social-icons a { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--surface-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; }

/* ============ COOKIE BANNER ============ */
.cookie-banner { position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 200; display: flex; justify-content: center; animation: floatIn 0.4s ease; }
.cookie-banner[hidden] { display: none; }
.cookie-inner {
  max-width: 720px; width: 100%; background: var(--bg-2); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.cookie-inner p { font-size: 0.88rem; color: var(--text-muted); max-width: 420px; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ ADMIN LAYOUT ============ */
.admin-body { background: var(--bg); }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-2); border-right: 1px solid var(--surface-border); padding: 24px 18px; display: flex; flex-direction: column; }
.admin-brand { margin-bottom: 30px; padding: 0 6px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a { padding: 11px 14px; border-radius: var(--radius-sm); color: var(--text-muted); font-weight: 600; font-size: 0.92rem; }
.admin-nav a:hover { background: var(--surface); color: var(--text); }
.admin-nav a.active { background: linear-gradient(120deg, var(--primary-2), var(--primary)); color: #fff; }
.admin-sidebar-footer { display: flex; flex-direction: column; gap: 4px; padding-top: 20px; border-top: 1px solid var(--surface-border); }
.admin-sidebar-footer a { padding: 10px 14px; color: var(--text-muted); font-size: 0.88rem; }
.admin-main { padding: 40px; overflow-x: hidden; }
.admin-main h1 { font-size: 1.8rem; margin-bottom: 6px; }
.admin-main-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 14px; }
.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 24px 0 40px; }
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.filter-tabs a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--surface-border); color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }
.filter-tabs a.active { background: linear-gradient(120deg, var(--primary-2), var(--primary)); color: #fff; border-color: transparent; }
.kyc-review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 20px; }
.kyc-review-card { padding: 20px; }
.kyc-review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.kyc-review-header span.muted { display: block; font-size: 0.8rem; }
.kyc-file-link { display: block; margin: 10px 0; color: var(--accent); font-size: 0.9rem; }
.kyc-decision-form { display: flex; gap: 8px; margin-top: 12px; }
.partner-add-form { display: flex; gap: 10px; padding: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.partner-add-form input { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--surface-border); background: var(--surface); color: var(--text); }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .quick-cards { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-actions .btn { display: none; }
  .mobile-nav a:last-child, .mobile-nav a:nth-last-child(2) { display: block; }
  .mobile-nav { display: none; }
  .hero h1 { font-size: 2.2rem; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}

/* ============ TICKER RAIL (signature element) ============ */
.ticker-rail {
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--surface-border);
  padding: 10px 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  flex-shrink: 0;
  border-right: 1px solid var(--surface-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  white-space: nowrap;
}
.ticker-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.ticker-viewport { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-cell {
  display: flex; align-items: center; gap: 10px;
  padding: 0 22px;
  border-right: 1px solid var(--surface-border);
  white-space: nowrap;
}
.ticker-cell .sym { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.ticker-cell .px { color: var(--text-muted); }
.ticker-cell .chg { font-weight: 700; }
.ticker-cell .chg.up { color: var(--success); }
.ticker-cell .chg.down { color: var(--error); }

/* ============ INFO / STATIC CONTENT PAGES ============ */
.info-section { padding: 60px 24px 90px; max-width: 760px; margin: 0 auto; }
.info-section h1 { font-size: 2.1rem; margin-bottom: 8px; }
.info-section .lead { margin-bottom: 32px; }
.info-card { padding: 36px; }
.info-card h2 { font-size: 1.2rem; margin: 28px 0 12px; color: var(--primary); }
.info-card h2:first-child { margin-top: 0; }
.info-card p { color: var(--text-muted); margin-bottom: 14px; line-height: 1.7; }
.info-card ul { margin: 0 0 14px 20px; color: var(--text-muted); line-height: 1.8; }
.info-card li { margin-bottom: 4px; }
.info-card code { font-family: var(--font-mono); background: var(--surface); padding: 2px 6px; border-radius: 4px; font-size: 0.88em; color: var(--accent); }
.info-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 24px; }

.status-grid { display: grid; gap: 10px; margin: 20px 0; }
.status-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); }
.status-row strong { font-weight: 600; }

.blog-grid { display: grid; gap: 18px; margin-top: 24px; }
.blog-card { padding: 26px; }
.blog-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 6px; }
.blog-card .blog-date { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 10px; display: block; }
.blog-card p { color: var(--text-muted); }

.code-block { background: var(--bg); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; margin: 12px 0 20px; }
.code-block pre { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); white-space: pre; }
.method-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; background: rgba(63, 191, 127, 0.15); color: var(--success); margin-right: 8px; }

.faq-item { border-bottom: 1px solid var(--surface-border); padding: 18px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; margin-bottom: 8px; }
.faq-item p { color: var(--text-muted); margin: 0; }

/* ============ INFO / CONTENT PAGES (about, careers, blog, legal, etc.) ============ */
.info-section { padding: 60px 24px 80px; max-width: 760px; margin: 0 auto; }
.info-hero { text-align: center; margin-bottom: 30px; }
.info-hero h1 { font-size: 2.1rem; margin-bottom: 10px; }
.info-card { padding: 40px; }
.info-card h2 { font-size: 1.2rem; margin: 26px 0 10px; color: var(--accent); }
.info-card h2:first-child { margin-top: 0; }
.info-card p { color: var(--text-muted); line-height: 1.7; margin-bottom: 12px; }
.info-card ul { margin: 0 0 12px 20px; color: var(--text-muted); line-height: 1.8; }
.info-card ul li { list-style: disc; }
.info-card strong { color: var(--text); }
.info-updated { color: var(--text-muted); font-size: 0.82rem; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--surface-border); }

.blog-grid { display: grid; gap: 18px; }
.blog-post { padding: 26px; }
.blog-post-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; }
.blog-post h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 8px 0 8px; }
.blog-post p { color: var(--text-muted); }

.status-grid { display: grid; gap: 10px; margin-top: 20px; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.status-row-name { font-weight: 600; }
.status-overall { display: flex; align-items: center; gap: 10px; padding: 16px 20px; margin-bottom: 20px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); animation: pulse-dot 1.6s ease-in-out infinite; }

.docs-endpoint { margin-bottom: 30px; }
.docs-endpoint h3 { font-family: var(--font-mono); font-size: 1rem; color: var(--text); margin-bottom: 8px; }
.docs-method { display: inline-block; padding: 2px 10px; border-radius: 6px; background: var(--success); color: #06251a; font-weight: 700; font-size: 0.75rem; font-family: var(--font-mono); margin-right: 8px; }
.docs-code { background: var(--bg); border: 1px solid var(--surface-border); border-radius: 10px; padding: 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.82rem; color: var(--text); white-space: pre; margin: 10px 0; }

.faq-item { padding: 20px 0; border-bottom: 1px solid var(--surface-border); }
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1rem; margin-bottom: 8px; }
.faq-item p { color: var(--text-muted); margin: 0; }

/* ============ 2FA ============ */
.qr-setup-box { display: flex; justify-content: center; padding: 20px; background: #fff; border-radius: var(--radius-sm); margin: 20px 0; }
.manual-key-box { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.manual-key-box code { font-family: var(--font-mono); font-size: 0.95rem; letter-spacing: 0.05em; word-break: break-all; color: var(--primary); }
.backup-codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.backup-codes-grid code { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 8px; padding: 10px; text-align: center; font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); }

.security-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.security-card-action { display: flex; align-items: center; gap: 12px; }

.admin-tx-actions { display: flex; gap: 6px; flex-wrap: wrap; }
