@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  --bg-0: #07090f;
  --bg-1: #0f1218;
  --bg-2: #161a24;
  --bg-3: #1c2030;
  --panel: rgba(22, 26, 36, 0.65);
  --panel-solid: #161a24;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6f8;
  --text-2: #b6bcc8;
  --muted: #7a8092;
  --accent: #ffd633;
  --accent-2: #ffa500;
  --accent-grad: linear-gradient(135deg, #ffd633 0%, #ff9500 100%);
  --accent-glow: 0 0 60px rgba(255, 165, 0, 0.25);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warn: #f59e0b;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 20px 60px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-xl: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-glow: 0 0 80px rgba(255, 214, 51, 0.15);
}

html, body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

body {
  background:
    radial-gradient(ellipse 90% 70% at 70% -10%, rgba(255, 165, 0, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 30%, rgba(59, 130, 246, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 80%, rgba(34, 197, 94, 0.06), transparent 50%),
    var(--bg-0);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  background: rgba(7, 9, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a1a1a;
  font-size: 15px;
  box-shadow: 0 4px 20px -2px rgba(255, 165, 0, 0.4);
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name span { color: var(--muted); font-weight: 500; }
nav { display: flex; gap: 4px; align-items: center; }
nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.15s;
}
nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
nav a.cta {
  background: var(--accent-grad);
  color: #1a1a1a;
  font-weight: 600;
  margin-left: 8px;
}

/* ===== CONTAINERS ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ===== HERO ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  margin: 32px 0 48px;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    margin: 64px 0 80px;
  }
}
.hero-content { max-width: 580px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.hero h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
}
@media (min-width: 768px) { .hero h1 { font-size: 56px; } }
@media (min-width: 1024px) { .hero h1 { font-size: 64px; } }
.hero h1 .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero p.lead {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.55;
  margin-bottom: 28px;
}
@media (min-width: 1024px) { .hero p.lead { font-size: 19px; } }

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.hero-feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.hero-feature .ico {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(255, 165, 0, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.hero-feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hero-feature p { color: var(--muted); font-size: 12px; line-height: 1.4; }
@media (max-width: 640px) {
  .hero-features { grid-template-columns: 1fr; gap: 10px; }
}

/* ===== CARDS ===== */
.card {
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-lg { padding: 32px; border-radius: var(--radius-xl); }
@media (min-width: 1024px) {
  .card { padding: 32px; }
  .card-lg { padding: 40px; }
}
.card-elevated { box-shadow: var(--shadow-xl); border-color: var(--border-strong); }
.card-glow {
  position: relative;
  isolation: isolate;
}
.card-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 214, 51, 0.4), transparent 40%, transparent 60%, rgba(255, 165, 0, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

/* ===== CALCULATOR ===== */
.calc-stack { display: flex; flex-direction: column; gap: 8px; position: relative; }
.calc-field {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s, background 0.2s;
}
.calc-field:focus-within {
  border-color: rgba(255, 214, 51, 0.4);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(255, 214, 51, 0.08);
}
.calc-field-content { flex: 1; min-width: 0; }
.calc-field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.calc-field input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  padding: 0;
}
@media (min-width: 1024px) { .calc-field input { font-size: 32px; } }
.calc-field input::placeholder { color: var(--muted); font-weight: 600; }
.currency-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-left: 12px;
}
.currency-badge .flag {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.flag-mxn { background: linear-gradient(180deg, #006847 0%, #fff 50%, #ce1126 50%); color: #006847; }
.flag-usdt { background: #26a17b; color: #fff; }

.calc-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  z-index: 2;
  color: var(--text-2);
  pointer-events: none;
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.6);
}

.rate-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px 4px;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
  gap: 10px;
}
.rate-line strong { color: var(--text); font-weight: 600; }
.rate-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
}
.rate-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(2); opacity: 0; }
}

/* ===== FORM FIELDS ===== */
.field { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  background: var(--bg-1);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(255, 214, 51, 0.4);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(255, 214, 51, 0.08);
}
.field input::placeholder { color: var(--muted); }
.field-help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}
.field + .field { margin-top: 16px; }
.field.mono input { font-family: 'JetBrains Mono', monospace; font-size: 14px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s, background 0.2s;
  width: 100%;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--accent-grad);
  color: #1a1a1a;
  box-shadow: 0 4px 24px -4px rgba(255, 165, 0, 0.5);
}
.btn-primary:hover { box-shadow: 0 8px 32px -4px rgba(255, 165, 0, 0.6); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-3); border-color: rgba(255,255,255,0.2); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 10px 14px;
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ===== AMOUNT DISPLAY ===== */
.big-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
@media (min-width: 768px) { .big-amount { font-size: 44px; } }
.big-amount .currency { font-size: 18px; color: var(--muted); font-weight: 500; margin-left: 6px; vertical-align: middle; }
.big-amount.accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== CODE / KEY-VALUE ===== */
.code-block {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.code-block .code-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  word-break: break-all;
}
@media (min-width: 768px) { .code-block .code-text { font-size: 36px; } }
.code-block.subtle .code-text { font-size: 16px; font-weight: 500; }
.copy-btn {
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.copy-btn:hover { color: var(--text); background: var(--bg-3); }
.copy-btn.copied { color: var(--success); border-color: rgba(34,197,94,0.4); }

.kv-list { display: flex; flex-direction: column; gap: 14px; }
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.kv-row:last-child { border-bottom: none; padding-bottom: 0; }
.kv-row .k { color: var(--muted); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.kv-row .v { color: var(--text); font-size: 14px; font-weight: 500; text-align: right; word-break: break-all; max-width: 60%; }
.kv-row .v.mono { font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.kv-row .v.big { font-size: 18px; font-weight: 600; }

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-pending, .badge-awaiting_funds { background: var(--warn-bg); color: var(--warn); }
.badge-matched, .badge-paid { background: var(--success-bg); color: var(--success); }
.badge-expired, .badge-failed, .badge-manual_review { background: var(--danger-bg); color: var(--danger); }
.badge-cancelled { background: rgba(122,128,146,0.15); color: var(--text-2); }

/* ===== ALERTS ===== */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  line-height: 1.5;
}
.alert-error { background: var(--danger-bg); color: #fca5a5; border-color: rgba(239,68,68,0.2); }
.alert-success { background: var(--success-bg); color: #86efac; border-color: rgba(34,197,94,0.2); }
.alert-warn { background: var(--warn-bg); color: #fcd34d; border-color: rgba(245,158,11,0.2); }
.alert-info { background: var(--info-bg); color: #93c5fd; border-color: rgba(59,130,246,0.2); }

/* ===== COUNTDOWN ===== */
.countdown-box {
  text-align: center;
  padding: 24px 0;
}
.countdown-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
@media (min-width: 1024px) { .countdown-time { font-size: 72px; } }
.countdown-time.expired { background: none; color: var(--danger); }
.countdown-label { color: var(--muted); font-size: 13px; margin-top: 10px; }

/* ===== STEPS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  background: var(--bg-2);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 10px;
}
.step.active .step-num { background: var(--accent-grad); color: #1a1a1a; }
.step.done .step-num { background: var(--success); color: #fff; }
.step-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.step-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; margin: 0 -8px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td { padding: 14px 12px; text-align: left; }
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
td { border-bottom: 1px solid var(--border); }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
td.mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.grid-stat {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.grid-stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.grid-stat .value { font-size: 26px; font-weight: 700; margin-top: 8px; letter-spacing: -0.02em; }

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1024px) {
  .dashboard-grid { grid-template-columns: 320px 1fr; }
}

/* ===== TWO-COLUMN PAGE LAYOUT ===== */
.page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 1024px) {
  .page-grid { grid-template-columns: 1.2fr 1fr; gap: 32px; }
}
.page-grid > .col-sticky {
  position: relative;
}
@media (min-width: 1024px) {
  .page-grid > .col-sticky { position: sticky; top: 96px; }
}

/* ===== FEATURES SECTION ===== */
.features-section {
  margin-top: 64px;
  margin-bottom: 32px;
}
.features-section h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-transform: none;
  color: var(--text);
}
@media (min-width: 1024px) { .features-section h2 { font-size: 36px; } }
.features-section .subtitle {
  color: var(--text-2);
  font-size: 16px;
  margin-bottom: 32px;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.feature-card .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255, 165, 0, 0.12);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ===== FAQ / HOW-IT-WORKS ===== */
.howto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  counter-reset: step;
}
@media (min-width: 1024px) { .howto { grid-template-columns: repeat(4, 1fr); } }
.howto-step {
  background: var(--panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
}
.howto-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 24px;
  width: 32px; height: 32px;
  background: var(--accent-grad);
  color: #1a1a1a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}
.howto-step h3 { font-size: 16px; font-weight: 600; margin: 8px 0 6px; }
.howto-step p { color: var(--muted); font-size: 13px; line-height: 1.55; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .footer-brand {
  margin-bottom: 8px;
  color: var(--text-2);
  font-weight: 600;
}

/* ===== MISC ===== */
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }
.spacer-sm { height: 8px; }
.spacer { height: 16px; }
.spacer-lg { height: 24px; }
.text-center { text-align: center; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* SVG ICONS */
.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg { width: 22px; height: 22px; }

/* MOBILE TWEAKS */
@media (max-width: 640px) {
  .container, .container-narrow { padding: 24px 14px 60px; }
  .site-header-inner { padding: 14px 16px; }
  .card { padding: 22px; border-radius: var(--radius); }
  .card-lg { padding: 24px; border-radius: var(--radius-lg); }
  .calc-field input { font-size: 22px; }
  .big-amount { font-size: 30px; }
  .countdown-time { font-size: 44px; }
  nav a { padding: 6px 10px; font-size: 13px; }
  nav a.cta { display: none; }
  .code-block .code-text { font-size: 24px; }
  .kv-row { flex-direction: column; gap: 4px; }
  .kv-row .v { text-align: left; max-width: 100%; }
}

/* ===== Success checkmark animation (paid order) ===== */
.success-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 0 22px;
  animation: success-fade-in 0.4s ease-out;
}
.success-anim__circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(34,197,94,0.22), rgba(34,197,94,0.05) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: success-pop 0.55s cubic-bezier(.2,.85,.3,1.2) both;
}
.success-anim__circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: success-pulse 1.6s ease-out 0.4s infinite;
}
.success-anim__svg {
  width: 64px;
  height: 64px;
}
.success-anim__svg circle {
  fill: none;
  stroke: #22c55e;
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: success-stroke 0.55s cubic-bezier(.65,0,.45,1) 0.05s forwards;
}
.success-anim__svg path {
  fill: none;
  stroke: #22c55e;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: success-stroke 0.35s cubic-bezier(.65,0,.45,1) 0.55s forwards;
}
.success-anim__title {
  margin-top: 18px;
  font-size: 22px;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: 0.2px;
}
.success-anim__subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #9aa0a6;
}
@keyframes success-stroke { to { stroke-dashoffset: 0; } }
@keyframes success-pop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes success-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); }
  100% { box-shadow: 0 0 0 22px rgba(34,197,94,0); }
}
@keyframes success-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Inline copy buttons in kv-list ===== */
.kv-list-copyable .kv-row { align-items: center; }
.kv-list-copyable .v-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}
.kv-list-copyable .v-wrap .v { word-break: break-all; }
.kv-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2, #9aa0a6);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}
.kv-copy:hover { background: rgba(245,189,77,0.12); border-color: rgba(245,189,77,0.4); color: var(--accent, #f5bd4d); }
.kv-copy:active { transform: scale(0.92); }
.kv-copy.copied { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.6); color: #22c55e; }
.kv-copy svg { width: 14px; height: 14px; }
@media (max-width: 600px) {
  .kv-list-copyable .kv-row { flex-direction: column; align-items: flex-start !important; gap: 6px; }
  .kv-list-copyable .v-wrap { justify-content: flex-start; width: 100%; }
}

/* ===== Polish: spinner, input validation states ===== */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: rgba(0,0,0,0.85);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

input.input-valid {
  border-color: rgba(34,197,94,0.55) !important;
  background-image: linear-gradient(0deg, rgba(34,197,94,0.05), rgba(34,197,94,0.05));
}
input.input-invalid {
  border-color: rgba(239,68,68,0.55) !important;
  background-image: linear-gradient(0deg, rgba(239,68,68,0.05), rgba(239,68,68,0.05));
}
input.input-valid:focus { box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
input.input-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }

/* Smooth scroll for anchor navigation */
html { scroll-behavior: smooth; }

/* Slightly tighter focus ring for buttons */
.btn:focus-visible { outline: 2px solid var(--accent, #ffd633); outline-offset: 2px; }

/* ===== Admin balances + stats ===== */
.admin-balances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.balance-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,214,51,0.06));
  pointer-events: none;
}
.balance-binance::before { background: linear-gradient(135deg, transparent 60%, rgba(240,185,11,0.10)); }
.balance-bitso::before { background: linear-gradient(135deg, transparent 60%, rgba(34,197,94,0.10)); }
.balance-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.balance-header h3 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  flex: 1;
}
.balance-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  font-size: 14px;
}
.balance-binance .balance-icon { background: rgba(240,185,11,0.15); color: #f0b90b; }
.balance-bitso .balance-icon { background: rgba(34,197,94,0.15); color: #22c55e; }
.balance-refresh {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.balance-refresh:hover { background: rgba(255,214,51,0.12); color: var(--accent); transform: rotate(90deg); }
.balance-rows { display: flex; flex-direction: column; gap: 6px; }
.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 14px;
}
.balance-row span { color: var(--muted); }
.balance-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.balance-row.balance-total {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
  font-size: 16px;
}
.balance-row.balance-total strong { font-size: 22px; font-weight: 700; }
.balance-binance .balance-row.balance-total strong { color: #f0b90b; }
.balance-bitso .balance-row.balance-total strong { color: #22c55e; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.grid-stat .sublabel {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.grid-stat-warn {
  border-color: rgba(245,158,11,0.4) !important;
  background: rgba(245,158,11,0.06) !important;
}
.grid-stat-warn .label, .grid-stat-warn .value, .grid-stat-warn .sublabel { color: var(--warn) !important; }

/* Compact tables for bitso fundings + binance withdrawals */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.data-table .empty { text-align: center; color: var(--muted); padding: 24px 0; }

/* ===== Modal: order detail ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 16px;
  z-index: 1000;
  overflow-y: auto;
  animation: modal-fade 0.2s ease-out;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow-xl);
  animation: modal-slide 0.25s cubic-bezier(.2,.85,.3,1.05);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.modal-close:hover { background: rgba(239,68,68,0.12); color: var(--danger); border-color: rgba(239,68,68,0.4); }
.modal-body { padding: 22px 24px; }
.modal-body .kv-row { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.modal-body .kv-row:last-child { border-bottom: none; }
.modal-body .kv-row .v { word-break: break-all; max-width: 420px; }
.modal-body .reason { padding: 12px; border-radius: 10px; background: rgba(239,68,68,0.08); color: var(--danger); font-size: 13px; margin-top: 10px; }
.modal-body .reason.warn { background: rgba(245,158,11,0.08); color: var(--warn); }

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-slide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.row-clickable { cursor: pointer; }
.row-clickable:hover td { background: rgba(255,214,51,0.04); }

/* ===== Admin: card toolbar + search bar + dense table ===== */
.card-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.card-toolbar h2 { font-size: 13px !important; margin: 0 !important; }
.card-toolbar select {
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-family: inherit;
}
.card-toolbar select:focus { outline: none; border-color: var(--accent); }

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,214,51,0.12); }
.search-bar .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 8px;
  outline: none;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--muted); }
.search-clear {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.search-clear:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.data-table-dense th { padding: 8px; font-size: 10.5px; }
.data-table-dense td { padding: 8px; font-size: 12.5px; }
.data-table-dense .mono { font-size: 11.5px; }
.data-table .row-orphan td { background: rgba(245,158,11,0.04); }

/* Inline JSON view in modal */
.raw-json {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-2);
  overflow-x: auto;
  white-space: pre;
  max-height: 320px;
  overflow-y: auto;
  margin-top: 12px;
}
.raw-json-toggle {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 14px;
  font-family: inherit;
}
.raw-json-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* Sticky table headers in long lists */
.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--panel-solid);
  z-index: 2;
}
.table-wrap {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 12px;
}

/* Status pills inside dense tables */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
