/* ============================================================
   Velora Exchange — Vanilla CSS
   Theme: dark fintech + purple gradient + glassmorphism
   ============================================================ */

:root {
  /* Brand */
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --purple-300: #c4b5fd;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --accent:     #a855f7;

  /* Surface */
  --bg-0: #07020f;
  --bg-1: #0a0118;
  --bg-2: #11052a;
  --bg-3: #1a0b2e;

  --text:       #f5f3ff;
  --text-mut:   #cbb8ff;
  --text-sub:   #9d8fc2;
  --line:       rgba(167, 139, 250, 0.18);
  --line-2:     rgba(167, 139, 250, 0.32);

  --glass:      rgba(255, 255, 255, 0.04);
  --glass-2:    rgba(255, 255, 255, 0.07);
  --glass-stroke: rgba(255, 255, 255, 0.08);

  --grad-1: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  --grad-2: linear-gradient(135deg, #6d28d9 0%, #c084fc 100%);
  --grad-soft: radial-gradient(120% 100% at 0% 0%, rgba(168,85,247,.18), transparent 60%);

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-2xl: 40px;

  --shadow-sm: 0 6px 24px rgba(20, 6, 50, .35);
  --shadow-md: 0 14px 40px rgba(20, 6, 50, .45);
  --shadow-glow: 0 0 0 1px rgba(168,85,247,.18), 0 30px 60px -20px rgba(124,58,237,.45);

  --ease: cubic-bezier(.2,.7,.2,1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--text);
  background: var(--bg-1);
  background-image:
    radial-gradient(60% 50% at 80% -10%, rgba(168,85,247,.18), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(124,58,237,.22), transparent 70%),
    linear-gradient(180deg, #07020f 0%, #0a0118 40%, #0a0118 100%);
  min-height: 100dvh;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.55;
}

h1,h2,h3,h4,h5 {
  font-family: 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c3aed, #a855f7);
  border-radius: 10px;
  border: 2px solid var(--bg-1);
}

::selection { background: rgba(168,85,247,.35); color: #fff; }

/* ===== Background decorations ===== */
.bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55;
  animation: float 18s var(--ease) infinite alternate;
}
.blob-1 { width: 540px; height: 540px; background: #7c3aed; top: -160px; left: -120px; }
.blob-2 { width: 460px; height: 460px; background: #a855f7; bottom: -160px; right: -120px; animation-delay: -6s; }
.blob-3 { width: 360px; height: 360px; background: #6d28d9; top: 40%; left: 50%; transform: translateX(-50%); opacity: .35; animation-delay: -12s; }
@keyframes float {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167,139,250,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(80% 60% at 50% 30%, #000 30%, transparent 80%);
}
.noise {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.8  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .35; mix-blend-mode: overlay;
}

/* ===== Loader ===== */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 40%, #1a0b2e 0%, #0a0118 80%);
  transition: opacity .55s var(--ease), visibility .55s var(--ease);
}
.loader.hide { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo { filter: drop-shadow(0 12px 30px rgba(168,85,247,.45)); animation: pop 1.2s var(--ease) infinite alternate; }
@keyframes pop { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.loader-name {
  font-family: 'Bricolage Grotesque'; font-weight: 800;
  letter-spacing: .35em; margin-top: 14px; color: #ede9fe;
}
.loader-bar { margin: 18px auto 0; width: 180px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.loader-bar span { display: block; width: 40%; height: 100%; background: var(--grad-1); border-radius: 99px; animation: bar 1.6s var(--ease) infinite; }
@keyframes bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

/* ===== Navbar ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: var(--safe-top);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: linear-gradient(180deg, rgba(7,2,15,.7), rgba(7,2,15,.35));
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: 'Bricolage Grotesque'; font-weight: 700; letter-spacing: .02em; color: #fff; }
.brand span { font-size: 18px; }
.brand em {
  font-style: normal; color: var(--purple-300); font-weight: 600;
  font-size: 11.5px; margin-left: 6px; letter-spacing: .06em;
  white-space: nowrap;
}
.brand em::before { content: ''; }
@media (max-width: 1000px) {
  .brand em { display: none; }
}
.brand-img {
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
  box-shadow: 0 4px 14px -2px rgba(124,58,237,.6), 0 0 0 1px rgba(168,85,247,.35) inset;
  background: #0a0118;
}
.loader-logo img {
  width: 90px; height: 90px; border-radius: 22px;
  box-shadow: 0 18px 50px -10px rgba(168,85,247,.55), 0 0 0 1px rgba(168,85,247,.4) inset;
  background: #0a0118;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 10px 14px; border-radius: 99px;
  color: var(--text-mut); font-weight: 500; font-size: 14px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.05); }

.btn-master {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 99px;
  background: var(--grad-1); color: #fff; font-weight: 600; font-size: 14px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 30px -10px rgba(124,58,237,.7), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
}
.btn-master:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -10px rgba(168,85,247,.85); }
.btn-master .dot { width: 6px; height: 6px; border-radius: 99px; background: #ade8ff; box-shadow: 0 0 8px #ade8ff; }

/* ===== Main / hero ===== */
.main { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 36px 22px 60px; }
.hero { text-align: left; padding: 30px 4px 14px; max-width: 720px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--purple-200); padding: 8px 14px; border-radius: 99px;
  background: rgba(168,85,247,.10); border: 1px solid var(--line-2);
}
.hero-eyebrow .pulse { width: 8px; height: 8px; border-radius: 99px; background: #c084fc; box-shadow: 0 0 0 0 rgba(192,132,252,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192,132,252,.6); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.hero-title {
  margin-top: 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02; letter-spacing: -0.02em;
}
.grad-text {
  background: linear-gradient(135deg, #c4b5fd, #a855f7 40%, #7c3aed);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--text-mut); margin-top: 14px; font-size: clamp(15px, 1.6vw, 17px); max-width: 600px; }

/* ===== 3-column grid ===== */
.grid-3 {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* ===== Cards ===== */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-xl);
  padding: 24px;
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: var(--shadow-md);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-glow); }
.card.glow::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 180deg, transparent, rgba(168,85,247,.35), transparent 30%);
  filter: blur(18px); opacity: .55; z-index: -1;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
}
.card-eyebrow {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--purple-300); margin-bottom: 6px;
}
.card-title {
  font-size: 22px; font-weight: 700;
}
.card-foot { margin-top: 18px; font-size: 12px; }
.card-foot.subtle { color: var(--text-sub); }
.mini-badge {
  font-size: 11px; font-weight: 600;
  padding: 6px 10px; border-radius: 99px;
  background: rgba(168,85,247,.14); color: var(--purple-200);
  border: 1px solid var(--line-2);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
  padding: 8px 12px; border-radius: 99px;
  background: rgba(34,197,94,.10); color: #86efac;
  border: 1px solid rgba(34,197,94,.25);
}
.live-dot { width: 7px; height: 7px; border-radius: 99px; background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse 1.8s infinite; }

/* Converter */
.card-converter { display: flex; flex-direction: column; }
.pair-selector {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 6px; background: rgba(255,255,255,.03);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.pair-btn {
  flex: 1 1 auto; min-width: 0;
  padding: 10px 12px; border-radius: 12px;
  background: transparent; border: 1px solid transparent; color: var(--text-mut);
  font-weight: 600; font-size: 12.5px; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.pair-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.pair-btn.active {
  background: var(--grad-1); color: #fff;
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 8px 22px -8px rgba(124,58,237,.7);
}
.pair-btn.disabled { opacity: .4; pointer-events: none; }

.io-row { margin-top: 18px; }
.io-label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 8px; font-weight: 600; letter-spacing: .04em; }
.io-field {
  position: relative; display: flex; align-items: center;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease);
}
.io-field:focus-within {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 4px rgba(168,85,247,.15);
  background: rgba(168,85,247,.05);
}
.io-field.receive { background: linear-gradient(180deg, rgba(168,85,247,.06), rgba(124,58,237,.04)); }
.io-field input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none; color: #fff;
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.01em;
}
.io-field input::placeholder { color: rgba(255,255,255,.25); }
.io-cur {
  font-weight: 700; letter-spacing: .08em; color: var(--purple-200);
  font-size: 14px; padding-left: 12px;
}

.swap-line {
  display: flex; align-items: center; justify-content: center;
  margin-top: 12px; gap: 12px;
}
.swap-rate {
  font-size: 12.5px; color: var(--text-sub); font-weight: 500;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}

.summary {
  margin-top: 22px; padding: 18px;
  background: linear-gradient(180deg, rgba(168,85,247,.07), rgba(124,58,237,.03));
  border: 1px solid var(--line-2); border-radius: var(--r-md);
}
.sum-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-mut); }
.sum-row + .sum-row { margin-top: 12px; }
.sum-row .sum-val { font-weight: 600; color: var(--text); font-size: 14px; }
.sum-row.total { padding-top: 12px; border-top: 1px dashed var(--line-2); }
.sum-row.total span:first-child { font-weight: 700; color: #fff; font-size: 14px; }
.total-val {
  font-family: 'Bricolage Grotesque'; font-weight: 800;
  font-size: 22px;
  background: linear-gradient(135deg, #ddd6fe, #a855f7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.actions { display: flex; gap: 10px; margin-top: 18px; }
.btn-primary {
  flex: 1; padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--grad-1); color: #fff; font-weight: 700;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 38px -14px rgba(124,58,237,.85), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: transform .15s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  position: relative;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); filter: brightness(.95); }
.btn-primary.full { width: 100%; flex: none; }
.btn-primary.sm { padding: 10px 14px; font-size: 13px; }
.btn-primary.saved { animation: savedPop .6s var(--ease); }
.btn-primary.error {
  background: linear-gradient(135deg, #b91c1c, #ef4444) !important;
  box-shadow: 0 14px 38px -14px rgba(220,38,38,.85), inset 0 0 0 1px rgba(255,255,255,.08);
  animation: errorShake .4s var(--ease);
}
@keyframes savedPop { 0% { transform: scale(1); } 30% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes errorShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.btn-spinner {
  width: 16px; height: 16px; border-radius: 99px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  padding: 14px 18px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--text); font-weight: 600;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: var(--line-2); }
.btn-ghost.sm { padding: 10px 14px; font-size: 13px; }

/* Receipt */
.receipt {
  margin-top: 18px; padding: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  position: relative; overflow: hidden;
}
.receipt::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(168,85,247,.5), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.receipt-head { display: flex; align-items: center; gap: 10px; font-weight: 800; font-family: 'Bricolage Grotesque'; font-size: 18px; margin-bottom: 14px; }
.receipt-emoji { font-size: 22px; }
.receipt-line { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-mut); font-size: 14px; }
.receipt-line b { color: #fff; font-weight: 700; }
.receipt-line.total { padding-top: 12px; border-top: 1px dashed var(--line-2); margin-top: 6px; }
.receipt-line.total b { background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 18px; font-family: 'Bricolage Grotesque'; }
.receipt-foot { margin-top: 12px; color: var(--text-sub); font-size: 12px; text-align: right; }

/* Rate list */
.rate-list { display: grid; gap: 10px; }
.rate-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.rate-item:hover { transform: translateY(-1px); background: rgba(255,255,255,.05); border-color: var(--line-2); }
.rate-pair { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 13px; }
.rate-flag {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; flex: none; position: relative;
  background: rgba(255,255,255,0.05);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,0.10);
}
.rate-flag img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rate-flag .flag-usdt {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #26a17b 0%, #50af95 100%);
  color: #fff; font-weight: 800; font-size: 16px;
  display: grid; place-items: center;
  font-family: 'Bricolage Grotesque';
}
.rate-flag .flag-fallback {
  width: 100%; height: 100%;
  background: var(--grad-1);
  color: #fff; font-weight: 800; font-size: 12px;
  display: grid; place-items: center;
}
.rate-val { font-family: 'Bricolage Grotesque'; font-weight: 700; font-size: 15px; color: #fff; transition: color .25s var(--ease); }
.rate-val.flash { color: #c4b5fd; animation: flash .8s var(--ease); }
@keyframes flash { 0% { color: #fff; } 50% { color: #a855f7; } 100% { color: #fff; } }
.rate-item.off { opacity: .45; }
.rate-item.off .rate-val::after { content: ' · off'; font-size: 11px; color: #f87171; }

/* Fee list */
.fee-list { display: grid; gap: 10px; }
.fee-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  font-size: 13px;
}
.fee-item .tier { color: var(--text-mut); }
.fee-item .val { font-weight: 700; color: #fff; }

/* Why */
.why { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.why-item {
  display: flex; gap: 14px; padding: 18px;
  background: var(--glass); border: 1px solid var(--line);
  border-radius: var(--r-md); backdrop-filter: blur(14px);
}
.why-ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(124,58,237,.15));
  display: grid; place-items: center; font-size: 22px; flex: none;
}
.why-item b { display: block; font-family: 'Bricolage Grotesque'; font-size: 15px; }
.why-item p { margin: 4px 0 0; font-size: 13px; color: var(--text-mut); }

/* Footer */
.footer {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 28px 22px calc(28px + var(--safe-bot));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  color: var(--text-sub); font-size: 13px;
  border-top: 1px solid var(--line);
}
.foot-left { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.foot-sep { opacity: .5; }
.foot-link {
  background: transparent; border: 0; color: var(--purple-200);
  font: inherit; cursor: pointer; padding: 0;
  position: relative; transition: color .2s var(--ease);
}
.foot-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.foot-link:hover { color: #fff; }
.foot-link:hover::after { transform: scaleX(1); }
.foot-link.sk { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.foot-links { display: flex; gap: 14px; }
.foot-links a:hover { color: #fff; }

/* ===== Help widget (side tab + chat panel) ===== */
.help-tab {
  position: fixed; top: 50%; right: 0; transform: translateY(-50%);
  z-index: 90;
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; border: 0;
  background: var(--grad-1); color: #fff;
  border-radius: 14px 0 0 14px;
  box-shadow: 0 14px 38px -12px rgba(124,58,237,.7), inset 0 0 0 1px rgba(255,255,255,.16);
  cursor: pointer; font: inherit;
  transition: padding .2s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}
.help-tab:hover { padding-right: 12px; box-shadow: 0 22px 50px -14px rgba(168,85,247,.85); }
.help-tab .help-tab-label {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
}
.help-tab[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.help-backdrop {
  position: fixed; inset: 0; z-index: 95;
  background: radial-gradient(60% 60% at 80% 50%, rgba(20,8,40,.55), rgba(7,2,15,.35));
  backdrop-filter: blur(4px);
  animation: modalIn .2s var(--ease);
}
.help-backdrop[hidden] { display: none; }

.help-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 100;
  width: min(380px, calc(100vw - 28px));
  max-height: min(78vh, 640px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(28,12,48,.96), rgba(14,4,28,.96));
  border: 1px solid var(--line-2);
  border-radius: 22px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(168,85,247,.18);
  overflow: hidden;
  animation: helpPop .35s var(--ease);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.help-panel[hidden] { display: none; }
@keyframes helpPop { from { transform: translateY(12px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.help-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124,58,237,.35), rgba(168,85,247,.25));
  border-bottom: 1px solid var(--line);
}
.help-av {
  position: relative;
  width: 42px; height: 42px; border-radius: 99px;
  background: var(--grad-1);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px -6px rgba(124,58,237,.7), inset 0 0 0 1px rgba(255,255,255,.18);
  flex: none;
}
.help-av-dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 12px; height: 12px; border-radius: 99px;
  background: #4ade80; border: 2px solid #1a0b2e;
  box-shadow: 0 0 8px #4ade80;
}
.help-name { font-family: 'Bricolage Grotesque'; font-weight: 700; color: #fff; font-size: 16px; }
.help-status { font-size: 11.5px; color: #c4b5fd; }
.help-close {
  margin-left: auto;
  width: 32px; height: 32px; border-radius: 99px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line);
  color: #fff; cursor: pointer; font-size: 20px; line-height: 1;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.help-close:hover { background: rgba(255,255,255,.16); transform: rotate(90deg); }

.help-body {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background-image: radial-gradient(60% 40% at 50% 0%, rgba(168,85,247,.06), transparent 70%);
}
.help-day {
  align-self: center;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-sub);
  padding: 4px 12px; border-radius: 99px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  margin-bottom: 6px;
}

.help-msg { display: flex; gap: 8px; align-items: flex-end; }
.help-msg.in { justify-content: flex-start; }
.help-msg-av {
  width: 28px; height: 28px; border-radius: 99px;
  background: var(--grad-1); color: #fff;
  display: grid; place-items: center; flex: none;
  box-shadow: 0 4px 10px -2px rgba(124,58,237,.6);
}
.help-bubble {
  max-width: 84%;
  padding: 12px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  color: var(--text); font-size: 13.5px; line-height: 1.55;
}
.help-bubble.subtle { background: transparent; color: var(--text-sub); font-size: 12.5px; }
.help-bubble b { color: #fff; }
.help-time { font-size: 10.5px; color: var(--text-sub); margin-top: 6px; }

.help-actions {
  display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; margin-top: 2px;
}
.help-chip {
  display: inline-flex; align-items: center;
  padding: 9px 14px; border-radius: 99px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  color: var(--purple-200); font-size: 12.5px; font-weight: 600;
  transition: background-color .2s var(--ease), transform .15s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.help-chip:hover {
  background: rgba(168,85,247,.12); color: #fff;
  border-color: var(--purple-400); transform: translateY(-1px);
}
.help-chip.primary {
  background: var(--grad-1); color: #fff; border-color: rgba(255,255,255,.18);
  box-shadow: 0 8px 22px -8px rgba(124,58,237,.7);
}
.help-chip.primary:hover { filter: brightness(1.06); }

.help-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  display: flex; justify-content: center;
}
.help-home {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 99px;
  background: rgba(168,85,247,.10); border: 1px solid var(--line-2);
  color: var(--purple-200); font-weight: 600; font-size: 13px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.help-home:hover { background: rgba(168,85,247,.18); color: #fff; }

@media (max-width: 1000px) {
  .help-tab { padding: 12px 6px; border-radius: 12px 0 0 12px; }
  .help-tab .help-tab-label { font-size: 11.5px; }
  .help-panel {
    right: 12px; left: 12px; bottom: 12px;
    width: auto; max-height: 82vh;
    border-radius: 18px;
  }
  .help-actions { padding-left: 0; }
}

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 22px;
  animation: modalIn .25s var(--ease);
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-backdrop {
  position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(20,8,40,.7), rgba(7,2,15,.85));
  backdrop-filter: blur(14px);
}
.modal-card {
  position: relative; z-index: 1;
  width: min(720px, 100%); max-height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(28,12,48,.96), rgba(14,4,28,.96));
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(168,85,247,.18);
  animation: modalPop .35s var(--ease);
  overflow: hidden;
}
@keyframes modalPop { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 24px 26px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-close {
  width: 38px; height: 38px; border-radius: 99px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.modal-close:hover { background: rgba(255,255,255,.1); transform: rotate(90deg); }
.modal-body {
  padding: 18px 26px 22px;
  overflow-y: auto; flex: 1;
  color: var(--text-mut); font-size: 14px; line-height: 1.7;
}
.modal-body h3 {
  font-family: 'Bricolage Grotesque'; font-size: 15px;
  color: #fff; letter-spacing: .04em; text-transform: uppercase;
  margin: 22px 0 10px;
  background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.modal-body p { margin: 0 0 12px; }
.modal-body ul { padding-left: 20px; margin: 0 0 12px; }
.modal-body li { margin: 6px 0; }
.modal-body b { color: #fff; }
.modal-foot {
  padding: 14px 26px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end;
}
.modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }

/* ===== Toast ===== */
.toast {
  position: fixed; right: 22px; bottom: calc(22px + var(--safe-bot));
  z-index: 200;
  padding: 12px 18px; border-radius: 99px;
  background: var(--grad-1); color: #fff;
  box-shadow: 0 18px 50px -14px rgba(124,58,237,.7);
  font-size: 13.5px; font-weight: 600;
  transform: translateY(140%); opacity: 0;
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.err {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  box-shadow: 0 18px 50px -14px rgba(220,38,38,.7);}

/* Install popup */
.install-pop[hidden] { display: none !important; }
.install-pop {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + var(--safe-bot)); z-index: 100;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; max-width: min(92%, 520px);
  background: rgba(20,8,40,.88); border: 1px solid var(--line-2);
  border-radius: 18px; backdrop-filter: blur(14px); color: var(--text-mut);
  box-shadow: var(--shadow-md);
  font-size: 13px; white-space: normal;
}
.install-pop > div:first-child { flex: 1; min-width: 0; }
.install-actions { display: flex; gap: 6px; flex: none; }

/* ===== Auth (login.html) ===== */
.auth-body { display: flex; flex-direction: column; min-height: 100dvh; }
.auth-wrap {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 22px; position: relative; z-index: 1; gap: 22px;
}
.auth-card {
  width: 100%; max-width: 460px;
  padding: 32px 28px;
}

.auth-brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.auth-brand-img {
  width: 84px; height: 84px; border-radius: 22px;
  box-shadow: 0 22px 50px -14px rgba(168,85,247,.7), 0 0 0 1px rgba(168,85,247,.4) inset;
  background: #0a0118;
}
.auth-brand-name {
  font-family: 'Bricolage Grotesque'; font-weight: 800;
  font-size: 22px; letter-spacing: -0.01em; color: #fff;
}
.auth-brand-name span {
  background: var(--grad-1);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.auth-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-bottom: 26px;
}
.auth-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 99px;
  background: rgba(168,85,247,.10); border: 1px solid var(--line-2);
  color: var(--purple-200); font-size: 12.5px; font-weight: 600;
}
.auth-badge svg { color: var(--purple-300); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: grid; gap: 8px; }
.auth-field label {
  font-size: 12px; color: var(--text-sub);
  font-weight: 600; letter-spacing: .04em; padding-left: 2px;
}
.auth-input {
  position: relative; display: flex; align-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease);
}
.auth-input:focus-within {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 4px rgba(168,85,247,.16);
  background: rgba(168,85,247,.06);
}
.auth-input-ico {
  display: grid; place-items: center;
  width: 44px; flex: none;
  color: var(--purple-300);
}
.auth-input input {
  flex: 1; min-width: 0;
  padding: 14px 14px 14px 0;
  background: transparent; border: 0; outline: none;
  color: #fff; font-size: 15px;
}
.auth-input input::placeholder { color: rgba(255,255,255,.32); }
.auth-eye {
  width: 44px; height: 100%; flex: none;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-sub);
  display: grid; place-items: center;
  transition: color .2s var(--ease);
}
.auth-eye:hover { color: #fff; }

.auth-err {
  background: rgba(248,113,113,.10); color: #fca5a5;
  border: 1px solid rgba(248,113,113,.3);
  padding: 10px 14px; border-radius: 10px; font-size: 13px;
}

.auth-btn {
  height: 52px; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.auth-btn svg { filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); }

.auth-forgot {
  align-self: flex-end;
  font-size: 13px; color: var(--purple-300); font-weight: 600;
  padding: 4px 2px; position: relative;
  transition: color .2s var(--ease);
}
.auth-forgot:hover { color: #fff; }
.auth-forgot::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transition: transform .25s var(--ease);
}
.auth-forgot:hover::after { transform: scaleX(1); }

.auth-secured {
  margin-top: 26px; display: flex; align-items: center; gap: 12px;
  color: var(--text-sub); font-size: 12px;
}
.auth-secured-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.auth-secured-text { letter-spacing: .02em; }

.auth-copy {
  color: var(--text-sub); font-size: 12.5px; text-align: center;
  padding: 0 16px;
}

/* ===== Admin dashboard ===== */
.admin-body { display: flex; flex-direction: column; min-height: 100dvh; }
.admin-main {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 0 auto;
  padding: 36px 22px 60px;
}
.admin-nav { display: flex; align-items: center; gap: 12px; }
.admin-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.admin-meta {
  background: var(--glass); border: 1px solid var(--line);
  padding: 14px 18px; border-radius: var(--r-md); backdrop-filter: blur(12px);
  text-align: right; font-size: 13px; color: var(--text-mut);
}
.admin-meta b { display: block; color: #fff; font-family: 'JetBrains Mono', monospace; margin-top: 4px; }

.admin-grid {
  margin-top: 32px; display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.admin-card-wide { grid-column: 1 / -1; }

.admin-rate-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.admin-status-grid {
  display: grid; gap: 10px;
}
.adm-row {
  display: grid; gap: 6px;
}
.adm-row > label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-sub); font-weight: 600; }
.adm-input {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 15px;
  outline: none;
}
.adm-input:focus { border-color: var(--purple-400); box-shadow: 0 0 0 4px rgba(168,85,247,.15); }

.adm-switch {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.adm-switch span { font-weight: 600; }
.toggle { position: relative; width: 44px; height: 24px; background: rgba(255,255,255,.1); border-radius: 99px; border: 1px solid var(--line); cursor: pointer; transition: background-color .2s var(--ease); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: transform .2s var(--ease); }
.toggle.on { background: var(--grad-1); }
.toggle.on::after { transform: translateX(20px); }

.admin-fees {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.fee-block {
  padding: 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.fee-block h3 { font-size: 13px; font-family: 'Plus Jakarta Sans'; font-weight: 700; color: var(--purple-200); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.fee-block .fee-tier { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; align-items: center; margin-top: 8px; }
.fee-block .fee-tier label { font-size: 12px; color: var(--text-mut); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1.5fr 1fr; }
  .grid-3 .card-fees { grid-column: 1 / -1; }
}

@media (max-width: 1000px) {
  body { font-size: 14.5px; }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .nav-inner .brand { order: 1; }
  .nav-inner .btn-master { order: 2; }
  .main { padding: 20px 16px 50px; }
  .hero { padding: 16px 4px 6px; }
  .hero-title { font-size: clamp(30px, 8vw, 44px); }
  .grid-3 { grid-template-columns: 1fr; gap: 16px; margin-top: 22px; }
  .card { padding: 20px; border-radius: var(--r-lg); }
  .card-converter { order: 1; }
  .card-rates { order: 2; }
  .card-fees { order: 3; }
  .pair-btn { font-size: 12px; padding: 9px 10px; }
  .io-field { padding: 12px 14px; }
  .io-field input { font-size: clamp(22px, 6vw, 30px); }
  .why { grid-template-columns: 1fr; gap: 12px; margin-top: 36px; }
  .footer { flex-direction: column; align-items: flex-start; padding: 22px 16px calc(22px + var(--safe-bot)); }
  .foot-left { font-size: 12.5px; }
  .modal { padding: 12px; }
  .modal-head { padding: 18px 18px 12px; }
  .modal-body { padding: 14px 18px 18px; font-size: 13.5px; }
  .modal-foot { padding: 12px 18px 18px; }
  .admin-main { padding: 22px 16px 60px; }
  .admin-grid { grid-template-columns: 1fr; gap: 16px; }
  .admin-rate-grid { grid-template-columns: 1fr 1fr; }
  .admin-fees { grid-template-columns: 1fr; }
  .toast { right: 12px; left: 12px; bottom: calc(14px + var(--safe-bot)); text-align: center; }
}

@media (max-width: 480px) {
  .admin-rate-grid { grid-template-columns: 1fr; }
  .pair-selector { padding: 4px; gap: 6px; }
  .pair-btn { flex: 1 1 30%; }
  .actions { flex-direction: column; }
  .btn-ghost { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   v3 — Dynamic Admin Dashboard (Activity Log, Tabs, Stats, etc.)
   ============================================================ */

/* Layout: sidebar + main */
.admin-layout {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  max-width: 1480px; margin: 0 auto;
  padding: 22px 22px 60px;
}
@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 1fr; }
}

/* ===== Activity Sidebar ===== */
.activity-sidebar {
  position: sticky; top: 86px;
  background: linear-gradient(180deg, rgba(28,12,48,.6), rgba(14,4,28,.45));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-md);
  height: calc(100vh - 110px);
  overflow: hidden;
  display: flex; flex-direction: column;
}
@media (max-width: 1100px) {
  .activity-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    width: min(380px, 100%); height: 100vh; z-index: 200;
    border-radius: 0; transform: translateX(110%);
    transition: transform .35s var(--ease);
  }
  .activity-sidebar.open { transform: translateX(0); }
}
.activity-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px; gap: 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(168,85,247,.08));
}
.activity-title {
  font-family: 'Bricolage Grotesque'; font-size: 18px; color: #fff; margin: 0;
}
.activity-close {
  width: 32px; height: 32px; border-radius: 99px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  display: none; place-items: center;
}
@media (max-width: 1100px) { .activity-close { display: grid; } }

.activity-feed {
  flex: 1; overflow-y: auto;
  padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.activity-feed::-webkit-scrollbar { width: 6px; }
.activity-empty {
  text-align: center; color: var(--text-sub); padding: 28px 14px; font-size: 13px;
}
.activity-item {
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border-left: 3px solid var(--purple-500);
  font-size: 12.5px; line-height: 1.5;
  animation: fadeIn .35s var(--ease);
}
.activity-item .activity-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--purple-300);
  font-weight: 600; margin-bottom: 2px;
}
.activity-item .activity-text { color: var(--text-mut); }
.activity-item .activity-text b { color: #fff; font-weight: 700; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.activity-trigger {
  display: none;
  align-items: center; gap: 6px; cursor: pointer;
  background: rgba(168,85,247,.14);
}
@media (max-width: 1100px) { .activity-trigger { display: inline-flex; } }
.activity-trigger .pulse-dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: #4ade80; box-shadow: 0 0 8px #4ade80;
  animation: pulse 1.8s infinite;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 26px 0 8px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  padding: 18px;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-md);
  backdrop-filter: blur(18px);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; inset: -1px;
  background: linear-gradient(135deg, rgba(168,85,247,.25), transparent 50%);
  opacity: .35; z-index: -1; border-radius: inherit;
}
.stat-label {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--purple-300); font-weight: 600;
}
.stat-value {
  font-family: 'Bricolage Grotesque'; font-weight: 800;
  font-size: clamp(28px, 4vw, 38px);
  background: linear-gradient(135deg, #ddd6fe, #a855f7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 6px 0 4px;
}
.stat-foot { font-size: 11.5px; color: var(--text-sub); }

/* ===== Admin Tabs ===== */
.admin-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px; margin: 26px 0 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: fit-content;
}
.tab-btn {
  padding: 10px 16px; border-radius: 12px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-mut); font-weight: 600; font-size: 13px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,.04); }
.tab-btn.active {
  background: var(--grad-1); color: #fff;
  box-shadow: 0 8px 22px -8px rgba(124,58,237,.7);
}
.tab-panel { display: none; animation: fadeIn .3s var(--ease); }
.tab-panel.active { display: block; }
.tab-panel > .card + .card { margin-top: 22px; }

/* ===== Create Pair Row ===== */
.pair-create-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr auto;
  gap: 12px; align-items: end;
}
@media (max-width: 800px) {
  .pair-create-row { grid-template-columns: 1fr; }
  .pair-create-arrow { display: none; }
}
.pair-create-field label {
  display: block; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-sub);
  font-weight: 600; margin-bottom: 6px;
}
.pair-create-arrow {
  font-size: 22px; color: var(--purple-300); padding-bottom: 12px;
}

/* ===== Pair Rows (rates + status) ===== */
.pairs-list { display: flex; flex-direction: column; gap: 10px; }
.pair-row {
  display: grid;
  grid-template-columns: 1fr 140px 60px 36px;
  gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
@media (max-width: 700px) {
  .pair-row { grid-template-columns: 1fr 36px; grid-template-areas:
    "left delete"
    "rate rate"
    "toggle toggle"; gap: 8px; }
  .pair-row-left { grid-area: left; }
  .pair-row .pair-rate-input { grid-area: rate; }
  .pair-row .toggle { grid-area: toggle; margin: 0; }
  .pair-row .icon-btn { grid-area: delete; }
}
.pair-row-left { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pair-flags { display: flex; align-items: center; flex: none; }
.pair-flag {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
  display: grid; place-items: center;
}
.pair-flag img { width: 100%; height: 100%; object-fit: cover; }
.pair-flag-2 { margin-left: -8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), -2px 0 0 var(--bg-1); }
.pair-name { font-weight: 700; font-size: 14px; }
.pair-sub { font-size: 11.5px; color: var(--text-sub); }

.pair-rate-input {
  width: 100%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

/* ===== Currency Grid ===== */
.currency-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.currency-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.currency-card:hover { background: rgba(168,85,247,.06); border-color: var(--line-2); }
.currency-flag {
  width: 36px; height: 36px; border-radius: 50%;
  overflow: hidden; background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
  display: grid; place-items: center; flex: none;
}
.currency-flag img { width: 100%; height: 100%; object-fit: cover; }
.currency-info { flex: 1; min-width: 0; }
.currency-code {
  font-family: 'Bricolage Grotesque'; font-weight: 800;
  font-size: 16px; color: #fff;
}
.currency-name {
  font-size: 11.5px; color: var(--text-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.currency-meta { display: flex; align-items: center; gap: 8px; flex: none; }

.currency-create-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr 1fr auto;
  gap: 10px; align-items: stretch;
}
@media (max-width: 800px) {
  .currency-create-row { grid-template-columns: 1fr 1fr; }
  .currency-create-row .btn-primary { grid-column: 1 / -1; }
}
.search-input { max-width: 280px; }

/* ===== Crypto flag badges ===== */
.flag-crypto {
  width: 100%; height: 100%;
  color: #fff; font-weight: 800; font-size: 15px;
  display: grid; place-items: center;
  font-family: 'Bricolage Grotesque';
}
.flag-usdt, .flag-usdc { background: linear-gradient(135deg, #26a17b, #50af95); }
.flag-btc  { background: linear-gradient(135deg, #f7931a, #ffb84d); color: #fff; }
.flag-eth  { background: linear-gradient(135deg, #627eea, #8b9eff); color: #fff; }

/* ===== Fee Tier Editor ===== */
.fee-block { padding: 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.fee-block + .fee-block { margin-top: 12px; }
.fee-block-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.fee-block-head h3 {
  font-size: 13px; font-family: 'Plus Jakarta Sans'; font-weight: 700;
  color: var(--purple-200); letter-spacing: .08em; text-transform: uppercase;
}
.tier-list { display: flex; flex-direction: column; gap: 6px; }
.tier-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 36px;
  gap: 8px; align-items: center;
}
.tier-row.tier-head {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-sub); font-weight: 600; padding: 4px 0;
}
.admin-fees { display: flex; flex-direction: column; gap: 14px; }

/* ===== Icon Buttons ===== */
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--text-mut); font-size: 18px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; transform: scale(1.04); }
.icon-btn.danger:hover { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.4); }

/* ===== Buttons danger ===== */
.btn-primary.danger {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  box-shadow: 0 14px 38px -14px rgba(220,38,38,.7);
}

/* ===== Skeleton loaders ===== */
.skeleton-row {
  height: 56px; border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.10) 50%, rgba(255,255,255,.04) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-row + .skeleton-row { margin-top: 8px; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center; color: var(--text-sub);
  padding: 24px 16px; font-size: 13.5px;
  background: rgba(255,255,255,.02); border: 1px dashed var(--line);
  border-radius: var(--r-md);
}

/* ===== Admin nav adjustments ===== */
.admin-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-hero { padding-top: 0; }

/* ===== Mobile responsive admin ===== */
@media (max-width: 1100px) {
  .admin-main { padding-top: 8px; }
}
@media (max-width: 700px) {
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 26px; }
  .tier-row { grid-template-columns: 1fr 1fr; }
  .tier-row .icon-btn { grid-column: 2; justify-self: end; }
}

/* ============================================================
   Fix: native <select> dropdown for dark theme
   ============================================================ */
select.adm-input {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23a78bfa' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
select.adm-input option {
  background-color: #1a0b2e;
  color: #fff;
  padding: 8px;
}
select.adm-input option:checked,
select.adm-input option:hover {
  background-color: #7c3aed;
  color: #fff;
}

/* ============================================================
   Site Content Editor (admin tab)
   ============================================================ */
.content-section {
  padding: 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  margin-bottom: 14px;
}
.content-section h3 {
  font-size: 13px; font-family: 'Plus Jakarta Sans'; font-weight: 700;
  color: var(--purple-200); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 12px;
}
.content-row {
  display: grid; gap: 6px; margin-bottom: 12px;
}
.content-row label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-sub); font-weight: 600;
}
.content-row .adm-input {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-size: 14px;
}
.content-row textarea.adm-input {
  min-height: 70px; resize: vertical;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.5;
}
.content-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 700px) { .content-grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   Social Media Icons in Footer
   ============================================================ */
.sosmed-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.sosmed-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-mut);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.sosmed-icon svg { width: 16px; height: 16px; display: block; }
.sosmed-icon:hover { color: #fff; transform: translateY(-2px); }

/* Brand colors on hover */
.sosmed-whatsapp:hover  { background: #25d366; color: #fff; }
.sosmed-instagram:hover { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); color: #fff; }
.sosmed-youtube:hover   { background: #ff0000; color: #fff; }
.sosmed-facebook:hover  { background: #1877f2; color: #fff; }
.sosmed-tiktok:hover    { background: linear-gradient(135deg, #25f4ee, #fe2c55); color: #fff; }
.sosmed-discord:hover   { background: #5865f2; color: #fff; }
.sosmed-telegram:hover  { background: #229ed9; color: #fff; }
.sosmed-twitter:hover   { background: #000; color: #fff; }

/* Footer layout adjust for sosmed row */
.footer .foot-left {
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ============================================================
   Konfigurasi Editor — Section Subtitle
   ============================================================ */
.content-section-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin: -8px 0 14px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .sosmed-row { margin-left: 0; width: 100%; padding-top: 6px; }
  .footer .foot-left { width: 100%; }
}
