/* ==========================================================================
   FFGLORY — "Midnight Iris" design system
   Presentation layer only. No JS / logic / IDs are defined or changed here.
   Loaded LAST on every page so it wins over inline <style>, index.css, shared.css.
   Layout: left rail (desktop) · slim top bar · floating dock (mobile)
   ========================================================================== */

:root {
  --bg: #07070d;
  --bg-2: #0b0b14;
  --panel: #0f0f19;
  --panel-2: #151522;
  --panel-3: #1c1c2d;
  --sunken: #0a0a12;

  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);

  --iris: #8b7bff;
  --iris-2: #b7a6ff;
  --iris-deep: #5b4be0;
  --iris-a08: rgba(139, 123, 255, 0.08);
  --iris-a14: rgba(139, 123, 255, 0.14);
  --iris-a28: rgba(139, 123, 255, 0.28);
  --grad: linear-gradient(135deg, #6d5efc 0%, #9b6bff 55%, #c77dff 100%);
  --grad-soft: linear-gradient(135deg, rgba(109, 94, 252, 0.22), rgba(199, 125, 255, 0.12));

  --amber: #ffc27a;
  --amber-a14: rgba(255, 194, 122, 0.14);
  --amber-a30: rgba(255, 194, 122, 0.30);
  --mint: #4fe3b5;
  --mint-a14: rgba(79, 227, 181, 0.14);
  --rose: #ff7a90;

  --text: #f3f2fb;
  --muted: #a5a3ba;
  --subtle: #6f6d86;

  --r-card: 22px;
  --r-ctl: 14px;
  --r-pill: 999px;

  --font-head: 'Sora', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --rail-w: 272px;

  /* re-point legacy tokens from shared.css / index.css */
  --ng-bg-dark: var(--bg);
  --ng-gold: var(--amber);
  --ng-cyan: var(--iris);
  --ng-cyan-deep: var(--iris-deep);
  --ng-border: var(--line);
  --ng-border-strong: var(--line-2);
  --ng-text-primary: var(--text);
  --ng-text-muted: var(--muted);
  --ng-text-subtle: var(--subtle);
  --font-heading: var(--font-head);
  --bnav-btn-cutout: var(--bg);
}

/* ------------------------------------------------------------------ base */
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(700px 380px at 85% -60px, rgba(124, 107, 255, 0.16), transparent 70%),
    radial-gradient(600px 360px at 0% 40%, rgba(199, 125, 255, 0.07), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .heading, .heading-font { font-family: var(--font-head); letter-spacing: -0.01em; }
.mono-font, .font-mono { font-family: var(--font-mono); }
::selection { background: var(--iris-a28); color: #fff; }
html body ::-webkit-scrollbar { width: 8px; height: 8px; }
html body ::-webkit-scrollbar-track { background: var(--bg); }
html body ::-webkit-scrollbar-thumb { background: #26263a; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--iris-2); outline-offset: 2px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ======================================================================
   LEGACY REMAP — keeps JS-rendered tailwind markup on-palette
   ====================================================================== */
html body .text-cyan-200, html body .text-cyan-300, html body .text-cyan-400, html body .text-cyan-500 { color: var(--iris-2) !important; }
html body .hover\:text-cyan-400:hover, html body .hover\:text-cyan-300:hover { color: var(--iris-2) !important; }
html body [class*="border-cyan-"] { border-color: var(--iris-a28) !important; }
html body [class*="bg-cyan-500/"], html body [class*="bg-cyan-400/"], html body [class*="bg-cyan-600/"], html body [class*="bg-cyan-900/"] { background-color: var(--iris-a14) !important; }
html body .bg-cyan-400, html body .bg-cyan-500, html body .bg-cyan-600 { background-color: var(--iris) !important; }
html body [class*="shadow-cyan-"] { --tw-shadow-color: rgba(139, 123, 255, 0.25) !important; }
html body .from-cyan-500, html body .from-cyan-400 { --tw-gradient-from: var(--iris-deep) !important; }
html body .to-cyan-500, html body .to-cyan-400 { --tw-gradient-to: var(--iris-2) !important; }
html body .text-amber-400, html body .text-amber-300 { color: var(--amber) !important; }
html body [class*="border-amber-"] { border-color: var(--amber-a30) !important; }
html body .text-purple-400 { color: var(--iris-2); }
html body .text-emerald-400, html body .text-green-400 { color: var(--mint); }

html body [class*="bg-[#0c1017]"], html body [class*="bg-[#0c121c]"], html body [class*="bg-[#0d1117]"],
html body [class*="bg-[#0a0f16]"], html body [class*="bg-[#0b111a]"] { background-color: var(--panel) !important; }
html body [class*="bg-[#121926]"], html body [class*="bg-[#151b24]"], html body [class*="bg-[#1a2332]"] { background-color: var(--panel-2) !important; }
html body [class*="bg-[#080d14]"], html body [class*="bg-[#080a0e]"], html body [class*="bg-[#05070a]"] { background-color: var(--sunken) !important; }
html body [class*="bg-[#122332]"] { background-color: var(--iris-a14) !important; }
html body [class*="border-[#1e293b]"] { border-color: var(--line-2) !important; }
html body .bg-slate-800 { background-color: var(--panel-3) !important; }
html body .bg-black\/60, html body .bg-black\/40 { background-color: rgba(5, 5, 10, 0.55) !important; }

/* legacy component classes defined in inline <style> of each page */
html body .nav-top {
  background: rgba(7, 7, 13, 0.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
html body .glow-card, html body .ng-card, html body .glow-border {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 38%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html body .ng-card:hover { border-color: var(--line-2); }

html body .input-dark, html body .ng-input, html body .modern-select {
  background: var(--sunken);
  border: 1px solid var(--line-2);
  border-radius: var(--r-ctl);
  color: var(--text);
  min-height: 50px;
  padding-left: 16px; padding-right: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
html body .input-dark.pl-11, html body .input-dark.pl-12 { padding-left: 2.9rem; }
html body .input-dark:focus, html body .ng-input:focus, html body .modern-select:focus {
  border-color: var(--iris);
  background: #0c0c16;
  box-shadow: 0 0 0 4px var(--iris-a14);
  outline: none;
}
html body .input-wrapper:focus-within i { color: var(--iris-2) !important; filter: none; transform: none; }
html body .input-wrapper:focus-within svg { color: var(--iris-2) !important; filter: none; }

html body .btn-cyan, html body .btn-primary {
  background: var(--grad);
  color: #fff;
  font-family: var(--font-head);
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-ctl);
  box-shadow: 0 14px 30px -14px rgba(124, 107, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
html body .btn-cyan:hover, html body .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(124, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); color: #fff; }
html body .btn-cyan:active, html body .btn-primary:active { transform: scale(0.99); }
html body .btn-cyan::before { display: none; }
html body .btn-cyan.bg-gradient-to-r { background: var(--grad); }

html body .btn-gold, html body .btn-yellow, html body .btn-secondary {
  background: var(--amber-a14);
  color: var(--amber);
  font-family: var(--font-head);
  border: 1px solid var(--amber-a30);
  border-radius: var(--r-ctl);
  box-shadow: none;
  transition: background .2s, transform .2s var(--ease), border-color .2s;
}
html body .btn-gold:hover, html body .btn-yellow:hover, html body .btn-secondary:hover { background: rgba(255, 194, 122, 0.22); border-color: rgba(255, 194, 122, 0.5); transform: translateY(-1px); box-shadow: none; }

html body .warning-box {
  background: var(--amber-a14);
  border: 1px solid var(--amber-a30);
  color: #ffd9a8;
  box-shadow: none;
  border-radius: 16px;
}
html body .profile-dropdown-content {
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 26px 50px -16px rgba(0, 0, 0, 0.95);
}
html body .badge-cyan, html body .badge-gold, html body .level-badge, html body .npr-badge {
  background: var(--iris-a14); color: var(--iris-2); border: 1px solid var(--iris-a28);
}
html body .progress, html body .progress-container { background: rgba(255, 255, 255, 0.07); border-radius: var(--r-pill); }
html body .progress-fill, html body .progress-bar-fill { background: var(--grad); border-radius: var(--r-pill); }
html body .nepal-accent-bar { background: linear-gradient(90deg, transparent, var(--iris), transparent); }

/* pay.html: mode tabs + preset chips (classes toggled by existing JS) */
html body .tab-active {
  background: var(--grad) !important; border-color: rgba(255, 255, 255, 0.18) !important; color: #fff !important;
  box-shadow: 0 14px 28px -16px rgba(124, 107, 255, 0.9) !important;
}
html body .tab-active i, html body .tab-active .text-amber-400, html body .tab-active .text-emerald-400 { color: #fff !important; }
html body .tab-inactive { background: var(--panel) !important; border-color: var(--line) !important; color: var(--muted) !important; }
html body .tab-inactive:hover { background: var(--panel-2) !important; color: var(--text) !important; }
html body .preset-chip {
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-family: var(--font-mono);
}
html body .preset-chip:hover { background: var(--iris-a14); border-color: var(--iris-a28); color: var(--iris-2); transform: translateY(-1px); }

/* login.html tabs (toggled by JS) */
html body .tab-btn { transition: background .2s, color .2s; }

/* ======================================================================
   APP SHELL  (fx-*)
   ====================================================================== */
html body.fx-body { display: block; padding: 0; min-height: 100vh; overflow-x: hidden; }
.fx-app { display: block; min-height: 100vh; }

/* ---- Rail (desktop) ---- */
.fx-rail { display: none; }
@media (min-width: 1024px) {
  .fx-app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .fx-rail {
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: 0; height: 100vh; padding: 26px 18px 22px;
    background: linear-gradient(180deg, rgba(15, 15, 25, 0.96), rgba(9, 9, 16, 0.98));
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
}
.fx-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 2px 8px; min-width: 0; }
.fx-logo { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; flex: none; border: 1px solid var(--line-2); background: var(--panel-2); box-shadow: 0 10px 24px -12px rgba(124, 107, 255, 0.9); }
.fx-brand-txt { line-height: 1.1; min-width: 0; }
.fx-brand-txt b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--text); }
.fx-brand-txt b i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-brand-txt small { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--subtle); }

.fx-nav { display: flex; flex-direction: column; gap: 4px; }
.fx-nav-label { padding: 0 12px 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--subtle); }
.fx-nav a {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 14px; text-decoration: none;
  font-size: 14px; font-weight: 700; color: var(--muted);
  transition: color .2s, background .2s;
}
.fx-nav a i { font-size: 20px; color: var(--subtle); transition: color .2s; }
.fx-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.fx-nav a:hover i { color: var(--iris-2); }
.fx-nav a.is-active { color: var(--text); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--iris-a28); }
.fx-nav a.is-active i { color: var(--iris-2); }
.fx-nav a.is-active::before { content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad); }

.fx-rail-card { padding: 16px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.fx-rail-card h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.fx-rail-card h4 i { color: var(--iris-2); font-size: 18px; }
.fx-rail-card p { margin: 0 0 12px; font-size: 12px; line-height: 1.55; color: var(--muted); }
.fx-rate { background: linear-gradient(150deg, rgba(109, 94, 252, 0.28), rgba(199, 125, 255, 0.08)), var(--panel-2); border-color: var(--iris-a28); }
.fx-rate .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--iris-2); }
.fx-rate .big { margin-top: 8px; display: flex; align-items: baseline; gap: 10px; font-family: var(--font-head); }
.fx-rate .big b { font-size: 28px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.fx-rate .big s { font-size: 14px; color: var(--subtle); }
.fx-rate .note { margin-top: 6px; font-size: 12px; color: var(--muted); }
.fx-rail-spacer { flex: 1; }
.fx-btn-tg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px;
  border-radius: 12px; font-size: 13px; font-weight: 700; text-decoration: none; color: #fff;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); transition: background .2s, border-color .2s;
}
.fx-btn-tg:hover { background: var(--iris-a14); border-color: var(--iris-a28); }

/* ---- Content column + top bar ---- */
.fx-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.fx-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(7, 7, 13, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 1024px) { .fx-top { padding: 16px 36px; } }
.fx-top .fx-brand { padding: 0; }
.fx-top .fx-logo { width: 38px; height: 38px; border-radius: 12px; }
.fx-top .fx-brand-txt small { display: none; }
@media (min-width: 1024px) { .fx-top .fx-brand { display: none; } }
.fx-crumb { display: none; }
@media (min-width: 1024px) {
  .fx-crumb { display: block; line-height: 1.15; }
  .fx-crumb small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); }
  .fx-crumb b { display: block; margin-top: 4px; font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
}
.fx-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.fx-wallet {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 5px 0 14px; border-radius: var(--r-pill);
  background: var(--panel-2); border: 1px solid var(--line-2);
}
.fx-wallet > i { font-size: 19px; color: var(--amber); }
.fx-wallet .num { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--text); }
.fx-wallet .unit { display: none; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); }
@media (min-width: 520px) { .fx-wallet .unit { display: inline; } }
.fx-wallet .add {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: #fff; text-decoration: none; font-size: 14px;
  box-shadow: 0 8px 18px -8px rgba(124, 107, 255, 0.9); transition: transform .2s var(--ease);
}
.fx-wallet .add:hover { transform: scale(1.08) rotate(90deg); }
.fx-wallet.is-cash > i { color: var(--mint); }

/* Avatar menu: JS writes the full username into #profile-username */
.fx-user { position: relative; outline: none; }
.fx-avatar {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; min-width: 44px; padding: 0; cursor: pointer;
  border-radius: var(--r-pill); background: var(--grad-soft); border: 1px solid var(--iris-a28); color: var(--text);
  transition: border-color .2s, background .2s;
}
.fx-avatar:hover { border-color: var(--iris); }
.fx-avatar #profile-username {
  display: block; width: 42px; height: 42px; overflow: hidden; text-align: center; text-transform: uppercase;
  font-size: 0 !important; line-height: 42px; max-width: none;
}
.fx-avatar #profile-username::first-letter { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: #fff; }
.fx-avatar .caret { display: none; }
@media (min-width: 768px) {
  .fx-avatar { padding: 0 14px 0 4px; }
  .fx-avatar #profile-username { width: auto; max-width: 130px; font-size: 13px !important; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap; text-overflow: ellipsis; padding-left: 10px; }
  .fx-avatar #profile-username::first-letter { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; }
  .fx-avatar .caret { display: inline; font-size: 11px; color: var(--muted); }
}
html body .fx-user .profile-dropdown-content { min-width: 190px; padding: 8px; }
.fx-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; }
.fx-item:hover { background: rgba(255, 255, 255, 0.06); }
.fx-item.danger { color: var(--rose); }
.fx-item.danger:hover { background: rgba(255, 122, 144, 0.1); }
.fx-sep { height: 1px; background: var(--line); margin: 4px 2px; }

/* ---- Main ---- */
.fx-main { width: 100%; max-width: 1140px; margin: 0 auto; padding: 18px 16px 120px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 768px) { .fx-main { padding: 26px 28px 120px; gap: 22px; } }
@media (min-width: 1024px) { .fx-main { padding: 32px 36px 56px; gap: 24px; } }
.fx-main > * { min-width: 0; }

/* Hero */
.fx-hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 24px 22px;
  background:
    radial-gradient(480px 260px at 100% 0%, rgba(199, 125, 255, 0.25), transparent 70%),
    linear-gradient(135deg, #17123a 0%, #0f0e24 100%);
  border: 1px solid var(--iris-a28);
  box-shadow: none;
}
.fx-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(120deg, transparent 30%, #000); mask-image: linear-gradient(120deg, transparent 30%, #000); opacity: .6; }
.fx-hero > * { position: relative; z-index: 1; }
@media (min-width: 768px) { .fx-hero { padding: 34px 38px; display: flex; align-items: center; justify-content: space-between; gap: 28px; } }
.fx-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--iris-2); background: rgba(139, 123, 255, 0.14); border: 1px solid var(--iris-a28); }
.fx-hero h1 { margin: 14px 0 8px; font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.08; letter-spacing: -0.03em; color: #fff; }
.fx-hero h1 em { font-style: normal; background: linear-gradient(120deg, #c8bcff, #ffb7e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-hero p { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.65; color: #b9b5d8; }
.fx-offer { margin-top: 20px; display: inline-flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 18px; background: rgba(7, 7, 13, 0.55); border: 1px solid var(--line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (min-width: 768px) { .fx-offer { margin-top: 0; flex: none; min-width: 210px; } }
.fx-offer .lbl { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); }
.fx-offer .row { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-head); }
.fx-offer .row b { font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.fx-offer .row s { color: var(--subtle); font-size: 14px; }
.fx-offer .tag { align-self: flex-start; margin-top: 4px; }

.fx-tag { display: inline-block; vertical-align: middle; padding: 3px 9px; border-radius: 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #1c1206; background: linear-gradient(135deg, #ffd9a3, #ffb15c); }

/* Grid for dashboard cards */
.fx-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@media (min-width: 1180px) { .fx-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* Cards */
.fx-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 36%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 20px;
  box-shadow: 0 24px 48px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
@media (min-width: 640px) { .fx-card { padding: 26px; } }
.fx-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.fx-card-head > div { flex: 1; min-width: 0; }
.fx-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; font-size: 22px; color: #fff; background: var(--grad); box-shadow: 0 12px 24px -12px rgba(124, 107, 255, 0.9); }
.fx-title { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; color: var(--text); }
.fx-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.fx-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--iris-2); background: var(--iris-a14); border: 1px solid var(--iris-a28); }

/* Form */
.fx-form { display: flex; flex-direction: column; gap: 20px; }
.fx-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.fx-label { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fx-label i { font-size: 16px; color: var(--iris-2); }
.fx-live { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; color: var(--mint); }
.fx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: fx-pulse 2s infinite; }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 rgba(79, 227, 181, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(79, 227, 181, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 227, 181, 0); } }
.fx-select { position: relative; }
.fx-select select, .fx-input {
  width: 100%; height: 54px; padding: 0 18px; border-radius: var(--r-ctl);
  background: var(--sunken); border: 1px solid var(--line-2); color: var(--text);
  font-family: var(--font-body); font-size: 16px; font-weight: 700;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.fx-select select { padding-right: 46px; cursor: pointer; }
.fx-select select option { background: #12121e; color: var(--text); }
.fx-select .chev { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--iris-2); font-size: 14px; pointer-events: none; }
.fx-input { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.12em; }
.fx-input::placeholder { color: var(--subtle); letter-spacing: 0.02em; font-family: var(--font-body); font-weight: 500; }
.fx-select select:hover, .fx-input:hover { border-color: rgba(255, 255, 255, 0.22); }
.fx-select select:focus, .fx-input:focus { outline: none; border-color: var(--iris); box-shadow: 0 0 0 4px var(--iris-a14); background: #0c0c16; }
.fx-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--subtle); }

.fx-meta { display: grid; gap: 1px; border-radius: 16px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.fx-meta > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 16px; background: var(--sunken); font-size: 13px; color: var(--muted); }
.fx-meta b { color: var(--text); font-weight: 700; }
.fx-meta s { color: var(--subtle); }
.fx-meta .price { color: var(--amber); font-weight: 800; }
.fx-sep-dot { color: var(--subtle); margin: 0 6px; }

.fx-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--amber-a14); border: 1px solid var(--amber-a30); color: #ffd9a8; font-size: 12.5px; line-height: 1.6; }
.fx-notice i { font-size: 20px; margin-top: 1px; flex: none; color: var(--amber); }
.fx-notice p { margin: 0; }
.fx-notice strong { color: #fff; font-weight: 700; }

.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 0 22px; cursor: pointer;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase;
  color: #fff; background: var(--grad); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 16px;
  box-shadow: 0 18px 34px -16px rgba(124, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.fx-btn i { font-size: 20px; }
.fx-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 22px 38px -16px rgba(124, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.fx-btn:active:not(:disabled) { transform: scale(0.99); }
.fx-btn:disabled { cursor: not-allowed; opacity: 0.6; filter: saturate(0.6); }
.fx-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 12px;
  transition: background .2s, border-color .2s;
}
.fx-btn-ghost:hover { background: var(--iris-a14); border-color: var(--iris-a28); }
.fx-btn-ghost i { color: var(--iris-2); }

.fx-usage { margin-bottom: 18px; padding: 14px 16px; border-radius: 16px; background: var(--sunken); border: 1px solid var(--line); }
.fx-usage-row { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.fx-usage-row span:last-child { font-family: var(--font-mono); color: var(--iris-2); letter-spacing: 0; }
.fx-usage-bar { height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.fx-usage-bar > div { height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s var(--ease); }
.fx-squads { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) and (max-width: 1179px) { .fx-squads { grid-template-columns: repeat(2, 1fr); } }
.fx-empty { grid-column: 1 / -1; text-align: center; padding: 34px 16px; background: var(--sunken); border: 1px dashed var(--line-2); border-radius: 18px; color: var(--muted); font-size: 14px; font-weight: 600; }

/* ---- Page header used on inner pages ---- */
.fx-page-head { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 768px) { .fx-page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.fx-page-head h2 { margin: 12px 0 6px; display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -0.03em; color: #fff; }
.fx-page-head h2 i { color: var(--iris-2); }
.fx-page-head p { margin: 0; max-width: 56ch; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* inner-page content width */
.fx-narrow { width: 100%; max-width: 820px; }

/* ======================================================================
   JS-RENDERED SQUAD CARDS (class names produced by app.js)
   ====================================================================== */
html body .squad-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 40%), var(--panel-2);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html body .squad-card:hover { border-color: var(--iris-a28); transform: translateY(-3px); box-shadow: 0 28px 44px -26px rgba(91, 75, 224, 0.7); }
html body .squad-logo { background: var(--grad-soft); border: 1px solid var(--iris-a28); box-shadow: none; border-radius: 16px; }
html body .super-badge { background: linear-gradient(135deg, #ffd9a3, #ffb15c); color: #1c1206; box-shadow: none; }
html body .squad-name { font-family: var(--font-head); letter-spacing: -0.01em; }
html body .squad-stats { border-bottom-color: var(--line); }
html body .stat-value.yellow, html body .metric strong.yellow { color: var(--amber); }
html body .stat-value.green, html body .metric strong.green { color: var(--mint); }
html body .stat-value { font-family: var(--font-mono); }
html body .status-badge { background: var(--mint-a14); border-color: rgba(79, 227, 181, 0.3); color: var(--mint); }
html body .status-badge.stopped { background: rgba(255, 122, 144, 0.12); border-color: rgba(255, 122, 144, 0.3); color: var(--rose); }
html body .btn-action.restart { background: var(--iris-a14); border: 1px solid var(--iris-a28); color: var(--iris-2); font-family: var(--font-head); border-radius: 12px; }
html body .btn-action.restart:hover { background: var(--iris-a28); box-shadow: none; }
html body .bot-card, html body .metric, html body .stat { background: var(--sunken); border-color: var(--line); }

/* ======================================================================
   MODALS
   ====================================================================== */
#glory-modal > div, #telegram-modal-content, #ff-likes-modal > div {
  background: var(--panel) !important;
  border: 1px solid var(--line-2) !important;
  border-radius: 26px !important;
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 1), 0 0 0 1px rgba(139, 123, 255, 0.06) !important;
}
#glory-modal, #telegram-update-modal { background: rgba(4, 4, 9, 0.78) !important; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#glory-modal .btn-cyan { width: 100%; }

/* ======================================================================
   BOTTOM DOCK (mobile) — floating pill; active tab expands with its label
   ====================================================================== */
html body .bottom-nav-wrap {
  background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0 14px max(14px, env(safe-area-inset-bottom, 14px));
  pointer-events: none;
}
html body .bottom-nav {
  pointer-events: auto; width: 100%; max-width: 380px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  padding: 7px; border-radius: 28px;
  background: rgba(17, 17, 29, 0.88);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(139, 123, 255, 0.05);
}
html body .nav-btn {
  flex: 1 1 0; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 8px; border-radius: 22px; text-decoration: none; position: relative;
  transition: flex-grow .35s var(--ease), background .25s, color .25s;
}
html body .nav-btn svg { width: 24px; height: 24px; flex: none; stroke: var(--subtle); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; filter: none; transform: none; }
html body .nav-btn span.label { display: none; font-family: var(--font-body); font-size: 13px; font-weight: 800; letter-spacing: 0; color: #fff; white-space: nowrap; }
html body .nav-btn:hover svg { stroke: var(--muted); transform: none; }
html body .nav-btn.active { flex-grow: 2.1; background: var(--grad); box-shadow: 0 12px 26px -12px rgba(124, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
html body .nav-btn.active svg { stroke: #fff; transform: none; filter: none; }
html body .nav-btn.active span.label { display: inline; color: #fff; }
html body .nav-btn.active::after { display: none; }
html body .nav-btn.nav-center { padding: 0 8px; gap: 8px; }
html body .nav-btn.nav-center .plus { width: auto; height: auto; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; display: flex; transform: none; }
html body .nav-btn.nav-center .plus svg { width: 24px; height: 24px; stroke: var(--subtle); stroke-width: 1.8; }
html body .nav-btn.nav-center:hover .plus, html body .nav-btn.nav-center:active .plus, html body .nav-btn.nav-center.active .plus { transform: none; box-shadow: none; background: transparent; border: 0; }
html body .nav-btn.nav-center.active .plus svg, html body .nav-btn.nav-center.active svg { stroke: #fff; }
html body .nav-btn.nav-center.active::after { display: none; }

/* ======================================================================
   AUTH (login.html) + misc
   ====================================================================== */
html body a.text-blue-400, html body .text-blue-400 { color: #8fb4ff; }
.fx-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .fx-auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.fx-auth-art {
  display: none; position: relative; overflow: hidden; padding: 48px 56px; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(520px 340px at 90% 0%, rgba(199, 125, 255, 0.4), transparent 70%),
    radial-gradient(520px 380px at 0% 100%, rgba(91, 75, 224, 0.6), transparent 70%),
    linear-gradient(150deg, #17123a, #0b0a1c);
  border-right: 1px solid var(--line);
}
@media (min-width: 960px) { .fx-auth-art { display: flex; } }
.fx-auth-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); }
.fx-auth-art > * { position: relative; z-index: 1; }
.fx-auth-art h2 { margin: 0 0 14px; font-family: var(--font-head); font-weight: 700; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.035em; color: #fff; }
.fx-auth-art h2 em { font-style: normal; background: linear-gradient(120deg, #c8bcff, #ffb7e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-auth-art p { margin: 0; max-width: 42ch; font-size: 15px; line-height: 1.7; color: #b9b5d8; }
.fx-points { display: grid; gap: 12px; margin-top: 28px; }
.fx-points div { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: #e6e3ff; }
.fx-points i { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; color: var(--iris-2); background: rgba(139, 123, 255, 0.16); border: 1px solid var(--iris-a28); font-size: 17px; }
.fx-auth-panel { display: flex; flex-direction: column; min-height: 100vh; }
.fx-auth-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; }
@media (min-width: 960px) { .fx-auth-bar { padding: 22px 40px; } .fx-auth-bar .fx-brand { visibility: hidden; } }
.fx-pill-link { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 700; text-decoration: none; color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-2); transition: background .2s, border-color .2s; }
.fx-pill-link:hover { background: var(--iris-a14); border-color: var(--iris-a28); }
.fx-auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px 18px 40px; }
html body .fx-auth-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.fx-auth-head h2 { margin: 0 0 6px; font-family: var(--font-head); font-weight: 700; font-size: 28px; letter-spacing: -0.03em; color: #fff; }
.fx-auth-head p { margin: 0; font-size: 14px; color: var(--muted); }
.fx-seg { display: flex; padding: 5px; gap: 4px; border-radius: 16px; background: var(--sunken); border: 1px solid var(--line); }

/* 404 */
.fx-404 { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fx-404 .big { font-family: var(--font-head); font-weight: 700; font-size: clamp(88px, 22vw, 140px); line-height: 1; letter-spacing: -0.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* profile hero */
.fx-profile-card { overflow: hidden; }
.fx-profile-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 96px; background: var(--grad); opacity: .85; }
.fx-profile-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 96px; background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px); background-size: 16px 16px; opacity: .5; }
.fx-profile-card > * { position: relative; z-index: 1; }
.fx-avatar-xl { display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 26px; font-size: 40px; color: #fff; background: var(--panel); border: 4px solid var(--panel); box-shadow: 0 0 0 1px var(--iris-a28), 0 18px 36px -14px rgba(0, 0, 0, 0.9); }
.fx-avatar-xl i { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fx-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--sunken); border: 1px solid var(--line); }
.fx-stat .k { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.fx-stat .v { display: block; margin-top: 4px; font-family: var(--font-mono); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.fx-stat .ico { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; font-size: 20px; }
.fx-stat.amber .v, .fx-stat.amber .ico { color: var(--amber); } .fx-stat.amber .ico { background: var(--amber-a14); }
.fx-stat.mint .v, .fx-stat.mint .ico { color: var(--mint); } .fx-stat.mint .ico { background: var(--mint-a14); }

/* inner page widths */
.fx-main--narrow { max-width: 940px; }
.fx-main--flow { display: block; }
.fx-main--flow > * + * { margin-top: 22px; }
.fx-main--flow .fx-page-head { margin-bottom: 4px; }
@media (max-width: 767px) { .fx-hide-sm { display: none !important; } }


/* ===== v2: mask icon set (replaces old phosphor glyphs) ===== */
.fx-ic{display:inline-block;width:1em;height:1em;flex:none;background-color:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;vertical-align:-0.125em}
.fx-ic-home{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='m3%2010%209-7%209%207v10a1%201%200%200%201-1%201h-5v-7H9v7H4a1%201%200%200%201-1-1z'/%3E%3C/svg%3E")}
.fx-ic-gem{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M6%203h12l4%206-10%2013L2%209z'/%3E%3Cpath%20d='M11%203%208%209l4%2013%204-13-3-6'/%3E%3Cpath%20d='M2%209h20'/%3E%3C/svg%3E")}
.fx-ic-sliders{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%204h-7M10%204H3M21%2012h-9M8%2012H3M21%2020h-5M12%2020H3M14%202v4M8%2010v4M16%2018v4'/%3E%3C/svg%3E")}
.fx-ic-wallet{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M19%207V4a1%201%200%200%200-1-1H5a2%202%200%200%200%200%204h15a1%201%200%200%201%201%201v4h-3a2%202%200%200%200%200%204h3a1%201%200%200%200%201-1v-2'/%3E%3Cpath%20d='M3%205v14a2%202%200%200%200%202%202h15a1%201%200%200%200%201-1v-4'/%3E%3C/svg%3E")}
.fx-ic-logout{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%2021H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h4'/%3E%3Cpath%20d='m16%2017%205-5-5-5M21%2012H9'/%3E%3C/svg%3E")}
.fx-ic-shield{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%2013c0%205-3.5%207.5-7.66%208.95a1%201%200%200%201-.67-.01C7.5%2020.5%204%2018%204%2013V6a1%201%200%200%201%201-1c2%200%204.5-1.2%206.24-2.72a1.17%201.17%200%200%201%201.52%200C14.51%203.81%2017%205%2019%205a1%201%200%200%201%201%201z'/%3E%3Cpath%20d='m9%2012%202%202%204-4'/%3E%3C/svg%3E")}
.fx-ic-user{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx='12'%20cy='8'%20r='4'/%3E%3Cpath%20d='M4%2021v-1a6%206%200%200%201%206-6h4a6%206%200%200%201%206%206v1'/%3E%3C/svg%3E")}
.fx-ic-history{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%2012a9%209%200%201%200%203-6.7L3%208'/%3E%3Cpath%20d='M3%203v5h5M12%207v5l3%202'/%3E%3C/svg%3E")}
.fx-ic-thumbs-up{--ic:url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%209V5a3%203%200%200%200-3-3l-4%209v11h11.28a2%202%200%200%200%202-1.7l1.38-9a2%202%200%200%200-2-2.3zM7%2022H4a2%202%200%200%201-2-2v-7a2%202%200%200%201%202-2h3'/%3E%3C/svg%3E")}

/* ======================================================================
   v2 — navigation, account chip, login slider, motion
   ====================================================================== */

/* ---- Bottom dock: icon over label, sliding indicator ---- */
html body .bottom-nav { position: relative; gap: 0; padding: 6px; max-width: 440px; isolation: isolate; }
html body .nav-ind {
  position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4);
  border-radius: 22px; background: var(--grad);
  box-shadow: 0 12px 26px -10px rgba(124, 107, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform .55s cubic-bezier(0.34, 1.35, 0.5, 1);
  will-change: transform;
}
html body .nav-btn { flex: 1 1 0; flex-direction: column; gap: 4px; min-height: 58px; padding: 6px 4px; z-index: 1; background: transparent; box-shadow: none; -webkit-tap-highlight-color: transparent; }
html body .nav-btn.active, html body .nav-btn.nav-center.active { flex-grow: 1; background: transparent; box-shadow: none; }
html body .nav-btn span.label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.01em; color: var(--subtle); transition: color .3s; }
html body .nav-btn.active span.label { display: block; color: #fff; }
html body .nav-btn svg { width: 22px; height: 22px; transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1), stroke .3s; }
html body .nav-btn.active svg { transform: translateY(-1px) scale(1.12); }
html body .nav-btn:active svg { transform: scale(0.88); }
html body .nav-btn.nav-center .plus svg { width: 22px; height: 22px; }

/* ---- Rail account chip ---- */
.fx-me { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--line); }
.fx-me-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: 12px; text-decoration: none; transition: background .2s; }
.fx-me-info:hover { background: rgba(255, 255, 255, 0.05); }
.fx-me-av { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 18px; color: #fff; background: var(--grad); box-shadow: 0 10px 20px -10px rgba(124, 107, 255, 0.9); }
.fx-me-txt { min-width: 0; line-height: 1.2; }
.fx-me-txt small { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); }
.fx-me-txt b { display: block; font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: 0.02em; }
.fx-me-out { flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 18px; cursor: pointer; color: var(--rose); background: rgba(255, 122, 144, 0.08); border: 1px solid rgba(255, 122, 144, 0.2); transition: background .2s, transform .25s var(--ease); }
.fx-me-out:hover { background: rgba(255, 122, 144, 0.18); transform: translateX(2px); }

/* ---- Login / Register slider switch ---- */
.fx-seg { position: relative; isolation: isolate; padding: 5px; gap: 4px; }
.fx-seg::before {
  content: ""; position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 14px) / 2);
  border-radius: 12px; background: var(--grad);
  box-shadow: 0 12px 24px -10px rgba(124, 107, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform .5s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.fx-seg:has(#signup-tab.btn-cyan)::before { transform: translateX(calc(100% + 4px)); }
html body .fx-seg button { position: relative; z-index: 1; min-height: 44px; background: transparent; box-shadow: none; border: 0; transition: color .3s; }
html body .fx-seg button.btn-cyan, html body .fx-seg button.btn-cyan:hover { background: transparent; box-shadow: none; border: 0; transform: none; filter: none; color: #fff; }
html body .fx-seg button.text-slate-400:hover { background: transparent; color: var(--text); }

/* ---- Motion ---- */
@keyframes fx-rise { from { opacity: 0; transform: translateY(20px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes fx-slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes fx-drop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes fx-float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-24px, 18px, 0) scale(1.12); } }
@keyframes fx-gem { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-8deg); } }
@keyframes fx-shine { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(260%) skewX(-20deg); } }
@keyframes fx-flow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
@keyframes fx-pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

html body .fx-main.animate-fade-in { animation: none; opacity: 1 !important; }
.fx-top { animation: fx-drop .6s var(--ease) both; }
.fx-rail { animation: fx-slide-in .6s var(--ease) both; }
.fx-nav a { animation: fx-slide-in .6s var(--ease) backwards; }
.fx-nav a:nth-of-type(1) { animation-delay: .12s; } .fx-nav a:nth-of-type(2) { animation-delay: .2s; } .fx-nav a:nth-of-type(3) { animation-delay: .28s; }
.fx-nav a i { transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), color .2s; }
.fx-nav a:hover i, .fx-nav a.is-active i { transform: scale(1.15) rotate(-6deg); }
.fx-nav a:hover { transform: translateX(3px); }
.fx-nav a { transition: color .2s, background .2s, transform .3s var(--ease); }
.fx-rail-card, .fx-me { animation: fx-rise .7s var(--ease) both; }
.fx-rate { animation-delay: .3s, 0s; } .fx-rail-card:not(.fx-rate) { animation-delay: .38s; } .fx-me { animation-delay: .46s; }

.fx-main > * { animation: fx-rise .7s var(--ease) both; }
.fx-main > *:nth-child(2) { animation-delay: .09s; } .fx-main > *:nth-child(3) { animation-delay: .18s; } .fx-main > *:nth-child(4) { animation-delay: .27s; } .fx-main > *:nth-child(5) { animation-delay: .36s; }
.fx-grid > .fx-card:nth-child(1) { animation-delay: .16s; } .fx-grid > .fx-card:nth-child(2) { animation-delay: .26s; }
.fx-main--flow > #panel-credits, .fx-main--flow > #panel-balance, .fx-main--flow > #qr-container { animation: fx-rise .6s var(--ease) both; }
.squad-card { animation: fx-rise .6s var(--ease) backwards; }
.squad-card:nth-child(2) { animation-delay: .08s; } .squad-card:nth-child(3) { animation-delay: .16s; } .squad-card:nth-child(4) { animation-delay: .24s; }
.fx-count { animation: fx-pop .5s var(--ease) both .4s; }

.fx-card { transition: border-color .3s, transform .4s var(--ease), box-shadow .4s; }
.fx-card:hover { border-color: var(--line-2); }
.fx-hero::before { content: ""; position: absolute; z-index: 0; width: 340px; height: 340px; right: -90px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(199, 125, 255, 0.5), transparent 65%); animation: fx-float 10s ease-in-out infinite; pointer-events: none; }
.fx-eyebrow i { animation: fx-gem 2.6s ease-in-out infinite; }
.fx-hero h1 em { background-size: 200% auto; background-image: linear-gradient(120deg, #c8bcff, #ffb7e6, #8fd3ff, #c8bcff); animation: fx-flow 6s linear infinite; }
.fx-rate { background-size: 200% 200%; animation: fx-rise .7s var(--ease) both, fx-flow 9s linear infinite; }
.fx-wallet > i { animation: fx-gem 3.2s ease-in-out infinite; }
.fx-wallet .num { transition: color .3s; }
.fx-icon { transition: transform .4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.fx-card:hover .fx-icon { transform: rotate(-8deg) scale(1.08); }

.fx-btn, html body .btn-cyan { position: relative; overflow: hidden; }
.fx-btn::after, html body .btn-cyan::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: translateX(-120%) skewX(-20deg); pointer-events: none; }
.fx-btn:hover::after, html body .btn-cyan:hover::after { animation: fx-shine .9s var(--ease); }
html body .fx-seg button.btn-cyan::after { display: none; }
.fx-btn-ghost i { transition: transform .5s var(--ease); }
.fx-btn-ghost:hover i { transform: rotate(180deg); }
.fx-usage-bar > div { position: relative; overflow: hidden; }
.fx-usage-bar > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); transform: translateX(-100%); animation: fx-shine 2.8s ease-in-out infinite; }
html body .progress-fill { position: relative; overflow: hidden; }
html body .progress-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); transform: translateX(-100%); animation: fx-shine 2.8s ease-in-out infinite; }
html body .tab-active, html body .tab-inactive { transition: background .3s, color .3s, box-shadow .3s, transform .3s var(--ease) !important; }
html body .tab-inactive:hover { transform: translateY(-2px); }

/* auth page motion */
.fx-auth-art::before { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(139, 123, 255, 0.45), transparent 65%); animation: fx-float 11s ease-in-out infinite; pointer-events: none; }
.fx-auth-art .fx-points div { animation: fx-slide-in .7s var(--ease) both; }
.fx-auth-art .fx-points div:nth-child(1) { animation-delay: .3s; } .fx-auth-art .fx-points div:nth-child(2) { animation-delay: .42s; } .fx-auth-art .fx-points div:nth-child(3) { animation-delay: .54s; }
.fx-auth-head > * { animation: fx-rise .6s var(--ease) both; }
.fx-auth-head > *:nth-child(2) { animation-delay: .08s; } .fx-auth-head > *:nth-child(3) { animation-delay: .16s; }
#auth-form > div { animation: fx-rise .6s var(--ease) both .2s; } #auth-form > div:nth-child(2) { animation-delay: .3s; } #auth-form > button { animation: fx-rise .6s var(--ease) both .4s; }
.fx-404 .glow-card { animation: fx-rise .7s var(--ease) both; }
.fx-404 .big { animation: fx-float 6s ease-in-out infinite; display: inline-block; }

/* modal entrance */
@keyframes fx-modal { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: none; } }
#glory-modal:not(.hidden) > div { animation: fx-modal .45s var(--ease) both; }
.fx-avatar-xl .fx-ic { width: 1em; height: 1em; background: var(--grad); -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }
