/* =========================================================
   DYOMM APPS — Premium Black & White Design System
   Inspired by shadcn-admin. Tokens, components, layouts.
   Business logic untouched — only visual layer.
   ========================================================= */

/* ---------- Design tokens (semantic, warm neutral) -------- */
:root{
  color-scheme: light;
  --radius: 0.7rem;
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Warm off-white palette — NOT sterile pure white/gray */
  --background: #f7f5f1;        /* warm off-white page bg */
  --foreground: #211f1b;        /* warm near-black text */
  --card: #fffdf9;              /* surface tier 2 — cards sit above bg */
  --card-foreground: #211f1b;
  --popover: #fffefb;           /* surface tier 3 — popovers/menus float highest */
  --popover-foreground: #211f1b;
  --primary: #211f1b;
  --primary-foreground: #fbf9f5;
  --secondary: #eeebe4;         /* muted warm surface (chips, subtle fills) */
  --secondary-foreground: #211f1b;
  --muted: #eeebe4;
  --muted-foreground: #79726a;  /* warm gray, not blue-gray */
  --accent: #e8e4db;
  --accent-foreground: #211f1b;
  --border: #e4dfd5;            /* soft warm border */
  --input: #e4dfd5;
  --ring: #211f1b;

  /* Surface elevation scale — used instead of ad-hoc per-
     component colors. 1 = page, 4 = highest float. */
  --surface-1: var(--background);
  --surface-2: var(--card);
  --surface-3: var(--secondary);
  --surface-4: var(--popover);

  /* Premium background tokens */
  --bg-glow: radial-gradient(900px circle at 50% -80px, rgba(80,60,30,0.035), transparent 55%);
  --bg-noise-opacity: 0.025;
  --surface-tint: linear-gradient(180deg, rgba(80,60,30,0.02), rgba(80,60,30,0) 320px);

  /* Status colors (the only allowed accents) + subtle tints
     for badges/alerts so components stop hardcoding hex */
  --success: #16a34a;
  --success-foreground: #ffffff;
  --success-subtle: #eef7ee;
  --success-subtle-border: #cfe9d1;
  --warning: #b8790a;
  --warning-foreground: #ffffff;
  --warning-subtle: #fbf1e2;
  --warning-subtle-border: #ecd9b4;
  --destructive: #c23b2f;
  --destructive-foreground: #ffffff;
  --destructive-subtle: #fbeeec;
  --destructive-subtle-border: #f0cec8;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Soft, warm-tinted shadows — never pure flat black */
  --shadow-xs: 0 1px 1px rgb(60 45 20 / 0.04), 0 1px 2px rgb(60 45 20 / 0.04);
  --shadow-sm: 0 1px 2px rgb(60 45 20 / 0.05), 0 2px 6px -1px rgb(60 45 20 / 0.06);
  --shadow-md: 0 2px 4px -1px rgb(60 45 20 / 0.06), 0 8px 24px -6px rgb(60 45 20 / 0.09);
  --shadow-lg: 0 8px 16px -6px rgb(60 45 20 / 0.09), 0 24px 48px -12px rgb(60 45 20 / 0.13);
  --shadow-ring: 0 0 0 1px rgb(60 45 20 / 0.06);

  /* Interaction tokens — theme-adaptive via color-mix so no
     component needs its own dark-mode override */
  --focus-ring: 0 0 0 3px color-mix(in oklab, var(--ring) 35%, transparent);
  --focus-ring-offset: 0 0 0 2px var(--background);
  --hover-surface: color-mix(in oklab, var(--foreground) 6%, transparent);
  --hover-surface-strong: color-mix(in oklab, var(--foreground) 10%, transparent);
  --row-hover: color-mix(in oklab, var(--foreground) 4%, transparent);
}

/* ---------- Reset ---------------------------------------- */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
body{
  font-family:var(--font-sans);
  background:var(--background);
  color:var(--foreground);
  font-size:14px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  min-height:100vh;
  overflow-x:hidden;
}
img,svg{display:block;max-width:100%}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
input,select,textarea{font:inherit;color:inherit}
a{color:inherit;text-decoration:none}
hr{border:0;border-top:1px solid var(--border)}
::selection{background:var(--foreground);color:var(--background)}

/* Hide decorative noisy elements globally (clean monochrome). */
.bg-decor,.blob,.grid-overlay,.noise{display:none !important}

/* ---------- Loader --------------------------------------- */
.loader{
  position:fixed;inset:0;z-index:9999;
  display:flex;align-items:center;justify-content:center;
  background:var(--background);
  transition:opacity .3s ease, visibility .3s ease;
}
.loader.hide{opacity:0;visibility:hidden;pointer-events:none}
.loader-inner{display:flex;flex-direction:column;align-items:center;gap:18px}
.loader-logo img{border-radius:14px;box-shadow:var(--shadow-md)}
.loader-name{
  font-family:var(--font-display);font-weight:700;letter-spacing:.16em;
  font-size:14px;color:var(--foreground)
}
.loader-bar{
  width:140px;height:3px;border-radius:999px;
  background:var(--muted);overflow:hidden;position:relative
}
.loader-bar span{
  position:absolute;inset:0;background:var(--foreground);
  transform:translateX(-100%);
  animation:loaderSlide 1.2s ease-in-out infinite
}
@keyframes loaderSlide{
  0%{transform:translateX(-100%)}
  50%{transform:translateX(40%)}
  100%{transform:translateX(110%)}
}

/* ---------- Nav / Header --------------------------------- */
.nav{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(1.4) blur(10px);
  -webkit-backdrop-filter:saturate(1.4) blur(10px);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:1280px;margin:0 auto;
  padding:14px 24px;
  display:flex;align-items:center;justify-content:space-between;gap:18px;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--foreground)}
.brand-img{width:32px;height:32px;border-radius:8px;object-fit:cover}
.brand em{font-style:normal;color:var(--muted-foreground);font-weight:500;font-size:12px}
.nav-links{display:flex;align-items:center;gap:4px}
.nav-links a{
  padding:8px 12px;border-radius:var(--radius-md);
  font-size:13.5px;font-weight:500;color:var(--muted-foreground);
  transition:color .15s, background .15s;
}
.nav-links a:hover{color:var(--foreground);background:var(--accent)}
.nav-cta{display:flex;align-items:center;gap:8px}

/* Language pill */
.lang-pill{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 10px;border:1px solid var(--border);
  border-radius:var(--radius-md);background:var(--background);
  font-size:12.5px;font-weight:600;color:var(--foreground);
  transition:background .15s, border-color .15s;
}
.lang-pill:hover{background:var(--accent)}
.lang-pill-flag{display:inline-flex}
.flag-sm,.fi{border-radius:2px}

/* Master CTA / primary button */
.btn-master{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 14px;border-radius:var(--radius-md);
  background:var(--primary);color:var(--primary-foreground);
  font-weight:600;font-size:13px;
  transition:opacity .15s, transform .05s;
  box-shadow:var(--shadow-sm);
}
.btn-master:hover{opacity:.9}
.btn-master:active{transform:translateY(1px)}
.btn-master .dot{
  width:6px;height:6px;border-radius:999px;background:var(--success);
  box-shadow:0 0 0 3px rgba(34,197,94,.18)
}
.btn-master-label-short{display:none}
@media (max-width:640px){
  .btn-master-label-full{display:none}
  .btn-master-label-short{display:inline}
}

/* ---------- Main / Containers ---------------------------- */
.main{max-width:1280px;margin:0 auto;padding:32px 24px 80px}

/* ---------- Hero ----------------------------------------- */
.hero{padding:48px 0 28px;text-align:left}
.hero-eyebrow{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 12px;border-radius:999px;
  background:var(--secondary);border:1px solid var(--border);
  font-size:12px;font-weight:600;color:var(--muted-foreground);
  letter-spacing:.02em;
}
.pulse{
  width:6px;height:6px;border-radius:999px;background:var(--foreground);
  box-shadow:0 0 0 4px rgba(0,0,0,.08);
  animation:pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{50%{opacity:.4}}

.hero-title{
  font-family:var(--font-display);
  font-size:clamp(36px,6vw,64px);
  line-height:1.05;letter-spacing:-0.025em;
  font-weight:700;margin:18px 0 14px;color:var(--foreground);
}
/* Light mode: dark gradient on white bg */
.grad-text{
  color:var(--foreground);
  background:linear-gradient(180deg,#111111 0%,#555555 100%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
/* Dark mode: light gradient on dark bg */
html[data-theme="dark"] .grad-text{
  background:linear-gradient(180deg,#ffffff 0%,#a1a1aa 100%);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.hero-sub{
  max-width:620px;font-size:16px;line-height:1.6;
  color:var(--muted-foreground);margin:0;
}

/* ---------- Card ----------------------------------------- */
.card{
  background:var(--card);color:var(--card-foreground);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:22px;
  box-shadow:var(--shadow-xs);
  transition:box-shadow .2s, border-color .2s;
}
.card:hover{box-shadow:var(--shadow-sm)}
.card.glow{box-shadow:var(--shadow-sm)}
.card-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  margin-bottom:16px;
}
.card-eyebrow{
  font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted-foreground);
}
.card-title{
  font-family:var(--font-display);
  font-size:20px;font-weight:700;letter-spacing:-0.01em;
  margin:4px 0 0;color:var(--foreground);
}
.card-foot{margin-top:14px;font-size:12px;color:var(--muted-foreground)}
.card-foot.subtle{opacity:.8}

/* Status badges */
.badge,.mini-badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;border-radius:999px;
  background:var(--secondary);border:1px solid var(--border);
  font-size:11.5px;font-weight:600;color:var(--foreground);
  white-space:nowrap;
}
.mini-badge{font-size:11px;padding:4px 9px;color:var(--muted-foreground)}
.live-dot,.pulse-dot{
  width:6px;height:6px;border-radius:999px;background:var(--success);
  box-shadow:0 0 0 3px rgba(22,163,74,.18);
  animation:pulse 1.8s ease-in-out infinite;
}

/* ---------- Grid Layouts --------------------------------- */
.grid-3{
  display:grid;gap:18px;
  grid-template-columns:1.4fr 1fr 1fr;
  margin-top:18px;
}
@media (max-width:1024px){.grid-3{grid-template-columns:1fr 1fr}}
@media (max-width:720px){.grid-3{grid-template-columns:1fr}}

/* ---------- Pair selector & inputs ----------------------- */
.pair-selector{
  display:flex;flex-wrap:wrap;gap:6px;
  margin-bottom:16px;
}
.pair-btn{
  padding:6px 10px;border-radius:var(--radius-md);
  border:1px solid var(--border);background:var(--background);
  font-size:12px;font-weight:600;color:var(--muted-foreground);
  transition:all .15s;
}
.pair-btn:hover{background:var(--accent);color:var(--foreground)}
.pair-btn.active{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}

.io-row{margin-top:12px}
.io-label{
  display:block;font-size:12px;font-weight:600;
  color:var(--muted-foreground);margin-bottom:6px;
}
.io-field{
  display:flex;align-items:center;gap:8px;
  background:var(--background);border:1px solid var(--input);
  border-radius:var(--radius-md);
  padding:10px 12px;
  transition:border-color .15s, box-shadow .15s;
}
.io-field:focus-within{border-color:var(--ring);box-shadow:var(--focus-ring)}
.io-field.receive{background:var(--secondary)}
.io-field input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  font-family:var(--font-mono);font-size:18px;font-weight:600;
  color:var(--foreground);
}
.io-field input::placeholder{color:#9ca3af}
.io-cur{
  font-size:12.5px;font-weight:700;color:var(--foreground);
  background:var(--background);border:1px solid var(--border);
  padding:4px 9px;border-radius:6px;
}
.io-field.receive .io-cur{background:var(--background)}

.swap-line{
  display:flex;justify-content:center;align-items:center;
  margin:8px 0 -4px;font-size:12px;color:var(--muted-foreground);
  font-family:var(--font-mono);
}

/* Summary */
.summary{
  margin-top:14px;padding:12px;
  background:var(--secondary);border:1px solid var(--border);
  border-radius:var(--radius-md);
}
.sum-row{display:flex;justify-content:space-between;font-size:13px;padding:4px 0}
.sum-row.total{border-top:1px solid var(--border);margin-top:6px;padding-top:10px;font-weight:600}
.sum-val{font-family:var(--font-mono);color:var(--foreground)}
.total-val{font-size:15px;font-weight:700}

/* Actions row */
.actions{display:flex;gap:8px;margin-top:14px}
.btn-primary{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 14px;border-radius:var(--radius-md);
  background:var(--primary);color:var(--primary-foreground);
  font-weight:600;font-size:13px;
  transition:opacity .15s, transform .05s;
}
.btn-primary:hover{opacity:.9}
.btn-primary:active{transform:translateY(1px)}
.btn-primary.full{width:100%}
.btn-ghost{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:10px 14px;border-radius:var(--radius-md);
  background:var(--background);color:var(--foreground);
  border:1px solid var(--border);font-weight:600;font-size:13px;
}
.btn-ghost:hover{background:var(--accent)}
.btn-spinner{
  width:14px;height:14px;border-radius:999px;
  border:2px solid currentColor;border-right-color:transparent;
  animation:spin .7s linear infinite;display:inline-block;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Receipt */
.receipt{
  margin-top:14px;padding:14px;
  background:var(--secondary);border:1px dashed var(--border);
  border-radius:var(--radius-md);font-size:13px;
}
.receipt-head{
  display:flex;align-items:center;gap:8px;font-weight:700;margin-bottom:8px;
}
.receipt-line{display:flex;justify-content:space-between;padding:3px 0;color:var(--muted-foreground)}
.receipt-line b{color:var(--foreground);font-family:var(--font-mono)}
.receipt-line.total{border-top:1px solid var(--border);margin-top:6px;padding-top:8px;color:var(--foreground)}
.receipt-foot{margin-top:8px;font-size:11px;color:var(--muted-foreground);text-align:right;font-family:var(--font-mono)}

/* ---------- Rate list / Fee list ------------------------- */
.rate-list,.fee-list{display:flex;flex-direction:column;gap:8px}
.rate-item,.fee-item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px;background:var(--background);
  border:1px solid var(--border);border-radius:var(--radius-md);
  transition:border-color .15s, background .15s;
}
.rate-item:hover,.fee-item:hover{background:var(--accent)}
.rate-pair,.fee-pair{font-weight:600;font-size:13px}
.rate-value,.fee-value{font-family:var(--font-mono);font-size:13px;color:var(--muted-foreground)}

/* ---------- Exchange panels: equal height + capped scroll -
   Converter / Live rates / Transfer fee no longer grow with
   content (e.g. a long rate list) — every panel is capped to
   the same height and its list scrolls internally instead. */
:root{
  --xchg-panel-h: 600px;
  --xchg-panel-h-tablet: 560px;
}
.card-converter,.card-rates,.card-fees{
  display:flex;flex-direction:column;
}
.rate-list,.fee-list{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:4px;
  margin-right:-4px;
  scrollbar-width:thin;
  scrollbar-color: color-mix(in oklab, var(--foreground) 22%, transparent) transparent;
}
.rate-list::-webkit-scrollbar,.fee-list::-webkit-scrollbar{ width:6px; }
.rate-list::-webkit-scrollbar-track,.fee-list::-webkit-scrollbar-track{ background:transparent; }
.rate-list::-webkit-scrollbar-thumb,.fee-list::-webkit-scrollbar-thumb{
  background: color-mix(in oklab, var(--foreground) 18%, transparent);
  border-radius:999px;
}
.rate-list::-webkit-scrollbar-thumb:hover,.fee-list::-webkit-scrollbar-thumb:hover{
  background: color-mix(in oklab, var(--foreground) 30%, transparent);
}
/* Card itself keeps a tidy, predictable height once panels sit
   side by side (2 or 3 columns). On a single stacked column the
   fixed height is dropped — only the list scroll cap remains. */
@media (min-width:721px){
  .card.card-converter,.card.card-rates,.card.card-fees{
    height:var(--xchg-panel-h);
  }
}
@media (min-width:721px) and (max-width:1024px){
  .card.card-converter,.card.card-rates,.card.card-fees{
    height:var(--xchg-panel-h-tablet);
  }
}
/* Converter has no single internal list, so let the whole card
   scroll if its content (e.g. an open receipt) needs more room
   than the fixed panel height. */
.card.card-converter{
  overflow-y:auto;
  overflow-x:hidden;
}
@media (max-width:720px){
  .rate-list,.fee-list{ max-height:320px; }
}

/* ---------- Why section ---------------------------------- */
.why{
  display:grid;gap:14px;
  grid-template-columns:repeat(3,1fr);
  margin-top:36px;
}
@media (max-width:860px){.why{grid-template-columns:1fr}}
.why-item{
  display:flex;align-items:flex-start;gap:14px;
  padding:18px;border:1px solid var(--border);
  border-radius:var(--radius-lg);background:var(--card);
}
.why-ico{
  width:38px;height:38px;flex:none;
  display:grid;place-items:center;
  background:var(--secondary);border:1px solid var(--border);
  border-radius:var(--radius-md);color:var(--foreground);
}
.why-ico svg{width:18px;height:18px}
.why-item b{display:block;font-weight:700;font-size:14px;margin-bottom:2px}
.why-item p{margin:0;color:var(--muted-foreground);font-size:13px}

/* ---------- Stats ---------------------------------------- */
.stats{
  display:grid;gap:14px;
  grid-template-columns:repeat(4,1fr);
  margin-top:36px;
}
@media (max-width:860px){.stats{grid-template-columns:repeat(2,1fr)}}
.stat-card{
  padding:18px;background:var(--card);
  border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xs);
}
.stat-number,.stat-value{
  font-family:var(--font-display);
  font-size:28px;font-weight:700;letter-spacing:-0.02em;
  color:var(--foreground);line-height:1.1;
}
.stat-label{font-size:12px;color:var(--muted-foreground);font-weight:600;
  text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.stat-foot{margin-top:6px;font-size:11.5px;color:var(--muted-foreground)}

/* ---------- FAQ (shadcn.io style: plain list, no boxes) -- */
/* ══════════════════════════════════════════════════════════
   FAQ SECTION — premium redesign
   ══════════════════════════════════════════════════════════ */
.faq{ margin-top:0; }

/* Head */
.faq-head{ text-align:center; margin-bottom:28px; }
.faq-eyebrow{
  display:inline-block; font-size:11px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted-foreground);
}
.faq-title{
  font-family:var(--font-display);
  font-size:clamp(26px,4vw,38px); font-weight:700;
  margin:8px 0 12px; letter-spacing:-0.02em;
}
.faq-subtitle{
  font-size:14px; color:var(--muted-foreground); line-height:1.6;
  margin:0; max-width:480px; margin:0 auto;
}

/* Search */
.faq-search-wrap{
  max-width:480px; margin:0 auto 28px;
}
.faq-search-box{
  position:relative; display:flex; align-items:center;
}
.faq-search-icon{
  position:absolute; left:14px; width:16px; height:16px;
  color:var(--muted-foreground); pointer-events:none; flex:none;
}
.faq-search-input{
  width:100%; padding:11px 16px 11px 42px;
  border:1px solid var(--border); border-radius:10px;
  background:var(--background); color:var(--foreground);
  font-size:13.5px; outline:none;
  transition:border-color .15s, box-shadow .15s;
  font-family:inherit;
}
.faq-search-input::placeholder{ color:var(--muted-foreground); }
.faq-search-input:focus{
  border-color:var(--foreground);
  box-shadow:0 0 0 3px rgba(0,0,0,.06);
}

/* Tabs wrapper — card style */
.faq-tabs-wrap{
  max-width:860px; margin:0 auto 24px;
  background:var(--secondary);
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
}
.faq-tabs{
  display:flex; flex-wrap:wrap; justify-content:center; gap:6px;
}
.faq-tab{
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:8px;
  font-size:12.5px; font-weight:600; color:var(--muted-foreground);
  white-space:nowrap; transition:color .15s, background .15s, box-shadow .15s;
  background:transparent;
}
.faq-tab:hover{ color:var(--foreground); background:var(--background); }
.faq-tab.active{
  background:var(--background); color:var(--foreground);
  box-shadow:0 1px 4px rgba(0,0,0,.1), 0 0 0 1px var(--border);
}
.faq-tab-icon{
  width:14px; height:14px; flex:none; opacity:.7;
}
.faq-tab.active .faq-tab-icon{ opacity:1; }

/* Body: accordion + CTA */
.faq-body{
  max-width:860px; margin:0 auto;
}

/* Panels */
.faq-panels{ display:block; }
.faq-list{
  display:flex; flex-direction:column;
  background:var(--background);
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  will-change:opacity;
}
/* CRITICAL: override display:flex when hidden so panels take zero layout space */
.faq-list[hidden]{ display:none !important; }

/* Accordion items */
.faq-item{
  background:transparent; border:0;
  border-bottom:1px solid var(--border);
  border-radius:0; overflow:hidden;
}
.faq-item:last-child{ border-bottom:0; }
.faq-item summary{
  list-style:none; cursor:pointer;
  padding:20px 24px; font-weight:600; font-size:14.5px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  transition:background .1s;
}
.faq-item summary:hover{ background:var(--secondary); }
.faq-item[open] summary{ background:var(--secondary); }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-chevron{
  width:16px; height:16px; transition:transform .2s; flex:none;
  color:var(--muted-foreground);
}
.faq-item[open] .faq-chevron{ transform:rotate(180deg); }
.faq-answer{
  padding:0 24px 20px; font-size:13.5px;
  color:var(--muted-foreground); line-height:1.65;
}

/* CTA Banner */
.faq-cta{
  margin-top:16px;
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:20px 24px;
  background:var(--secondary);
  border:1px solid var(--border);
  border-radius:16px;
}
.faq-cta-icon{
  width:44px; height:44px; border-radius:50%;
  background:var(--background);
  border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; flex:none;
}
.faq-cta-icon svg{ width:20px; height:20px; color:var(--foreground); }
.faq-cta-text{
  display:flex; flex-direction:column; gap:2px; flex:1; min-width:160px;
}
.faq-cta-text strong{ font-size:14px; font-weight:600; color:var(--foreground); }
.faq-cta-text span{ font-size:13px; color:var(--muted-foreground); }
.faq-cta-btn{
  margin-left:auto; white-space:nowrap;
  background:var(--foreground); color:var(--background);
  padding:10px 20px; border-radius:8px;
  font-size:13.5px; font-weight:600;
  transition:opacity .15s;
  text-decoration:none; display:inline-block;
}
.faq-cta-btn:hover{ opacity:.85; }

/* Search: no-results state */
.faq-no-results{
  text-align:center; padding:40px 24px;
  color:var(--muted-foreground); font-size:14px;
  display:none;
}
.faq-no-results.visible{ display:block; }

/* Mobile */
@media (max-width:640px){
  .faq-tabs-wrap{ padding:10px; border-radius:12px; }
  .faq-tabs{ justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; -webkit-overflow-scrolling:touch; gap:4px; }
  .faq-tabs::-webkit-scrollbar{ display:none; }
  .faq-tab{ flex:none; font-size:12px; padding:7px 12px; }
  .faq-tab-icon{ display:none; }
  .faq-item summary{ padding:16px 18px; font-size:13.5px; }
  .faq-answer{ padding:0 18px 16px; }
  .faq-cta{ flex-direction:column; align-items:flex-start; gap:12px; }
  .faq-cta-btn{ margin-left:0; width:100%; text-align:center; }
}

/* ---------- Footer (shadcn.io style: multi-column) ------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--background);
  margin-top: 0;
  padding: 48px 32px 24px;
}

/* Multi-column grid: brand column wider, rest equal */
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 28px;
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 36px;
}

.foot-col-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 12px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.foot-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.foot-brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

.foot-tagline {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin: 0;
  max-width: 260px;
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.foot-col-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 2px;
}

.foot-col a,
.foot-col .foot-link {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
  text-decoration: none;
  width: fit-content;
}

.foot-col a:hover,
.foot-col .foot-link:hover {
  color: var(--foreground);
}

/* Sosmed icons (sit under brand tagline) */
.sosmed-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.sosmed-row a {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.sosmed-row a:hover {
  color: var(--foreground);
  background: var(--accent);
  border-color: var(--border);
}

/* Bottom bar: copyright left, credit line right */
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.foot-copy {
  font-size: 12px;
  color: var(--muted-foreground);
  letter-spacing: 0.01em;
}

.foot-credit {
  font-size: 12px;
  color: var(--muted-foreground);
}

.foot-credit b {
  color: var(--foreground);
  font-weight: 700;
}

/* Legacy selectors kept for JS/markup compat (older pages) */
.foot-top   { display: contents; }
.foot-nav   { display: contents; }
.foot-left  { display: contents; }
.foot-links { display: contents; }
.foot-sep   { display: none; }

/* Tablet: brand spans full width, columns wrap to 3 */
@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .foot-col-brand {
    grid-column: 1 / -1;
    padding-right: 0;
    margin-bottom: 8px;
  }
}

/* Mobile footer: stack everything, 2 columns for links */
@media (max-width: 600px) {
  .footer {
    padding: 36px 16px 20px;
  }
  .foot-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding-bottom: 28px;
  }
  .foot-col-brand {
    grid-column: 1 / -1;
  }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 16px;
  }
}
/* ---------- Modal (shadcn-style dialog) ------------------ */
.modal{
  position:fixed;inset:0;z-index:100;
  display:grid;place-items:center;padding:20px;
}
.modal[hidden]{display:none}
.modal-backdrop{
  position:absolute;inset:0;background:rgba(0,0,0,.5);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  animation:fadeIn .2s ease;
}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes pop{from{opacity:0;transform:scale(.96) translateY(6px)}to{opacity:1;transform:none}}
.modal-card{
  position:relative;width:min(560px,100%);max-height:85vh;overflow:auto;
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);
  padding:22px;animation:pop .18s ease;
}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px}
.modal-close{
  width:30px;height:30px;border-radius:var(--radius-md);
  display:grid;place-items:center;color:var(--muted-foreground);
  border:1px solid var(--border);background:var(--background);
  font-size:18px;line-height:1;
}
.modal-close:hover{background:var(--accent);color:var(--foreground)}
.modal-body{font-size:13.5px;color:var(--foreground);line-height:1.6}
.modal-body p{margin:0 0 10px}
.modal-foot{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}

/* ---------- Toast ---------------------------------------- */
.toast{
  position:fixed;bottom:20px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--primary);color:var(--primary-foreground);
  padding:10px 16px;border-radius:var(--radius-md);
  font-size:13px;font-weight:500;
  box-shadow:var(--shadow-lg);
  z-index:200;opacity:0;pointer-events:none;
  transition:opacity .2s, transform .2s;
  max-width:calc(100% - 40px);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.toast.success{background:var(--success);color:var(--success-foreground)}
.toast.error{background:var(--destructive);color:var(--destructive-foreground)}
.toast.warning{background:var(--warning);color:var(--warning-foreground)}

/* =========================================================
   AUTH / LOGIN PAGE
   ========================================================= */
.auth-body{
  min-height:100vh;
  background:var(--secondary);
  background-attachment: fixed;
}
html[data-theme="dark"] .auth-body{
  background:
    radial-gradient(800px 400px at 50% -100px, rgba(210,170,110,0.06), transparent 60%),
    var(--background);
  background-attachment: fixed;
}
.auth-wrap{
  min-height:100vh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  padding:24px;gap:18px;
}
.auth-card{
  width:min(420px,100%);
  padding:32px;background:var(--card);
  border:1px solid var(--border);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-lg);
}
.auth-brand{
  display:flex;flex-direction:column;align-items:center;gap:10px;
  margin-bottom:18px;
}
.auth-brand-img{width:48px;height:48px;border-radius:10px;box-shadow:var(--shadow-sm)}
.auth-brand-name{font-family:var(--font-display);font-weight:800;font-size:20px;letter-spacing:-0.01em}
.auth-brand-name span{color:var(--muted-foreground);font-weight:600}
.auth-badges{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.auth-badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:5px 10px;font-size:11px;font-weight:600;
  background:var(--secondary);border:1px solid var(--border);
  border-radius:999px;color:var(--muted-foreground);
}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-field label{
  display:block;font-size:12.5px;font-weight:600;color:var(--foreground);
  margin-bottom:6px;
}
.auth-input{
  display:flex;align-items:center;gap:8px;
  background:var(--background);border:1px solid var(--input);
  border-radius:var(--radius-md);padding:10px 12px;
  transition:border-color .15s, box-shadow .15s;
}
.auth-input:focus-within{border-color:var(--ring);box-shadow:var(--focus-ring)}
.auth-input-ico{color:var(--muted-foreground);display:inline-flex}
.auth-input input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;
  font-size:14px;color:var(--foreground);
}
.auth-eye{color:var(--muted-foreground);padding:2px;border-radius:6px}
.auth-eye:hover{color:var(--foreground)}
.auth-err{
  font-size:12.5px;padding:8px 12px;border-radius:var(--radius-md);
  background:var(--destructive-subtle);color:var(--destructive);border:1px solid var(--destructive-subtle-border);
}
.auth-btn{margin-top:4px}
.auth-forgot{
  display:block;text-align:center;margin-top:4px;
  font-size:12.5px;font-weight:600;color:var(--muted-foreground);
  text-decoration:none;
}
.auth-forgot:hover{color:var(--foreground);text-decoration:underline;text-underline-offset:3px}
.auth-secured{display:flex;align-items:center;gap:10px;margin-top:22px}
.auth-secured-line{flex:1;height:1px;background:var(--border)}
.auth-secured-text{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground)}
.auth-copy{font-size:11.5px;color:var(--muted-foreground);text-align:center}

/* =========================================================
   ADMIN LAYOUT — Sidebar + Header + Main (shadcn-admin)
   ========================================================= */
.admin-body{
  min-height:100vh;
  background:var(--secondary);
  background-attachment: fixed;
}
html[data-theme="dark"] .admin-body{
  background:
    radial-gradient(800px 400px at 50% -100px, rgba(210,170,110,0.06), transparent 60%),
    var(--background);
  background-attachment: fixed;
}
.admin-body .nav{
  background:var(--background);border-bottom:1px solid var(--border);
}
.admin-nav{display:flex;align-items:center;gap:8px}
.activity-trigger{cursor:pointer}
.activity-trigger:hover{background:var(--accent)}

.admin-layout{
  display:grid;grid-template-columns:280px 1fr;gap:0;
  max-width:1440px;margin:0 auto;
  min-height:calc(100vh - 65px);
}
@media (max-width:1024px){
  .admin-layout{grid-template-columns:1fr}
  .activity-sidebar{display:none}
  .activity-sidebar.open{
    display:flex;position:fixed;top:0;right:0;bottom:0;left:auto;
    width:min(360px,100%);z-index:80;box-shadow:var(--shadow-lg);
  }
}

.activity-sidebar{
  position:sticky;top:65px;
  height:calc(100vh - 65px);
  background:var(--background);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  overflow:hidden;
}
.activity-head{
  display:flex;justify-content:space-between;align-items:flex-start;
  gap:8px;padding:18px 18px 14px;border-bottom:1px solid var(--border);
}
.activity-title{
  margin:4px 0 0;font-family:var(--font-display);
  font-size:15px;font-weight:700;letter-spacing:-0.01em;
}
.activity-close{
  width:28px;height:28px;border-radius:6px;display:grid;place-items:center;
  color:var(--muted-foreground);font-size:18px;line-height:1;
  border:1px solid var(--border);background:var(--background);
}
.activity-close:hover{background:var(--accent);color:var(--foreground)}
.activity-feed{
  flex:1;overflow-y:auto;padding:14px 18px;
  display:flex;flex-direction:column;gap:10px;
}
.activity-empty{
  font-size:12.5px;color:var(--muted-foreground);
  text-align:center;padding:24px 0;
}
.activity-item{
  padding:10px 12px;background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-md);font-size:12.5px;
}
.activity-item .activity-when{font-size:11px;color:var(--muted-foreground);margin-top:4px}

.admin-main{padding:28px 28px 60px;min-width:0}
@media (max-width:640px){.admin-main{padding:18px 16px 40px}}

.admin-hero{
  display:flex;justify-content:space-between;align-items:flex-end;
  gap:18px;flex-wrap:wrap;margin-bottom:24px;
}
.admin-hero .hero-title{font-size:clamp(26px,4vw,40px);margin:14px 0 0}
.admin-meta{
  text-align:right;font-size:12px;color:var(--muted-foreground);
  background:var(--card);border:1px solid var(--border);
  padding:10px 14px;border-radius:var(--radius-md);
}
.admin-meta b{display:block;color:var(--foreground);font-family:var(--font-mono);font-size:13px;margin-top:2px}

.stats-grid{
  display:grid;gap:14px;
  grid-template-columns:repeat(4,1fr);
  margin-bottom:24px;
}
@media (max-width:1024px){.stats-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:520px){.stats-grid{grid-template-columns:1fr}}

/* Admin tabs */
.admin-tabs{
  display:flex;gap:4px;padding:4px;
  background:var(--secondary);border:1px solid var(--border);
  border-radius:var(--radius-md);
  margin-bottom:18px;width:fit-content;
  flex-wrap:wrap;
}
.tab-btn{
  padding:7px 14px;border-radius:6px;
  font-size:13px;font-weight:600;color:var(--muted-foreground);
  transition:background .15s, color .15s;
}
.tab-btn:hover{color:var(--foreground)}
.tab-btn.active{background:var(--background);color:var(--foreground);box-shadow:var(--shadow-xs)}
.tab-panel{display:none}
.tab-panel.active{display:block}

.admin-card{
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:22px;margin-bottom:18px;
  box-shadow:var(--shadow-xs);
}
.admin-card-wide{grid-column:1/-1}

/* Currency grid */
.currency-grid{
  display:grid;gap:10px;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
}
.currency-card{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;background:var(--background);
  border:1px solid var(--border);border-radius:var(--radius-md);
  font-size:13px;
}
.currency-card .cur-code{font-weight:700}
.currency-card .cur-name{color:var(--muted-foreground);font-size:12px}

.currency-create-row{
  display:grid;gap:8px;grid-template-columns:repeat(4,1fr) auto;
  margin-top:14px;
}
@media (max-width:760px){.currency-create-row{grid-template-columns:1fr 1fr}}

/* Admin inputs */
.adm-input,.search-input{
  width:100%;padding:9px 12px;font-size:13px;
  background:var(--background);border:1px solid var(--input);
  border-radius:var(--radius-md);color:var(--foreground);
  transition:border-color .15s, box-shadow .15s;
}
.adm-input:focus,.search-input:focus{
  outline:0;border-color:var(--ring);
  box-shadow:var(--focus-ring);
}
.search-input{margin-bottom:14px}

/* Pairs / rates list */
.pairs-list{display:flex;flex-direction:column;gap:8px}
.pair-create-row{
  display:grid;gap:8px;grid-template-columns:1fr auto 1fr 1fr auto;
  align-items:center;
  padding:12px;background:var(--secondary);border:1px solid var(--border);
  border-radius:var(--radius-md);margin-bottom:12px;
}
@media (max-width:760px){
  .pair-create-row{grid-template-columns:1fr 1fr}
  .pair-create-arrow{display:none}
}
.pair-create-arrow{text-align:center;color:var(--muted-foreground);font-weight:700}

/* Toggle switch */
.toggle{
  position:relative;display:inline-block;width:36px;height:20px;
  background:var(--border);border-radius:999px;cursor:pointer;
  transition:background .15s;flex:none;
}
.toggle::after{
  content:"";position:absolute;top:2px;left:2px;
  width:16px;height:16px;background:#fff;border-radius:50%;
  box-shadow:var(--shadow-sm);transition:transform .15s;
}
.toggle.on{background:var(--foreground)}
.toggle.on::after{transform:translateX(16px)}

/* Fees editor */
.admin-fees{display:flex;flex-direction:column;gap:10px}

/* Empty state */
.empty-state{
  padding:32px 18px;text-align:center;
  color:var(--muted-foreground);font-size:13px;
  border:1px dashed var(--border);border-radius:var(--radius-md);
  background:var(--secondary);
}
.skeleton-row{
  height:42px;background:linear-gradient(90deg,var(--muted) 25%,var(--accent) 50%,var(--muted) 75%);
  background-size:200% 100%;animation:shimmer 1.4s infinite;
  border-radius:var(--radius-md);margin-bottom:8px;
}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* =========================================================
   LANG MODAL
   ========================================================= */
/* Language picker — right-side drawer (Wise-style) */
.lang-modal-backdrop{
  position:fixed;inset:0;z-index:119;
  background:rgba(0,0,0,.45);backdrop-filter:blur(2px);
  opacity:0;pointer-events:none;transition:opacity .25s ease;
}
.lang-modal-backdrop.open{opacity:1;pointer-events:auto}
.lang-modal{
  position:fixed;top:0;right:0;bottom:0;z-index:120;
  width:min(440px,100%);
  background:var(--card);border-left:1px solid var(--border);
  box-shadow:-12px 0 32px -12px rgba(0,0,0,.25);
  display:flex;flex-direction:column;
  padding:24px 24px 20px;
  transform:translateX(100%);
  transition:transform .28s cubic-bezier(.32,.72,0,1);
  overscroll-behavior:contain;
}
.lang-modal.open{transform:translateX(0)}
.lang-modal-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;margin-bottom:6px;
}
.lang-modal-head h3{
  margin:0;font-size:18px;font-weight:700;color:var(--foreground);letter-spacing:-.01em;
}
.lang-close{
  display:inline-flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:999px;
  border:1px solid var(--border);background:var(--background);
  color:var(--muted-foreground);cursor:pointer;flex-shrink:0;
  transition:background .15s,color .15s;
}
.lang-close:hover{background:var(--accent);color:var(--foreground)}
.lang-modal-sub{
  margin:0 0 18px;font-size:13px;color:var(--muted-foreground);line-height:1.5;
}
.lang-list{
  flex:1 1 auto;overflow-y:auto;
  display:flex;flex-direction:column;gap:8px;
  margin:0 -4px;padding:2px 4px 8px;
}
.lang-option{
  display:flex;align-items:center;gap:12px;
  width:100%;text-align:left;
  padding:12px 14px;
  background:var(--card);
  border:1px solid var(--border);border-radius:var(--radius-md);
  font-size:14px;font-weight:600;color:var(--foreground);
  cursor:pointer;transition:background .15s,border-color .15s;
}
.lang-option:hover{background:var(--accent)}
.lang-option.active{border-color:var(--foreground);background:var(--secondary)}
.lang-option-flag{display:inline-flex;flex-shrink:0}
.lang-option-flag .fi{width:28px;height:20px;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.06)}
.lang-name{flex:1 1 auto;min-width:0;line-height:1.25}
.lang-native{font-weight:500;color:var(--muted-foreground);font-size:12px}
.lang-check{
  display:inline-flex;align-items:center;justify-content:center;
  width:20px;height:20px;border-radius:999px;
  background:var(--foreground);color:var(--background);
  opacity:0;transform:scale(.6);transition:opacity .15s,transform .15s;
  flex-shrink:0;
}
.lang-option.active .lang-check{opacity:1;transform:scale(1)}
.lang-modal-foot{
  margin-top:14px;padding-top:14px;
  border-top:1px solid var(--border);
}
.lang-confirm-btn{
  width:100%;padding:12px 16px;
  background:var(--foreground);color:var(--background);
  border:0;border-radius:var(--radius-md);
  font-size:14px;font-weight:700;cursor:pointer;
  transition:opacity .15s;
}
.lang-confirm-btn:hover{opacity:.9}
@media (max-width:480px){
  .lang-modal{width:100%;border-left:0}
}

/* =========================================================
   HELP / SUPPORT WIDGET
   ========================================================= */
.help-tab{
  position:fixed;bottom:20px;right:20px;z-index:60;
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 14px;background:var(--primary);color:var(--primary-foreground);
  border-radius:999px;font-size:13px;font-weight:600;
  box-shadow:var(--shadow-lg);cursor:pointer;
}
.help-tab:hover{opacity:.92}
.help-panel{
  position:fixed;bottom:20px;right:20px;z-index:70;
  width:min(360px,calc(100% - 40px));max-height:560px;
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);
  display:none;flex-direction:column;overflow:hidden;
}
.help-panel.open{display:flex}
.help-backdrop{display:none}
.help-head{
  display:flex;align-items:center;gap:10px;padding:14px;
  border-bottom:1px solid var(--border);
}
.help-av{position:relative;width:38px;height:38px;border-radius:999px;background:var(--secondary);display:grid;place-items:center;font-weight:700}
.help-av-dot{position:absolute;bottom:0;right:0;width:10px;height:10px;background:var(--success);border-radius:999px;border:2px solid var(--card)}
.help-name{font-weight:700;font-size:13.5px}
.help-status{font-size:11.5px;color:var(--muted-foreground)}
.help-close{margin-left:auto;color:var(--muted-foreground)}
.help-body{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--secondary)}
.help-day{text-align:center;font-size:11px;color:var(--muted-foreground);margin:4px 0}
.help-msg{display:flex;align-items:flex-end;gap:6px}
.help-msg-av{width:24px;height:24px;border-radius:999px;background:var(--background);border:1px solid var(--border)}
.help-bubble{
  max-width:78%;padding:9px 12px;background:var(--background);
  border:1px solid var(--border);border-radius:14px 14px 14px 4px;
  font-size:13px;
}
.help-bubble.subtle{background:var(--accent);color:var(--muted-foreground)}
.help-time{font-size:10.5px;color:var(--muted-foreground);margin-top:2px;display:block}
.help-foot{padding:10px;border-top:1px solid var(--border);background:var(--background)}
.help-actions{display:flex;flex-wrap:wrap;gap:6px}
.help-chip{
  padding:6px 10px;font-size:12px;font-weight:600;
  background:var(--secondary);border:1px solid var(--border);border-radius:999px;
}
.help-chip:hover{background:var(--accent)}
.help-home{padding:8px 12px;display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--border);font-size:12px;color:var(--muted-foreground)}

/* =========================================================
   INSTALL PROMPT
   ========================================================= */
.install-pop{
  position:fixed;bottom:80px;right:20px;z-index:65;
  width:min(320px,calc(100% - 40px));padding:14px;
  background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-md);box-shadow:var(--shadow-lg);
  font-size:13px;
}
.install-pop[hidden]{display:none}
.install-actions{display:flex;gap:8px;margin-top:10px}

/* =========================================================
   ABOUT PAGE (tentang.html)
   ========================================================= */
.about-page{max-width:880px;margin:0 auto;padding:48px 24px 80px}
.about-hero{text-align:center;margin-bottom:32px}
.about-eyebrow{
  display:inline-block;font-size:11px;font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;color:var(--muted-foreground);
}
.about-title{
  font-family:var(--font-display);
  font-size:clamp(32px,5vw,52px);font-weight:700;letter-spacing:-0.025em;
  margin:10px 0 14px;
}
.about-lead{color:var(--muted-foreground);font-size:16px;line-height:1.6;max-width:680px;margin:0 auto}
.about-content{display:flex;flex-direction:column;gap:24px}
.about-services{margin-top:8px}
.service-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.service-card{
  padding:18px;background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-lg);
}
.service-card h3{margin:0 0 6px;font-size:15px;font-weight:700}
.service-card p{margin:0;color:var(--muted-foreground);font-size:13px}
.about-commit .commit-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.about-commit .commit-list li{
  padding:10px 14px;background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius-md);font-size:13.5px;
}
.about-closing{text-align:center;padding:24px;background:var(--secondary);border:1px solid var(--border);border-radius:var(--radius-lg)}
.about-cta{
  display:inline-flex;align-items:center;gap:8px;margin-top:18px;
  padding:10px 18px;border-radius:var(--radius-md);
  background:var(--primary);color:var(--primary-foreground);
  font-weight:600;font-size:14px;
  transition:opacity .15s, transform .05s;
  box-shadow:var(--shadow-sm);
  text-decoration:none;
}
.about-cta:hover{opacity:.9;transform:translateY(-1px)}
.about-cta:active{transform:translateY(0)}
.about-cta-wrap{text-align:center;margin-top:18px}

/* =========================================================
   STATUS UTILITIES
   ========================================================= */
.success,.in{color:var(--success)}
.warning{color:var(--warning)}
.danger{color:var(--destructive)}
.check{color:var(--success)}
.primary{color:var(--foreground)}
.sm{font-size:12px}
.subtle{color:var(--muted-foreground)}

/* Active link state */
.active{color:var(--foreground)}
.nav-links a.active{
  color:var(--foreground);
  background:var(--accent);
  font-weight:600;
}

/* =========================================================
   PRINT
   ========================================================= */
@media print{
  .nav,.footer,.help-tab,.help-panel,.install-pop,.toast{display:none !important}
  body{background:#fff;color:#000}
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */
@media (max-width:640px){
  .nav-links{display:none}
  .hero{padding:32px 0 18px}
  .main{padding:20px 16px 60px}
  .card{padding:18px}
  .modal-card{padding:18px}
}

/* =========================================================
   RESPONSIVE FIXES — prevent grid/flex children blowing out
   ========================================================= */
.grid-3 > *,
.stats > *,
.stats-grid > *,
.why > *,
.service-grid > *,
.currency-grid > *,
.pair-create-row > *,
.currency-create-row > *,
.admin-layout > *{ min-width: 0; }

.card, .modal-card, .auth-card, .admin-card{ max-width: 100%; min-width: 0; }
.card{ overflow: hidden; }

/* Allow inputs and currency code chips to shrink inside flex */
.io-field{ min-width: 0; flex-wrap: wrap; }
.io-field input{ width: 100%; min-width: 0; flex: 1 1 0; }
.io-cur{ flex: none; }

/* Mono numerics should never push parents */
.sum-val, .total-val, .rate-value, .fee-value, .receipt-line b{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Long words / URLs in modal body */
.modal-body, .faq-answer{ overflow-wrap: anywhere; }

/* Rate / fee rows: allow wrap on very narrow screens */
.rate-item, .fee-item{ flex-wrap: wrap; row-gap: 4px; }

/* Nav admin row: wrap badges instead of overflow */
.admin-nav{ flex-wrap: wrap; row-gap: 6px; justify-content: flex-end; }

/* Pair selector buttons stay clickable on small screens */
.pair-selector{ overflow-x: auto; flex-wrap: wrap; }

/* Very small (≤360) tightening */
@media (max-width: 380px){
  .main{ padding: 18px 12px 50px; }
  .card{ padding: 16px; border-radius: var(--radius-md); }
  .nav-inner{ padding: 12px 14px; gap: 10px; }
  .brand span{ font-size: 14px; }
  .brand em{ display: none; }
  .hero-title{ font-size: 30px; }
  .io-field input{ font-size: 16px; }
  .total-val{ font-size: 14px; }
  .badge, .mini-badge{ font-size: 10.5px; padding: 4px 8px; }
  .lang-pill-code{ display: none; }
  .lang-pill{ padding: 6px 8px; }
  .stat-number, .stat-value{ font-size: 24px; }
}

/* Mobile: reduce admin hero density */
@media (max-width: 640px){
  .admin-hero{ flex-direction: column; align-items: flex-start; }
  .admin-meta{ width: 100%; text-align: left; }
  .activity-sidebar.open{ width: 100% !important; max-width: 360px; }
}

/* Prevent any horizontal scroll page-wide */
html, body{ max-width: 100%; overflow-x: hidden; }

/* ============================================================
   THEME: Dark mode tokens — warm charcoal (single source of
   truth). Activated via <html data-theme="dark"> set by theme.js.
   Every dark-mode value lives HERE ONLY — no other rule in this
   file should re-declare these custom properties for dark mode.
   ============================================================ */
html[data-theme="dark"]{
  color-scheme: dark;

  /* Warm charcoal palette — NOT pure black, NOT navy */
  --background: #17150f;        /* warm charcoal page bg */
  --foreground: #f2ede4;        /* warm off-white text */
  --card: #1e1b15;              /* surface tier 2 */
  --card-foreground: #f2ede4;
  --popover: #24201a;           /* surface tier 3 — floats above card */
  --popover-foreground: #f2ede4;
  --primary: #f2ede4;
  --primary-foreground: #17150f;
  --secondary: #29251d;
  --secondary-foreground: #f2ede4;
  --muted: #29251d;
  --muted-foreground: #a89e8f;  /* warm gray, keeps text legible */
  --accent: #322c22;
  --accent-foreground: #f2ede4;
  --border: #332e24;            /* subtle warm border, visible not harsh */
  --input: #332e24;
  --ring: #d8cfbf;

  --surface-1: var(--background);
  --surface-2: var(--card);
  --surface-3: var(--secondary);
  --surface-4: var(--popover);

  /* Soft shadows — warm-tinted black, never flat/blue-black */
  --shadow-xs: 0 1px 1px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.5), 0 2px 6px -1px rgb(0 0 0 / 0.45);
  --shadow-md: 0 2px 4px -1px rgb(0 0 0 / 0.5), 0 12px 28px -8px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 10px 20px -6px rgb(0 0 0 / 0.55), 0 28px 56px -14px rgb(0 0 0 / 0.6);
  --shadow-ring: 0 0 0 1px rgb(255 245 230 / 0.06);

  --surface-tint: radial-gradient(1200px 600px at 50% -200px, rgba(255,245,230,0.035), transparent 60%);
  --bg-glow: radial-gradient(900px circle at 50% -80px, rgba(210,170,110,0.05), transparent 55%);
  --bg-noise-opacity: 0.035;

  /* Status subtle tints re-tuned for a dark warm surface */
  --success-subtle: color-mix(in oklab, var(--success) 16%, var(--card));
  --success-subtle-border: color-mix(in oklab, var(--success) 34%, var(--card));
  --warning-subtle: color-mix(in oklab, var(--warning) 16%, var(--card));
  --warning-subtle-border: color-mix(in oklab, var(--warning) 34%, var(--card));
  --destructive-subtle: color-mix(in oklab, var(--destructive) 16%, var(--card));
  --destructive-subtle-border: color-mix(in oklab, var(--destructive) 34%, var(--card));

  /* Interaction tokens — slightly stronger on dark for the same
     perceived contrast as light mode */
  --focus-ring: 0 0 0 3px color-mix(in oklab, var(--ring) 40%, transparent);
  --hover-surface: color-mix(in oklab, var(--foreground) 8%, transparent);
  --hover-surface-strong: color-mix(in oklab, var(--foreground) 14%, transparent);
  --row-hover: color-mix(in oklab, var(--foreground) 6%, transparent);
}
html[data-theme="dark"] img.invert-on-dark,
html[data-theme="dark"] .invert-on-dark img{ filter: invert(1) hue-rotate(180deg); }

/* Theme toggle button (matches lang-pill / btn-master visual language) */
.theme-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:999px;
  border:1px solid var(--border);background:var(--background);color:var(--foreground);
  cursor:pointer;transition:background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  box-shadow:var(--shadow-xs);
}
.theme-toggle:hover{ background:var(--accent); }
.theme-toggle:active{ transform:scale(.96); }
.theme-toggle svg{ width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
.theme-toggle .icon-sun{ display:inline-block; }
.theme-toggle .icon-moon{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-sun{ display:none; }
html[data-theme="dark"] .theme-toggle .icon-moon{ display:inline-block; }

/* Smooth transitions on theme switch */
body, .nav, .card, .modal, .auth-card, .admin-shell, header, footer, input, select, textarea, button{
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

@media print { html[data-theme="dark"]{ --background:#fff; --foreground:#000; } }

/* ============================================================
   v1.4 — POLISH LAYER (visual only, no logic/layout changes)
   Refined tokens, depth, typography, hover/focus, dark mode.
   Inspired by Linear / Stripe / Vercel / shadcn.
   ============================================================ */

/* Tokens for this layer (radius, shadows, surface-tint, status
   subtle tints, hover/focus) now live solely in the :root and
   html[data-theme="dark"] blocks above — nothing to redeclare here. */

/* Smoother type rendering + better default contrast */
html{ text-rendering: optimizeLegibility; }

/* ── LIGHT MODE background ──────────────────────────────────
   Warm off-white base. Faint top-glow + barely-visible noise
   give depth without turning sterile-white or cold-gray.        */
body{
  font-feature-settings: "ss01","cv11","ss03";
  letter-spacing: -0.005em;
  background:
    var(--bg-glow),
    var(--surface-tint),
    var(--background);
  background-attachment: fixed;
}

/* Noise layer — very faint on light, slightly stronger on dark */
body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  opacity:var(--bg-noise-opacity);
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat:repeat;
  background-size:256px 256px;
}

/* ── DARK MODE background ───────────────────────────────────
   Warm charcoal. Amber-tinted glow on top for a premium material
   feel — no blue/violet, no navy, no flat pure-black.            */
html[data-theme="dark"] body{
  background:
    var(--bg-glow),
    radial-gradient(700px 380px at 100% -40px, rgba(210,170,110,0.035), transparent 58%),
    var(--surface-tint),
    var(--background);
  background-attachment: fixed;
}

/* Tighter, more confident headings */
h1,h2,h3,.hero-title{ letter-spacing:-0.022em; }
.hero-title{ font-weight:720; }
.hero-sub{ color: color-mix(in oklab, var(--foreground) 62%, transparent); }

/* Nav — glassy + crisper border, theme-adaptive via color-mix */
.nav{
  background: color-mix(in oklab, var(--background) 82%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}
html[data-theme="dark"] .nav{
  background: color-mix(in oklab, var(--background) 80%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 7%, transparent);
}
.nav-links a{ transition: color .15s ease, background-color .15s ease; }
.nav-links a:hover{ background: color-mix(in oklab, var(--foreground) 6%, transparent); }

/* Buttons — refined depth + active feedback */
.btn-master, .btn, button.btn-master{
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgb(255 255 255 / 0.08);
  transition: transform .08s ease, box-shadow .2s ease, opacity .15s ease, background-color .2s ease;
}
.btn-master:hover{ opacity:1; box-shadow: var(--shadow-md), inset 0 1px 0 rgb(255 255 255 / 0.1); transform: translateY(-1px); }
.btn-master:active{ transform: translateY(0); box-shadow: var(--shadow-xs); }

/* Pills / language switch */
.lang-pill, .theme-toggle{
  box-shadow: var(--shadow-xs);
  transition: background-color .2s ease, border-color .2s ease, transform .1s ease, box-shadow .2s ease;
}
.lang-pill:hover, .theme-toggle:hover{ box-shadow: var(--shadow-sm); }

/* Cards — softer borders, subtle lift on hover */
.card{
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
  border-radius: calc(var(--radius) + 2px);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.card:hover{
  box-shadow: var(--shadow-md);
  border-color: color-mix(in oklab, var(--foreground) 14%, transparent);
}

/* Inputs — clean, focus ring like shadcn */
input, select, textarea{
  border-radius: var(--radius-md);
  border:1px solid var(--input);
  background: var(--background);
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input:hover, select:hover, textarea:hover{
  border-color: color-mix(in oklab, var(--foreground) 22%, transparent);
}
input:focus, select:focus, textarea:focus, button:focus-visible{
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 22%, transparent);
}

/* Tables — readable, modern fintech */
table{ border-collapse: separate; border-spacing: 0; width:100%; }
th, td{
  text-align:left; padding: 12px 14px;
  border-bottom: 1px solid color-mix(in oklab, var(--foreground) 7%, transparent);
  font-variant-numeric: tabular-nums;
}
thead th{
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--foreground) 3%, transparent);
}
tbody tr{ transition: background-color .15s ease; }
tbody tr:hover{ background: color-mix(in oklab, var(--foreground) 4%, transparent); }

/* Section rhythm */
section{ scroll-margin-top: 80px; }
.main > section + section{ margin-top: 56px; }
@media (min-width: 900px){ .main > section + section{ margin-top: 72px; } }

/* Hero CTA hierarchy — clearer secondary */
.hero .btn-master + .btn,
.hero .btn-master + a.btn,
.hero .btn-master + button{
  background: transparent;
  border:1px solid var(--border);
  color: var(--foreground);
}
.hero .btn-master + .btn:hover{ background: color-mix(in oklab, var(--foreground) 5%, transparent); }

/* Focus accessibility */
a:focus-visible{
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Scrollbar */
*{ scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--foreground) 22%, transparent) transparent; }
*::-webkit-scrollbar{ width:10px; height:10px; }
*::-webkit-scrollbar-thumb{
  background: color-mix(in oklab, var(--foreground) 18%, transparent);
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover{ background: color-mix(in oklab, var(--foreground) 32%, transparent); background-clip: padding-box; }

/* Selection */
::selection{ background: color-mix(in oklab, var(--foreground) 88%, transparent); color: var(--background); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ============================================================
   v1.4 — INTERACTION STATES (consistent hover + a11y focus)
   Unified token-driven hover/focus across buttons, links,
   inputs, and table rows. Keyboard-first via :focus-visible.
   ============================================================ */

/* Focus/hover tokens now declared once in :root / html[data-theme="dark"] above. */

/* Kill default browser outline only where we replace it with a visible ring */
:focus{ outline: none; }

/* Universal keyboard focus — strong, never invisible */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
[role="tab"]:focus-visible,
[role="menuitem"]:focus-visible,
summary:focus-visible,
.btn-master:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.lang-pill:focus-visible,
.theme-toggle:focus-visible,
.pair-btn:focus-visible,
.tab-btn:focus-visible,
.help-tab:focus-visible,
.help-chip:focus-visible,
.foot-links a:focus-visible,
.sosmed-row a:focus-visible,
.nav-links a:focus-visible,
.lang-option:focus-visible,
.activity-trigger:focus-visible,
.modal-close:focus-visible,
.auth-forgot:focus-visible,
.auth-eye:focus-visible{
  outline: none;
  box-shadow: var(--focus-ring-offset), var(--focus-ring);
  border-radius: var(--radius-md);
  z-index: 1;
}

/* Form field focus — visible ring on the field container */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.adm-input:focus,
.search-input:focus{
  outline: none;
  border-color: var(--ring);
  box-shadow: var(--focus-ring);
}
.io-field:focus-within,
.auth-input:focus-within{
  border-color: var(--ring);
  box-shadow: var(--focus-ring);
}

/* Consistent hover for all interactive surfaces */
.nav-links a:hover,
.foot-links a:hover,
.sosmed-row a:hover,
.lang-pill:hover,
.theme-toggle:hover,
.pair-btn:hover,
.tab-btn:hover,
.btn-ghost:hover,
.activity-trigger:hover,
.activity-close:hover,
.modal-close:hover,
.lang-close:hover,
.lang-option:hover,
.help-chip:hover,
.rate-item:hover,
.fee-item:hover{
  background: var(--hover-surface);
  color: var(--foreground);
}

/* Primary buttons — keep brand fill, add depth + subtle brighten */
.btn-master:hover,
.btn-primary:hover,
.lang-confirm-btn:hover,
.help-tab:hover{
  opacity: 1;
  filter: brightness(1.05);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgb(255 255 255 / 0.10);
}
html[data-theme="dark"] .btn-master:hover,
html[data-theme="dark"] .btn-primary:hover{
  filter: brightness(1.1);
}
.btn-master:active,
.btn-primary:active,
.lang-confirm-btn:active,
.help-tab:active{
  transform: translateY(0);
  filter: brightness(0.98);
  box-shadow: var(--shadow-xs);
}

/* Disabled state — consistent and obvious */
button:disabled,
.btn-master:disabled,
.btn-primary:disabled,
input:disabled,
select:disabled,
textarea:disabled{
  opacity: .55;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

/* Links — clearer hover affordance */
a:not([class]):hover{
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Table rows — unified hover + keyboard focus */
tbody tr{ transition: background-color .15s ease; }
tbody tr:hover{ background: var(--row-hover); }
tbody tr:focus-within{
  background: var(--row-hover);
  box-shadow: inset 2px 0 0 var(--foreground);
}
tbody tr[role="button"]:focus-visible,
tbody tr.is-clickable:focus-visible{
  outline: none;
  background: var(--hover-surface);
  box-shadow: inset 0 0 0 2px var(--ring);
}

/* Inputs — consistent hover affordance */
input:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus){
  border-color: color-mix(in oklab, var(--foreground) 28%, transparent);
}

/* High contrast / forced colors — keep focus visible */
@media (forced-colors: active){
  a:focus-visible, button:focus-visible, input:focus-visible,
  select:focus-visible, textarea:focus-visible, [role="button"]:focus-visible{
    outline: 2px solid CanvasText;
    outline-offset: 2px;
    box-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MagicBento — Adaptive B&W Glow (v3.8)
   Dark  → white glow, dark cards (#0a0a0a)
   Light → black glow, light cards (#f0f0f0)
═══════════════════════════════════════════════════════════════ */

/* Section wrapper */
.bento-section {
  position: relative;
  padding: 3rem 1rem 1rem;
  user-select: none;
}

.bento-head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.bento-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

.bento-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin: 0;
}

/* Mode badge — top-right corner of the section */
.bento-mode-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 1;
  pointer-events: none;
}

/* Grid */
.card-grid {
  display: grid;
  gap: 0.5em;
  padding: 0.75em;
  max-width: 54em;
  margin: 0 auto;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
}

/* Cards */
.magic-bento-card {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 240px;
  width: 100%;
  padding: 1.1em 1.25em 1.25em;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background-color: #0a0a0a;
  color: #ffffff;
  font-weight: 300;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;

  --glow-x: 50%;
  --glow-y: 50%;
  --glow-intensity: 0;
  --glow-radius: 200px;
  --glow-color: 255, 255, 255;
}

/* Visual middle zone */
.mb-visual {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
  padding: 0.6em 0;
  min-height: 0;
  width: 100%;
}

/* Border glow (follows cursor) */
.magic-bento-card--border-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 6px;
  background: radial-gradient(
    var(--glow-radius) circle at var(--glow-x) var(--glow-y),
    rgba(var(--glow-color), calc(var(--glow-intensity) * 0.8)) 0%,
    rgba(var(--glow-color), calc(var(--glow-intensity) * 0.35)) 30%,
    transparent 60%
  );
  border-radius: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

/* Card text */
.magic-bento-card__header,
.magic-bento-card__content {
  display: flex;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.mb-visual > div {
  width: 100%;
}

.magic-bento-card__header {
  justify-content: space-between;
}

.magic-bento-card__content {
  flex-direction: column;
}

.magic-bento-card__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

.magic-bento-card__title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 0.3em;
  line-height: 1.2;
}

.magic-bento-card__description {
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0.65;
}

/* Particle (spawned by JS) */
.mb-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
}

/* Global spotlight */
.mb-global-spotlight {
  position: fixed;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  will-change: transform, opacity;
}

/* Responsive grid */
@media (max-width: 599px) {
  .card-grid {
    grid-template-columns: 1fr;
    width: 92%;
    margin: 0 auto;
    padding: 0.5em;
  }
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .magic-bento-card:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .magic-bento-card:nth-child(4) {
    grid-column: 1 / span 2;
    grid-row: 2 / span 2;
  }

  .magic-bento-card:nth-child(6) {
    grid-column: 4;
    grid-row: 3;
  }
}

/* ── Adaptive logo — dark mode: white logo / light mode: black logo ── */
[data-theme="dark"]  .logo-light-mode { display: none; }
[data-theme="dark"]  .logo-dark-mode  { display: inline-block; }
[data-theme="light"] .logo-dark-mode  { display: none; }
[data-theme="light"] .logo-light-mode { display: inline-block; }

/* Fallback: jika data-theme belum di-set, ikuti system preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light-mode { display: none; }
  :root:not([data-theme="light"]) .logo-dark-mode  { display: inline-block; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-dark-mode  { display: none; }
  :root:not([data-theme="dark"]) .logo-light-mode { display: inline-block; }
}

/* ── Rate list: compact flag (mirip converter tab) ────────── */
.rate-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rate-flag {
  flex-shrink: 0;
  width: 28px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rate-flag img {
  width: 28px !important;
  height: 20px !important;
  object-fit: cover;
  display: block;
}
.rate-flag .flag-crypto {
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.admin-shell.sidebar-collapsed .sidebar-nav-item span,
.admin-shell.sidebar-collapsed .sidebar-nav-label,
.admin-shell.sidebar-collapsed .sidebar-logout-btn span {
  display: none;
}
.admin-shell.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}
.admin-shell.sidebar-collapsed .admin-sidebar {
  align-items: center;
}
.admin-shell.sidebar-collapsed .sidebar-user {
  justify-content: center;
  padding: 10px 0;
}
.admin-shell.sidebar-collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 10px;
}
.admin-shell.sidebar-collapsed .sidebar-logout-btn {
  justify-content: center;
  padding: 10px;
}

/* Sidebar */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: var(--background);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width 0.2s ease;
  overflow: hidden;
}
.admin-shell.sidebar-collapsed .admin-sidebar {
  width: 56px;
}

/* Brand row */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 12px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.sidebar-brand .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  min-width: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-collapse-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sidebar-collapse-btn:hover {
  background: var(--accent);
  color: var(--foreground);
}
.sidebar-collapse-btn svg {
  transition: transform 0.2s ease;
}

/* User */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-user-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
}
.sidebar-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-user-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--muted-foreground);
}

/* Nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 8px 4px;
}
.sidebar-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 4px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.sidebar-nav-item:hover {
  background: var(--accent);
  color: var(--foreground);
}
.sidebar-nav-item.active {
  background: var(--accent);
  color: var(--foreground);
  font-weight: 600;
}
.sidebar-nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar-nav-item.active svg {
  opacity: 1;
}

/* Footer */
.sidebar-footer {
  padding: 10px 8px 14px;
  border-top: 1px solid var(--border);
}
.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.sidebar-logout-btn:hover {
  background: color-mix(in oklab, var(--destructive) 8%, transparent);
  color: var(--destructive);
}

/* Content wrap */
.admin-content-wrap {
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}
.admin-shell.sidebar-collapsed .admin-content-wrap {
  margin-left: 56px;
}

/* Top bar */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  height: 56px;
}
.topbar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
  flex: 1;
}
.topbar-site {
  font-weight: 600;
  color: var(--foreground);
}
.topbar-page {
  font-weight: 500;
  color: var(--foreground);
}
.topbar-right {
  margin-left: auto;
}
.topbar-right .admin-meta {
  font-size: 11px;
  text-align: right;
  color: var(--muted-foreground);
  background: transparent;
  border: none;
  padding: 0;
}
.topbar-right .admin-meta b {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--foreground);
  margin-top: 1px;
}

/* Main padding */
.admin-main {
  padding: 24px 28px 60px;
  min-width: 0;
  flex: 1;
}

/* Panel header (page title inside panel) */
.panel-header {
  margin-bottom: 20px;
}
.panel-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin: 6px 0 0;
  letter-spacing: -0.02em;
}

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 39;
}
.sidebar-overlay.visible {
  display: block;
}

/* Mobile responsive */
@media (max-width: 1023px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  .admin-content-wrap {
    margin-left: 0 !important;
  }
  .topbar-hamburger {
    display: flex;
  }
  .sidebar-collapse-btn {
    display: none;
  }
}
@media (max-width: 640px) {
  .admin-main {
    padding: 18px 16px 40px;
  }
  .admin-topbar {
    padding: 0 16px;
  }
}

/* ============================================================
   MAJOR REDESIGN — Admin Panels v6
   Pairs & Rates · Transfer Fees · Currencies · Konfigurasi
   ============================================================ */

/* ── Stats cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 28px;
}
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--foreground) 0%, transparent 100%);
  opacity: 0.12;
}
.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 6px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin-bottom: 4px;
}
.stat-foot {
  font-size: 11.5px;
  color: var(--muted-foreground);
}

/* ── Admin card ──────────────────────────────────────────── */
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 16px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.card-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 3px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.card-body {
  padding: 20px 22px;
}

/* ── Pairs list ──────────────────────────────────────────── */
.pairs-list {
  display: flex;
  flex-direction: column;
}
.pair-row {
  display: grid;
  grid-template-columns: 1fr 200px 52px 36px;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.pair-row:last-child { border-bottom: none; }
.pair-row:hover { background: var(--accent); }

.pair-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pair-flags {
  position: relative;
  width: 44px;
  height: 28px;
  flex-shrink: 0;
}
.pair-flag {
  position: absolute;
  display: inline-flex;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1.5px var(--border);
}
.pair-flag:first-child {
  top: 0; left: 0; z-index: 2;
}
.pair-flag:last-child {
  bottom: 0; right: 0; z-index: 1;
}
.pair-flag .fi,
.pair-flag img {
  width: 22px !important;
  height: 16px !important;
  display: block;
}
.pair-name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pair-sub {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pair-rate-input {
  width: 100% !important;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 10px !important;
}

/* Toggle redesign */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
  flex: none;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: var(--card);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.toggle.on {
  background: var(--success);
}
.toggle.on::after {
  transform: translateX(18px);
}

/* Pair create form inside card */
.pair-create-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr 160px auto;
  align-items: end;
  padding: 18px 22px;
  background: transparent;
  border: none;
  margin-bottom: 0;
  border-radius: 0;
}
@media (max-width: 800px) {
  .pair-create-row { grid-template-columns: 1fr 1fr; }
  .pair-create-arrow { display: none; }
}
.pair-create-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pair-create-field label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pair-create-arrow {
  font-size: 18px;
  color: var(--muted-foreground);
  padding-bottom: 10px;
  text-align: center;
}

/* ── Transfer Fees ───────────────────────────────────────── */
.admin-fees {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fee-block {
  border-bottom: 1px solid var(--border);
}
.fee-block:last-child { border-bottom: none; }

.fee-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px 12px;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}
.fee-block-head h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.tier-list {
  padding: 10px 22px 14px;
}
.tier-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 32px;
  gap: 8px;
  padding: 0 0 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.tier-head > div {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-foreground);
}

.tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 32px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
}
.tier-row .adm-input {
  padding: 7px 10px !important;
  font-size: 13px;
  font-family: var(--font-mono);
}

/* ── Currency grid ───────────────────────────────────────── */
.currency-create-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 100px 1fr 80px 80px auto;
  align-items: end;
  padding: 18px 22px;
}
@media (max-width: 760px) {
  .currency-create-row { grid-template-columns: 1fr 1fr; }
}
.currency-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  padding: 16px 22px;
}
.currency-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.12s, background 0.12s;
}
.currency-card:hover {
  border-color: var(--foreground);
  background: var(--accent);
}
.currency-flag {
  flex-shrink: 0;
}
.currency-flag .fi,
.currency-flag img {
  width: 26px !important;
  height: 19px !important;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
  display: block;
}
.currency-info {
  flex: 1;
  min-width: 0;
}
.currency-code {
  font-size: 13px;
  font-weight: 700;
}
.currency-name {
  font-size: 11px;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.currency-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mini-badge {
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

/* Search inside card */
#currencySearch {
  margin: 0;
  width: 220px;
}

/* ── Konfigurasi / Content Editor ────────────────────────── */
.content-group {
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.content-group:last-child { border-bottom: none; }
.content-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px 12px;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.content-group-head:hover { background: var(--accent); }
.content-group-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--foreground);
}
.content-group-rows {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0;
}
.content-row {
  display: contents;
}
.content-row > label {
  display: flex;
  align-items: center;
  padding: 10px 22px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--secondary);
}
.content-row > .adm-input {
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  padding: 10px 16px !important;
  font-size: 13px;
}
.content-row > .adm-input:focus {
  background: var(--accent);
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ring);
}
.content-row > textarea.adm-input {
  min-height: 72px;
  resize: vertical;
}

/* ── Icon button ─────────────────────────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--accent); color: var(--foreground); }
.icon-btn.danger:hover {
  background: color-mix(in oklab, var(--destructive) 10%, transparent);
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ── Admin input ─────────────────────────────────────────── */
.adm-input, .search-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  background: var(--background);
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  color: var(--foreground);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.adm-input:focus, .search-input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12);
}
select.adm-input { cursor: pointer; }

/* ── Activity tab panel ──────────────────────────────────── */
.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-foreground);
  white-space: nowrap;
  margin-top: 2px;
  flex-shrink: 0;
}
.activity-text { flex: 1; line-height: 1.5; }
.activity-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--foreground);
  color: var(--background);
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, transform 0.05s;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary.danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-ghost:hover { background: var(--accent); }
.btn-ghost.sm { padding: 5px 10px; font-size: 12px; }
.btn-spinner {
  width: 12px; height: 12px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Panel header ────────────────────────────────────────── */
.panel-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin: 6px 0 0;
  letter-spacing: -0.025em;
}

/* ── Responsive pairs ────────────────────────────────────── */
@media (max-width: 700px) {
  .pair-row {
    grid-template-columns: 1fr 140px 44px 32px;
    padding: 12px 16px;
    gap: 8px;
  }
}
@media (max-width: 500px) {
  .pair-row {
    grid-template-columns: 1fr 110px 40px 28px;
    padding: 10px 14px;
  }
  .pair-name { font-size: 12.5px; }
  .pair-sub { display: none; }
}
