/* ==========================================================================
   FOREX PESA — pw_style.css
   Core design system for the ForexPesa admin dashboard template.
   Font: Quicksand (Google Fonts)
   ========================================================================== */

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

/* ---------- Design tokens -------------------------------------------------- */
:root{
  /* Dark theme (default) */
  --bg:            #0A0E14;
  --bg-soft:       #0F141C;
  --surface:       #141B26;
  --surface-2:     #1B2432;
  --surface-3:     #232E40;
  --border:        rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.14);

  --text:          #F3F6FA;
  --text-muted:    #8B96A8;
  --text-faint:    #5C6879;

  --accent:        #00D9A3;   /* emerald — growth / forex up   */
  --accent-2:      #14F1B2;
  --gold:          #FFB020;   /* gold    — rewards / winning   */
  --gold-2:        #FFCB61;
  --violet:        #8B7CFA;   /* social / entertainment tiles  */
  --blue:          #3EA6FF;   /* watch / media tiles           */
  --pink:          #FF5E9C;   /* chat / community tiles        */
  --danger:        #FF5470;   /* down / logout / withdraw      */

  --grad-primary:  linear-gradient(135deg, #00D9A3 0%, #00B8D9 100%);
  --grad-gold:     linear-gradient(135deg, #FFB020 0%, #FF7A50 100%);
  --grad-hero:     radial-gradient(120% 140% at 0% 0%, rgba(0,217,163,0.25) 0%, rgba(0,217,163,0) 45%),
                    radial-gradient(120% 140% at 100% 0%, rgba(139,124,250,0.20) 0%, rgba(139,124,250,0) 50%),
                    linear-gradient(160deg, #121A26 0%, #0C1017 100%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 10px rgba(0,0,0,0.25);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-glow-accent: 0 0 0 1px rgba(0,217,163,0.25), 0 12px 40px rgba(0,217,163,0.18);
  --shadow-glow-gold:   0 0 0 1px rgba(255,176,32,0.25), 0 12px 40px rgba(255,176,32,0.16);

  --sidebar-w: 272px;
  --sidebar-w-collapsed: 88px;
  --bottomnav-h: 74px;
  --topbar-h: 72px;

  --ease: cubic-bezier(.4,0,.2,1);
  color-scheme: dark;
}

/* ---------- Light theme ---------------------------------------------------- */
[data-theme="light"]{
  --bg:            #F3F6FA;
  --bg-soft:       #EAF0F6;
  --surface:       #FFFFFF;
  --surface-2:     #F5F8FB;
  --surface-3:     #EAF0F7;
  --border:        rgba(16,24,40,0.08);
  --border-strong: rgba(16,24,40,0.14);

  --text:          #101826;
  --text-muted:    #5B6B82;
  --text-faint:    #90A0B4;

  --grad-hero: radial-gradient(120% 140% at 0% 0%, rgba(0,217,163,0.16) 0%, rgba(0,217,163,0) 45%),
               radial-gradient(120% 140% at 100% 0%, rgba(139,124,250,0.14) 0%, rgba(139,124,250,0) 50%),
               linear-gradient(160deg, #FFFFFF 0%, #EEF3F9 100%);

  --shadow-sm: 0 2px 10px rgba(16,24,40,0.06);
  --shadow-md: 0 10px 30px rgba(16,24,40,0.10);
  color-scheme: light;
}

/* ---------- Reset ----------------------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:'Quicksand', sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  transition:background .25s var(--ease), color .25s var(--ease);
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
::selection{ background:var(--accent); color:#001510; }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:6px;
}

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

h1,h2,h3,h4{ font-family:'Quicksand', sans-serif; font-weight:700; margin:0; letter-spacing:-.01em; }
p{ margin:0; }

.tabular{ font-variant-numeric: tabular-nums; font-feature-settings:"tnum"; }

/* ---------- App shell -------------------------------------------------------- */
.pw-app{
  display:flex;
  min-height:100%;
  background:var(--bg);
}

/* ---------- Sidebar (desktop) ------------------------------------------------ */
.pw-sidebar{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:var(--surface);
  border-right:1px solid var(--border);
  padding:22px 16px;
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  transition:width .25s var(--ease), padding .25s var(--ease);
  z-index:40;
}
.pw-sidebar::-webkit-scrollbar{ width:6px; }
.pw-sidebar::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:10px; }

.pw-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:6px 10px 14px;
  border-bottom:1px solid var(--border);
  margin-bottom:6px;
}
.pw-brand-mark{
  width:40px; height:40px; border-radius:12px;
  background:var(--grad-primary);
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-glow-accent);
  flex-shrink:0;
}
.pw-brand-mark svg{ width:22px; height:22px; }
.pw-brand-text{ display:flex; flex-direction:column; line-height:1.1; overflow:hidden; white-space:nowrap; }
.pw-brand-text b{ font-size:17px; font-weight:800; }
.pw-brand-text span{ font-size:11px; color:var(--text-muted); font-weight:600; letter-spacing:.06em; text-transform:uppercase; }

.pw-nav{ display:flex; flex-direction:column; gap:2px; flex:1; }
.pw-nav-label{
  font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em;
  color:var(--text-faint); margin:14px 10px 6px; white-space:nowrap;
}
.pw-nav-label:first-child{ margin-top:4px; }

.pw-nav-item{
  display:flex; align-items:center; gap:12px;
  padding:11px 12px;
  border-radius:var(--radius-sm);
  color:var(--text-muted);
  font-weight:600;
  font-size:14.5px;
  position:relative;
  transition:background .18s var(--ease), color .18s var(--ease);
  white-space:nowrap;
}
.pw-nav-item .pw-ico{
  width:34px; height:34px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  background:var(--surface-2); flex-shrink:0;
  transition:background .18s var(--ease), color .18s var(--ease);
  color:var(--text-muted);
}
.pw-nav-item:hover{ background:var(--surface-2); color:var(--text); }
.pw-nav-item.active{ background:linear-gradient(90deg, rgba(0,217,163,.14), rgba(0,217,163,0)); color:var(--text); }
.pw-nav-item.active .pw-ico{ background:var(--grad-primary); color:#01150F; box-shadow:var(--shadow-glow-accent); }
.pw-nav-item.active::before{
  content:''; position:absolute; left:-16px; top:8px; bottom:8px; width:3px;
  background:var(--accent); border-radius:0 3px 3px 0;
}
.pw-nav-item .pw-badge{
  margin-left:auto; font-size:10.5px; font-weight:700; padding:2px 7px; border-radius:20px;
  background:var(--gold); color:#241300;
}
.pw-nav-item .pw-sub{ font-size:11px; color:var(--text-faint); font-weight:600; display:block; }

.pw-sidebar-foot{
  border-top:1px solid var(--border);
  padding-top:14px;
  display:flex; flex-direction:column; gap:4px;
}

/* Collapsed state (desktop) */
.pw-app.is-collapsed .pw-sidebar{ width:var(--sidebar-w-collapsed); padding:22px 12px; }
.pw-app.is-collapsed .pw-brand-text,
.pw-app.is-collapsed .pw-nav-label,
.pw-app.is-collapsed .pw-nav-item span:not(.pw-badge),
.pw-app.is-collapsed .pw-nav-item .pw-sub{ display:none; }
.pw-app.is-collapsed .pw-nav-item{ justify-content:center; }
.pw-app.is-collapsed .pw-nav-item .pw-badge{ position:absolute; top:4px; right:4px; margin:0; }

/* ---------- Topbar ------------------------------------------------------------ */
.pw-main{ flex:1; min-width:0; display:flex; flex-direction:column; }

.pw-topbar{
  height:var(--topbar-h);
  display:flex; align-items:center; gap:14px;
  padding:0 24px;
  background:var(--bg-soft);
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:30;
  backdrop-filter:blur(10px);
}
.pw-icon-btn{
  width:40px; height:40px; border-radius:12px;
  border:1px solid var(--border);
  background:var(--surface);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-muted); cursor:pointer;
  transition:all .18s var(--ease);
}
.pw-icon-btn:hover{ color:var(--text); border-color:var(--border-strong); transform:translateY(-1px); }

.pw-search{
  flex:1; max-width:380px;
  display:flex; align-items:center; gap:10px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:0 14px; height:40px;
  color:var(--text-faint);
}
.pw-search input{ border:0; background:transparent; outline:none; color:var(--text); font-family:inherit; font-size:14px; width:100%; }

.pw-topbar-right{ margin-left:auto; display:flex; align-items:center; gap:10px; }

.pw-theme-toggle{
  width:52px; height:30px; border-radius:20px;
  background:var(--surface-2); border:1px solid var(--border);
  position:relative; cursor:pointer; flex-shrink:0;
}
.pw-theme-toggle .pw-knob{
  position:absolute; top:2px; left:2px; width:24px; height:24px; border-radius:50%;
  background:var(--grad-primary); box-shadow:var(--shadow-glow-accent);
  display:flex; align-items:center; justify-content:center; color:#012;
  transition:left .22s var(--ease);
}
[data-theme="light"] .pw-theme-toggle .pw-knob{ left:24px; background:var(--grad-gold); box-shadow:var(--shadow-glow-gold); }

.pw-chip{
  display:flex; align-items:center; gap:8px;
  background:var(--surface); border:1px solid var(--border);
  padding:6px 12px 6px 6px; border-radius:30px; cursor:pointer;
}
.pw-avatar{
  width:30px; height:30px; border-radius:50%;
  background:var(--grad-gold);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:12px; color:#241300;
}

/* ---------- Content ------------------------------------------------------------ */
.pw-content{ padding:26px 26px 110px; max-width:1400px; width:100%; margin:0 auto; }
.pw-page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.pw-page-head h1{ font-size:26px; }
.pw-page-head p{ color:var(--text-muted); font-size:14px; margin-top:4px; }
.pw-eyebrow{ color:var(--accent); font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }

.pw-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 20px; border-radius:12px; border:0; cursor:pointer;
  font-weight:700; font-size:14px; font-family:inherit;
  transition:transform .15s var(--ease), box-shadow .15s var(--ease), opacity .15s var(--ease);
}
.pw-btn:active{ transform:scale(.97); }
.pw-btn-primary{ background:var(--grad-primary); color:#01150F; box-shadow:var(--shadow-glow-accent); }
.pw-btn-primary:hover{ box-shadow:0 0 0 1px rgba(0,217,163,.4), 0 16px 44px rgba(0,217,163,.28); }
.pw-btn-gold{ background:var(--grad-gold); color:#2A1300; box-shadow:var(--shadow-glow-gold); }
.pw-btn-ghost{ background:var(--surface-2); color:var(--text); border:1px solid var(--border); }
.pw-btn-danger{ background:rgba(255,84,112,0.12); color:var(--danger); border:1px solid rgba(255,84,112,0.3); }
.pw-btn-block{ width:100%; }

/* ---------- Grid + cards --------------------------------------------------------- */
.pw-grid{ display:grid; gap:18px; }
.pw-grid-4{ grid-template-columns:repeat(4,1fr); }
.pw-grid-3{ grid-template-columns:repeat(3,1fr); }
.pw-grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:1180px){ .pw-grid-4{ grid-template-columns:repeat(2,1fr);} .pw-grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width:640px){ .pw-grid-4,.pw-grid-3,.pw-grid-2{ grid-template-columns:1fr 1fr; } }

.pw-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:20px; box-shadow:var(--shadow-sm);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pw-card:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:var(--border-strong); }

/* Hero balance card — signature element */
.pw-hero-card{
  grid-column:1 / -1;
  position:relative; overflow:hidden;
  border-radius:var(--radius-xl);
  background:var(--grad-hero);
  border:1px solid var(--border);
  padding:28px 30px;
  display:grid; grid-template-columns:1.15fr 1fr; gap:24px; align-items:center;
}
@media (max-width:900px){ .pw-hero-card{ grid-template-columns:1fr; } }
.pw-hero-card::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.035) 50%, transparent 70%);
  background-size:220% 220%;
  animation:pw-sheen 7s ease-in-out infinite;
}
@keyframes pw-sheen{ 0%,100%{ background-position:0% 0%;} 50%{ background-position:100% 100%;} }

.pw-hero-label{ display:flex; align-items:center; gap:8px; color:var(--text-muted); font-weight:700; font-size:13px; }
.pw-hero-label .dot{ width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(0,217,163,.18); }
.pw-hero-balance{ font-size:44px; font-weight:800; margin:8px 0 4px; letter-spacing:-.02em; }
.pw-hero-balance small{ font-size:20px; color:var(--text-muted); font-weight:700; margin-right:4px; }
.pw-hero-sub{ display:flex; gap:18px; flex-wrap:wrap; margin-top:14px; }
.pw-hero-sub .item{ display:flex; flex-direction:column; }
.pw-hero-sub .item b{ font-size:16px; }
.pw-hero-sub .item span{ font-size:11.5px; color:var(--text-muted); font-weight:600; }
.pw-hero-actions{ display:flex; gap:10px; margin-top:20px; flex-wrap:wrap; }

.pw-ticker-wrap{ position:relative; z-index:1; }
.pw-ticker{
  background:rgba(0,0,0,0.18); border:1px solid var(--border); border-radius:16px; padding:16px;
}
[data-theme="light"] .pw-ticker{ background:rgba(16,24,40,0.04); }
.pw-ticker-row{ display:flex; justify-content:space-between; align-items:center; padding:7px 4px; font-size:13px; font-weight:700; }
.pw-ticker-row + .pw-ticker-row{ border-top:1px dashed var(--border); }
.pw-ticker-row .pair{ display:flex; align-items:center; gap:8px; color:var(--text); }
.pw-ticker-row .flagdot{ width:8px; height:8px; border-radius:2px; background:var(--violet); }
.pw-up{ color:var(--accent); } .pw-down{ color:var(--danger); }
.pw-sparkline{ width:64px; height:22px; }

/* Stat card */
.pw-stat-card{ display:flex; flex-direction:column; gap:10px; }
.pw-stat-top{ display:flex; align-items:center; justify-content:space-between; }
.pw-stat-ico{ width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.pw-stat-card h3{ font-size:22px; }
.pw-stat-card .lbl{ color:var(--text-muted); font-size:12.5px; font-weight:600; }
.pw-trend{ font-size:12px; font-weight:700; display:flex; align-items:center; gap:4px; }

/* Activity tile (menu grid) */
.pw-tile{
  display:flex; flex-direction:column; gap:12px;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:18px; position:relative; overflow:hidden;
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.pw-tile:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.pw-tile .pw-tile-ico{
  width:46px; height:46px; border-radius:13px;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:20px;
}
.pw-tile b{ font-size:15px; }
.pw-tile .pw-tile-sub{ font-size:12px; color:var(--text-muted); font-weight:600; }
.pw-tile .pw-tile-tag{
  position:absolute; top:14px; right:14px; font-size:10px; font-weight:800; letter-spacing:.04em;
  padding:3px 9px; border-radius:20px; background:var(--gold); color:#241300;
}
.pw-tile.pw-tile-big{
  grid-column:span 2;
  background:linear-gradient(135deg, rgba(0,217,163,0.14), rgba(62,166,255,0.08));
  border-color:rgba(0,217,163,0.3);
}
@media (max-width:640px){ .pw-tile.pw-tile-big{ grid-column:span 2; } }

/* Referral level rows */
.pw-level-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; border-radius:14px; background:var(--surface-2); border:1px solid var(--border);
}
.pw-level-row + .pw-level-row{ margin-top:10px; }
.pw-level-badge{ width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-weight:800; }
.pw-status{ font-size:11px; font-weight:800; padding:4px 10px; border-radius:20px; text-transform:uppercase; letter-spacing:.03em; }
.pw-status.active{ background:rgba(0,217,163,.14); color:var(--accent); }
.pw-status.inactive{ background:rgba(139,150,168,.14); color:var(--text-faint); }

/* Forms */
.pw-field{ display:flex; flex-direction:column; gap:7px; margin-bottom:16px; }
.pw-field label{ font-size:13px; font-weight:700; color:var(--text-muted); }
.pw-input-wrap{ position:relative; display:flex; align-items:center; }
.pw-input-wrap .ico{ position:absolute; left:14px; color:var(--text-faint); display:flex; }
.pw-field input, .pw-field select{
  width:100%; height:48px; padding:0 16px; border-radius:12px;
  background:var(--surface-2); border:1px solid var(--border); color:var(--text);
  font-family:inherit; font-size:14.5px; font-weight:600; outline:none;
  transition:border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.pw-field input.has-ico{ padding-left:44px; }
.pw-field input:focus, .pw-field select:focus{ border-color:var(--accent); box-shadow:0 0 0 3px rgba(0,217,163,.15); }
.pw-field .toggle-pass{ position:absolute; right:14px; color:var(--text-faint); cursor:pointer; }

.pw-auth-shell{
  min-height:100vh; display:grid; grid-template-columns:1.05fr 1fr;
  background:var(--bg);
}
@media (max-width:980px){ .pw-auth-shell{ grid-template-columns:1fr; } .pw-auth-visual{ display:none; } }
.pw-auth-visual{
  background:var(--grad-hero);
  position:relative; overflow:hidden;
  display:flex; flex-direction:column; justify-content:space-between; padding:48px;
  border-right:1px solid var(--border);
}
.pw-auth-form-side{ display:flex; align-items:center; justify-content:center; padding:32px; }
.pw-auth-card{ width:100%; max-width:420px; }
.pw-auth-card .pw-brand{ border:0; padding:0; margin-bottom:26px; }

.pw-divider{ display:flex; align-items:center; gap:12px; color:var(--text-faint); font-size:12.5px; font-weight:700; margin:18px 0; }
.pw-divider::before,.pw-divider::after{ content:''; flex:1; height:1px; background:var(--border); }

.pw-social-row{ display:flex; gap:10px; }
.pw-social-btn{
  flex:1; height:46px; border-radius:12px; border:1px solid var(--border); background:var(--surface-2);
  display:flex; align-items:center; justify-content:center; gap:8px; font-weight:700; font-size:13px; cursor:pointer;
}

/* ---------- Mobile bottom nav (always visible on small screens) ----------------------- */
.pw-bottomnav{
  display:none;
  position:fixed; left:0; right:0; bottom:0; z-index:60;
  height:var(--bottomnav-h);
  background:var(--surface);
  border-top:1px solid var(--border);
  padding:8px 6px calc(env(safe-area-inset-bottom,0px) + 6px);
  align-items:center; justify-content:space-between;
  box-shadow:0 -8px 30px rgba(0,0,0,0.25);
}
.pw-bottomnav a{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:4px;
  color:var(--text-faint); font-size:10.5px; font-weight:700; padding:6px 2px; border-radius:12px;
}
.pw-bottomnav a .ico{ width:22px; height:22px; display:flex; align-items:center; justify-content:center; }
.pw-bottomnav a.active{ color:var(--accent); }
.pw-bottomnav a.pw-fab{
  position:relative; top:-22px;
}
.pw-bottomnav a.pw-fab .ico{
  width:52px; height:52px; border-radius:50%; background:var(--grad-gold);
  color:#2A1300; box-shadow:var(--shadow-glow-gold); font-size:22px;
}

/* Mobile sidebar drawer */
.pw-drawer-overlay{
  display:none; position:fixed; inset:0; background:rgba(4,7,12,0.55); z-index:70; backdrop-filter:blur(2px);
}
.pw-app.drawer-open .pw-drawer-overlay{ display:block; }
.pw-app.drawer-open .pw-sidebar{
  position:fixed; left:0; top:0; height:100%; box-shadow:20px 0 50px rgba(0,0,0,.4);
}

/* ---------- Responsive: collapse to app-shell on mobile --------------------------- */
@media (max-width:900px){
  .pw-sidebar{ position:fixed; left:-300px; top:0; height:100%; transition:left .28s var(--ease); z-index:80; }
  .pw-app.drawer-open .pw-sidebar{ left:0; }
  .pw-content{ padding:18px 14px calc(var(--bottomnav-h) + 26px); }
  .pw-bottomnav{ display:flex; }
  .pw-topbar{ padding:0 14px; }
  .pw-search{ display:none; }
  .pw-hero-balance{ font-size:32px; }
  .pw-page-head h1{ font-size:21px; }
}

/* Utility */
.pw-mt-24{ margin-top:24px; } .pw-mb-16{ margin-bottom:16px; }
.pw-flex{ display:flex; align-items:center; } .pw-gap-8{ gap:8px; } .pw-gap-12{ gap:12px; }
.pw-muted{ color:var(--text-muted); }
.pw-center-col{ display:flex; flex-direction:column; align-items:center; text-align:center; }

/* Simple fade-in for page load */
@keyframes pw-fade-up{ from{ opacity:0; transform:translateY(10px);} to{ opacity:1; transform:translateY(0);} }
.pw-anim{ animation:pw-fade-up .5s var(--ease) both; }
.pw-anim-1{ animation-delay:.03s;} .pw-anim-2{ animation-delay:.08s;} .pw-anim-3{ animation-delay:.13s;} .pw-anim-4{ animation-delay:.18s;}

/* ---- Pair selector (replaces old ticker strip) ---- */
.frx-chart-head-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frx-pair-select-wrap {
  display: inline-block;
}

.frx-pair-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%2300d9a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f2f5f7;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 7px 30px 7px 12px;
  cursor: pointer;
  min-width: 120px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.frx-pair-select:hover {
  border-color: rgba(0, 217, 163, 0.4);
  background-color: rgba(255, 255, 255, 0.06);
}

.frx-pair-select:focus {
  outline: none;
  border-color: var(--accent, #00d9a3);
  box-shadow: 0 0 0 3px rgba(0, 217, 163, 0.15);
}

.frx-pair-select option {
  background-color: #0f141c;
  color: #f2f5f7;
  font-weight: 600;
}
.frx-fallback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.frx-fallback-overlay.show {
  display: flex;
}

.frx-fallback-panel {
  width: 100%;
  max-width: 380px;
  background: #10151d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.frx-fallback-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  background: rgba(0, 217, 163, 0.15);
  color: #00d9a3;
}

.frx-fallback-panel.lost .frx-fallback-badge {
  background: rgba(255, 84, 112, 0.15);
  color: #ff5470;
}

.frx-fallback-headline {
  font-size: 20px;
  font-weight: 800;
  color: #f2f5f7;
  margin-bottom: 4px;
}

.frx-fallback-sub {
  font-size: 13px;
  color: rgba(242, 245, 247, 0.6);
  margin-bottom: 14px;
}

.frx-fallback-amount {
  font-size: 30px;
  font-weight: 800;
  color: #00d9a3;
  margin-bottom: 16px;
}

.frx-fallback-panel.lost .frx-fallback-amount {
  color: #ff5470;
}

.frx-fallback-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
  margin-bottom: 14px;
}

.frx-fallback-grid > div {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px 10px;
}

.frx-fallback-grid .k {
  display: block;
  font-size: 11px;
  color: rgba(242, 245, 247, 0.5);
  margin-bottom: 2px;
}

.frx-fallback-grid .v {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #f2f5f7;
}

.frx-fallback-note {
  font-size: 11.5px;
  color: rgba(255, 176, 32, 0.85);
  margin-bottom: 16px;
  line-height: 1.4;
}

.frx-fallback-refresh-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--accent, #00d9a3);
  color: #01150F;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.frx-fallback-refresh-btn:hover {
  filter: brightness(1.06);
}