/* ========================================================================
   DESIGN 100 - SINGLE APP STYLESHEET
   All first-party app styling is consolidated here to avoid CSS load-order
   conflicts across public, member, dashboard, trading, and admin surfaces.
   ======================================================================== */


/* ========================================================================
   Source: assets/css/bicrypto5.css - Bicrypto5 base tokens and utilities
   ======================================================================== */

/* ==========================================================================
   BICRYPTO5 DESIGN SYSTEM — MTR Integration
   Covers: tokens, theme, animations, trading, utilities, mobile bottom nav,
           page loader, login/auth wrappers, and all shared components
   Extracted from Bicrypto5/frontend — pure CSS (no Tailwind build required)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES — LIGHT & DARK TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Layout */
  --header-height: 60px;
  --footer-height: 40px;

  /* Semantic color tokens (HSL triplets — used with hsl()) */
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --card: 0 0% 100%;
  --card-foreground: 240 10% 3.9%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 10% 3.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --success: 142 76% 36%;
  --success-foreground: 210 40% 98%;
  --warning: 38 92% 50%;
  --warning-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.5rem;

  /* Trading colors */
  --color-win: #22c55e;
  --color-loss: #ef4444;
  --price-increase: #10b981;
  --price-decrease: #ef4444;

  /* Theme-aware border colors */
  --border-color: rgba(228, 228, 231, 0.8);
  --border-color-light: rgba(228, 228, 231, 0.5);
  --table-border-color: rgba(228, 228, 231, 1);
  --table-border-color-light: rgba(228, 228, 231, 0.7);
  --panel-border-color: rgba(228, 228, 231, 1);
}

.dark {
  --background: 240 10% 3.9%;
  --foreground: 0 0% 98%;
  --card: 240 10% 3.9%;
  --card-foreground: 0 0% 98%;
  --popover: 240 10% 3.9%;
  --popover-foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 240 5.9% 10%;
  --secondary: 240 3.7% 15.9%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 3.7% 15.9%;
  --muted-foreground: 240 5% 64.9%;
  --accent: 240 3.7% 15.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --success: 142 71% 45%;
  --success-foreground: 0 0% 98%;
  --warning: 38 92% 50%;
  --warning-foreground: 0 0% 98%;
  --border: 240 3.7% 15.9%;
  --input: 240 3.7% 15.9%;
  --ring: 240 4.9% 83.9%;
  --chart-1: 220 70% 50%;
  --chart-2: 160 60% 45%;
  --chart-3: 30 80% 55%;
  --chart-4: 280 65% 60%;
  --chart-5: 340 75% 55%;

  --border-color: rgba(63, 63, 70, 0.5);
  --border-color-light: rgba(39, 39, 42, 0.5);
  --table-border-color: rgba(63, 63, 70, 0.8);
  --table-border-color-light: rgba(39, 39, 42, 0.7);
  --panel-border-color: rgba(63, 63, 70, 0.8);
}

/* --------------------------------------------------------------------------
   2. BASE RESETS & BODY
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   3. THEME SWITCHING
   -------------------------------------------------------------------------- */
.dark-theme { color-scheme: dark; }
.light-theme { color-scheme: light; }

/* Smooth theme transitions */
* {
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.2s ease;
}

/* Disable transitions on initial page load */
.no-transition * { transition: none !important; }

/* --------------------------------------------------------------------------
   4. THEME-AWARE BORDER UTILITIES
   -------------------------------------------------------------------------- */
.border-theme        { border-color: var(--border-color) !important; }
.border-theme-light  { border-color: var(--border-color-light) !important; }
.table-border        { border-color: var(--table-border-color) !important; }
.table-border-light  { border-color: var(--table-border-color-light) !important; }
.panel-border        { border-color: var(--panel-border-color) !important; }

:root:not(.dark) table               { border-color: var(--table-border-color); }
:root:not(.dark) table th,
:root:not(.dark) table td            { border-color: var(--table-border-color-light); }
:root:not(.dark) .order-book-row     { border-color: var(--table-border-color-light); }

/* --------------------------------------------------------------------------
   5. SCROLLBARS
   -------------------------------------------------------------------------- */
::-webkit-scrollbar        { width: 8px; height: 8px; background-color: transparent; border-radius: 9999px; }
::-webkit-scrollbar-track  { background-color: #f4f4f5; border-radius: 9999px; }
::-webkit-scrollbar-thumb  { background-color: #d4d4d8; border: 2px solid #f4f4f5; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background-color: #a1a1aa; }

.dark ::-webkit-scrollbar        { width: 8px; height: 8px; background-color: #18181b; border-radius: 9999px; }
.dark ::-webkit-scrollbar-track  { background: #09090b; border-radius: 9999px; }
.dark ::-webkit-scrollbar-thumb  { background-color: #27272a; border: 2px solid #09090b; border-radius: 9999px; }
.dark ::-webkit-scrollbar-thumb:hover { background-color: #3f3f46; }

.scrollbar-thin              { scrollbar-width: thin; }
.scrollbar-thin::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
.scrollbar-thin::-webkit-scrollbar-track { background-color: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 9999px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background-color: #9ca3af; }

.hide-scrollbar, .scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.hide-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar { display: none; }

.no-scrollbar::-webkit-scrollbar { width: 0; }
.no-scrollbar::-webkit-scrollbar-thumb { background-color: transparent; }

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: rgba(100,100,100,0.5); border-radius: 3px; }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(100,100,100,0.5) transparent; }

/* --------------------------------------------------------------------------
   6. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.page-min-height          { min-height: calc(var(--vh, 1vh) * 100 - 117px); }
.page-min-height-semibox  { min-height: calc(var(--vh, 1vh) * 100 - 200px); }
.page-min-height-horizontal { min-height: calc(var(--vh, 1vh) * 100 - 170px); }
.app-height               { height: calc(var(--vh, 1vh) * 100 - 11.1rem) !important; }

@media (max-width: 768px) {
  .app-height { height: calc(var(--vh, 1vh) * 100 - 10.5rem) !important; }
}

.layout-padding { padding-bottom: 112px; }
@media (min-width: 768px) {
  .layout-padding { padding-bottom: 37px; }
}

@media (min-width: 1280px) {
  .semibox-content-wrapper { margin-left: 56px; margin-right: 56px; }
}

.loginwrapper                { min-height: calc(var(--vh, 1vh) * 100); flex-basis: 100%; }
.loginwrapper .lg-inner-column { height: calc(var(--vh, 1vh) * 100); }

/* Safe area */
.pb-safe         { padding-bottom: env(safe-area-inset-bottom, 0); }
.pb-safe-or-2    { padding-bottom: max(env(safe-area-inset-bottom, 0), 0.5rem); }
.h-screen-safe   { height: calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0)); }
.min-h-screen-safe { min-height: calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0)); }
.h-screen-mobile { height: calc(var(--vh, 1vh) * 100); }
.min-h-screen-mobile { min-height: calc(var(--vh, 1vh) * 100); }

/* --------------------------------------------------------------------------
   7. INPUT GROUP
   -------------------------------------------------------------------------- */
.input-group :not(:first-child) input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group.merged :not(:first-child) input { border-left-width: 0 !important; padding-left: 0 !important; }
.input-group :not(:last-child) input  { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group.merged :not(:last-child) input { border-right-width: 0 !important; padding-right: 0 !important; }

/* --------------------------------------------------------------------------
   8. COLLAPSIBLE CONTENT
   -------------------------------------------------------------------------- */
.CollapsibleContent { overflow: hidden; }
.CollapsibleContent[data-state="open"]   { animation: slideDown 300ms ease-out; }
.CollapsibleContent[data-state="closed"] { animation: slideUp 300ms ease-out; }

/* --------------------------------------------------------------------------
   9. STICKY HEADER BLUR
   -------------------------------------------------------------------------- */
.has-sticky-header::after {
  position: absolute;
  z-index: -10;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  content: "";
  background: linear-gradient(
    180deg,
    rgba(var(--v-theme-background), 70%) 44%,
    rgba(var(--v-theme-background), 43%) 73%,
    rgba(var(--v-theme-background), 0%)
  );
  background-repeat: repeat;
  block-size: 5.5rem;
  inset-block-start: -1.5rem;
  inset-inline: 0;
  -webkit-mask: linear-gradient(black, black 18%, transparent 100%);
  mask: linear-gradient(black, black 18%, transparent 100%);
}

/* --------------------------------------------------------------------------
   10. KEYFRAMES — CORE
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(10px); }
}
@keyframes slideDown {
  from { transform: translateY(-30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes slideLeft {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideRight {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes slideOut {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}
@keyframes slideInLeft {
  from { transform: translateX(-10%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(10%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInTop {
  from { transform: translateY(-10%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes slideInBottom {
  from { transform: translateY(10%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes grid-slideUp   { 0% { transform: translateY(0); }    100% { transform: translateY(-50%); } }
@keyframes grid-slideDown { 0% { transform: translateY(-50%); } 100% { transform: translateY(0); } }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes row-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1);   opacity: 1; }
}
@keyframes pulse-glow {
  0%   { box-shadow: 0 0 5px  rgba(59,130,246,0.5); }
  50%  { box-shadow: 0 0 15px rgba(59,130,246,0.8); }
  100% { box-shadow: 0 0 5px  rgba(59,130,246,0.5); }
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40%  { transform: translateY(-20px); }
  60%  { transform: translateY(-10px); }
}
@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes zoomIn   { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes zoomOut  { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes zoomIn95 { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes panel-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes panel-slide-in-right { from { transform: translateX(20px);  opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes panel-slide-in-left  { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes panel-slide-in-top   { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes panel-slide-in-bottom{ from { transform: translateY(20px);  opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes panel-collapse { from { transform: scale(1); }    to { transform: scale(0.98); } }
@keyframes panel-expand   { from { transform: scale(0.98); } to { transform: scale(1); } }
@keyframes flipX { from { transform: perspective(400px) rotateX(90deg); opacity: 0; } to { transform: perspective(400px) rotateX(0); opacity: 1; } }
@keyframes flipY { from { transform: perspective(400px) rotateY(90deg); opacity: 0; } to { transform: perspective(400px) rotateY(0); opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80%      { transform: translateX(5px); }
}
@keyframes tada {
  0%       { transform: scale(1); }
  10%, 20% { transform: scale(0.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
  40%, 60%, 80%      { transform: scale(1.1) rotate(-3deg); }
  100%     { transform: scale(1) rotate(0); }
}
@keyframes wobble {
  0%   { transform: translateX(0%); }
  15%  { transform: translateX(-25%) rotate(-5deg); }
  30%  { transform: translateX(20%) rotate(3deg); }
  45%  { transform: translateX(-15%) rotate(-3deg); }
  60%  { transform: translateX(10%) rotate(2deg); }
  75%  { transform: translateX(-5%) rotate(-1deg); }
  100% { transform: translateX(0%); }
}
@keyframes heartBeat {
  0%  { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}
@keyframes rubberBand {
  0%   { transform: scale(1); }
  30%  { transform: scaleX(1.25) scaleY(0.75); }
  40%  { transform: scaleX(0.75) scaleY(1.25); }
  50%  { transform: scaleX(1.15) scaleY(0.85); }
  65%  { transform: scaleX(0.95) scaleY(1.05); }
  75%  { transform: scaleX(1.05) scaleY(0.95); }
  100% { transform: scale(1); }
}

/* Flash animations — light/dark variants */
@keyframes flash-green       { 0% { background-color: rgba(34,197,94,0.2);  } 100% { background-color: transparent; } }
@keyframes flash-red         { 0% { background-color: rgba(239,68,68,0.2);  } 100% { background-color: transparent; } }
@keyframes flash-green-dark  { 0% { background-color: rgba(34,197,94,0.15); } 100% { background-color: transparent; } }
@keyframes flash-red-dark    { 0% { background-color: rgba(239,68,68,0.15); } 100% { background-color: transparent; } }
@keyframes flash-green-light { 0% { background-color: rgba(22,163,74,0.1);  } 100% { background-color: transparent; } }
@keyframes flash-red-light   { 0% { background-color: rgba(220,38,38,0.1);  } 100% { background-color: transparent; } }

@keyframes progress-bar-stripes { 0% { background-position: 1rem 0; } to { background-position: 0 0; } }
@keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes slideDownAndFade  { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUpAndFade    { from { opacity: 0; transform: translateY(2px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeftAndFade  { from { opacity: 0; transform: translateX(2px);  } to { opacity: 1; transform: translateX(0); } }
@keyframes slideRightAndFade { from { opacity: 0; transform: translateX(-2px); } to { opacity: 1; transform: translateX(0); } }

/* --------------------------------------------------------------------------
   11. ANIMATION CLASSES
   -------------------------------------------------------------------------- */
.animate-slide-up           { animation: grid-slideUp   30s linear infinite; }
.animate-slide-down         { animation: grid-slideDown 30s linear infinite; }
.animate-slide-up-slow      { animation: grid-slideUp   45s linear infinite; }
.animate-slide-down-slow    { animation: grid-slideDown 45s linear infinite; }
.animate-slide-up-fast      { animation: grid-slideUp   20s linear infinite; }
.animate-slide-down-fast    { animation: grid-slideDown 20s linear infinite; }
.animate-marquee            { animation: marquee 30s linear infinite; }
.animate-bounce-subtle      { animation: bounce-subtle 2s infinite; }
.animate-pulse-glow         { animation: pulse-glow 2s infinite; }
.animate-flash-green        { animation: flash-green 1s ease-out; }
.animate-flash-red          { animation: flash-red  1s ease-out; }
.dark .animate-flash-green  { animation: flash-green-dark 1s ease-out; }
.dark .animate-flash-red    { animation: flash-red-dark   1s ease-out; }
.light .animate-flash-green { animation: flash-green-light 1s ease-out; }
.light .animate-flash-red   { animation: flash-red-light   1s ease-out; }
.animate-slideIn            { animation: slideIn  0.3s ease-out forwards; }
.animate-fadeIn             { animation: fadeIn   0.3s ease-out forwards; }
.animate-stripes            { animation: progress-bar-stripes 1s linear infinite; }
.animate-in                 { animation-duration: 150ms; animation-timing-function: cubic-bezier(0.4,0,0.2,1); animation-fill-mode: both; }
.fade-in                    { animation-name: fadeIn; }
.zoom-in-95                 { transform-origin: top left; animation-name: zoomIn95; }

/* Order card / slide panel */
.order-card-enter  { animation: fadeIn  0.3s ease-out forwards; }
.order-card-exit   { animation: fadeOut 0.3s ease-in  forwards; }
.order-card-update { animation: pulse   0.5s ease-in-out; }
.slide-panel-enter { animation: slideIn  0.3s ease-out forwards; }
.slide-panel-exit  { animation: slideOut 0.3s ease-in  forwards; }
.row-appear        { animation: row-appear 0.2s ease-out forwards; }

/* Panel animate */
.panel-animate-in       { animation-duration: 0.3s; animation-timing-function: cubic-bezier(0.4,0,0.2,1); animation-fill-mode: both; }
.panel-fade-in          { animation-name: panel-fade-in; }
.panel-slide-in-right   { animation-name: panel-slide-in-right; }
.panel-slide-in-left    { animation-name: panel-slide-in-left; }
.panel-slide-in-top     { animation-name: panel-slide-in-top; }
.panel-slide-in-bottom  { animation-name: panel-slide-in-bottom; }
.panel-delay-100        { animation-delay: 100ms; }
.panel-delay-200        { animation-delay: 200ms; }
.panel-delay-300        { animation-delay: 300ms; }

/* --------------------------------------------------------------------------
   12. HOVER & INTERACTION EFFECTS
   -------------------------------------------------------------------------- */
.hover-gradient-transition { position: relative; z-index: 1; overflow: hidden; }
.hover-gradient-transition::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  opacity: 0; transition: opacity 0.3s ease;
}
.hover-gradient-transition:hover::before { opacity: 1; }

.text-gradient-hover { position: relative; z-index: 1; }
.text-gradient-hover .hover-text { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; }
.text-gradient-hover:hover .hover-text    { opacity: 1; }
.text-gradient-hover:hover .default-text  { opacity: 0; }

.gradient-border-hover { position: relative; z-index: 1; }
.gradient-border-hover::before {
  content: ""; position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
  z-index: -1; opacity: 0; transition: opacity 0.3s ease; border-radius: inherit;
}
.gradient-border-hover:hover::before { opacity: 1; }

.hover-elevate { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-elevate:hover {
  transform: translateY(calc(-4px * var(--hover-intensity, 1)));
  box-shadow: 0 calc(10px * var(--hover-intensity, 1)) calc(20px * var(--hover-intensity, 1)) rgba(0,0,0,0.1);
}
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(calc(1 + (0.1 * var(--hover-intensity, 1)))); }
.hover-glow  { transition: box-shadow 0.3s ease; }
.hover-glow:hover { box-shadow: 0 0 calc(15px * var(--hover-intensity, 1)) rgba(124,58,237,calc(0.5 * var(--hover-intensity, 1))); }
.hover-tilt  { transition: transform 0.3s ease; }
.hover-tilt:hover { transform: perspective(1000px) rotateX(calc(5deg * var(--hover-intensity, 1))) rotateY(calc(5deg * var(--hover-intensity, 1))); }

/* Dark mode select options */
.dark select option { background-color: #27272a; color: #e4e4e7; }

/* --------------------------------------------------------------------------
   13. TRADING UI
   -------------------------------------------------------------------------- */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.order-panel-container   { position: relative; z-index: 50; }
.order-panel-dropdown    { z-index: 100; }
.trade-confirmation-modal { z-index: 200; }

.trading-history-footer {
  background: linear-gradient(to right, #1a1d29, #131722);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}
.trading-history-footer:hover { background: linear-gradient(to right, #1e2235, #171b2a); }
.trading-history-toggle {
  background: rgba(30,33,48,0.8);
  border: 1px solid rgba(42,46,57,0.8);
  transition: all 0.2s ease;
}
.trading-history-toggle:hover { background: rgba(36,39,56,0.9); transform: scale(1.05); }

.pb-trading-history       { padding-bottom: 40px; }
.trading-history-visible  { margin-bottom: 40px; }
.trading-buttons-container { margin-bottom: 60px; }

/* Glass morphism */
.glass-morphism {
  background: rgba(30,33,48,0.8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Press / price level */
.press-effect:active { transform: scale(0.95); transition: transform 0.1s; }
.price-level   { transition: background-color 0.2s ease-in-out; }
.price-increase { transition: color 0.2s ease; color: #10b981; }
.price-decrease { transition: color 0.2s ease; color: #ef4444; }

.orderbook-section { max-height: 100%; overflow-y: auto; }

/* --------------------------------------------------------------------------
   14. VERTICAL TEXT / COLLAPSED PANEL UTILITIES
   -------------------------------------------------------------------------- */
.writing-vertical-rl  { writing-mode: vertical-rl; }
.vertical-text-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; }
.vertical-text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  text-orientation: mixed; white-space: nowrap; letter-spacing: 0.05em;
  text-align: center; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.collapsed-panel-text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; justify-content: center;
  height: 100%; width: 100%; text-align: center; white-space: nowrap;
  letter-spacing: 0.05em; padding: 1rem 0; font-weight: 500;
}

/* --------------------------------------------------------------------------
   15. PARALLAX & GRADIENT EFFECTS
   -------------------------------------------------------------------------- */
.parallax      { transform: translateZ(0); transition: transform 0.2s ease-out; }
.parallax-slow { transform: translateZ(0); transition: transform 0.4s ease-out; }
.parallax-layer-1 { transform: translateZ(-10px) scale(2); }
.parallax-layer-2 { transform: translateZ(-5px)  scale(1.5); }
.parallax-layer-3 { transform: translateZ(-2px)  scale(1.2); }

.gradient-animate { background-size: 200% 200%; animation: gradient 15s ease infinite; }

.glow      { box-shadow: 0 0 15px rgba(79,70,229,0.5); transition: box-shadow 0.3s ease; }
.glow:hover { box-shadow: 0 0 25px rgba(79,70,229,0.8); }
.text-glow { text-shadow: 0 0 10px rgba(79,70,229,0.5); }

.btn-hover-effect { position: relative; overflow: hidden; }
.btn-hover-effect::after {
  content: ""; position: absolute;
  top: 50%; left: 50%; width: 0; height: 0;
  background: rgba(255,255,255,0.2); border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}
.btn-hover-effect:hover::after { width: 300%; height: 300%; }

/* --------------------------------------------------------------------------
   16. MISC GLOBAL UTILITIES
   -------------------------------------------------------------------------- */
.text-balance { text-wrap: balance; }
.bg-grid-white {
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.1) 1px, transparent 1px);
}

/* --------------------------------------------------------------------------
   17. MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .no-select { user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
  .touch-target { min-height: 44px; min-width: 44px; }
  .slide-in-right  { animation: slideInRight 0.3s forwards; }
  .slide-out-right { animation: slideOutRight 0.3s forwards; }

  @keyframes slideInRight  { from { transform: translateX(100%); } to { transform: translateX(0); } }
  @keyframes slideOutRight { from { transform: translateX(0); }    to { transform: translateX(100%); } }

  .mobile-footer { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 -5px 20px rgba(0,0,0,0.3); }
  .mobile-btn:active { transform: scale(0.96); transition: transform 0.1s; }
}
.mobile-footer { box-shadow: 0 -5px 25px rgba(0,0,0,0.3); }
.tab-transition { transition: transform 0.3s ease; }

@media (max-width: 480px) {
  .modal-container { width: 95% !important; max-width: 350px; padding: 12px !important; }
  .modal-header    { margin-bottom: 10px !important; }
  .modal-content   { font-size: 0.875rem !important; }
  .modal-buttons   { gap: 8px !important; }
}

/* --------------------------------------------------------------------------
   18. MOBILE BOTTOM NAVIGATION BAR
   -------------------------------------------------------------------------- */
.ih-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: hsl(var(--card) / 0.97);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border-top: 1px solid hsl(var(--border));
  padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 1024px) { .ih-bottom-nav { display: none; } }

.ih-bottom-nav-inner {
  display: flex; align-items: center; justify-content: space-around;
  height: 64px; max-width: 500px; margin: 0 auto;
}
.ih-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; flex: 1; padding: 6px 0; cursor: pointer; position: relative;
  -webkit-tap-highlight-color: transparent; transition: all 0.15s ease; text-decoration: none;
}
.ih-nav-item ion-icon { font-size: 22px; color: hsl(var(--muted-foreground)); transition: color 0.15s ease; }
.ih-nav-item span     { font-size: 10px; font-weight: 500; color: hsl(var(--muted-foreground)); transition: color 0.15s ease; }
.ih-nav-item.active ion-icon { color: hsl(var(--primary)); }
.ih-nav-item.active span     { color: hsl(var(--primary)); font-weight: 600; }
.dark .ih-nav-item.active ion-icon,
.dark .ih-nav-item.active span { color: hsl(var(--primary)); }
.ih-nav-item:active { transform: scale(0.9); }

.ih-nav-trade { position: relative; margin-top: -16px; }
.ih-nav-trade-btn {
  width: 52px; height: 52px; border-radius: 1rem;
  background: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px hsl(var(--primary) / 0.3);
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.ih-nav-trade-btn ion-icon { font-size: 24px; color: hsl(var(--primary-foreground)) !important; }
.ih-nav-trade:not(.active) span { color: hsl(var(--muted-foreground)); font-weight: 500; }
.ih-nav-trade:active .ih-nav-trade-btn { transform: scale(0.9); }

@media (max-width: 1023px) {
  body { padding-bottom: 72px; }
}

/* --------------------------------------------------------------------------
   19. PAGE LOADER
   -------------------------------------------------------------------------- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: hsl(var(--background));
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loading-icon {
  width: 64px; height: 64px;
  animation: loader-pulse 1.5s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.92); }
}
.animate-pulse-logo { animation: loader-pulse 1.5s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   20. LOGIN / AUTH WRAPPERS
   -------------------------------------------------------------------------- */
.auth-page-bg {
  min-height: 100vh;
  background: hsl(var(--background));
}

/* --------------------------------------------------------------------------
   22. BICRYPTOO COMPONENT SYSTEM — exact shadcn/ui patterns from Bicryptoo
   -------------------------------------------------------------------------- */

/* shadow-2xs utility (Tailwind v4 — fallback definition) */
.shadow-2xs { box-shadow: 0 1px rgb(0 0 0 / 0.05); }
.shadow-xs   { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

/* ---- Card ---- */
/* Base card: rounded-md border bg-card text-card-foreground */
.bc-card, [data-slot="card"] {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) - 2px);
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
[data-slot="card-header"] {
  display: flex; flex-direction: column; gap: 0.375rem;
  padding: 1.5rem 1.5rem 0;
}
[data-slot="card-title"]  { font-weight: 600; line-height: 1; letter-spacing: -0.015em; }
[data-slot="card-description"] { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
[data-slot="card-content"] { padding: 1.5rem; padding-top: 0; }
[data-slot="card-footer"]  { display: flex; align-items: center; padding: 0 1.5rem 1.5rem; }

/* bc-card shorthands */
.bc-card-header { padding: 1.5rem 1.5rem 0; }
.bc-card-body   { padding: 1.5rem; }
.bc-card-footer { padding: 0 1.5rem 1.5rem; }

/* ---- Badge ---- */
/* Base: inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium */
.bc-badge, [data-slot="badge"] {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: calc(var(--radius) - 2px); border: 1px solid transparent;
  padding: 0.125rem 0.5rem; font-size: 0.75rem; font-weight: 500;
  white-space: nowrap; width: fit-content; overflow: hidden;
  transition: color 0.15s, box-shadow 0.15s;
}
.bc-badge-default  { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: transparent; }
.bc-badge-success  { background: hsl(var(--success)); color: hsl(var(--success-foreground)); border-color: transparent; }
.bc-badge-danger   { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); border-color: transparent; }
.bc-badge-warning  { background: hsl(var(--warning)); color: hsl(var(--warning-foreground)); border-color: transparent; }
.bc-badge-secondary{ background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); border-color: transparent; }
.bc-badge-outline  { background: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--border)); }
/* Soft variants (colored bg at 15% opacity) */
.bc-badge-success-soft  { background: hsl(var(--success)/0.15); color: hsl(var(--success)); border-color: transparent; }
.bc-badge-danger-soft   { background: hsl(var(--destructive)/0.15); color: hsl(var(--destructive)); border-color: transparent; }
.bc-badge-warning-soft  { background: hsl(var(--warning)/0.15); color: hsl(var(--warning)); border-color: transparent; }
.bc-badge-primary-soft  { background: hsl(var(--primary)/0.15); color: hsl(var(--primary)); border-color: transparent; }
.bc-badge-muted         { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); border-color: transparent; }

/* ---- Button ---- */
/* Base: inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium */
.bc-btn {
  display: inline-flex; cursor: pointer; align-items: center; justify-content: center;
  gap: 0.5rem; white-space: nowrap; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500; padding: 0.5rem 1rem; height: 2.5rem;
  border: none; text-decoration: none; outline: none;
  transition: color 0.15s, box-shadow 0.15s;
}
.bc-btn:disabled { pointer-events: none; opacity: 0.5; }
.bc-btn:focus-visible { border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring)/0.5); }
.bc-btn:active { transform: scale(0.98); }

/* Variants */
.bc-btn-primary   { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: 0 1px rgb(0 0 0 / 0.05); }
.bc-btn-primary:hover { background: hsl(var(--primary)/0.9); }
.bc-btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); box-shadow: 0 1px rgb(0 0 0 / 0.05); }
.bc-btn-secondary:hover { background: hsl(var(--secondary)/0.8); }
.bc-btn-outline   { background: hsl(var(--background)); border: 1px solid hsl(var(--input)); box-shadow: 0 1px rgb(0 0 0 / 0.05); color: hsl(var(--foreground)); }
.bc-btn-outline:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.bc-btn-ghost     { background: transparent; color: hsl(var(--foreground)); }
.bc-btn-ghost:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.bc-btn-destructive { background: hsl(var(--destructive)); color: #fff; box-shadow: 0 1px rgb(0 0 0 / 0.05); }
.bc-btn-destructive:hover { background: hsl(var(--destructive)/0.9); }
.bc-btn-success   { background: hsl(var(--success)); color: hsl(var(--success-foreground)); }
.bc-btn-success:hover { background: hsl(var(--success)/0.9); }
.bc-btn-link      { background: transparent; color: hsl(var(--primary)); text-underline-offset: 4px; height: auto; padding: 0; }
.bc-btn-link:hover { text-decoration: underline; }

/* Sizes */
.bc-btn-xs  { height: 2rem; padding: 0 0.5rem; font-size: 0.8125rem; }
.bc-btn-sm  { height: 2.25rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.bc-btn-md  { height: 2.5rem; padding: 0 1rem; }
.bc-btn-lg  { height: 2.75rem; padding: 0 2rem; font-size: 1rem; }
.bc-btn-icon { height: 2.5rem; width: 2.5rem; padding: 0; }
.bc-btn-icon-sm { height: 2rem; width: 2rem; padding: 0; }

/* ---- Input ---- */
/* Base: border-input h-9 w-full rounded-md border bg-transparent px-3 py-1 text-base */
.bc-input {
  display: flex; align-items: center;
  width: 100%; min-width: 0;
  height: 2.25rem; /* h-9 */
  background: transparent;
  border: 1px solid hsl(var(--input));
  border-radius: calc(var(--radius) - 2px);
  padding: 0.25rem 0.75rem;
  font-size: 1rem; /* text-base */
  color: hsl(var(--foreground));
  outline: none;
  transition: color 0.15s, box-shadow 0.15s;
}
.bc-input::placeholder { color: hsl(var(--muted-foreground)); }
.bc-input:focus-visible {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px hsl(var(--ring)/0.5);
}
.bc-input:disabled { pointer-events: none; cursor: not-allowed; opacity: 0.5; }

/* ---- Table ---- */
/* Base: w-full caption-bottom text-sm */
.bc-table-wrap { position: relative; width: 100%; overflow-x: auto; }
.bc-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; caption-side: bottom; }
.bc-table thead tr { border-bottom: 1px solid hsl(var(--border)); }
.bc-table tbody tr:last-child { border-bottom: none; }
.bc-table tbody tr { border-bottom: 1px solid hsl(var(--border)); transition: background 0.15s; }
.bc-table tbody tr:hover { background: hsl(var(--muted)/0.5); }
.bc-table th {
  padding: 0.625rem 0.5rem; text-align: left; align: middle; font-weight: 500;
  color: hsl(var(--muted-foreground)); white-space: nowrap; height: 2.5rem;
}
.bc-table td { padding: 0.5rem; align: middle; white-space: nowrap; color: hsl(var(--foreground)); }

/* ---- Skeleton shimmer ---- */
.bc-skeleton {
  background: linear-gradient(
    90deg,
    hsl(var(--border)) 25%,
    hsl(var(--accent)) 50%,
    hsl(var(--border)) 75%
  );
  background-size: 200% 100%;
  animation: bc-shimmer 1.4s infinite;
  border-radius: calc(var(--radius) - 2px);
}
@keyframes bc-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Divider ---- */
.bc-divider { height: 1px; background: hsl(var(--border)); margin: 1rem 0; }

/* ---- Page layout utilities (from Bicryptoo globals.css) ---- */
.page-min-height            { min-height: calc(var(--vh, 1vh) * 100 - 117px); }
.page-min-height-semibox    { min-height: calc(var(--vh, 1vh) * 100 - 200px); }
.page-min-height-horizontal { min-height: calc(var(--vh, 1vh) * 100 - 170px); }
.app-height                 { height: calc(var(--vh, 1vh) * 100 - 11.1rem) !important; }
.layout-padding             { padding-bottom: 112px; }
@media (min-width: 768px) { .layout-padding { padding-bottom: 37px; } }
@media (max-width: 768px) { .app-height { height: calc(var(--vh, 1vh) * 100 - 10.5rem) !important; } }

/* ---- Auth layout (loginwrapper) ---- */
.loginwrapper { min-height: calc(var(--vh, 1vh) * 100); flex-basis: 100%; }
.loginwrapper .lg-inner-column { height: calc(var(--vh, 1vh) * 100); }

/* ---- Collapsed panel system (from Bicryptoo panels.css) ---- */
.collapsed-panel {
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1), height 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
:root:not(.dark) .collapsed-panel { background-color: #f4f4f5; border-color: #e4e4e7; color: #71717a; }
:root.dark .collapsed-panel       { background-color: #121212; border-color: rgba(82,82,82,0.2); color: #888; }
:root:not(.dark) .collapsed-panel:hover { background-color: #e4e4e7; }
:root.dark .collapsed-panel:hover       { background-color: #1a1a1a; }

/* ---- Collapsible animation ---- */
.CollapsibleContent { overflow: hidden; }
.CollapsibleContent[data-state="open"]   { animation: bc-slideDown 300ms ease-out; }
.CollapsibleContent[data-state="closed"] { animation: bc-slideUp 300ms ease-out; }
@keyframes bc-slideDown { from { height: 0; } to { height: var(--radix-collapsible-content-height, auto); } }
@keyframes bc-slideUp   { from { height: var(--radix-collapsible-content-height, auto); } to { height: 0; } }

/* ---- Support drawer ---- */
.support-drawer-content {
  width: 90vw !important; max-width: 90vw !important;
  min-width: 90vw !important; height: 100vh !important;
}

/* ---- Input group ---- */
.input-group :not(:first-child) input  { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group :not(:last-child)  input  { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group.merged :not(:first-child) input { border-left-width: 0 !important; padding-left: 0 !important; }
.input-group.merged :not(:last-child)  input { border-right-width: 0 !important; padding-right: 0 !important; }

/* --------------------------------------------------------------------------
   23. LANGUAGE SIDEBAR OVERLAY
   -------------------------------------------------------------------------- */
#langSidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 300px; max-width: 85vw; z-index: 1100;
  background: hsl(var(--card));
  border-left: 1px solid hsl(var(--border));
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
}
#langSidebar.open { transform: translateX(0); }
#langSidebarOverlay {
  position: fixed; inset: 0; z-index: 1099;
  background: rgba(0,0,0,0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#langSidebarOverlay.open { opacity: 1; visibility: visible; }

/* ========================================================================
   Source: assets/css/pro-redesign.css - PR component system
   ======================================================================== */

/* pro-redesign.css - Unified PR Component System
   Tokens now bridge to the Bicrypto5 HSL design system loaded via bicrypto5.css */
:root {
  /* Brand accents — Bicrypto5 primary palette */
  --pr-purple: hsl(var(--primary));
  --pr-purple-light: hsl(var(--primary) / 0.86);
  --pr-gradient-purple: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.84) 100%);
  --pr-gradient-purple-hover: linear-gradient(135deg, hsl(var(--primary) / 0.94) 0%, hsl(var(--primary) / 0.78) 100%);
  --pr-purple-soft: hsl(var(--primary) / 0.12);
  --pr-green: #0ecb81;
  --pr-green-soft: rgba(14, 203, 129, 0.12);
  --pr-red: #f6465d;
  --pr-red-soft: rgba(246, 70, 93, 0.12);
  --pr-amber: #f0b90b;
  --pr-amber-soft: rgba(240, 185, 11, 0.12);

  /* Surface / structure — pulled from Bicrypto5 tokens */
  --pr-bg: hsl(var(--background));
  --pr-surface: hsl(var(--card));
  --pr-border: hsl(var(--border));
  --pr-text: hsl(var(--foreground));
  --pr-muted: hsl(var(--muted-foreground));
  --pr-subtle: hsl(var(--muted-foreground));
  --pr-input-bg: hsl(var(--input, var(--background)));
  --pr-hover: hsl(var(--accent));

  --pr-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --pr-shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --pr-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --pr-radius: calc(var(--radius, 0.5rem) - 2px);
  --pr-radius-sm: calc(var(--radius, 0.5rem) - 4px);
  --pr-radius-lg: var(--radius, 0.5rem);
}
html.dark {
  /* Dark surface overrides — Bicrypto5 zinc-950 family */
  --pr-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  --pr-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.pr-page-wrap {
  padding: 1rem;
  max-width: 1280px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .pr-page-wrap {
    padding: 1.5rem 2rem;
  }
}
@media (min-width: 1024px) {
  .pr-page-wrap {
    padding: 2rem 2.5rem;
  }
}
.pr-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.pr-page-header-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.pr-page-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pr-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pr-text);
  margin: 0;
  line-height: 1.3;
}
.pr-page-subtitle {
  font-size: 0.8125rem;
  color: var(--pr-muted);
  margin: 0.125rem 0 0;
}
.pr-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--pr-radius-sm);
  background: var(--pr-surface);
  border: 1px solid var(--pr-border);
  color: var(--pr-text);
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.15s;
  flex-shrink: 0;
}
.pr-back-btn:hover {
  background: var(--pr-hover);
  transform: translateX(-2px);
}
.pr-back-btn ion-icon {
  font-size: 1.125rem;
}
.pr-content-grid {
  display: grid;
  gap: 1.25rem;
}
.pr-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--pr-radius);
  padding: 1.25rem;
  box-shadow: var(--pr-shadow-sm);
  color: hsl(var(--card-foreground));
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.pr-card:hover {
  box-shadow: var(--pr-shadow);
}
.pr-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--pr-border);
}
.pr-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pr-text);
  margin: 0;
}
.pr-card-title ion-icon {
  font-size: 1.125rem;
}
.pr-stats-row {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.pr-stats-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.pr-stats-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.pr-stats-row.cols-4 {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .pr-stats-row.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 480px) {
  .pr-stats-row.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pr-stat-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--pr-radius);
  padding: 1rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  box-shadow: var(--pr-shadow-sm);
  color: hsl(var(--card-foreground));
}
.pr-stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pr-stat-icon ion-icon {
  font-size: 1.375rem;
}
.pr-stat-label {
  font-size: 0.75rem;
  color: var(--pr-muted);
  font-weight: 500;
  margin-bottom: 0.1875rem;
}
.pr-stat-value {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--pr-text);
  line-height: 1.2;
}
.pr-stat-change {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.1875rem;
}
.pr-stat-change.up {
  color: var(--pr-green);
}
.pr-stat-change.down {
  color: var(--pr-red);
}
.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.375rem;
  /* border-radius: var(--pr-radius-sm); */
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.pr-btn:active {
  transform: scale(0.97);
}
.pr-btn ion-icon {
  font-size: 1rem;
}
.pr-btn.w-full {
  width: 100%;
}
.pr-btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--pr-shadow-sm);
}
.pr-btn-primary:hover {
  background: hsl(var(--primary) / 0.9);
}
.pr-btn-secondary {
  background: var(--pr-surface);
  color: var(--pr-text);
  border: 1px solid var(--pr-border);
}
.pr-btn-secondary:hover {
  background: var(--pr-hover);
}
.pr-btn-success {
  background: var(--pr-green);
  color: #052e16;
}
.pr-btn-danger {
  background: var(--pr-red);
  color: #fff;
}
.pr-btn-amber {
  background: var(--pr-gradient-purple);
  color: #ffffff;
}
.pr-btn-amber:hover {
  background: var(--pr-gradient-purple-hover);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.3);
}
.pr-btn-sm {
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
}
.pr-btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}
.pr-btn[disabled],
.pr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.pr-form-group {
  margin-bottom: 1.125rem;
}
.pr-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pr-text);
  margin-bottom: 0.5rem;
}
.pr-label-optional {
  color: var(--pr-muted);
  font-weight: 400;
}
.pr-input {
  width: 100%;
  background: var(--pr-input-bg);
  border: 1px solid var(--pr-border);
  border-radius: var(--pr-radius-sm);
  padding: 0.6875rem 0.875rem;
  font-size: 0.875rem;
  color: var(--pr-text);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  box-sizing: border-box;
}
.pr-input::placeholder {
  color: var(--pr-subtle);
}
.pr-input:focus {
  border-color: var(--pr-purple);
  box-shadow: 0 0 0 3px var(--pr-purple-soft);
}
.pr-input-wrap {
  position: relative;
}
.pr-input-prefix {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pr-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.pr-input-prefix ion-icon {
  font-size: 1rem;
}
.pr-input.has-prefix {
  padding-left: 2.5rem;
}
.pr-hint {
  font-size: 0.75rem;
  color: var(--pr-muted);
  margin-top: 0.375rem;
}
.pr-hint strong {
  color: var(--pr-text);
}
.pr-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 100px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pr-badge-success {
  background: var(--pr-green-soft);
  color: var(--pr-green);
}
.pr-badge-danger {
  background: var(--pr-red-soft);
  color: var(--pr-red);
}
.pr-badge-warning {
  background: var(--pr-amber-soft);
  color: var(--pr-amber);
}
.pr-badge-purple {
  background: var(--pr-purple-soft);
  color: var(--pr-purple);
}
.pr-badge-muted {
  background: rgba(112, 122, 138, 0.12);
  color: var(--pr-muted);
}
.pr-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--pr-radius-sm);
  border-left: 3px solid;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
}
.pr-alert ion-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.0625rem;
}
.pr-alert.warning {
  background: var(--pr-amber-soft);
  border-color: var(--pr-amber);
  color: var(--pr-text);
}
.pr-alert.warning ion-icon {
  color: var(--pr-amber);
}
.pr-alert.danger {
  background: var(--pr-red-soft);
  border-color: var(--pr-red);
  color: var(--pr-text);
}
.pr-alert.danger ion-icon {
  color: var(--pr-red);
}
.pr-alert.success {
  background: var(--pr-green-soft);
  border-color: var(--pr-green);
  color: var(--pr-text);
}
.pr-alert.success ion-icon {
  color: var(--pr-green);
}
.pr-alert.info {
  background: var(--pr-purple-soft);
  border-color: var(--pr-purple);
  color: var(--pr-text);
}
.pr-alert.info ion-icon {
  color: var(--pr-purple);
}
.pr-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pr-list-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--pr-border);
  transition: background 0.15s;
}
.pr-list-item:last-child {
  border-bottom: none;
}
.pr-list-item-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pr-list-item-icon ion-icon {
  font-size: 1.0625rem;
}
.pr-list-item-body {
  flex: 1;
  min-width: 0;
}
.pr-list-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pr-list-item-sub {
  font-size: 0.75rem;
  color: var(--pr-muted);
  margin-top: 0.0625rem;
}
.pr-list-item-meta {
  text-align: right;
  flex-shrink: 0;
}
.pr-list-item-amount {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pr-text);
}
.pr-list-item-date {
  font-size: 0.6875rem;
  color: var(--pr-muted);
  margin-top: 0.125rem;
}
.pr-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--pr-hover);
  padding: 0.25rem;
  border-radius: var(--pr-radius-sm);
  margin-bottom: 1.25rem;
}
.pr-tab {
  flex: 1;
  padding: 0.5rem 0.875rem;
  border-radius: calc(var(--pr-radius-sm) - 2px);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pr-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: center;
  transition: all 0.15s;
}
.pr-tab.active {
  background: var(--pr-surface);
  color: var(--pr-text);
  box-shadow: var(--pr-shadow);
}
.pr-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--pr-muted);
}
.pr-empty ion-icon {
  font-size: 3rem;
  display: block;
  margin: 0 auto 0.75rem;
  color: var(--pr-border);
}
.pr-empty h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pr-text);
  margin: 0 0 0.375rem;
}
.pr-empty p {
  font-size: 0.8125rem;
  margin: 0;
}
.pr-method-card {
  background: var(--pr-surface);
  border: 2px solid var(--pr-border);
  border-radius: var(--pr-radius);
  padding: 1rem 1.125rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}
.pr-method-card:hover {
  border-color: var(--pr-purple);
  box-shadow: 0 0 0 3px var(--pr-purple-soft);
}
.pr-method-card.active {
  border-color: var(--pr-purple);
  background: var(--pr-purple-soft);
}
.pr-method-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pr-method-icon ion-icon {
  font-size: 1.375rem;
}
.pr-method-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pr-text);
}
.pr-method-label {
  font-size: 0.75rem;
  color: var(--pr-muted);
  margin-top: 0.0625rem;
}
.pr-table-wrap {
  overflow-x: auto;
}
.pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.pr-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pr-muted);
  border-bottom: 1px solid var(--pr-border);
  white-space: nowrap;
}
.pr-table td {
  padding: 0.875rem 1rem;
  color: var(--pr-text);
  border-bottom: 1px solid var(--pr-border);
  vertical-align: middle;
}
.pr-table tr:last-child td {
  border-bottom: none;
}
.pr-table tr:hover td {
  background: var(--pr-hover);
}
.pr-divider {
  height: 1px;
  background: var(--pr-border);
  margin: 1rem 0;
}
.pr-upload-box {
  border: 2px dashed var(--pr-border);
  border-radius: var(--pr-radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--pr-muted);
}
.pr-upload-box:hover {
  border-color: var(--pr-purple);
  background: var(--pr-purple-soft);
  color: var(--pr-purple);
}
.pr-upload-box ion-icon {
  font-size: 2.5rem;
  display: block;
  margin: 0 auto 0.625rem;
}
.pr-upload-box p {
  font-size: 0.875rem;
  margin: 0;
}
.pr-toggle {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}
.pr-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.pr-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--pr-border);
  border-radius: 100px;
  transition: 0.2s;
}
.pr-toggle input:checked + .pr-toggle-slider {
  background: var(--pr-purple);
}
.pr-toggle input:checked + .pr-toggle-slider:before {
  transform: translateX(1.25rem);
}
.pr-skeleton {
  background: linear-gradient(
    90deg,
    var(--pr-border) 25%,
    var(--pr-hover) 50%,
    var(--pr-border) 75%
  );
  background-size: 200% 100%;
  animation: pr-shimmer 1.4s infinite;
  border-radius: var(--pr-radius-sm);
}
@keyframes pr-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* Scrollbar — defer to bicrypto5.css (8px, rounded with light/dark) */
@media (max-width: 767px) {
  .pr-hide-mobile {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .pr-show-mobile-only {
    display: none !important;
  }
}

/* ── Light Mode Professional Refinements ─────────────────────── */

/* Sharper card borders in light */
:root .pr-card {
  border-color: #e2e5ea;
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.05),
    0 2px 12px rgba(0, 0, 0, 0.04);
}
:root .pr-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Crisper stat cards in light */
:root .pr-stat-card {
  border-color: #e2e5ea;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Slightly elevated header in light mode */
:root #mainHeader {
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 1px 6px rgba(0, 0, 0, 0.04);
}

/* Better table stripes in light */
:root .pr-table tr:hover td {
  background: #f7f8fa;
}

/* Professional focus ring */
:root .pr-input:focus {
  border-color: var(--pr-purple);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

/* More visible tab active state in light */
:root .pr-tab.active {
  background: #ffffff;
  color: #1e2026;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Upload box polish */
:root .pr-upload-box:hover {
  background: hsl(var(--primary) / 0.04);
}

/* ── Dark Mode Overrides ─────────────────────────────────────── */
html.dark .pr-card {
  border-color: var(--pr-border);
  box-shadow: var(--pr-shadow);
}
html.dark .pr-card:hover {
  box-shadow: var(--pr-shadow-lg);
}
html.dark #mainHeader {
  box-shadow: none;
}

/* ========================================================================
   Source: assets/css/global-radius.css - Radius normalization
   ======================================================================== */

/* =================================================================
   GLOBAL CARD RADIUS — unified rounded-xl across the entire app
   (user pages + admin panel). Loaded after main stylesheets so it
   wins specificity for safe overrides. Keep small badges/pills
   distinctive; only true "card-like" containers get the 12px radius.
   ================================================================= */
:root {
    --app-card-radius: 12px;
    --app-input-radius: 10px;
    --app-pill-radius: 9999px;
}

/* ---------- Generic card classes (Bootstrap, Kaiadmin, Bicrypto) ---------- */
.card,
.card-header,
.card-body,
.card-footer,
.card-deck > .card,
.card-group > .card,
.kt-portlet,
.kt-portlet__head,
.kt-portlet__body,
.kt-card,
.kt-widget,
.kt-stats,
.dashboard-card,
.stat-card,
.stats-card,
.summary-card,
.balance-card,
.wallet-card,
.invest-card,
.plan-card,
.product-card,
.profile-card,
.notification-card,
.kyc-card,
.feature-card,
.pricing-card,
.review-card,
.faq-card,
.service-card,
.about-card,
.contact-card,
.team-card,
.testimonial-card,
.glass-card,
.surface-card,
.panel,
.panel-card,
.panel-default,
.panel-primary,
.well,
.alert,
.modal-content,
.toast,
.popover,
.tooltip-inner { border-radius: var(--app-card-radius) !important; }

/* Card-header to card-body should not double-round when stacked */
.card > .card-header:first-child { border-top-left-radius: var(--app-card-radius) !important; border-top-right-radius: var(--app-card-radius) !important; }
.card > .card-footer:last-child  { border-bottom-left-radius: var(--app-card-radius) !important; border-bottom-right-radius: var(--app-card-radius) !important; }

/* ---------- Form inputs / selects (slightly tighter for hierarchy) ---------- */
.form-control,
.form-select,
select.form-control,
input.form-control,
textarea.form-control,
.input-group-text,
.input-group > .form-control,
.bootstrap-select > .btn,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple { border-radius: var(--app-input-radius) !important; }

.input-group > .form-control:not(:last-child),
.input-group > .input-group-prepend > .input-group-text { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.input-group > .form-control:not(:first-child),
.input-group > .input-group-append > .input-group-text { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }

/* ---------- Buttons (rounded-xl for primary actions, pill for tags) ---------- */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info { border-radius: var(--app-input-radius) !important; }

/* Round button group children consistently */
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.btn-group > .btn:not(:last-child)  { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* ---------- Tables wrapped in cards ---------- */
.table-responsive,
.dataTables_wrapper,
.dt-container { border-radius: var(--app-card-radius); overflow: hidden; }
.table { border-radius: var(--app-card-radius); overflow: hidden; }

/* ---------- Modals / dialogs / dropdowns / sheets ---------- */
.modal-dialog .modal-content,
.modal-content,
.dropdown-menu,
.menu-card,
.sheet-card,
[role="dialog"] > .panel,
[role="dialog"] > .card { border-radius: var(--app-card-radius) !important; }

/* Bottom sheets keep top corners only */
.bottom-sheet,
.b-sheet,
.mob-sheet,
.binary-bottom-sheet { border-radius: var(--app-card-radius) var(--app-card-radius) 0 0 !important; }

/* ---------- Sidebar / navbar tweaks (avoid super-square corners) ---------- */
.nav-tabs .nav-link,
.nav-pills .nav-link { border-radius: var(--app-input-radius) !important; }

/* ---------- Images inside cards inherit the card radius edge ---------- */
.card > img:first-child,
.card-img-top,
.card-img { border-top-left-radius: var(--app-card-radius) !important; border-top-right-radius: var(--app-card-radius) !important; }
.card-img-bottom { border-bottom-left-radius: var(--app-card-radius) !important; border-bottom-right-radius: var(--app-card-radius) !important; }

/* ---------- Badges, chips, dots — keep PILL shape ---------- */
.badge,
.badge-pill,
.tag,
.chip,
.pill,
.label,
.status-pill,
.dot { border-radius: var(--app-pill-radius) !important; }

/* Round indicator dots at ~50% so they remain circular regardless of size */
.dot,
.indicator-dot,
.notif-dot { border-radius: 50% !important; }

/* ---------- Avatars / profile images stay circular ---------- */
.avatar,
.user-avatar,
.profile-img-circle,
.rounded-circle,
.avatar-circle { border-radius: 50% !important; }

/* ---------- Avoid breaking elements that explicitly need square corners ---------- */
hr,
.no-radius,
.flat,
.square { border-radius: 0 !important; }

/* ========================================================================
   Source: assets/css/fx-aesthetic.css - FX aesthetic layer
   ======================================================================== */

/* =============================================================================
   FX-AESTHETIC — Professional Futures Trading Theme (Binance-style)
   ----------------------------------------------------------------------------
   Professional trading platform theme with enhanced dark/light modes,
   professional color palette inspired by Binance, Bybit, and top exchanges.
   
   Version: 2.0 (Enhanced)
   Features:
   - Enhanced color contrast for readability
   - Professional trading indicators (green/red for buy/sell)
   - Smooth theme transitions
   - Professional typography hierarchy
   - Mobile-first responsive design
   - Advanced order book styling
   - Micro-interactions and animations
   - Loading states and skeleton loaders
   - Glass morphism effects
   ========================================================================= */

/* -- LIGHT (default Bicryptoo, slate-based) ------------------------------- */
.fx-page {
    /* HSL tokens consumed by Tailwind utilities & shadcn components */
    --background:           0 0% 100%;
    --foreground:           222 47% 11%;     /* slate-900 */
    --card:                 210 40% 98%;     /* slate-50 */
    --card-foreground:      222 47% 11%;
    --popover:              0 0% 100%;
    --popover-foreground:   222 47% 11%;
    --muted:                210 40% 96%;     /* slate-100 */
    --muted-foreground:     215 16% 47%;     /* slate-500 */
    --accent:               210 40% 96%;
    --accent-foreground:    222 47% 11%;
    --border:               214 32% 91%;     /* slate-200 */
    --input:                214 32% 91%;
    --ring:                 var(--primary);
    --primary-foreground:   0 0% 100%;
    --secondary:            210 40% 96%;
    --secondary-foreground: 222 47% 11%;
    --destructive:          0 72% 51%;
    --destructive-foreground: 0 0% 100%;

    /* Optional helpers for compact futures cards */
    --fx-surface:    hsl(var(--card));
    --fx-surface-2:  hsl(var(--muted));
    --fx-text:       hsl(var(--foreground));
    --fx-text-dim:   hsl(var(--muted-foreground));
    --fx-border:     hsl(var(--border));
    --fx-accent:     hsl(var(--primary));
    --fx-rise:       #16a34a;
    --fx-fall:       #dc2626;
    --fx-radius:     12px;
    --fx-radius-sm:  10px;
    --fx-shadow:     0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    
    /* Professional exchange colors - Enhanced */
    --fx-yellow:     #f0b90b;      /* Binance yellow */
    --fx-blue:      hsl(var(--primary));      /* Links & info */
    --fx-orange:    #f97316;      /* Warnings */
    --fx-purple:    hsl(var(--primary));      /* Special items */
    
    /* Glass morphism - Light mode */
    --fx-glass:     rgba(255, 255, 255, 0.7);
    --fx-glass-bg:  rgba(255, 255, 255, 0.5);
    --fx-glass-border: rgba(0, 0, 0, 0.08);
}

/* -- DARK overrides ------------------------------------------------------- */
html.dark .fx-page {
    --background:           0 0% 4%;         /* #0a0a0a */
    --foreground:           232 24% 91%;     /* #e2e5f0 */
    --card:                 0 0% 7%;         /* #111111 */
    --card-foreground:      232 24% 91%;
    --popover:              0 0% 9%;
    --popover-foreground:   232 24% 91%;
    --muted:                0 0% 9%;         /* #181818 */
    --muted-foreground:     228 13% 50%;
    --accent:               0 0% 11%;
    --accent-foreground:    232 24% 91%;
    --border:               0 0% 13%;        /* #222 */
    --input:                0 0% 13%;
    --ring:                 var(--primary);
    --primary-foreground:   0 0% 100%;
    --secondary:            0 0% 9%;
    --secondary-foreground: 232 24% 91%;
    --destructive:          0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    /* Binance-style professional trading colors */
    --fx-rise:    #00dc81;
    --fx-fall:   #f6465d;
    --fx-rise-bg:   rgba(0, 220, 129, 0.12);
    --fx-fall-bg:    rgba(246, 70, 93, 0.12);
    --fx-shadow:  0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.5);
    --fx-surface: #16181d;
    --fx-surface-2: #1c1e26;
    --fx-overlay: rgba(255, 255, 255, 0.04);
    --fx-overlay-2: rgba(255, 255, 255, 0.08);
}

/* Binance green/red utility classes - Use these for trading actions */
.fx-rise { color: var(--fx-rise) !important; }
.fx-fall { color: var(--fx-fall) !important; }
.fx-rise-bg { background: var(--fx-rise-bg); }
.fx-fall-bg { background: var(--fx-fall-bg); }

/* Green/Red button actions - Binance style */
.fx-btn-buy,
.fx-btn-long {
    background: var(--fx-rise) !important;
    color: #000 !important;
    border-color: var(--fx-rise) !important;
}
.fx-btn-buy:hover,
.fx-btn-long:hover {
    background: #00c474 !important;
    filter: brightness(1.05);
}

.fx-btn-sell,
.fx-btn-short {
    background: var(--fx-fall) !important;
    color: #fff !important;
    border-color: var(--fx-fall) !important;
}
.fx-btn-sell:hover,
.fx-btn-short:hover {
    background: #e0404f !important;
    filter: brightness(1.05);
}

/* -- Container behavior --------------------------------------------------- */
.fx-page {
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

/* Mobile-first compact container — desktop centered with max-width */
.fx-page > .fx-container,
.fx-page .fx-container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}
@media (max-width: 480px) {
    .fx-page .fx-container { padding: 12px; }
}

/* -- Section header (back button + title) -------------------------------- */
.fx-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.fx-head-back {
    width: 38px;
    height: 38px;
    border-radius: var(--fx-radius-sm);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
}
.fx-head-back:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring) / 0.4);
}
.fx-head-back ion-icon { font-size: 18px; }
.fx-head-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: hsl(var(--foreground));
}
.fx-head-sub {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    margin-top: 2px;
}

/* -- Card -------------------------------------------------------------- */
.fx-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius);
    padding: 16px;
    box-shadow: var(--fx-shadow);
}
.fx-card + .fx-card { margin-top: 12px; }
.fx-card-tight { padding: 12px; }
.fx-card-flush { padding: 0; overflow: hidden; }

/* -- Stat (balance) header card ---------------------------------------- */
.fx-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.fx-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.fx-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: hsl(var(--foreground));
    letter-spacing: -0.5px;
    line-height: 1.1;
}
.fx-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--fx-radius-sm);
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fx-stat-icon ion-icon { font-size: 22px; }

/* -- Section title (above a list / form) ------------------------------ */
.fx-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 2px;
    margin: 14px 0 8px;
}

/* -- Inputs ----------------------------------------------------------- */
.fx-input,
.fx-select {
    width: 100%;
    padding: 12px 14px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius-sm);
    color: hsl(var(--foreground));
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fx-input:focus,
.fx-select:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.fx-input::placeholder { color: hsl(var(--muted-foreground)); }
.fx-input[readonly] { background: hsl(var(--muted)); cursor: default; }

.fx-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 6px;
}

/* -- Buttons ---------------------------------------------------------- */
.fx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--fx-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, background 0.15s, transform 0.1s;
}
.fx-btn:active { transform: scale(0.98); }
.fx-btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.fx-btn-primary:hover { filter: brightness(1.08); }
.fx-btn-outline {
    background: hsl(var(--card));
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}
.fx-btn-outline:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring) / 0.4);
}
.fx-btn-ghost {
    background: transparent;
    color: hsl(var(--muted-foreground));
}
.fx-btn-ghost:hover {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}
.fx-btn-danger {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}
.fx-btn-block { width: 100%; }
.fx-btn-lg { padding: 14px 18px; font-size: 15px; }

/* -- Pill / chip -------------------------------------------------------- */
.fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fx-chip.is-success { background: rgb(22 163 74 / 0.12); color: var(--fx-rise); border-color: rgb(22 163 74 / 0.3); }
.fx-chip.is-danger  { background: rgb(220 38 38 / 0.12); color: var(--fx-fall); border-color: rgb(220 38 38 / 0.3); }
.fx-chip.is-warning { background: rgb(234 179 8 / 0.14); color: #ca8a04; border-color: rgb(234 179 8 / 0.3); }
.fx-chip.is-pending { background: rgb(99 102 241 / 0.12); color: hsl(var(--primary)); border-color: hsl(var(--primary) / 0.3); }

/* -- List rows (history items) ----------------------------------------- */
.fx-list { display: flex; flex-direction: column; gap: 6px; }
.fx-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius-sm);
    text-decoration: none;
    color: hsl(var(--foreground));
    transition: background 0.15s, border-color 0.15s;
}
.fx-list-item:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--ring) / 0.3);
}
.fx-list-item-l { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.fx-list-item-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: hsl(var(--muted));
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.fx-list-item-icon ion-icon { font-size: 18px; color: hsl(var(--muted-foreground)); }
.fx-list-item-title { font-size: 13px; font-weight: 600; line-height: 1.2; }
.fx-list-item-sub   { font-size: 11px; color: hsl(var(--muted-foreground)); margin-top: 2px; }
.fx-list-item-r {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    text-align: right;
}
.fx-list-item-amt { font-size: 13px; font-weight: 700; }
.fx-list-item-sub2 { font-size: 11px; color: hsl(var(--muted-foreground)); }

/* -- Method selector cards (deposit/withdraw method picker) ----------- */
.fx-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.fx-method {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius);
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    font-family: inherit;
    color: hsl(var(--foreground));
}
.fx-method:hover {
    border-color: hsl(var(--ring) / 0.4);
    background: hsl(var(--accent));
}
.fx-method.active {
    border-color: hsl(var(--primary));
    background: hsl(var(--primary) / 0.08);
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.4) inset;
}
.fx-method-icon {
    width: 40px; height: 40px;
    border-radius: var(--fx-radius-sm);
    background: hsl(var(--primary) / 0.14);
    color: hsl(var(--primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fx-method-icon ion-icon { font-size: 22px; }
.fx-method-name { font-size: 14px; font-weight: 700; }
.fx-method-desc { font-size: 11px; color: hsl(var(--muted-foreground)); line-height: 1.3; }

/* -- Quick-amount chips (deposit) ------------------------------------- */
.fx-amt-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}
@media (min-width: 480px) { .fx-amt-chips { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.fx-amt-chip {
    padding: 8px 4px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.fx-amt-chip:hover { border-color: hsl(var(--ring) / 0.4); color: hsl(var(--foreground)); }
.fx-amt-chip.active {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

/* -- Empty state ------------------------------------------------------ */
.fx-empty {
    padding: 32px 16px;
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 13px;
}
.fx-empty ion-icon {
    display: block;
    margin: 0 auto 8px;
    font-size: 32px;
    color: hsl(var(--muted-foreground) / 0.7);
}

/* -- Alert -------------------------------------------------------------- */
.fx-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--fx-radius-sm);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    font-size: 13px;
    color: hsl(var(--foreground));
}
.fx-alert ion-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.fx-alert.is-info    { background: hsl(var(--primary) / 0.08);  border-color: hsl(var(--primary) / 0.3);  color: hsl(var(--primary)); }
.fx-alert.is-warning { background: rgb(234 179 8 / 0.10); border-color: rgb(234 179 8 / 0.3);  color: #a16207; }
.fx-alert.is-success { background: rgb(22 163 74 / 0.10); border-color: rgb(22 163 74 / 0.3);  color: var(--fx-rise); }
.fx-alert.is-danger  { background: rgb(220 38 38 / 0.10); border-color: rgb(220 38 38 / 0.3);  color: var(--fx-fall); }

/* -- Dark mode tweaks for warning text ------------------------------- */
html.dark .fx-alert.is-warning { color: #facc15; }
html.dark .fx-chip.is-warning  { color: #facc15; }

/* -- Forms layout ----------------------------------------------------- */
.fx-form-row { display: flex; flex-direction: column; gap: 14px; }
.fx-form-group { display: flex; flex-direction: column; gap: 6px; }
.fx-input-suffix { position: relative; }
.fx-input-suffix .fx-input { padding-right: 56px; }
.fx-input-suffix-text {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.3px;
    pointer-events: none;
}
.fx-input-prefix { position: relative; }
.fx-input-prefix .fx-input { padding-left: 48px; }
.fx-input-prefix-text {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    pointer-events: none;
}

/* -- Tab strip --------------------------------------------------------- */
.fx-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius-sm);
    margin-bottom: 12px;
}
.fx-tab {
    flex: 1;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.fx-tab.active {
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: var(--fx-shadow);
}

/* -- Avatar / circle ---------------------------------------------------- */
.fx-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: hsl(var(--muted));
    border: 2px solid hsl(var(--border));
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}
.fx-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* -- Table ------------------------------------------------------------- */
.fx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.fx-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: hsl(var(--muted));
    border-bottom: 1px solid hsl(var(--border));
}
.fx-table tbody tr { border-bottom: 1px solid hsl(var(--border)); }
.fx-table tbody tr:last-child { border-bottom: 0; }
.fx-table tbody tr:hover { background: hsl(var(--accent)); }
.fx-table tbody td { padding: 12px; vertical-align: middle; }

/* -- Divider ---------------------------------------------------------- */
.fx-divider {
    height: 1px;
    background: hsl(var(--border));
    margin: 12px 0;
}

/* =============================================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================= */

/* -- Keyframe Animations ------------------------------------------------ */
@keyframes fxSlideInRight {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fxSlideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fxSlideInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fxPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes fxSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes fxPriceFlashGreen {
    0% { background: transparent; }
    50% { background: rgba(0, 220, 129, 0.15); }
    100% { background: transparent; }
}

@keyframes fxPriceFlashRed {
    0% { background: transparent; }
    50% { background: rgba(246, 70, 93, 0.15); }
    100% { background: transparent; }
}

@keyframes fxSkeletonShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes fxBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* -- Animation Utility Classes ------------------------------------------- */
.fx-animate-slide-in { animation: fxSlideInRight 0.25s ease-out; }
.fx-animate-slide-up { animation: fxSlideInUp 0.25s ease-out; }
.fx-animate-slide-down { animation: fxSlideInDown 0.3s ease-out; }
.fx-animate-fade-in { animation: fxFadeIn 0.2s ease-out; }
.fx-animate-pulse { animation: fxPulse 2s ease-in-out infinite; }
.fx-animate-spin { animation: fxSpin 1s linear infinite; }
.fx-animate-bounce { animation: fxBounce 0.5s ease-in-out; }

/* Price flash animations for trading */
.fx-price-up { animation: fxPriceFlashGreen 0.6s ease-out; }
.fx-price-down { animation: fxPriceFlashRed 0.6s ease-out; }

/* -- Skeleton Loaders --------------------------------------------------- */
.fx-skeleton {
    background: linear-gradient(
        90deg,
        hsl(var(--muted)) 0px,
        hsl(var(--accent)) 40px,
        hsl(var(--muted)) 80px
    );
    background-size: 200px 100%;
    animation: fxSkeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--fx-radius-sm);
}

.fx-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.fx-skeleton-text:last-child {
    width: 70%;
}

.fx-skeleton-title {
    height: 24px;
    width: 50%;
    margin-bottom: 12px;
}

.fx-skeleton-circle {
    border-radius: 50%;
}

.fx-skeleton-btn {
    height: 40px;
    width: 120px;
}

.fx-skeleton-card {
    height: 120px;
    width: 100%;
}

/* -- Toast Notifications ------------------------------------------------ */
.fx-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.fx-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: fxSlideInRight 0.3s ease-out;
    font-size: 13px;
    color: hsl(var(--foreground));
    min-width: 280px;
}

.fx-toast.fx-toast-exit {
    animation: fxSlideOutRight 0.3s ease-in forwards;
}

@keyframes fxSlideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.fx-toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.fx-toast.is-success {
    border-left: 3px solid var(--fx-rise);
}

.fx-toast.is-success .fx-toast-icon {
    color: var(--fx-rise);
}

.fx-toast.is-error,
.fx-toast.is-danger {
    border-left: 3px solid var(--fx-fall);
}

.fx-toast.is-error .fx-toast-icon,
.fx-toast.is-danger .fx-toast-icon {
    color: var(--fx-fall);
}

.fx-toast.is-warning {
    border-left: 3px solid #f59e0b;
}

.fx-toast.is-warning .fx-toast-icon {
    color: #f59e0b;
}

.fx-toast.is-info {
    border-left: 3px solid hsl(var(--primary));
}

.fx-toast.is-info .fx-toast-icon {
    color: hsl(var(--primary));
}

.fx-toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fx-toast-close:hover {
    color: hsl(var(--foreground));
}

/* -- Button Micro-interactions ------------------------------------------- */
.fx-btn {
    transition: all 0.15s ease;
}

.fx-btn:active {
    transform: scale(0.97);
}

.fx-btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.fx-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.fx-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: fxSpin 0.8s linear infinite;
    margin-left: 8px;
}

/* -- Input Micro-interactions ------------------------------------------- */
.fx-input,
.fx-select {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fx-input:focus,
.fx-select:focus {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* -- Card Hover Effects ------------------------------------------------- */
.fx-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fx-card:hover {
    border-color: hsl(var(--ring) / 0.3);
}

/* -- Tab Transitions ---------------------------------------------------- */
.fx-tab {
    transition: all 0.15s ease;
}

/* =============================================================================
   PRICE TYPOGRAPHY (JetBrains Mono for numbers)
   ========================================================================= */

/* Use the local/system monospace stack; no render-blocking font import. */

.fx-price,
.fx-number,
.fx-amount {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.fx-price-lg {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.fx-price-md {
    font-size: 18px;
    font-weight: 700;
}

.fx-price-sm {
    font-size: 14px;
    font-weight: 600;
}

.fx-change-up {
    color: var(--fx-rise);
}

.fx-change-down {
    color: var(--fx-fall);
}

/* =============================================================================
   ENHANCED ORDER BOOK STYLES
   ========================================================================= */

.fx-ob-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s ease;
    position: relative;
}

.fx-ob-row:hover {
    background: hsl(var(--accent));
}

.fx-ob-depth-bar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0.15;
    transition: width 0.3s ease;
}

.fx-ob-depth-bar.buy {
    background: var(--fx-rise);
}

.fx-ob-depth-bar.sell {
    background: var(--fx-fall);
}

.fx-ob-price {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    z-index: 1;
}

.fx-ob-price.buy {
    color: var(--fx-rise);
}

.fx-ob-price.sell {
    color: var(--fx-fall);
}

.fx-ob-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    z-index: 1;
}

.fx-ob-spread {
    text-align: center;
    padding: 4px;
    font-size: 11px;
    color: hsl(var(--muted-foreground));
    border-top: 1px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
}

.fx-ob-spread-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--fx-yellow);
}

/* =============================================================================
   ENHANCED POSITION CARDS
   ========================================================================= */

.fx-position-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius);
    padding: 14px;
    margin-bottom: 8px;
    transition: border-color 0.2s ease;
}

.fx-position-card:hover {
    border-color: hsl(var(--ring) / 0.3);
}

.fx-position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fx-position-pair {
    font-size: 15px;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.fx-position-direction {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fx-position-direction.long {
    background: var(--fx-rise-bg);
    color: var(--fx-rise);
}

.fx-position-direction.short {
    background: var(--fx-fall-bg);
    color: var(--fx-fall);
}

.fx-position-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.fx-position-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fx-position-detail-label {
    font-size: 10px;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fx-position-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.fx-position-pnl {
    font-size: 16px;
    font-weight: 800;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid hsl(var(--border));
}

.fx-position-pnl.profit {
    color: var(--fx-rise);
}

.fx-position-pnl.loss {
    color: var(--fx-fall);
}

/* Time progress bar for positions */
.fx-position-progress {
    height: 3px;
    background: hsl(var(--muted));
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.fx-position-progress-bar {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 2px;
    transition: width 1s linear;
}

.fx-position-close-btn {
    background: none;
    border: 1px solid hsl(var(--border));
    color: hsl(var(--muted-foreground));
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fx-position-close-btn:hover {
    border-color: var(--fx-fall);
    color: var(--fx-fall);
    background: var(--fx-fall-bg);
}

/* =============================================================================
   MODAL ENHANCEMENTS
   ========================================================================= */

.fx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fxFadeIn 0.2s ease;
}

.fx-modal-overlay.hidden {
    display: none;
}

.fx-modal-sheet {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--fx-radius) var(--fx-radius) 0 0;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: fxSlideInUp 0.3s ease-out;
}

.fx-modal-sheet-close {
    width: 32px;
    height: 4px;
    background: hsl(var(--muted-foreground));
    border-radius: 2px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

.fx-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-bottom: 16px;
    text-align: center;
}

/* Desktop modal (centered) */
@media (min-width: 768px) {
    .fx-modal-overlay {
        align-items: center;
    }
    
    .fx-modal-sheet {
        border-radius: var(--fx-radius);
        margin: 16px;
        animation: fxSlideInDown 0.3s ease-out;
    }
}

/* =============================================================================
   BADGE & STATUS INDICATORS
   ========================================================================= */

.fx-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px;
}

.fx-badge-live {
    background: rgba(0, 220, 129, 0.12);
    color: var(--fx-rise);
}

.fx-badge-live::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fx-rise);
    animation: fxPulse 2s ease-in-out infinite;
}

.fx-badge-pending {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.fx-badge-completed {
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
}

.fx-badge-cancelled {
    background: rgba(246, 70, 93, 0.12);
    color: var(--fx-fall);
}

/* =============================================================================
   RESPONSIVE UTILITIES
   ========================================================================= */

@media (max-width: 480px) {
    .fx-hide-mobile { display: none !important; }
    .fx-container { padding: 12px; }
}

@media (min-width: 481px) {
    .fx-hide-desktop { display: none !important; }
}

/* =============================================================================
   SCROLLBAR STYLING
   ========================================================================= */

.fx-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: hsl(var(--muted)) transparent;
}

.fx-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.fx-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.fx-scrollbar::-webkit-scrollbar-thumb {
    background: hsl(var(--muted));
    border-radius: 3px;
}

.fx-scrollbar::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground));
}

/* ========================================================================
   Source: assets/css/member-trading.css - Member trading pages
   ======================================================================== */

/* Member trading pages: professional exchange-style surface for wallet, profile,
   deposits, withdrawals, transactions, investment history, and detail pages. */

:root {
    --mt-bg: #f6f8fb;
    --mt-card: rgba(255, 255, 255, 0.92);
    --mt-card-2: rgba(248, 250, 252, 0.92);
    --mt-border: rgba(15, 23, 42, 0.10);
    --mt-text: #0f172a;
    --mt-muted: #64748b;
    --mt-primary: hsl(var(--primary));
    --mt-primary-2: hsl(var(--primary) / 0.84);
    --mt-green: #0ecb81;
    --mt-red: #f6465d;
    --mt-amber: #f0b90b;
    --mt-blue: hsl(var(--primary));
    --mt-radius: 10px;
    --mt-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html.dark {
    --mt-bg: #07080c;
    --mt-card: rgba(14, 16, 24, 0.92);
    --mt-card-2: rgba(20, 23, 33, 0.86);
    --mt-border: rgba(148, 163, 184, 0.14);
    --mt-text: #e8ecf6;
    --mt-muted: #8f9bb3;
    --mt-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.fx-page,
.pr-page-wrap,
.member-pro-page {
    background:
        radial-gradient(circle at 20% -10%, hsl(var(--primary) / 0.14), transparent 34rem),
        radial-gradient(circle at 92% 0%, rgba(14, 203, 129, 0.08), transparent 30rem),
        var(--mt-bg);
    color: var(--mt-text);
}

.fx-page.member-pro-page,
.wallet-page {
    padding: 0;
}

.pr-page-wrap,
.member-pro-page {
    min-height: 100dvh;
    padding: 18px 14px 112px;
}

@media (min-width: 768px) {
    .pr-page-wrap,
    .member-pro-page {
        padding: 28px 24px 88px;
    }
}

@media (min-width: 1024px) {
    .pr-page-wrap,
    .member-pro-page,
    .fx-page .fx-container {
        max-width: 1120px;
    }
}

.fx-page .fx-container {
    padding-bottom: 104px;
}

.fx-head,
.pr-page-header {
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.pr-page-header {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.fx-head-title,
.pr-page-title {
    color: var(--mt-text);
    font-size: 1.18rem;
    font-weight: 760;
    letter-spacing: 0;
}

.fx-head-sub,
.pr-page-subtitle {
    color: var(--mt-muted);
    font-size: 0.82rem;
}

.fx-head-back,
.pr-back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-border);
    background: var(--mt-card);
    color: var(--mt-text);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.fx-head-back:hover,
.pr-back-btn:hover {
    border-color: hsl(var(--primary) / 0.45);
    background: var(--mt-card-2);
}

.fx-card,
.pr-card,
.wallet-addr-card {
    background: linear-gradient(180deg, var(--mt-card), var(--mt-card-2));
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius) !important;
    box-shadow: var(--mt-shadow);
}

.fx-card,
.pr-card {
    padding: 16px;
}

.pr-card:hover {
    box-shadow: var(--mt-shadow);
}

.fx-stat {
    min-height: 92px;
}

.fx-stat-label,
.pr-section-title,
.fx-section-title,
.pr-list-item-sub,
.pr-page-subtitle {
    color: var(--mt-muted);
}

.fx-stat-value {
    color: var(--mt-text);
    font-size: clamp(1.6rem, 4vw, 2.25rem);
}

.fx-stat-icon,
.pr-list-item-icon {
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-border);
}

.fx-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fx-method {
    min-height: 92px;
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-border);
    background: var(--mt-card);
    box-shadow: none;
}

.fx-method.active,
.fx-method:hover {
    border-color: hsl(var(--primary) / 0.56);
    background: linear-gradient(180deg, hsl(var(--primary) / 0.14), var(--mt-card));
}

.fx-method-icon {
    border-radius: 9px;
}

.fx-input,
.fx-select,
.pr-input,
.pr-select {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    color: var(--mt-text);
}

html.dark .fx-input,
html.dark .fx-select,
html.dark .pr-input,
html.dark .pr-select {
    background: rgba(8, 10, 15, 0.72);
}

.fx-input:focus,
.fx-select:focus,
.pr-input:focus,
.pr-select:focus {
    border-color: hsl(var(--primary) / 0.75);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.16);
}

.fx-btn,
.pr-btn {
    border-radius: var(--mt-radius);
    min-height: 42px;
}

.fx-btn-primary,
.pr-btn-primary {
    background: linear-gradient(135deg, var(--mt-primary), var(--mt-primary-2));
    color: #fff;
    border: 0;
    box-shadow: 0 10px 22px hsl(var(--primary) / 0.24);
}

.fx-cta-long,
.fx-btn-success,
.pr-btn-success {
    background: var(--mt-green);
    color: #03110b;
}

.fx-cta-short,
.fx-btn-danger,
.pr-btn-danger {
    background: var(--mt-red);
    color: #fff;
}

.fx-alert,
.pr-alert {
    border-radius: var(--mt-radius);
    border: 1px solid var(--mt-border);
}

.fx-list,
.pr-card[style*="padding:0"],
.pr-card[style*="padding: 0"] {
    overflow: hidden;
}

.pr-list,
.fx-list {
    border-radius: var(--mt-radius);
}

.pr-list-item,
.fx-list-item,
.coin-row {
    min-height: 64px;
    border-color: var(--mt-border) !important;
}

.pr-list-item:hover,
.fx-list a:hover,
.coin-row:hover {
    background: hsl(var(--primary) / 0.075) !important;
}

.pr-list-item-title,
.pr-list-item-amount {
    color: var(--mt-text);
}

.pr-badge,
.fx-chip {
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
}

.pr-badge-success,
.fx-chip.is-success,
.bg-emerald-500\/15 {
    background: rgba(14, 203, 129, 0.13) !important;
    color: var(--mt-green) !important;
}

.pr-badge-warning,
.fx-chip.is-warning,
.bg-amber-500\/15 {
    background: rgba(240, 185, 11, 0.14) !important;
    color: var(--mt-amber) !important;
}

.pr-badge-danger,
.fx-chip.is-danger,
.bg-red-500\/15 {
    background: rgba(246, 70, 93, 0.13) !important;
    color: var(--mt-red) !important;
}

.pr-empty,
.fx-empty {
    background: var(--mt-card);
    border: 1px dashed var(--mt-border);
    border-radius: var(--mt-radius);
    color: var(--mt-muted);
}

.profile-hero,
.wallet-hero-bg {
    background:
        linear-gradient(180deg, hsl(var(--primary) / 0.10), rgba(14, 203, 129, 0.04)),
        var(--mt-card);
}

.member-pro-page .divide-border > :not([hidden]) ~ :not([hidden]),
.fx-page .divide-border > :not([hidden]) ~ :not([hidden]) {
    border-color: var(--mt-border);
}

.member-pro-page a,
.pr-page-wrap a,
.fx-page a {
    text-decoration: none;
}

.fx-detail-container {
    max-width: 640px;
}

.fx-receipt-hero {
    text-align: center;
    padding: 28px 20px;
    margin-bottom: 14px;
    background:
        radial-gradient(circle at 50% -20%, hsl(var(--primary) / 0.18), transparent 46%),
        var(--mt-card);
}

.fx-receipt-icon {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fx-receipt-icon ion-icon {
    font-size: 34px;
}

.fx-receipt-eyebrow {
    font-size: 12px;
    color: var(--mt-muted);
    margin-bottom: 4px;
}

.fx-receipt-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--mt-text);
    margin-bottom: 8px;
}

.fx-receipt-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--mt-text);
    letter-spacing: 0;
    line-height: 1.05;
}

.fx-receipt-meta {
    font-size: 12px;
    color: var(--mt-muted);
    margin-top: 6px;
}

.fx-receipt-section-head,
.fx-receipt-row {
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--mt-border);
}

.fx-receipt-section-head {
    padding-top: 12px;
    padding-bottom: 12px;
}

.fx-receipt-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--mt-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.fx-receipt-section-title ion-icon {
    color: hsl(var(--primary));
    font-size: 16px;
}

.fx-receipt-label {
    font-size: 13px;
    color: var(--mt-muted);
    flex: 0 0 auto;
}

.fx-receipt-value {
    font-size: 13px;
    font-weight: 650;
    color: var(--mt-text);
    text-align: right;
    min-width: 0;
}

.fx-receipt-value.is-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.fx-receipt-note {
    margin-bottom: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.fx-receipt-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.fx-receipt-actions .fx-btn {
    flex: 1;
}

.fx-detail-page {
    min-height: 100vh;
}

.fx-detail-page .fx-detail-container {
    max-width: 980px;
    padding-bottom: 32px;
}

.fx-detail-page .fx-head {
    position: relative;
    padding: 2px 0 14px;
    margin-bottom: 16px;
    border: 0;
    background: transparent;
}

.fx-detail-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    align-items: start;
}

.fx-detail-page .fx-receipt-hero {
    position: sticky;
    top: 16px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    padding: 26px;
    border: 1px solid hsl(var(--primary) / 0.22);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .18);
    background:
        linear-gradient(180deg, hsl(var(--primary) / 0.16), transparent 42%),
        radial-gradient(circle at 18% 0%, hsl(var(--primary) / 0.24), transparent 34%),
        var(--mt-card);
}

.fx-detail-page .fx-receipt-hero::before {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, hsl(var(--primary)), transparent);
    opacity: .76;
    pointer-events: none;
}

.fx-detail-page .fx-receipt-hero::after {
    content: "";
    position: absolute;
    inset: auto -38px -48px auto;
    width: 190px;
    height: 190px;
    border: 1px solid hsl(var(--primary) / 0.18);
    border-radius: 999px;
    opacity: .7;
    pointer-events: none;
}

.fx-detail-page .fx-receipt-icon {
    width: 56px;
    height: 56px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 42px hsl(var(--primary) / 0.18);
    flex: 0 0 auto;
}

.fx-detail-page .fx-receipt-icon ion-icon {
    font-size: 28px;
}

.fx-detail-page .fx-receipt-eyebrow,
.fx-detail-page .fx-receipt-meta {
    margin: 0;
}

.fx-detail-page .fx-receipt-eyebrow {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.fx-detail-page .fx-receipt-title {
    margin: 0 0 12px;
    line-height: 1.25;
    font-size: 19px;
}

.fx-detail-page .fx-receipt-amount {
    margin: 10px 0 0;
    font-size: clamp(32px, 5vw, 46px);
    line-height: .98;
}

.fx-detail-page .fx-card-flush {
    overflow: hidden;
    border: 1px solid hsl(var(--border) / .9);
    border-radius: 16px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .13);
}

.fx-detail-page .fx-receipt-section-head {
    padding: 17px 20px;
    background:
        linear-gradient(90deg, hsl(var(--primary) / 0.12), transparent 62%),
        hsl(var(--card) / .46);
}

.fx-detail-page .fx-receipt-row {
    padding: 16px 20px;
    transition: background .18s ease;
}

.fx-detail-page .fx-receipt-row:hover {
    background: hsl(var(--primary) / 0.045);
}

.fx-detail-page .fx-receipt-value {
    font-weight: 750;
}

.fx-detail-page .fx-receipt-note {
    margin-top: 16px;
    border-color: hsl(var(--primary) / 0.22);
    background: hsl(var(--primary) / 0.08);
}

.fx-detail-page .fx-receipt-actions {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid hsl(var(--border) / .86);
    border-radius: 16px;
    background: hsl(var(--card) / .62);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .1);
}

.fx-detail-page .fx-receipt-actions .fx-btn {
    min-height: 50px;
}

.fx-detail-page .fx-btn-primary {
    box-shadow: 0 14px 28px hsl(var(--primary) / 0.24);
}

.fx-receipt-meta-grid {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.fx-detail-page .fx-receipt-hero > div:first-child {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
}

.fx-detail-page .fx-receipt-hero > div:first-child .fx-receipt-eyebrow,
.fx-detail-page .fx-receipt-hero > div:first-child .fx-receipt-title,
.fx-detail-page .fx-receipt-hero > div:first-child .fx-receipt-amount {
    grid-column: 2;
}

.fx-detail-page .fx-receipt-hero > div:first-child .fx-receipt-icon {
    grid-row: 1 / span 3;
}

.fx-receipt-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid hsl(var(--border) / .76);
    border-radius: 12px;
    background: rgba(255, 255, 255, .035);
}

.fx-receipt-stat span:first-child {
    font-size: 11px;
    font-weight: 750;
    color: var(--mt-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.fx-receipt-stat span:last-child {
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
    color: var(--mt-text);
    text-align: right;
}

@media (max-width: 640px) {
    .fx-card,
    .pr-card {
        padding: 14px;
    }

    .pr-page-header,
    .fx-head {
        margin-bottom: 14px;
    }

    .pr-list-item,
    .fx-list a {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .fx-method {
        min-height: 84px;
    }

    .fx-receipt-row {
        align-items: flex-start;
    }

    .fx-receipt-value {
        max-width: 62%;
    }
}

@media (max-width: 760px) {
    .fx-detail-page .fx-detail-container {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 22px;
    }

    .fx-detail-page .fx-head {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .fx-detail-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fx-detail-page .fx-receipt-hero {
        position: relative;
        top: auto;
        min-height: 0;
        padding: 18px;
        text-align: left;
        border-color: hsl(var(--border) / .82);
        border-radius: 14px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, .1);
        background:
            linear-gradient(180deg, hsl(var(--primary) / 0.10), transparent 34%),
            var(--mt-card);
    }

    .fx-detail-page .fx-receipt-hero::after {
        display: none;
    }

    .fx-detail-page .fx-receipt-icon {
        width: 46px;
        height: 46px;
        margin-left: 0;
        margin-right: 0;
    }

    .fx-detail-page .fx-receipt-hero > div:first-child {
        grid-template-columns: 46px minmax(0, 1fr);
        column-gap: 12px;
    }

    .fx-detail-page .fx-receipt-icon ion-icon {
        font-size: 23px;
    }

    .fx-detail-page .fx-receipt-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .fx-detail-page .fx-receipt-amount {
        font-size: 32px;
        line-height: 1.05;
    }

    .fx-receipt-meta-grid {
        gap: 0;
        margin-top: 16px;
        border: 1px solid hsl(var(--border) / .75);
        border-radius: 12px;
        overflow: hidden;
        background: hsl(var(--background) / .38);
    }

    .fx-receipt-stat {
        padding: 10px 12px;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .fx-receipt-stat + .fx-receipt-stat {
        border-top: 1px solid hsl(var(--border) / .72);
    }

    .fx-receipt-stat span:first-child {
        font-size: 10px;
    }

    .fx-receipt-stat span:last-child {
        font-size: 11.5px;
        line-height: 1.25;
    }

    .fx-detail-page .fx-card-flush {
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .08);
    }

    .fx-detail-page .fx-receipt-section-head {
        padding: 14px 16px;
        background: hsl(var(--card) / .5);
    }

    .fx-detail-page .fx-receipt-row {
        padding: 12px 16px;
    }

    .fx-detail-page .fx-receipt-label {
        font-size: 12px;
    }

    .fx-detail-page .fx-receipt-value,
    .fx-detail-page .fx-receipt-value.is-code {
        font-size: 12px;
    }

    .fx-detail-page .fx-receipt-actions {
        padding: 10px;
        margin-top: 12px;
        border-radius: 14px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    }

    .fx-detail-page .fx-receipt-actions .fx-btn {
        min-height: 46px;
    }
}

/* Pro exchange detail layout */
.fx-detail-page .fx-detail-container {
    max-width: 760px;
}

.fx-detail-page .fx-head {
    padding: 0 0 12px;
    margin-bottom: 10px;
}

.fx-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fx-detail-page .fx-receipt-hero {
    position: relative;
    top: auto;
    min-height: 0;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid hsl(var(--border) / .86);
    border-radius: 8px;
    box-shadow: none;
    background:
        linear-gradient(90deg, hsl(var(--primary) / 0.08), transparent 45%),
        var(--mt-card);
}

.fx-detail-page .fx-receipt-hero::before {
    left: 0;
    right: auto;
    width: 3px;
    height: 100%;
    border-radius: 0;
    background: hsl(var(--primary));
    opacity: .9;
}

.fx-detail-page .fx-receipt-hero::after {
    display: none;
}

.fx-detail-page .fx-receipt-hero > div:first-child {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
}

.fx-detail-page .fx-receipt-icon {
    width: 44px;
    height: 44px;
    border-color: hsl(var(--border) / .7);
    box-shadow: none;
}

.fx-detail-page .fx-receipt-icon ion-icon {
    font-size: 22px;
}

.fx-detail-page .fx-receipt-eyebrow {
    font-size: 10px;
    letter-spacing: .06em;
}

.fx-detail-page .fx-receipt-title {
    margin: 2px 0 6px;
    font-size: 15px;
    font-weight: 800;
}

.fx-detail-page .fx-receipt-amount {
    margin: 0;
    font-size: clamp(28px, 4.2vw, 36px);
    line-height: 1;
}

.fx-receipt-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
    border: 1px solid hsl(var(--border) / .76);
    border-radius: 8px;
    overflow: hidden;
    background: hsl(var(--background) / .34);
}

.fx-receipt-stat {
    display: grid;
    gap: 5px;
    align-items: start;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.fx-receipt-stat + .fx-receipt-stat {
    border-left: 1px solid hsl(var(--border) / .7);
}

.fx-receipt-stat span:first-child {
    font-size: 10px;
    letter-spacing: .04em;
}

.fx-receipt-stat span:last-child {
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-detail-page .fx-card-flush {
    border-radius: 8px;
    box-shadow: none;
}

.fx-detail-page .fx-receipt-section-head {
    padding: 13px 16px;
    background: hsl(var(--muted) / .28);
}

.fx-detail-page .fx-receipt-row {
    padding: 13px 16px;
}

.fx-detail-page .fx-receipt-value {
    font-weight: 800;
}

.fx-detail-page .fx-receipt-note {
    margin-top: 12px;
    border-color: hsl(var(--border) / .86);
    background: hsl(var(--muted) / .22);
}

.fx-detail-page .fx-receipt-actions {
    margin-top: 12px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.fx-detail-page .fx-receipt-actions .fx-btn {
    min-height: 46px;
    border-radius: 8px;
}

.fx-auto-trades {
    overflow: hidden;
    border: 1px solid hsl(var(--border) / .86);
    border-radius: 8px;
    background: var(--mt-card);
}

.fx-auto-trade-list {
    display: grid;
}

.fx-auto-trade-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid hsl(var(--border) / .64);
    background: linear-gradient(180deg, hsl(var(--primary) / .035), transparent);
}

.fx-auto-trade-overview div {
    display: grid;
    gap: 2px;
}

.fx-auto-trade-overview span {
    font-size: 10px;
    font-weight: 750;
    color: var(--mt-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fx-auto-trade-overview strong {
    font-size: 14px;
    font-weight: 850;
    color: var(--mt-text);
    font-variant-numeric: tabular-nums;
}

.fx-auto-trade-progress {
    height: 3px;
    background: hsl(var(--muted) / .82);
}

.fx-auto-trade-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--mt-green), hsl(var(--primary)));
    transition: width .35s ease;
}

.fx-auto-trade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-top: 1px solid hsl(var(--border) / .78);
}

.fx-auto-trade-row.is-running {
    background: hsl(var(--primary) / .035);
}

.fx-auto-trade-row.is-pending {
    opacity: .78;
}

.fx-auto-trade-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fx-auto-trade-no {
    width: 34px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: hsl(var(--primary) / 0.10);
    color: hsl(var(--primary));
    font-size: 11px;
    font-weight: 800;
}

.fx-auto-trade-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--mt-text);
    line-height: 1.2;
}

.fx-auto-trade-sub {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 650;
    color: var(--mt-muted);
}

.fx-auto-trade-result {
    display: grid;
    justify-items: end;
    gap: 5px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.fx-auto-muted {
    color: var(--mt-muted) !important;
}

.ft-rise {
    color: var(--mt-green) !important;
}

.ft-fall {
    color: var(--mt-red) !important;
}

@media (max-width: 760px) {
    .fx-detail-page .fx-detail-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fx-receipt-meta-grid {
        grid-template-columns: 1fr;
    }

    .fx-receipt-stat + .fx-receipt-stat {
        border-left: 0;
        border-top: 1px solid hsl(var(--border) / .7);
    }

    .fx-detail-page .fx-receipt-hero {
        padding: 16px;
    }

    .fx-auto-trade-row {
        padding: 11px 12px;
    }

    .fx-auto-trade-overview {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px 12px;
    }

    .fx-auto-trade-no {
        width: 30px;
    }
}

/* Transaction detail page: keep every field in one place only. */
.fx-transaction-detail-page .fx-detail-container {
    max-width: 720px;
}

.fx-transaction-detail-page .fx-detail-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
}

.fx-transaction-detail-page .fx-receipt-hero {
    position: relative;
    top: auto;
    width: 100%;
    min-height: 0;
    display: block;
    padding: 18px;
    border: 1px solid hsl(var(--border) / .88);
    border-radius: 8px;
    background:
        linear-gradient(90deg, hsl(var(--primary) / .08), transparent 54%),
        var(--mt-card);
    box-shadow: none;
}

.fx-transaction-detail-page .fx-receipt-hero::before {
    left: 0;
    right: auto;
    top: 0;
    width: 3px;
    height: 100%;
    border-radius: 0;
    background: hsl(var(--primary));
}

.fx-transaction-detail-page .fx-receipt-primary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
}

.fx-transaction-detail-page .fx-receipt-primary .fx-receipt-icon {
    grid-row: 1 / span 2;
    width: 44px;
    height: 44px;
    margin: 0;
    border: 1px solid hsl(var(--border) / .7);
    box-shadow: none;
}

.fx-transaction-detail-page .fx-receipt-primary .fx-receipt-icon ion-icon {
    font-size: 22px;
}

.fx-transaction-detail-page .fx-receipt-eyebrow {
    margin: 0 0 5px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--mt-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.fx-transaction-detail-page .fx-receipt-amount {
    margin: 0;
    min-width: 0;
    color: var(--mt-text);
    font-size: clamp(30px, 8vw, 42px);
    font-weight: 850;
    line-height: 1.02;
    overflow-wrap: anywhere;
}

.fx-transaction-detail-page .fx-card-flush {
    width: 100%;
    border-radius: 8px;
    box-shadow: none;
}

.fx-transaction-detail-page .fx-receipt-section-head {
    padding: 13px 16px;
    background: hsl(var(--muted) / .28);
}

.fx-transaction-detail-page .fx-receipt-row {
    display: grid;
    grid-template-columns: minmax(112px, .78fr) minmax(0, 1.22fr);
    align-items: start;
    gap: 12px;
    padding: 13px 16px;
}

.fx-transaction-detail-page .fx-card-flush .fx-receipt-row:last-child {
    border-bottom: 0;
}

.fx-transaction-detail-page .fx-receipt-label {
    min-width: 0;
    line-height: 1.35;
}

.fx-transaction-detail-page .fx-receipt-value {
    min-width: 0;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.fx-transaction-detail-page .fx-receipt-value.is-money.is-warning {
    color: var(--fx-yellow);
}

.fx-transaction-detail-page .fx-receipt-value.is-note {
    font-weight: 650;
    color: var(--mt-muted);
    white-space: normal;
}

@media (max-width: 520px) {
    .fx-transaction-detail-page .fx-head {
        align-items: flex-start;
    }

    .fx-transaction-detail-page .fx-head .fx-chip {
        margin-top: 5px;
        white-space: nowrap;
    }

    .fx-transaction-detail-page .fx-receipt-row {
        grid-template-columns: minmax(96px, .72fr) minmax(0, 1.28fr);
        padding: 12px 14px;
    }

    .fx-transaction-detail-page .fx-receipt-section-head {
        padding: 12px 14px;
    }
}

/* ========================================================================
   Source: admin/assets/css/iti-admin.css - Admin intl-tel-input overrides
   ======================================================================== */

/* ============================================================
   intl-tel-input overrides — Bicryptoo admin design tokens
   ============================================================ */

/* Container full-width */
.iti { width: 100%; }

/* Flag button — match admin-input background & border */
.iti__selected-flag {
    background: hsl(var(--background));
    border-right: 1px solid hsl(var(--border));
    border-radius: 6px 0 0 6px;
    padding: 0 10px;
    transition: background 0.15s;
}
.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background: hsl(var(--muted));
    outline: none;
}

/* Arrow indicator */
.iti__arrow {
    border-top-color: hsl(var(--muted-foreground));
}
.iti__arrow--up {
    border-bottom-color: hsl(var(--muted-foreground));
}

/* Tel input — remove left radius (flag button handles it) */
.iti input[type=text],
.iti input[type=tel] {
    border-radius: 0 6px 6px 0 !important;
    width: 100%;
    min-height: 40px;
}

/* Country dropdown */
.iti__country-list {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);
    color: hsl(var(--foreground));
    z-index: 9999;
    margin-top: 4px;
}
.dark .iti__country-list {
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
}

/* Country list item */
.iti__country {
    padding: 8px 12px;
    transition: background 0.1s;
}
.iti__country:hover,
.iti__country.iti__highlight {
    background: hsl(var(--accent));
}

/* Country name & dial code text */
.iti__country-name {
    color: hsl(var(--foreground));
    font-size: 0.875rem;
}
.iti__dial-code {
    color: hsl(var(--muted-foreground));
    font-size: 0.8rem;
}

/* Divider between preferred & all countries */
.iti__divider {
    border-color: hsl(var(--border));
    margin: 4px 0;
}

/* Search input inside dropdown */
.iti__search-input {
    background: hsl(var(--background)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: 6px !important;
    color: hsl(var(--foreground)) !important;
    font-size: 0.875rem !important;
    padding: 6px 10px !important;
    outline: none !important;
    width: calc(100% - 16px) !important;
    margin: 8px !important;
    display: block;
}
.iti__search-input:focus {
    border-color: hsl(var(--ring)) !important;
    box-shadow: 0 0 0 2px hsl(var(--ring) / 20%) !important;
}

/* Selected dial code text (separateDialCode mode) */
.iti__selected-dial-code {
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 6px;
}

/* When separateDialCode is true — the outer border wraps iti */
.iti--separate-dial-code .iti__selected-flag {
    background: hsl(var(--muted));
    border-right: 1px solid hsl(var(--border));
}
.iti--separate-dial-code .iti__selected-flag:hover {
    background: hsl(var(--accent));
}

.iti--separate-dial-code input[type=text],
.iti--separate-dial-code input[type=tel] {
    border-radius: 6px !important;
}

.iti--separate-dial-code .iti__selected-flag {
    height: 100%;
    min-height: 40px;
}

/* Remove default white bg on iti__tel-input wrapper */
.iti__tel-input {
    background: transparent;
}

/* ========================================================================
   Source: assets/css/design-100.css - Premium polish layer
   ======================================================================== */

/* ========================================================================
   DESIGN 100 - premium fintech restyle layer
   Loaded last from includes/header.php so it can polish legacy surfaces
   without changing PHP markup or business flow.
   ======================================================================== */

:root {
  --d100-bg: #f6f8fb;
  --d100-bg-2: #ffffff;
  --d100-card: rgba(255, 255, 255, 0.92);
  --d100-card-solid: #ffffff;
  --d100-elevated: #ffffff;
  --d100-ink: #07111f;
  --d100-text: #102033;
  --d100-muted: #66758a;
  --d100-soft: #eef3f8;
  --d100-line: rgba(15, 23, 42, 0.1);
  --d100-line-strong: rgba(15, 23, 42, 0.16);
  --d100-primary: hsl(var(--primary));
  --d100-primary-strong: hsl(var(--primary));
  --d100-primary-soft: hsl(var(--primary) / 0.12);
  --d100-cyan: var(--d100-primary);
  --d100-cyan-strong: var(--d100-primary-strong);
  --d100-emerald: #10b981;
  --d100-amber: #f59e0b;
  --d100-red: #ef4444;
  --d100-radius: 8px;
  --d100-radius-sm: 6px;
  --d100-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 16px 44px rgba(15, 23, 42, 0.08);
  --d100-shadow-tight: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 22px rgba(15, 23, 42, 0.07);
  --d100-glass: rgba(255, 255, 255, 0.76);
  --brand-logo-width: 132px;
  --brand-logo-height: 40px;
  --brand-logo-width-mobile: 120px;
  --brand-logo-height-mobile: 38px;
  --app-header-height: 64px;
  --d100-grid:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

html.dark {
  --d100-bg: #05070d;
  --d100-bg-2: #080c13;
  --d100-card: rgba(13, 18, 28, 0.86);
  --d100-card-solid: #0d121c;
  --d100-elevated: #111827;
  --d100-ink: #f8fafc;
  --d100-text: #e7edf6;
  --d100-muted: #91a0b4;
  --d100-soft: #111827;
  --d100-line: rgba(226, 232, 240, 0.11);
  --d100-line-strong: rgba(226, 232, 240, 0.18);
  --d100-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  --d100-shadow-tight: 0 10px 34px rgba(0, 0, 0, 0.28);
  --d100-glass: rgba(8, 12, 19, 0.78);
  --d100-grid:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
}

html,
body {
  background:
    radial-gradient(circle at 18% -10%, hsl(var(--primary) / 0.12), transparent 26rem),
    linear-gradient(180deg, var(--d100-bg-2), var(--d100-bg)) !important;
  color: var(--d100-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

html.dark body {
  background:
    radial-gradient(circle at 72% -18%, hsl(var(--primary) / 0.13), transparent 30rem),
    linear-gradient(180deg, #05070d, #070b12 52%, #05070d) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: var(--d100-grid);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  opacity: 0.72;
}

body > .fixed.inset-0.-z-10 .rounded-full {
  display: none !important;
}

.noise-overlay {
  opacity: 0.025 !important;
  mix-blend-mode: soft-light;
}

#mainHeader {
  min-height: var(--app-header-height) !important;
  height: var(--app-header-height) !important;
  background: var(--d100-glass) !important;
  border-bottom: 1px solid var(--d100-line) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 18px 42px rgba(15, 23, 42, 0.08) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

#mainHeader > .relative,
#mainHeader > .relative > .flex,
#mainHeader .h-16 {
  min-height: var(--app-header-height) !important;
  height: var(--app-header-height) !important;
}

html.dark #mainHeader {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 20px 52px rgba(0, 0, 0, 0.36) !important;
}

#headerGradientOverlay {
  opacity: 1 !important;
  background:
    linear-gradient(90deg, hsl(var(--primary) / 0.08), transparent 28%, transparent 72%, hsl(var(--primary) / 0.07)) !important;
}

#mainHeader a,
#mainHeader button {
  border-radius: var(--d100-radius) !important;
}

.app-theme-logo:not(.tv-watermark-logo):not(.pw-logo) {
  width: var(--brand-logo-width) !important;
  max-width: var(--brand-logo-width) !important;
  height: var(--brand-logo-height) !important;
  max-height: var(--brand-logo-height) !important;
  object-fit: contain !important;
  object-position: left center !important;
  flex-shrink: 0;
}

#mainHeader .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
.t-header-logo .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
header .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
.sidebar-brand .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo) {
  width: var(--brand-logo-width) !important;
  max-width: var(--brand-logo-width) !important;
  height: var(--brand-logo-height) !important;
  max-height: var(--brand-logo-height) !important;
}

.text-center > .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
.mx-auto.app-theme-logo:not(.tv-watermark-logo):not(.pw-logo) {
  object-position: center center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#loader .loading-icon {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}

#mainHeader nav a {
  height: 36px;
  display: inline-flex;
  align-items: center;
  padding-inline: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--d100-muted) !important;
}

#mainHeader nav a:hover,
#mainHeader nav a.bg-accent,
#mainHeader nav a.font-semibold {
  color: var(--d100-ink) !important;
  background: hsl(var(--primary) / 0.10) !important;
}

html.dark #mainHeader nav a:hover,
html.dark #mainHeader nav a.bg-accent,
html.dark #mainHeader nav a.font-semibold {
  background: hsl(var(--primary) / 0.14) !important;
}

#sidebarOverlay {
  background: rgba(15, 23, 42, 0.28) !important;
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}

html.dark #sidebarOverlay {
  background: rgba(0, 0, 0, 0.58) !important;
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}

#sidebarMenu {
  background: rgba(255, 255, 255, 0.97) !important;
  color: var(--d100-text) !important;
  border-left: 1px solid var(--d100-line) !important;
  box-shadow: -22px 0 52px rgba(15, 23, 42, 0.16) !important;
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

html.dark #sidebarMenu {
  background: rgba(8, 12, 19, 0.96) !important;
  border-left-color: var(--d100-line) !important;
  box-shadow: -24px 0 58px rgba(0, 0, 0, 0.38) !important;
}

#sidebarMenu .text-foreground {
  color: var(--d100-text) !important;
}

#sidebarMenu .text-muted-foreground {
  color: var(--d100-primary) !important;
}

#sidebarMenu input {
  background: rgba(255, 255, 255, 0.9) !important;
}

html.dark #sidebarMenu input {
  background: rgba(2, 6, 23, 0.52) !important;
}

main {
  isolation: isolate;
}

.hero-section-mobile {
  position: relative;
  overflow: hidden;
}

.hero-section-mobile::before {
  content: "";
  position: absolute;
  inset: 5.5rem 1rem auto auto;
  width: min(42vw, 520px);
  height: min(42vw, 520px);
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.16), hsl(var(--primary) / 0.09)),
    var(--d100-grid);
  background-size: auto, 34px 34px;
  border: 1px solid var(--d100-line);
  border-radius: 22px;
  transform: rotate(8deg);
  opacity: 0.72;
  z-index: -1;
}

.gradient-text {
  background: linear-gradient(90deg, var(--d100-ink), var(--d100-cyan-strong) 52%, var(--d100-cyan)) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

html.dark .gradient-text {
  background: linear-gradient(90deg, #ffffff, hsl(var(--primary) / 0.88) 50%, hsl(var(--primary))) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.btn-gradient,
.pr-btn-primary,
.bc-btn-primary,
a.bg-primary,
button.bg-primary,
.bg-primary {
  background: linear-gradient(135deg, var(--d100-cyan), var(--d100-cyan-strong)) !important;
  color: hsl(var(--primary-foreground)) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 10px 26px hsl(var(--primary) / 0.24) !important;
}

.btn-gradient:hover,
.pr-btn-primary:hover,
.bc-btn-primary:hover,
a.bg-primary:hover,
button.bg-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px hsl(var(--primary) / 0.32) !important;
  filter: saturate(1.04);
}

.btn-outline-glass,
.pr-btn-secondary,
.bc-btn-outline,
.border-border {
  border-color: var(--d100-line) !important;
}

.btn-outline-glass,
.pr-btn-secondary,
.bc-btn-outline {
  background: rgba(255, 255, 255, 0.58) !important;
  color: var(--d100-text) !important;
}

html.dark .btn-outline-glass,
html.dark .pr-btn-secondary,
html.dark .bc-btn-outline {
  background: rgba(17, 24, 39, 0.62) !important;
}

.card-gradient,
.market-card,
.spot-grid-card,
.pr-card,
.pr-stat-card,
.bc-card,
.dashboard-card,
.balance-card,
.wallet-card,
.invest-card,
.plan-card,
.profile-card,
.notification-card,
.modal-content,
#notificationDropdown,
#dash-scroll-root .bg-card,
#dash-scroll-root [class*="bg-card"],
#dash-scroll-root [class*="border border-border"] {
  background: var(--d100-card) !important;
  border: 1px solid var(--d100-line) !important;
  border-radius: var(--d100-radius) !important;
  box-shadow: var(--d100-shadow-tight) !important;
  -webkit-backdrop-filter: blur(16px) saturate(132%);
  backdrop-filter: blur(16px) saturate(132%);
}

.spot-grid-card {
  box-shadow: var(--d100-shadow) !important;
}

.hover-lift:hover,
.market-card:hover,
.pr-card:hover,
.pr-stat-card:hover,
#dash-scroll-root [class*="border border-border"]:hover {
  border-color: hsl(var(--primary) / 0.36) !important;
  box-shadow: var(--d100-shadow) !important;
}

.rounded-3xl,
.rounded-2xl,
.rounded-xl {
  border-radius: var(--d100-radius) !important;
}

.rounded-lg,
.rounded-md {
  border-radius: var(--d100-radius-sm) !important;
}

.rounded-full {
  border-radius: 9999px !important;
}

.text-muted-foreground {
  color: var(--d100-muted) !important;
}

.text-foreground,
.text-card-foreground {
  color: var(--d100-text) !important;
}

.bg-background {
  background-color: transparent !important;
}

.bg-card {
  background-color: var(--d100-card) !important;
}

.bg-muted,
.bg-accent {
  background-color: rgba(100, 116, 139, 0.09) !important;
}

html.dark .bg-muted,
html.dark .bg-accent {
  background-color: rgba(148, 163, 184, 0.08) !important;
}

.market-row,
.coin-row,
.pr-table tr,
#dash-scroll-root [class*="py-2.5"][class*="border-b"] {
  transition: background-color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.market-row:hover,
.coin-row:hover,
.pr-table tr:hover td,
#dash-scroll-root [class*="py-2.5"][class*="border-b"]:hover {
  background: hsl(var(--primary) / 0.07) !important;
}

.pr-table th,
table th {
  color: var(--d100-muted) !important;
  font-size: 0.75rem;
  letter-spacing: 0 !important;
  text-transform: none;
}

.pr-table td,
table td {
  border-color: var(--d100-line) !important;
}

input,
select,
textarea,
.form-control,
.pr-input,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background: rgba(255, 255, 255, 0.78) !important;
  /* border: 1px solid var(--d100-line-strong) !important; */
  border-radius: var(--d100-radius) !important;
  color: var(--d100-text) !important;
  box-shadow: none !important;
}

html.dark input,
html.dark select,
html.dark textarea,
html.dark .form-control,
html.dark .pr-input,
html.dark .select2-container--default .select2-selection--single,
html.dark .select2-container--default .select2-selection--multiple {
  background: rgba(2, 6, 23, 0.42) !important;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.pr-input:focus {
  border-color: hsl(var(--primary) / 0.72) !important;
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.14) !important;
  outline: 0 !important;
}

.lev-btn.active {
  background: linear-gradient(135deg, var(--d100-cyan), var(--d100-cyan-strong)) !important;
  color: hsl(var(--primary-foreground)) !important;
  border-color: hsl(var(--primary) / 0.40) !important;
}

.text-green-500,
.text-emerald-400,
.text-emerald-500,
.text-success,
.pr-stat-change.up {
  color: var(--d100-emerald) !important;
}

.text-red-500,
.text-destructive,
.pr-stat-change.down {
  color: var(--d100-red) !important;
}

.text-yellow-500,
.text-amber-400,
.text-amber-500 {
  color: var(--d100-amber) !important;
}

.bg-green-500,
.bg-emerald-500,
.from-green-600,
.to-emerald-500 {
  background: linear-gradient(135deg, #10b981, #059669) !important;
}

#loader {
  background:
    var(--d100-grid),
    linear-gradient(180deg, var(--d100-bg-2), var(--d100-bg)) !important;
}

.loading-icon {
  filter: drop-shadow(0 16px 28px hsl(var(--primary) / 0.24));
}

.ih-bottom-nav {
  padding: 0.55rem max(0.75rem, env(safe-area-inset-left)) calc(0.55rem + env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-right)) !important;
  background: transparent !important;
}

.ih-bottom-nav-inner {
  height: 64px !important;
  max-width: 520px;
  margin-inline: auto;
  background: var(--d100-glass) !important;
  border: 1px solid var(--d100-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
}

.ih-nav-item {
  color: var(--d100-muted) !important;
  font-weight: 700 !important;
}

.ih-nav-item.active,
.ih-nav-item:hover {
  color: var(--d100-cyan-strong) !important;
}

.ih-nav-trade-btn {
  background: linear-gradient(135deg, var(--d100-cyan), var(--d100-cyan-strong)) !important;
  box-shadow: 0 12px 24px hsl(var(--primary) / 0.28) !important;
}

footer {
  background:
    linear-gradient(180deg, transparent, hsl(var(--primary) / 0.035)),
    var(--d100-card) !important;
  border-top: 1px solid var(--d100-line) !important;
}

.g-toast {
  border-radius: var(--d100-radius) !important;
  box-shadow: var(--d100-shadow) !important;
}

@media (min-width: 1024px) {
  #dash-scroll-root {
    max-width: 1480px !important;
  }

  .hero-section-mobile {
    padding-top: 7rem !important;
  }
}

@media (max-width: 1023px) {
  .hero-section-mobile::before {
    display: none !important;
  }
}

@media (max-width: 640px) {
  html,
  body {
    background:
      linear-gradient(180deg, var(--d100-bg-2), var(--d100-bg)) !important;
  }

  body::before {
    background-size: 32px 32px;
    opacity: 0.44;
  }
  #mainHeader {
    border-bottom-color: transparent !important;
  }

  .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo) {
    width: var(--brand-logo-width-mobile) !important;
    max-width: var(--brand-logo-width-mobile) !important;
    height: var(--brand-logo-height-mobile) !important;
    max-height: var(--brand-logo-height-mobile) !important;
  }

  #mainHeader .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
  .t-header-logo .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
  header .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo),
  .sidebar-brand .app-theme-logo:not(.tv-watermark-logo):not(.pw-logo) {
    width: var(--brand-logo-width-mobile) !important;
    max-width: var(--brand-logo-width-mobile) !important;
    height: var(--brand-logo-height-mobile) !important;
    max-height: var(--brand-logo-height-mobile) !important;
  }

  #dash-scroll-root {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #dash-scroll-root > * {
    max-width: 100%;
  }

  .card-gradient,
  .market-card,
  .spot-grid-card,
  #dash-scroll-root .bg-card,
  #dash-scroll-root [class*="border border-border"] {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


html.dark .text-muted-foreground {
  color: var(--d100-primary) !important;
}


/* ========================================================================
   Source: pages/trading/trading-theme.css - Trading theme tokens
   ======================================================================== */

/* Unified trading theme tokens shared by index.php, binary.php, and spot.php */
/* Professional Binance-style color palette - Enhanced v2 */
:root {
  /* ── Core color palette ── */
  --trd-bg:        #0a0a0a;
  --trd-surface:   #111111;
  --trd-card:      #181818;
  --trd-border:   #222222;
  --trd-border-2: #2a2a2a;
  --trd-text:     #e2e5f0;
  --trd-text-2:   #b8bcc4;
  --trd-muted:     #5a5f78;
  --trd-accent:   hsl(var(--primary));
  --trd-accent-2: hsl(var(--primary) / 0.82);
  
  /* Binance-style profit/loss colors - Official Binance greens/reds */
  --trd-rise:      #00dc81;
  --trd-rise-dk:   #00c474;
  --trd-rise-bg:   rgba(0, 220, 129, 0.12);
  --trd-fall:      #f6465d;
  --trd-fall-dk:   #e0404f;
  --trd-fall-bg:    rgba(246, 70, 93, 0.12);
  
  /* Binance yellow/orange accents */
  --trd-yellow:    #f0b90b;
  --trd-orange:   #f5a623;
  --trd-orange-bg: rgba(245, 166, 35, 0.12);
  
  /* Professional gradients */
  --trd-grad-buy: linear-gradient(135deg, #00dc81 0%, #00c474 100%);
  --trd-grad-sell: linear-gradient(135deg, #f6465d 0%, #e0404f 100%);
  --trd-grad-accent: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary) / 0.82) 100%);
  
  --trd-font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* ── Short aliases (used by index.php, binary.php via layout-override.css) ── */
  --bg:      var(--trd-bg);
  --surface: var(--trd-surface);
  --card:    var(--trd-card);
  --border:  var(--trd-border);
  --border2: var(--trd-border-2);
  --txt:     var(--trd-text);
  --muted:   var(--trd-muted);
  --accents: var(--trd-accent);
  --accent2: var(--trd-accent-2);
  --rise:    var(--trd-rise);
  --fall:    var(--trd-fall);
}

/* ════════════════════════════════════════════════════════════════ */
/* PROFESSIONAL TRADING COMPONENTS - BINANCE STYLE         */
/* ════════════════════════════════════════════════════════════════ */

/* Trading Card - Professional glass effect */
.trading-card {
  background: linear-gradient(145deg, rgba(24,24,24,0.95) 0%, rgba(17,17,17,0.98) 100%);
  border: 1px solid var(--trd-border);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.trading-card:hover {
  border-color: var(--trd-border-2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Price Display - Large professional numbers */
.price-display {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.price-change {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Trading Button - Professional Binance style */
.trade-btn {
  font-family: var(--trd-font);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trade-btn-buy {
  background: var(--trd-grad-buy);
  color: #000;
  box-shadow: 0 4px 16px rgba(0, 220, 129, 0.25);
}

.trade-btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 220, 129, 0.35);
}

.trade-btn-sell {
  background: var(--trd-grad-sell);
  color: #fff;
  box-shadow: 0 4px 16px rgba(246, 70, 93, 0.25);
}

.trade-btn-sell:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(246, 70, 93, 0.35);
}

/* Legacy button compatibility */
.btn-buy, .btn-long {
  background: var(--trd-rise) !important;
  color: #000 !important;
  border-color: var(--trd-rise) !important;
}
.btn-buy:hover, .btn-long:hover { background: var(--trd-rise-dk) !important; }

.btn-sell, .btn-short {
  background: var(--trd-fall) !important;
  color: #fff !important;
  border-color: var(--trd-fall) !important;
}
.btn-sell:hover, .btn-short:hover { background: var(--trd-fall-dk) !important; }

/* Binance color utility classes */
.rise, .fx-rise, .text-rise, .text-green { color: var(--trd-rise) !important; }
.fall, .fx-fall, .text-fall, .text-red { color: var(--trd-fall) !important; }
.bg-rise, .bg-green { background: var(--trd-rise-bg) !important; }
.bg-fall, .bg-red { background: var(--trd-fall-bg) !important; }

/* Professional Input Fields */
.trade-input {
  background: var(--trd-surface);
  border: 1px solid var(--trd-border);
  border-radius: 8px;
  color: var(--trd-text);
  font-family: var(--trd-font);
  font-size: 14px;
  padding: 12px 16px;
  transition: all 0.2s ease;
}

.trade-input:focus {
  border-color: var(--trd-accent);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
  outline: none;
}

.trade-input::placeholder {
  color: var(--trd-muted);
}

/* Pro Select Dropdown */
.trade-select {
  background: var(--trd-surface);
  border: 1px solid var(--trd-border);
  border-radius: 8px;
  color: var(--trd-text);
  font-family: var(--trd-font);
  font-size: 14px;
  padding: 12px 16px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a5f78' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.trade-select:focus {
  border-color: var(--trd-accent);
  outline: none;
}

/* Leverage Slider */
.leverage-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--trd-border);
  border-radius: 3px;
  outline: none;
}

.leverage-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: var(--trd-accent);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.40);
  transition: all 0.2s;
}

.leverage-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.50);
}

/* Order Book Row */
.orderbook-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  transition: background 0.15s;
  cursor: pointer;
}

.orderbook-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Order Book Depth Bar */
.orderbook-bar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  opacity: 0.15;
  transition: width 0.3s ease;
}

.orderbook-row.sell .orderbook-bar {
  background: var(--trd-fall);
}

.orderbook-row.buy .orderbook-bar {
  background: var(--trd-rise);
}

/* Position Card */
.position-card {
  background: var(--trd-card);
  border: 1px solid var(--trd-border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}

.position-card:hover {
  border-color: var(--trd-border-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.position-card.active {
  border-color: var(--trd-accent);
  box-shadow: 0 0 0 1px var(--trd-accent), 0 8px 24px hsl(var(--primary) / 0.15);
}

/* Mini Chart Container */
.mini-chart {
  background: var(--trd-card);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Status Badge */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: hsl(var(--primary) / 0.15);
  color: var(--trd-accent);
}

.status-badge.win {
  background: var(--trd-rise-bg);
  color: var(--trd-rise);
}

.status-badge.loss {
  background: var(--trd-fall-bg);
  color: var(--trd-fall);
}

/* ════════════════════════════════════════════════════════════════ */
/* ANIMATIONS - Professional Trading Feel                   */
/* ════════════════════════════════════════════════════════════════ */

@keyframes priceFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.price-flash {
  animation: priceFlash 0.3s ease;
}

@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

.slide-in {
  animation: slideIn 0.3s ease forwards;
}

/* Pulse dot for live data */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--trd-rise);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(0, 220, 129, 0.5); 
  }
  50% { 
    box-shadow: 0 0 0 8px rgba(0, 220, 129, 0); 
  }
}

/* ========================================================================
   Source: pages/trading/layout-override.css - Trading layout
   ======================================================================== */

/* ---------------------------------------------------------------------------
   BINARY TRADING � MASTER STYLESHEET
   Sections:
     1.  Host Reset        � hide surrounding page chrome
     2.  App Shell         � #binApp grid, html/body
     3.  Header            � .hdr and children
     4.  Main / Views      � .main, view IDs, view switching
     5.  Chart             � .chart-col, chart-bar, interval buttons
     6.  Floating Trades   � .float-trades, .ft-*
     7.  Trade Panel       � .trade-col, top row, buy/sell toggle
     8.  Trade Grid        � 2-column layout, trade-form
     9.  Form Fields       � .bn-avail, .bn-field, .bn-input, slider, etc.
    10.  Order Book        � .order-book, .ob-*, ratio bar
    11.  Bottom Section    � tabs, filter row, bottom content
    12.  Bottom Nav        � .bnav, .bnav-btn
    13.  Bottom Sheets     � .sht-bg, .sht-panel
    14.  UI Atoms          � .crd, .tog, .no-sb, .donut, .stab, .ctab, .xp-fill
    15.  Overlays          � confirm sheet, toast
    16.  Animations        � shimmer, glow, flash, slide-up, pulse
    17.  Mobile            � @media (max-width: 768px)
   --------------------------------------------------------------------------- */

/* -----------------------------------------------------------------------------
   1. HOST RESET
   ----------------------------------------------------------------------------- */
/* Color tokens are defined in trading-theme.css � no duplicate :root needed here */

#mainHeader,
#sidebarOverlay,
#sidebarMenu,
body>footer,
nav#dash-bottom-nav,
nav#bottomNav,
.ih-bottom-nav,
.safe-area-bottom,
#dash-tab-sticky {
    display: none !important;
}

/* Reset global bottom-nav body padding on trading pages */
@media (max-width: 1023px) {
    body {
        padding-bottom: 0 !important;
    }
}

html {
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    padding: 0 !important;
    margin: 0 !important;
    background-color: var(--bg) !important;
    background-image: url('../../assets/img/body-bg.png') !important;
    background-repeat: repeat !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

html,
body {
    height: 100dvh !important;
    max-height: 100dvh !important;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* -----------------------------------------------------------------------------
   2. APP SHELL
   ----------------------------------------------------------------------------- */
#binApp {
    height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: transparent;
    color: #eaecef;
    overflow: hidden;
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

/* -----------------------------------------------------------------------------
   3. HEADER
   ----------------------------------------------------------------------------- */
.hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    height: 52px;
    background: linear-gradient(180deg, #111111 0%, #0a0a0a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.hdr::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 5%,
            rgba(14, 203, 129, 0.25) 50%,
            transparent 95%);
}

/* --- Logo --- */
.hdr-logo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ecb81 0%, #1a7a5e 100%);
    box-shadow: 0 0 10px rgba(14, 203, 129, 0.25);
    cursor: pointer;
    flex-shrink: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.hdr-logo:hover {
    box-shadow: 0 0 16px rgba(14, 203, 129, 0.4);
}

.hdr-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.hdr-logo-text {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

.hdr-back {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    text-decoration: none;
    flex-shrink: 0;
}

.hdr-back:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.05);
}

.hdr-pair {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 8px 4px 6px;
    border-radius: 10px;
    transition: background 0.15s;
    min-width: 0;
    flex-shrink: 1;
}

.hdr-pair:hover {
    background: rgba(255, 255, 255, 0.04);
}

.hdr-sym {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #f0f0f0;
}

.hdr-chg {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.hdr-price {
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
    transition: color 0.3s;
}

.hdr-stats {
    display: none;
    align-items: center;
    gap: 20px;
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
    .hdr-stats {
        display: flex;
    }
}

.hdr-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.hdr-stat-label {
    font-size: 8px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.hdr-stat-val {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.hdr-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.hdr-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.hdr-btn:hover {
    color: #eaecef;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

.hdr-wallet {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 20px;
    cursor: pointer;
    background: rgba(14, 203, 129, 0.1);
    border: 1px solid rgba(14, 203, 129, 0.2);
    transition: all 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}

.hdr-wallet:hover {
    background: rgba(14, 203, 129, 0.15);
}

.hdr-wallet i {
    font-size: 10px;
    color: #0ecb81;
}

.hdr-wallet-amt {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #eaecef;
}

.hdr-wallet-cur {
    font-size: 11px;
    font-weight: 700;
    color: #0ecb81;
}

/* --- T-Header (unified trading header) --- */
.t-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: 46px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.t-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 5%,
            var(--accents) 50%,
            transparent 95%);
    opacity: 0.35;
}

.t-header-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.t-header-pair-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.t-header-change-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.t-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.t-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    min-width: 44px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
}

.t-header-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

@media (max-width: 1023px) {
    .t-header-logo {
        min-width: 40px;
        height: 40px;
    }

    .t-header {
        gap: 8px;
        padding: 0 10px;
    }

    .t-header-pair-name {
        font-size: 14px;
    }

    .t-header-change-badge {
        font-size: 10px;
    }
}

.t-balance-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid hsl(var(--primary) / 0.15);
    border-radius: 10px;
    padding: 5px 12px 5px 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.t-balance-chip:hover {
    border-color: hsl(var(--primary) / 0.30);
}

.t-balance-chip ion-icon {
    font-size: 15px;
    color: var(--accents);
}

.t-balance-val {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.t-balance-sub {
    font-size: 9px;
    color: var(--muted);
    line-height: 1.2;
}

.hdr-mobile-actions {
    display: none;
    align-items: center;
    gap: 4px;
}

.hdr-mobile-balance {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: linear-gradient(135deg,
            hsl(var(--primary) / 0.14),
            hsl(var(--primary) / 0.10));
    border: 1px solid hsl(var(--primary) / 0.35);
    border-radius: 10px;
    max-width: 60vw;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: auto;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.hdr-mobile-balance:hover,
.hdr-mobile-balance:focus-visible {
    background: linear-gradient(135deg,
            hsl(var(--primary) / 0.22),
            hsl(var(--primary) / 0.18));
    border-color: hsl(var(--primary) / 0.55);
    outline: none;
}

.hdr-mobile-balance:active {
    transform: scale(0.98);
}

.hdr-mobile-balance .hdr-mb-icon {
    font-size: 18px;
    color: var(--accents, hsl(var(--primary)));
    flex-shrink: 0;
}

.hdr-mobile-balance .hdr-mb-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.hdr-mobile-balance .hdr-mb-label {
    font-size: 9px;
    color: var(--muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hdr-mobile-balance .hdr-mb-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.hdr-desktop-balance,
.hdr-desktop-history {
    display: flex;
}

@media (max-width: 1023px) {
    .hdr-mobile-actions {
        display: flex !important;
    }

    .hdr-mobile-balance {
        display: flex !important;
    }

    .hdr-desktop-balance,
    .hdr-desktop-history {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .hdr-mobile-actions {
        display: none !important;
    }

    .hdr-mobile-balance {
        display: none !important;
    }

    .hdr-desktop-balance,
    .hdr-desktop-history {
        display: flex;
    }
}

/* -----------------------------------------------------------------------------
   4. MAIN / VIEWS
   ----------------------------------------------------------------------------- */
.main {
    flex: 1;
    display: flex;
    flex-direction: column !important;
    min-height: 0;
    overflow: hidden;
    width: 100% !important;
}

#chartView,
#tradeView,
#historyView,
#analyticsView,
#moreView {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    width: 100% !important;
}

#chartView.hidden,
#tradeView.hidden,
#historyView.hidden,
#analyticsView.hidden,
#moreView.hidden {
    display: none !important;
}

/* Full-tab panels (history, analytics, more) */
.tab-panel {
    width: 100%;
    background: #0d1015;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-panel.hidden {
    display: none !important;
}

.tab-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* -----------------------------------------------------------------------------
   5. CHART
   ----------------------------------------------------------------------------- */
.chart-col {
    flex: 1 !important;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    max-width: 100% !important;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #0d1015;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.chart-bar::-webkit-scrollbar {
    display: none;
}

.iv-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.iv-btn:hover {
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.04);
}

.iv-btn.on {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.07);
}

.iv-sep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.06);
    margin: 0 2px;
    flex-shrink: 0;
}

.iv-live {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.iv-live-price {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.iv-live-arrow {
    font-size: 9px;
}

#binTvChart {
    flex: 1;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}

.tv-chart-stage {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tv-chart-stage>#binTvChart,
.tv-chart-stage>#tv-chart-widget {
    flex: 1;
    width: 100%;
    min-height: 0;
    position: relative;
    z-index: 1;
}

/* -----------------------------------------------------------------------------
   PAGE WATERMARK � single, full-viewport, professional
   -----------------------------------------------------------------------------
   Sits above the chart but below all interactive UI (header, panels, modals).
   Uses fixed positioning so it spans the entire viewport regardless of scroll.
   ----------------------------------------------------------------------------- */
#pageWatermark {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    z-index: 3;
    /* Let the chart and UI receive all events � watermark is purely visual */
}

.pw-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    /* Slight downward offset so it sits in the visual centre of the chart area
     rather than the centre of the entire screen (header occupies ~52px) */
    transform: translateY(32px);
    /* Fade-in on first render so it doesn't flash */
    animation: pwFadeIn 0.8s ease both;
}

@keyframes pwFadeIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(32px) scale(1);
    }
}

.pw-logo {
    width: min(56vw, 480px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* Light mode: desaturated dark */
    filter: brightness(0) invert(0) grayscale(1);
    opacity: 0.07;
}

.dark .pw-logo {
    /* Dark mode: render naturally (logo is already on dark) */
    filter: none;
    opacity: 0.08;
}

.pw-name {
    font-size: clamp(13px, 1.8vw, 20px);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #ffffff;
    opacity: 0.07;
}

.dark .pw-name {
    opacity: 0.09;
}

@media (max-width: 767px) {
    .pw-logo {
        width: min(72vw, 480px);
    }

    .pw-name {
        font-size: 12px;
        letter-spacing: 0.2em;
    }
}

/* Legacy tv-watermark kept for backward compat but now hidden */
.tv-watermark {
    display: none;
}

.tv-watermark-logo {
    width: min(50vw, 280px);
    max-width: 50%;
    height: auto;
    opacity: 0.1;
    filter: brightness(0) invert(1) grayscale(1);
    object-fit: contain;
    user-select: none;
}

/* Dark mode: show dark logo variant with natural colors */
.dark .tv-watermark-logo {
    filter: none;
}

@media (max-width: 1023px) {
    .tv-watermark-logo {
        width: min(70vw, 100%);
        max-width: 100%;
    }
}

#binTvChart>div,
#binTvChart iframe,
#tv-chart-widget,
#tv-chart-widget>div,
#tv-chart-widget iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* -----------------------------------------------------------------------------
   6. FLOATING TRADES
   ----------------------------------------------------------------------------- */
.float-trades {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 40%;
    overflow-y: auto;
}

.ft-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(11, 14, 17, 0.88);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 7px 11px;
    font-size: 10px;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s;
}

.ft-pill:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.ft-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.ft-amt {
    font-weight: 800;
    font-size: 10px;
}

.ft-profit {
    font-weight: 800;
    font-size: 10px;
}

.ft-cd {
    animation: atPulse 2s ease-in-out infinite;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ft-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* -----------------------------------------------------------------------------
   7. TRADE PANEL
   ----------------------------------------------------------------------------- */
.trade-col {
    width: 100% !important;
    max-width: 100% !important;
    background: #0d1015;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    flex: 1 !important;
    border-left: none !important;
    border-top: none !important;
    max-height: none !important;
}

/* Top row: Buy/Sell toggle + Margin + Icons */
.tv-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #0d1015;
    border-bottom: 1px solid #2b2f36;
    flex-shrink: 0;
    gap: 10px;
}

.bs-toggle {
    display: flex;
    background: #2b2f36;
    border-radius: 6px;
    padding: 2px;
}

.bs-btn {
    padding: 7px 20px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: #848e9c;
    transition: all 0.15s;
}

.bs-buy.active {
    background: #0ecb81;
    color: #fff;
}

.bs-sell.active {
    background: #f6465d;
    color: #fff;
}

.tv-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-margin-label {
    font-size: 11px;
    font-weight: 500;
    color: #848e9c;
}

/* Small toggle (Margin) */
.tog.tog-sm {
    width: 30px;
    height: 16px;
    border-radius: 8px;
    background: #2b2f36;
}

.tog.tog-sm .dot {
    width: 12px;
    height: 12px;
    top: 2px;
    left: 2px;
}

.tog.tog-sm.on .dot {
    left: 16px;
}

.tv-icon-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #848e9c;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}

.tv-icon-btn:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.04);
}

/* -----------------------------------------------------------------------------
   8. TRADE GRID  (2 equal columns)
   ----------------------------------------------------------------------------- */
.trade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 4 1 0;
    min-height: 0;
    overflow: hidden;
}

.trade-form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.form-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 12px;
}

.form-body::-webkit-scrollbar {
    width: 2px;
}

.form-body::-webkit-scrollbar-track {
    background: transparent;
}

.form-body::-webkit-scrollbar-thumb {
    background: #2b2f36;
    border-radius: 2px;
}

/* -----------------------------------------------------------------------------
   9. FORM FIELDS
   ----------------------------------------------------------------------------- */

/* Available balance row */
.bn-avail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    margin-bottom: 6px;
}

.bn-avail-lbl {
    font-size: 11px;
    color: #848e9c;
}

.bn-avail-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bn-avail-val {
    font-size: 12px;
    font-weight: 600;
    color: #eaecef;
    font-variant-numeric: tabular-nums;
}

.bn-avail-cur {
    font-size: 11px;
    color: #848e9c;
    font-weight: 500;
}

.bn-avail-add {
    background: none;
    border: none;
    color: #848e9c;
    cursor: pointer;
    padding: 0 0 0 2px;
    font-size: 13px;
    transition: color 0.15s;
}

.bn-avail-add:hover {
    color: #f0b90b;
}

/* Generic input field */
.bn-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #1e222d;
    border-radius: 4px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
    border: 1px solid transparent;
    min-height: 44px;
}

.bn-field:hover {
    border-color: #2b2f36;
}

.bn-field-val {
    font-size: 13px;
    font-weight: 500;
    color: #eaecef;
}

.bn-field-placeholder {
    font-size: 13px;
    color: #474d57;
    font-weight: 400;
}

.bn-field-unit {
    font-size: 12px;
    font-weight: 600;
    color: #eaecef;
}

.bn-field-icon {
    font-size: 10px;
    color: #474d57;
}

.bn-field-sub {
    font-size: 10px;
    color: #474d57;
    font-weight: 400;
    line-height: 1;
}

.bn-field-input {
    cursor: default;
}

.bn-field-input:focus-within {
    border-color: #f0b90b;
}

.bn-field-select {
    position: relative;
}

.bn-field-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.bn-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: #eaecef;
    font-variant-numeric: tabular-nums;
    width: 100%;
    padding: 0;
}

.bn-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 24px;
    text-overflow: ellipsis;
}

.bn-select option {
    color: #eaecef;
    background: #1e222d;
}

.bn-field-select-icon {
    pointer-events: none;
    color: #848e9c;
    min-width: 18px;
    justify-content: flex-end;
    display: flex;
    align-items: center;
}

.bn-input::placeholder {
    color: #474d57;
}

.bn-input::-webkit-outer-spin-button,
.bn-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bn-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.bn-limit-pill {
    padding: 4px 10px;
    background: #2b2f36;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #eaecef;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bn-limit-pill i {
    font-size: 9px;
    color: #848e9c;
}

.bn-limit-pill:hover {
    background: #363b45;
}

/* Slider */
.bn-slider-wrap {
    position: relative;
    margin: 6px 0 12px;
    padding: 6px 6px 0;
}

.bn-slider-track {
    position: relative;
}

.bn-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(to right,
            #474d57 var(--pct, 0%),
            #2b2f36 var(--pct, 0%));
    outline: none;
    cursor: pointer;
}

.bn-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #eaecef;
    border: 3px solid #474d57;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.bn-dots {
    display: flex;
    justify-content: space-between;
    margin-top: -3px;
    padding: 0 1px;
}

.bn-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2b2f36;
    border: 2px solid #474d57;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    z-index: 1;
}

.bn-dot:hover {
    border-color: #eaecef;
}

.bn-dot:first-child {
    background: #474d57;
    border-color: #474d57;
}

/* Max. Buy row */
.bn-max {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px;
    background: #1e222d;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 11px;
    color: #474d57;
}

.bn-max-val {
    color: #848e9c;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bn-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 2px 10px;
    margin-top: -2px;
    margin-bottom: 4px;
}

.bn-meta-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.bn-meta-label {
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bn-meta-sub {
    font-size: 10px;
    color: #7c8594;
    font-variant-numeric: tabular-nums;
}

.bn-meta-chip {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(14, 203, 129, 0.12);
    border: 1px solid rgba(14, 203, 129, 0.18);
    color: #19c37d;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bn-meta-row-plan {
    border-bottom: 1px solid rgba(132, 142, 156, 0.14);
}

/* Post-Only / GTC row */
.bn-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 2px;
}

.bn-check-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    color: #eaecef;
    font-weight: 500;
}

.bn-check {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid #474d57;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.bn-check:checked {
    background: #f0b90b;
    border-color: #f0b90b;
}

.bn-check:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #181a20;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.bn-gtc {
    font-size: 12px;
    font-weight: 600;
    color: #eaecef;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bn-gtc i {
    font-size: 9px;
    color: #474d57;
}

/* Execute button */
.bn-exec-btn {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    text-align: center;
    transition: all 0.15s;
    margin-bottom: 8px;
}

.bn-exec-buy {
    background: #0ecb81;
}

.bn-exec-buy:hover {
    background: #0bb574;
}

.bn-exec-sell {
    background: #f6465d;
}

.bn-exec-sell:hover {
    background: #dd3b52;
}

.bn-exec-btn:active {
    transform: scale(0.98);
}

.bn-exec-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Expiry pills */
.bn-expiry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 0 2px;
}

.bn-expiry-pills {
    display: flex;
    gap: 3px;
}

.bn-exp {
    padding: 3px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid #2b2f36;
    background: transparent;
    color: #474d57;
    cursor: pointer;
    transition: all 0.15s;
}

.bn-exp:hover,
.bn-exp.active {
    border-color: #f0b90b;
    color: #f0b90b;
    background: rgba(240, 185, 11, 0.06);
}

.bn-expiry-cd {
    font-size: 11px;
    font-weight: 700;
    color: #f0b90b;
    font-variant-numeric: tabular-nums;
}

/* Profit / payout line */
.bn-profit-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(14, 203, 129, 0.05);
    border: 1px solid rgba(14, 203, 129, 0.1);
    font-size: 10px;
    color: #848e9c;
    margin-bottom: 4px;
}

.bn-profit-val {
    font-size: 12px;
    font-weight: 800;
    color: #0ecb81;
    font-variant-numeric: tabular-nums;
}

/* -----------------------------------------------------------------------------
   10. ORDER BOOK
   ----------------------------------------------------------------------------- */
.order-book {
    display: flex;
    flex-direction: column;
    background: #0d1015;
    overflow: hidden;
    border-left: 1px solid #2b2f36;
    min-height: 0;
    align-self: stretch;
    width: 100% !important;
}

.ob-col-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px 4px;
    font-size: 10px;
    font-weight: 600;
    color: #474d57;
    flex-shrink: 0;
    line-height: 1.3;
}

.ob-sub {
    font-size: 9px;
    color: #474d57;
}

.ob-asks-wrap,
.ob-bids-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ob-asks {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    overflow: hidden;
}

.ob-bids {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.ob-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 10px;
    font-size: 11px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    position: relative;
    line-height: 19px;
}

.ob-row::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: var(--depth, 0%);
    opacity: 0.12;
    z-index: 0;
}

.ob-asks .ob-row {
    color: #f6465d;
}

.ob-asks .ob-row::before {
    background: #f6465d;
}

.ob-bids .ob-row {
    color: #0ecb81;
}

.ob-bids .ob-row::before {
    background: #0ecb81;
}

.ob-price,
.ob-qty {
    position: relative;
    z-index: 1;
}

.ob-qty {
    color: #eaecef;
    font-weight: 600;
}

/* Mid price row */
.ob-mid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 10px;
    border-top: 1px solid #2b2f36;
    border-bottom: 1px solid #2b2f36;
    flex-shrink: 0;
}

.ob-mid-price {
    font-size: 18px;
    font-weight: 900;
    color: #f6465d;
    font-variant-numeric: tabular-nums;
}

.ob-mid.price-up .ob-mid-price {
    color: #0ecb81;
}

.ob-mid.price-down .ob-mid-price {
    color: #f6465d;
}

.ob-mid-arrow {
    font-size: 11px;
    color: #474d57;
}

.ob-mid-usd {
    width: 100%;
    font-size: 10px;
    color: #474d57;
    margin-top: -2px;
}

/* Buy/sell ratio bar */
.ob-ratio {
    display: flex;
    height: 18px;
    flex-shrink: 0;
    border-top: 1px solid #2b2f36;
}

.ob-ratio-b,
.ob-ratio-s {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    transition: width 0.5s;
}

.ob-ratio-b {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

.ob-ratio-s {
    background: rgba(246, 70, 93, 0.12);
    color: #f6465d;
}

/* Footer */
.ob-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-top: 1px solid #2b2f36;
    flex-shrink: 0;
}

.ob-dec {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #1e222d;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #eaecef;
    cursor: pointer;
}

.ob-dec i {
    font-size: 8px;
    color: #474d57;
}

.ob-view-icon {
    background: none;
    border: none;
    color: #474d57;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    transition: color 0.15s;
}

.ob-view-icon:hover {
    color: #eaecef;
}

/* -----------------------------------------------------------------------------
   11. BOTTOM SECTION  (tabs � filter � content)
   ----------------------------------------------------------------------------- */
.bn-bottom-tabs {
    display: flex;
    align-items: center;
    border-top: 1px solid #2b2f36;
    background: #0d1015;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 10px;
    min-height: 44px;
}

.bn-bottom-tabs::-webkit-scrollbar {
    display: none;
}

.bn-btab {
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #474d57;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.15s;
}

.bn-btab:hover {
    color: #eaecef;
}

.bn-btab.active {
    color: #eaecef;
    font-weight: 700;
}

.bn-btab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: #f0b90b;
    border-radius: 1px;
}

.bn-btab-n {
    font-size: 11px;
    color: #474d57;
    margin-left: 2px;
}

.bn-btab-icons {
    margin-left: auto;
    display: flex;
    gap: 14px;
    color: #474d57;
    font-size: 15px;
    padding-right: 6px;
}

.bn-btab-icons i {
    cursor: pointer;
    transition: color 0.15s;
}

.bn-btab-icons i:hover {
    color: #eaecef;
}

.bn-filter-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: #0d1015;
    border-top: 1px solid #2b2f36;
    flex-shrink: 0;
    min-height: 42px;
}

.bn-bottom-content {
    flex: 2.5 1 0;
    min-height: 60px;
    overflow-y: auto;
    background: #0d1015;
    display: flex;
    flex-direction: column;
}

.bn-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #474d57;
    font-size: 13px;
    min-height: 80px;
    padding: 20px;
}

.bn-empty-state i {
    font-size: 28px;
    color: #2b2f36;
    margin-bottom: 4px;
}

/* -----------------------------------------------------------------------------
   12. BOTTOM NAV
   ----------------------------------------------------------------------------- */
.bnav {
    display: flex;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    flex-shrink: 0;
}

.bnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}

.bnav-btn.on {
    color: #818cf8;
}

.bnav-btn.on::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #818cf8, transparent);
    border-radius: 0 0 2px 2px;
}

.bnav-btn i {
    font-size: 15px;
}

.bnav-dot {
    position: absolute;
    top: 6px;
    right: calc(50% - 16px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    border: 1px solid #0d1015;
}

/* -----------------------------------------------------------------------------
   13. BOTTOM SHEETS
   ----------------------------------------------------------------------------- */
.sht-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.sht-bg.open {
    opacity: 1;
    pointer-events: auto;
}

.sht-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 51;
    background: #12151a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.sht-panel.open {
    transform: translateY(0);
}

.sht-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px auto 6px;
    flex-shrink: 0;
}

.sht-close {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
}

.sht-close:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.05);
}

/* -----------------------------------------------------------------------------
   14. UI ATOMS
   ----------------------------------------------------------------------------- */

/* Card */
.crd {
    background: #161a22;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

/* Toggle switch */
.tog {
    position: relative;
    width: 38px;
    height: 20px;
    border-radius: 10px;
    background: #1e2333;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.tog.on {
    background: #818cf8;
}

.tog .dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.2s;
}

.tog.on .dot {
    left: 20px;
}

/* Scrollbar hide */
.no-sb {
    scrollbar-width: none;
}

.no-sb::-webkit-scrollbar {
    display: none;
}

/* Donut chart */
.donut svg {
    transform: rotate(-90deg);
}

.donut .ct {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Settings sub-tab */
.stab.on {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
}

/* Challenge sub-tab */
.ctab.on {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.25);
}

/* XP bar fill */
.xp-fill {
    background: linear-gradient(90deg, #f97316, #f59e0b);
}

/* -----------------------------------------------------------------------------
   15. OVERLAYS
   ----------------------------------------------------------------------------- */
#confirmSheet>div {
    animation: sUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 70;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 280px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* -----------------------------------------------------------------------------
   16. ANIMATIONS
   ----------------------------------------------------------------------------- */
@keyframes atPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes sUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes glow-g {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }

    50% {
        box-shadow: 0 0 30px 6px rgba(34, 197, 94, 0.3);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes glow-r {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }

    50% {
        box-shadow: 0 0 30px 6px rgba(239, 68, 68, 0.3);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.skeleton {
    background: linear-gradient(90deg, #1e2333 25%, #252c3d 50%, #1e2333 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.flash-g {
    animation: glow-g 0.7s ease-out;
}

.flash-r {
    animation: glow-r 0.7s ease-out;
}

/* -----------------------------------------------------------------------------
   17. MOBILE  @media (max-width: 768px)
   ----------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Prevent right-side overflow */
    #binApp,
    .main,
    .hdr,
    .chart-col,
    .trade-col,
    .tab-panel,
    .bnav,
    .chart-bar,
    #binTvChart,
    .trade-grid,
    .tv-top-row,
    .bn-bottom-tabs,
    .bots-hdr,
    .bn-filter-row,
    .bots-inline-stats,
    .bn-bottom-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Chart collapses; panels fill remaining space */
    .chart-col {
        height: 38vh;
        min-height: 0;
    }

    .tab-panel {
        flex: 1;
        max-height: 100%;
    }

    .float-trades {
        max-height: 28%;
    }

    /* Equal columns */
    .trade-grid {
        grid-template-columns: 1fr 1fr;
        width: 100% !important;
    }

    .order-book {
        border-left: 1px solid #2b2f36;
    }

    .trade-form {
        border-right: none;
    }

    /* Form fields � compact */
    .form-body {
        padding: 0 8px 8px;
    }

    .bn-avail {
        padding: 5px 0;
        margin-bottom: 4px;
    }

    .bn-avail-lbl {
        font-size: 10px;
    }

    .bn-avail-val {
        font-size: 11px;
    }

    .bn-avail-cur {
        font-size: 10px;
    }

    .bn-avail-add {
        font-size: 12px;
    }

    .bn-field {
        padding: 7px 9px;
        min-height: 34px;
        margin-bottom: 4px;
    }

    .bn-field-val {
        font-size: 12px;
    }

    .bn-field-placeholder {
        font-size: 11px;
    }

    .bn-field-unit {
        font-size: 11px;
    }

    .bn-field-icon {
        font-size: 9px;
    }

    .bn-field-sub {
        font-size: 9px;
    }

    .bn-input {
        font-size: 12px;
    }

    .bn-limit-pill {
        padding: 3px 6px;
        font-size: 11px;
    }

    .bn-slider-wrap {
        margin: 4px 0 8px;
        padding: 4px 4px 0;
    }

    .bn-dot {
        width: 10px;
        height: 10px;
    }

    .bn-max {
        padding: 5px 9px;
        font-size: 10px;
        margin-bottom: 5px;
    }

    .bn-max-val {
        font-size: 10px;
    }

    .bn-options-row {
        margin-bottom: 7px;
    }

    .bn-check-label {
        font-size: 10px;
        gap: 4px;
    }

    .bn-check {
        width: 13px;
        height: 13px;
    }

    .bn-gtc {
        font-size: 11px;
    }

    .bn-exec-btn {
        padding: 10px;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .bn-expiry {
        margin-bottom: 4px;
    }

    .bn-exp {
        padding: 2px 5px;
        font-size: 9px;
    }

    .bn-expiry-cd {
        font-size: 10px;
    }

    .bn-profit-line {
        padding: 5px 7px;
        font-size: 9px;
    }

    .bn-profit-val {
        font-size: 11px;
    }

    /* Order book � compact */
    .ob-col-header {
        padding: 5px 6px 3px;
        font-size: 9px;
    }

    .ob-sub {
        font-size: 8px;
    }

    .ob-row {
        padding: 1px 6px;
        font-size: 10px;
        line-height: 17px;
    }

    .ob-mid {
        padding: 3px 6px;
        gap: 3px;
    }

    .ob-mid-price {
        font-size: 13px;
        font-weight: 800;
    }

    .ob-mid-arrow {
        font-size: 10px;
    }

    .ob-mid-usd {
        font-size: 9px;
        margin-top: -1px;
    }

    .ob-ratio {
        height: 14px;
    }

    .ob-ratio-b,
    .ob-ratio-s {
        font-size: 9px;
        font-weight: 700;
    }

    .ob-foot {
        padding: 4px 6px;
    }

    .ob-dec {
        padding: 2px 6px;
        font-size: 10px;
    }

    .ob-view-icon {
        font-size: 12px;
    }

    /* Bottom tabs � compact */
    .bn-btab {
        padding: 10px 12px;
        font-size: 12px;
    }

    .bn-btab.active::after {
        left: 10px;
        right: 10px;
    }

    .bn-filter-row,
    .bots-inline-stats {
        padding: 5px 10px;
        gap: 8px;
        min-height: 34px;
    }

    .bn-check-label {
        font-size: 11px;
    }

    .bn-btab-icons {
        gap: 10px;
        font-size: 14px;
    }

    /* Top row � compact */
    .tv-top-row {
        padding: 6px 10px;
        gap: 6px;
    }

    .bs-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .tv-margin-label {
        font-size: 10px;
    }

    .tv-icon-btn {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

/* -----------------------------------------------------------------------------
   18. BOTS TABLE (Trade Tab Bottom Section)
   ----------------------------------------------------------------------------- */

/* Bots Section Header */
.bots-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.bots-title {
    font-size: 12px;
    font-weight: 800;
    color: #eaecef;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bots-settings-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #6b7280;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.15s;
}

.bots-settings-btn:hover {
    color: #eaecef;
    background: rgba(255, 255, 255, 0.05);
}

/* Bots Stats Row */
.bots-stats-row {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    gap: 6px;
    background: rgba(14, 203, 129, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    flex-wrap: wrap;
    row-gap: 4px;
}

.bots-stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    white-space: nowrap;
}

.bots-stat-qs {
    color: #6b7280;
    font-size: 8px;
    cursor: help;
}

.bots-stat-label {
    color: #9ca3af;
    font-size: 9px;
}

.bots-stat-val {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bots-stat-pct {
    font-size: 9px;
    font-weight: 600;
}

.bots-stat-divider {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* Bots Table */
.bots-table-wrap {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
}

.bots-table-header {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.5fr 1fr 0.9fr 1fr 0.8fr;
    padding: 6px 12px;
    background: #0b0e11;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 2;
}

.bots-table-header .bt-col {
    font-size: 9px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.3;
}

.bots-table-body {
    display: flex;
    flex-direction: column;
}

.bots-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: #474d57;
    font-size: 12px;
    min-height: 80px;
}

/* Bot Row */
.bt-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.5fr 1fr 0.9fr 1fr 0.8fr;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.15s;
    align-items: center;
}

.bt-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.bt-row:last-child {
    border-bottom: none;
}

/* Bot Row Cells */
.bt-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #eaecef;
}

.bt-col-pair {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.bt-col-opts {
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.bt-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.bt-pair-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bt-pair-name {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-type-badge {
    font-size: 9px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bt-sub {
    font-size: 9px;
    color: #6b7280;
    font-weight: 500;
}

.bt-sub-val {
    font-size: 9px;
    font-weight: 600;
    margin-left: 2px;
}

/* Status Badges */
.bt-status-badge {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    display: inline-block;
}

.bt-status-active {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

.bt-status-long {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.bt-status-short {
    background: rgba(246, 70, 93, 0.12);
    color: #f6465d;
}

/* Option Buttons */
.bt-opt-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.15s;
}

.bt-opt-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.3);
}

.bt-opt-cancel:hover {
    background: rgba(246, 70, 93, 0.1);
    color: #f6465d;
    border-color: rgba(246, 70, 93, 0.3);
}

/* Mobile: make bots table scroll horizontally */
@media (max-width: 640px) {
    .bots-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bots-table-header,
    .bt-row {
        grid-template-columns: 120px 80px 70px 100px 80px 70px 80px 60px;
        min-width: 660px;
    }

    .bots-stats-row {
        gap: 4px;
        padding: 5px 10px;
    }

    .bots-stat-label {
        display: none;
    }
}

/* -----------------------------------------------------------------------------
   19. REDESIGNED BOTS & LIVE MARKET (Trade Tab Bottom � v2)
   ----------------------------------------------------------------------------- */

/* -- Live Market Section Header --------------------------- */
.bots-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 0 10px;
    background: #0d1117;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    min-height: 42px;
}

.bots-hdr-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.bots-hdr-icon {
    font-size: 11px;
    color: #0ecb81;
    filter: drop-shadow(0 0 4px rgba(14, 203, 129, 0.5));
}

.bots-hdr-title {
    font-size: 11px;
    font-weight: 800;
    color: #c9d1d9;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.bots-hdr-gear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #6b7280;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.bots-hdr-gear:hover {
    background: rgba(14, 203, 129, 0.1);
    border-color: rgba(14, 203, 129, 0.25);
    color: #0ecb81;
}

/* -- Stats Strip ------------------------------------------ */
.bots-inline-stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 10px;
    background: #090c10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
    min-height: 32px;
    overflow-x: auto;
    scrollbar-width: none;
}

.bots-inline-stats::-webkit-scrollbar {
    display: none;
}

.bis-item {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 8px 0 0;
}

.bis-q {
    font-size: 8px;
    color: #3d4451;
    cursor: help;
}

.bis-val {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #eaecef;
}

.bis-pct {
    font-size: 9px;
    font-weight: 600;
    opacity: 0.85;
}

.bis-green {
    color: #0ecb81;
}

.bis-red {
    color: #f6465d;
}

.bis-sep {
    font-size: 8px;
    color: #1e2530;
    padding: 0 4px 0 0;
    flex-shrink: 0;
}

/* -- Table Wrapper (scrollable container) ----------------- */
.lm-table-wrap {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #0b0e13;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.lm-table-wrap::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

.lm-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

/* -- Table Header Row ------------------------------------- */
.lm-table-hdr {
    display: flex;
    align-items: center;
    padding: 7px 8px 6px;
    background: #151b2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    position: sticky;
    top: 0;
    z-index: 5;
    min-width: 360px;
    flex-shrink: 0;
}

.lmth-cell {
    font-size: 9px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

.lmth-q {
    font-size: 7px;
    opacity: 0.5;
}

.lmth-sub {
    color: #3d4451;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Column widths � applied to both header cells and row cells */
.lmth-ex,
.lm-col-ex {
    width: 40px;
    flex-shrink: 0;
}

.lmth-pair,
.lm-col-pair {
    flex: 2;
    min-width: 80px;
}

.lmth-val,
.lm-col-val {
    flex: 1.4;
    min-width: 65px;
}

.lmth-chg,
.lm-col-chg {
    flex: 1;
    min-width: 55px;
}

.lmth-info,
.lm-col-info {
    flex: 1.6;
    min-width: 70px;
}

.lmth-opts,
.lm-col-opts {
    flex: 1.2;
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

/* -- Data Rows -------------------------------------------- */
.lm-list {
    display: flex;
    flex-direction: column;
}

.lm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    color: #4b5563;
    font-size: 11px;
}

.lm-row {
    display: flex;
    align-items: center;
    padding: 9px 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.1s;
    min-width: 360px;
    position: relative;
}

.lm-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: transparent;
    transition: background 0.1s;
}

.lm-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.lm-row:hover::before {
    background: #0ecb81;
}

.lm-row:last-child {
    border-bottom: none;
}

/* -- Exchange Icon ---------------------------------------- */
.lm-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
}

/* -- Pair Column ------------------------------------------ */
.lm-sym {
    font-size: 11px;
    font-weight: 700;
    color: #eaecef;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -- Badge (Type label) ----------------------------------- */
.lm-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

.lm-badge-spot {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.lm-badge-rise {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

.lm-badge-fall {
    background: rgba(246, 70, 93, 0.12);
    color: #f6465d;
}

/* -- Value / Change columns ------------------------------- */
.lm-col-val {
    font-size: 11px;
    font-weight: 700;
    color: #eaecef;
    font-variant-numeric: tabular-nums;
}

.lm-col-chg {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.lm-up {
    color: #0ecb81;
}

.lm-dn {
    color: #f6465d;
}

/* -- Info column ------------------------------------------ */
.lm-info-main {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #eaecef;
    display: flex;
    align-items: center;
    gap: 3px;
}

.lm-info-pct {
    font-size: 9px;
    opacity: 0.85;
}

.lm-info-sub {
    font-size: 9px;
    color: #4b5563;
    margin-top: 1px;
}

/* -- Status Pill ------------------------------------------ */
.lm-status-pill {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.lm-status-active {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

.lm-status-long {
    background: rgba(129, 140, 248, 0.12);
    color: #818cf8;
}

/* -- Option / Trade Buttons ------------------------------- */
.lm-opt-btn {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #6b7280;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.lm-opt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #eaecef;
}

.lm-trade-btn {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(14, 203, 129, 0.1);
    border: 1px solid rgba(14, 203, 129, 0.18);
    color: #0ecb81;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.lm-trade-btn:hover {
    background: rgba(14, 203, 129, 0.2);
}

/* -- Section Label Dividers ------------------------------- */
.lm-section-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 10px 4px;
    background: #090c10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.lm-section-lbl i {
    font-size: 8px;
    color: #0ecb81;
}

/* -- Unused legacy selectors (kept to avoid breakage) ----- */
.lm-hdr,
.lm-hdr-label,
.lm-hdr-icon,
.lm-refresh-btn {
    display: none;
}

/* Active Bots List */
.bots-active-list {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.bot-active-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
    transition: background 0.12s;
}

.bot-active-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.bar-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.bar-info {
    flex: 1;
    min-width: 0;
}

.bar-pair {
    font-size: 11px;
    font-weight: 700;
    color: #eaecef;
}

.bar-type {
    font-size: 9px;
    color: #6b7280;
    margin-top: 1px;
}

.bar-right {
    text-align: right;
}

.bar-pnl {
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.bar-chg {
    font-size: 9px;
    font-weight: 600;
    margin-top: 1px;
}

.bar-green {
    color: #0ecb81;
}

.bar-red {
    color: #f6465d;
}

.bar-status {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.bar-status-active {
    background: rgba(14, 203, 129, 0.12);
    color: #0ecb81;
}

.bar-status-long {
    background: rgba(129, 140, 248, 0.12);
    color: #818cf8;
}

/* Upgrade buy/sell toggle to match image exactly */
.bs-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.bs-btn {
    padding: 7px 20px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: #6b7280;
    transition: all 0.18s;
    min-width: 72px;
}

.bs-buy.active {
    background: #0ecb81;
    color: #fff;
    box-shadow: 0 2px 12px rgba(14, 203, 129, 0.3);
}

.bs-sell.active {
    background: #f6465d;
    color: #fff;
    box-shadow: 0 2px 12px rgba(246, 70, 93, 0.3);
}

.bs-btn:not(.active):hover {
    color: #9ca3af;
    background: rgba(255, 255, 255, 0.04);
}

/* Execute button refined */
.bn-exec-buy {
    background: linear-gradient(135deg, #0ecb81 0%, #0bb574 100%);
    box-shadow: 0 3px 16px rgba(14, 203, 129, 0.25);
}

.bn-exec-buy:hover {
    background: linear-gradient(135deg, #11d888 0%, #0ecb81 100%);
    box-shadow: 0 4px 20px rgba(14, 203, 129, 0.35);
}

.bn-exec-sell {
    background: linear-gradient(135deg, #f6465d 0%, #dd3b52 100%);
    box-shadow: 0 3px 16px rgba(246, 70, 93, 0.25);
}

.bn-exec-sell:hover {
    background: linear-gradient(135deg, #f75d72 0%, #f6465d 100%);
    box-shadow: 0 4px 20px rgba(246, 70, 93, 0.35);
}

.bn-exec-btn {
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    transition: all 0.18s;
}

/* Payout line refined */
.bn-profit-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid rgba(14, 203, 129, 0.12);
    background: rgba(14, 203, 129, 0.04);
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    margin-top: 2px;
}

.bn-profit-val {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* (wallet styles defined in header section above) */

/* ===== Shared Trading Styles (from index.php) ===== */
/* -- Reset site chrome -- */
#mainHeader,
#sidebarOverlay,
#sidebarMenu,
body>footer,
.safe-area-bottom {
    display: none !important;
}

body {
    padding: 0 !important;
    margin: 0 !important;
    background: var(--bg) !important;
}

html,
body {
    height: 100dvh !important;
    overflow: hidden !important;
}

/* -- Variables: colors from trading-theme.css; layout-specific only here -- */
:root {
    --rise-dk: #16a34a;
    --fall-dk: #dc2626;
    --mobile-fixed-chrome: 78px;
    --mobile-chart-height: 38dvh;
}

/* -- Layout shell -- */
#tradeLayout {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: transparent;
    color: var(--txt);
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -- Header -- */
.t-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: 46px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 8px;
    position: relative;
    z-index: 10;
}

.t-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 5%,
            var(--accents) 50%,
            transparent 95%);
    opacity: 0.35;
}

.t-header-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.t-header-pair-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.t-header-change-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

.t-header-price {
    font-size: 13px;
    font-weight: 600;
}

.t-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.t-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    min-width: 44px;
    height: 44px;
    cursor: pointer;
    flex-shrink: 0;
}

.t-header-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

@media (max-width: 1023px) {
    .t-header-logo {
        min-width: 40px;
        height: 40px;
    }
}

.t-balance-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    border: unset !important;
    border-radius: 10px;
    padding: 5px 12px 5px 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.t-balance-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}

.t-balance-chip:hover {
    background: hsl(var(--primary) / 0.12);
    border-color: hsl(var(--primary) / 0.30);
}

.t-balance-chip ion-icon {
    font-size: 15px;
    color: var(--accents);
}

.t-balance-val {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.t-balance-sub {
    font-size: 9px;
    color: var(--muted);
    line-height: 1.2;
}

.hdr-mobile-balance {
    display: none !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 3px 8px 4px;
    border-radius: 10px;
    border: 1px solid hsl(var(--primary) / 0.22);
    background: hsl(var(--primary) / 0.08);
    cursor: pointer;
}

.hdr-mobile-bal-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--muted);
    line-height: 1;
}

.hdr-mobile-bal-main {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.hdr-mobile-bal-sub {
    font-size: 8px;
    color: var(--muted);
    line-height: 1;
}

.hdr-mobile-actions {
    display: none;
    align-items: center;
    gap: 4px;
}

.hdr-desktop-balance,
.hdr-desktop-history {
    display: flex;
}

/* -- Timeframe Strip -- */
.tf-strip {
    display: flex;
    align-items: center;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    scrollbar-width: none;
    flex-shrink: 0;
    padding: 4px 14px;
    min-height: 40px;
    gap: 2px;
}

.tf-strip::-webkit-scrollbar {
    display: none;
}

.tf-strip-inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.tf-strip-scroll {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
    flex: 1 1 auto;
}

.tf-strip-scroll::-webkit-scrollbar {
    display: none;
}

.tf-strip-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
    border-left: 1px solid var(--border);
}

.tf-btn {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition:
        color 0.15s,
        background 0.15s;
    letter-spacing: 0.2px;
}

.tf-btn:hover {
    color: var(--txt);
    background: rgba(255, 255, 255, 0.03);
}

.tf-btn.active {
    font-weight: 700;
    background: hsl(var(--primary) / 0.12);
    color: var(--accents);
}

/* Normalize action icon buttons inside TF strip (override inline sizes) */
.tf-strip-actions>a,
.tf-strip-actions>button {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tf-strip-actions>a ion-icon,
.tf-strip-actions>button ion-icon {
    font-size: 14px !important;
}

/* -- Chart wrapper -- */
.trade-body {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    overflow: hidden;
}

.chart-wrapper {
    flex: 1;
    min-height: 0;
    position: relative;
    background: var(--bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#tv-chart-widget {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Push the TradingView iframe up by 1px to clip its internal top border */
#tv-chart-widget iframe {
    margin: -2px 0 0 0 !important;
    height: calc(100% + 2px) !important;
    width: calc(100% + 2px) !important;
}

iframe {
    margin: -2px 0 0 0 !important;
}

/* -- Bottom Trading Panel -- */
.trade-bottom {
    flex-shrink: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.trade-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px 12px 6px;
}

.tb-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Balance display */
.tb-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    font-weight: 600;
}

.tb-balance-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.tb-balance-val {
    font-size: 14px;
    font-weight: 700;
}

.tb-balance-sub {
    font-size: 10px;
    color: var(--muted);
}

.tb-deposit-btn {
    margin-top: 5px;
    width: 100%;
    padding: 5px 0;
    background: hsl(var(--primary) / 0.10);
    border: 1px solid hsl(var(--primary) / 0.25);
    border-radius: 6px;
    color: var(--accents);
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tb-deposit-btn:hover {
    background: hsl(var(--primary) / 0.18);
}

.mob-panel {
    display: none;
    min-height: 0;
}

.mob-panel.active {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

/* Old button styles removed - using new P2P styles below */

/* -- P2P Panel -- */
.p2p-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p2p-segmented {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 12px;
}

.p2p-segmented-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 9px 8px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.p2p-segmented-btn.active {
    background: linear-gradient(135deg, var(--accents), var(--accent2));
    color: #fff;
    box-shadow: 0 2px 12px hsl(var(--primary) / 0.30);
}

.p2p-mode-switch {
    margin-top: 0px;
}

.p2p-view {
    display: none;
    min-height: 0;
}

.p2p-view.active {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.p2p-market-view .p2p-action-row {
    margin-top: auto !important;
}

.tab-action-btn {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 800;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        filter 0.15s ease,
        border-color 0.15s ease;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.tab-action-btn ion-icon {
    font-size: 18px;
}

.tab-action-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-action-btn:active {
    transform: scale(0.98) translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tab-action-btn.is-buy {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    border-color: rgba(34, 197, 94, 0.55);
}

.tab-action-btn.is-buy:hover {
    box-shadow:
        0 8px 24px rgba(34, 197, 94, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-action-btn.is-sell {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.55);
}

.tab-action-btn.is-sell:hover {
    box-shadow:
        0 8px 24px rgba(239, 68, 68, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.tab-action-btn.is-primary {
    background: linear-gradient(135deg, var(--accents) 0%, var(--accent2) 100%);
    color: #fff;
    border-color: hsl(var(--primary) / 0.55);
}

.tab-action-btn.is-primary:hover {
    box-shadow:
        0 8px 24px hsl(var(--primary) / 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.ref-p2p-btn {
    flex: 1;
}

.ref-invest-btn {
    width: 100%;
    white-space: nowrap;
}

.p2p-action-row {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
    padding-bottom: 2px;
}

.p2p-limit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* min-height: 100%; */
}

.p2p-limit-form .ref-invest-btn {
    margin-top: auto;
    box-shadow:
        0 6px 24px hsl(var(--primary) / 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.p2p-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1.5px solid hsl(var(--primary) / 0.25);
    background: hsl(var(--primary) / 0.06);
    gap: 10px;
    margin-top: 4px;
}

.p2p-balance-row .p2p-bal-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--muted);
    text-transform: uppercase;
}

.p2p-balance-row .p2p-bal-inline {
    font-size: 14px;
    font-weight: 800;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.p2p-stat-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border2);
    border-radius: 9px;
}

.p2p-stat-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

.p2p-stat-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--txt);
}

/* -- Combined Stats Card -- */
.p2p-stats-card {
    display: flex;
    align-items: stretch;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border2);
    border-radius: 10px;
    padding: 8px 0;
    gap: 0;
}

.p2p-stats-card-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 6px;
    min-width: 0;
}

.p2p-stats-card-divider {
    width: 1px;
    background: var(--border2);
    align-self: stretch;
    flex-shrink: 0;
}

.p2p-stats-card-label {
    font-size: 9px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.p2p-stats-card-value {
    font-size: 12px;
    font-weight: 800;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.p2p-hidden {
    display: none !important;
}

/* -- Mobile Symbol + Stats Combined Card -- */
.mob-symbol-card {
    background: var(--bg);
    border: none;
    border-radius: 0;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.mob-symbol-card::before {
    content: none;
}

/* Row 1: Symbol header */
.mob-sym-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
}

.mob-sym-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mob-sym-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    flex-shrink: 0;
}

.mob-sym-name {
    font-size: 16px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.mob-sym-name.is-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 8px 2px 6px;
    margin-left: -6px;
    border-radius: 6px;
    transition: background 0.15s ease;
    user-select: none;
}

.mob-sym-name.is-selector:hover,
.mob-sym-name.is-selector:focus-visible {
    background: hsl(var(--primary) / 0.12);
    outline: none;
}

.mob-sym-name.is-selector:active {
    background: hsl(var(--primary) / 0.20);
}

.mob-sym-name-caret {
    font-size: 14px;
    color: var(--muted);
    flex-shrink: 0;
}

.mob-sym-sub {
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.mob-sym-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.mob-sym-badge.is-rise {
    background: rgba(34, 197, 94, 0.15);
    color: var(--rise);
}

.mob-sym-badge.is-fall {
    background: rgba(239, 68, 68, 0.15);
    color: var(--fall);
}

/* Row 2: Big price */
.mob-sym-price {
    font-size: 19px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    margin-bottom: 0;
    letter-spacing: -0.3px;
    text-align: right;
}

.mob-sym-price-unit {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 4px;
    vertical-align: baseline;
    letter-spacing: 0.5px;
}

/* Row 3: 24h stats 2?2 grid */
.mob-sym-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-top: 1px solid var(--border2);
    border-bottom: 1px solid var(--border2);
    margin: 0 -2px;
}

.mob-sym-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 2px;
    border-bottom: 1px solid transparent;
}

/* Top row has a subtle bottom border */
.mob-sym-stat:nth-child(1),
.mob-sym-stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
}

/* Odd items get right padding, even get left padding (visual column gap) */
.mob-sym-stat:nth-child(odd) {
    padding-right: 14px;
    border-right: 1px solid var(--border);
}

.mob-sym-stat:nth-child(even) {
    padding-left: 14px;
}

.mob-sym-stat-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.mob-sym-stat-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.2px;
}

/* Separate mobile balance / qty / price strip */
.mob-balance-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px 14px 6px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.mob-symbol-card.hidden,
.mob-balance-strip.hidden {
    display: none !important;
}

.mob-sym-balance-row {
    display: flex;
    align-items: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--border2);
    gap: 0;
}

.mob-sym-bal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0;
    min-width: 0;
    background: none;
    border: none;
    border-radius: 0;
    transition: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mob-sym-bal-item:first-child {
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-sym-bal-item:last-child {
    padding-left: 10px;
}

.mob-sym-bal-divider {
    display: none;
}

.mob-sym-bal-label {
    display: block;
    flex-shrink: 0;
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.mob-sym-bal-label::after {
    content: "";
}

.mob-sym-bal-value {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    letter-spacing: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* -- Recent History List (inside trade/invest tabs) -- */
.recent-history {
    margin-top: 5px;
}

.recent-history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.recent-history-title a {
    font-size: 10px;
    color: var(--accents);
    text-decoration: none;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.15s;
}

.recent-history-title a:hover {
    color: #c084fc;
    text-decoration: underline;
}

/* -- Stats summary bar (removed ? single item view) -- */

.rh-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Card wrapper */
.rh-card {
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.15s;
}

.rh-card:hover {
    border-color: var(--border2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

/* -- Single card expanded layout -- */
.rh-card-single {
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.35);
}

.rh-card-single .rh-detail-card {
    padding: 16px;
    gap: 0;
}

/* Top row: type badge + status badge */
.rh-single-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rh-type-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.rh-type-badge ion-icon {
    font-size: 13px;
}

/* Identity: name + market � inside hero block */
.rh-single-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.rh-single-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.1px;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rh-single-market {
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Hero profit block */
.rh-single-hero {
    display: flex;
    flex-direction: column;
    padding: 16px 14px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border2);
    border-radius: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.rh-single-hero.is-win {
    background: rgba(34, 197, 94, 0.04);
    border-color: rgba(34, 197, 94, 0.22);
}

.rh-single-hero.is-loss {
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.22);
}

.rh-single-hero.is-run {
    background: hsl(var(--primary) / 0.04);
    border-color: hsl(var(--primary) / 0.22);
}

.rh-single-hero-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: center;
}

.rh-single-hero-amount {
    font-size: 32px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    line-height: 1.1;
    color: var(--txt);
    text-align: center;
}

.rh-single-hero-amount.is-win {
    color: var(--rise);
}

.rh-single-hero-amount.is-loss {
    color: var(--fall);
}

.rh-single-hero-amount.is-run {
    color: var(--accents);
}

.rh-single-hero-roi {
    display: inline-flex;
    align-self: center;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.rh-single-hero-roi ion-icon {
    font-size: 12px;
}

.rh-single-hero-roi.is-win {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--rise);
}

.rh-single-hero-roi.is-loss {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--fall);
}

.rh-single-hero-roi.is-run {
    background: hsl(var(--primary) / 0.14);
    border: 1px solid hsl(var(--primary) / 0.20);
    color: var(--accents);
}

/* Detailed 2-col stats with icons */
.rh-single-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}

.rh-single-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.018);
}

.rh-single-stat:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.rh-single-stat:nth-last-child(-n + 2) {
    border-bottom: none;
}

/* If odd total, last item spans full */
.rh-single-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: none;
}

.rh-single-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: hsl(var(--primary) / 0.10);
    color: var(--accents);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}

/* State-colored icons */
.rh-detail-card.is-win .rh-single-stat-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--rise);
}

.rh-detail-card.is-loss .rh-single-stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--fall);
}

.rh-single-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rh-single-stat-label {
    font-size: 9px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.rh-single-stat-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

/* Timeline row: Start ? End */
.rh-single-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
}

.rh-tl-point {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.rh-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.rh-tl-start {
    background: var(--accents);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.18);
}

.rh-tl-end {
    background: var(--border2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.rh-detail-card.is-win .rh-tl-end {
    background: var(--rise);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.rh-detail-card.is-loss .rh-tl-end {
    background: var(--fall);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.rh-tl-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rh-tl-label {
    font-size: 8px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.rh-tl-val {
    font-size: 11px;
    font-weight: 700;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh-tl-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
            var(--border2),
            transparent,
            var(--border2));
    position: relative;
    margin: 0 10px;
}

.rh-tl-line span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
    background: var(--card);
    padding: 2px 7px;
    white-space: nowrap;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* View all link */
.rh-single-viewall {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accents);
    text-decoration: none;
    border-top: 1px solid var(--border);
    margin: 0 -16px -16px -16px;
    transition:
        background 0.15s,
        color 0.15s;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.rh-single-viewall:hover {
    background: hsl(var(--primary) / 0.07);
    color: #c084fc;
}

.rh-single-viewall ion-icon {
    font-size: 13px;
}

/* Progress bar for running items */
.rh-progress-wrap {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.rh-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.rh-progress-info span:last-child {
    color: var(--accents);
}

.rh-progress-bar {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.rh-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accents), var(--accent2), #c084fc);
    transition: width 0.4s ease;
}

/* Detail card ? mirrors mob-symbol-card design */
.rh-detail-card {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.rh-detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            var(--accents),
            var(--accent2),
            transparent);
    opacity: 0.4;
}

/* .rh-detail-card.is-win::before {
        background: linear-gradient(90deg, var(--rise), #86efac, transparent);
        opacity: 0.6;
    }
    .rh-detail-card.is-loss::before {
        background: linear-gradient(90deg, var(--fall), #fca5a5, transparent);
        opacity: 0.6;
    } */

/* Detail card header ? badge only (single card uses inline badges) */
.rh-dc-badge {
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 3px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.2px;
}

.rh-dc-badge ion-icon {
    font-size: 11px;
}

/* Empty state */
.rh-empty {
    text-align: center;
    padding: 30px 10px;
}

.rh-empty-icon {
    font-size: 36px;
    color: var(--border2);
    margin-bottom: 10px;
    line-height: 1;
}

.rh-empty-icon ion-icon {
    font-size: 36px;
}

.rh-empty-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    margin-bottom: 4px;
}

.rh-empty-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.p2p-panel-body .dr-form-label {
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
}

.p2p-panel-body .dr-input,
.p2p-panel-body .dr-select {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--border2);
    background: var(--card);
    color: var(--txt);
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background 0.2s;
}

.p2p-panel-body .dr-input::placeholder {
    color: var(--muted);
    font-weight: 500;
}

.p2p-panel-body .dr-input:hover,
.p2p-panel-body .dr-select:hover {
    border-color: hsl(var(--primary) / 0.45);
}

.p2p-panel-body .dr-input:focus,
.p2p-panel-body .dr-select:focus {
    border-color: var(--accents);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}

.p2p-panel-body .dr-input[readonly] {
    background: rgba(255, 255, 255, 0.02);
    cursor: default;
}

.p2p-panel-body .dr-pct-row {
    margin-top: 6px;
    gap: 5px;
}

.p2p-panel-body .dr-pct-btn {
    padding: 6px 0;
    font-size: 11px;
    border-radius: 8px;
    font-weight: 700;
}

.p2p-panel-body .tab-action-btn {
    padding: 14px 10px;
    font-size: 15px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

/* Duration select (right) */
.tb-duration-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    font-weight: 700;
}

.tb-duration-select {
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--txt);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    outline: none;
    cursor: pointer;
    width: 100%;
    transition: border-color 0.2s;
}

.tb-duration-select:focus {
    border-color: var(--accents);
}

/* Rise / Fall Buttons */
.trade-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 14px 12px;
}

.rise-btn,
.fall-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 0;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition:
        transform 0.1s,
        opacity 0.2s,
        box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.rise-btn:hover,
.fall-btn:hover {
    transform: translateY(-1px);
}

.rise-btn:active,
.fall-btn:active {
    transform: scale(0.97);
}

.rise-btn {
    background: linear-gradient(135deg, var(--rise) 0%, var(--rise-dk) 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.28);
}

.rise-btn:hover {
    box-shadow: 0 6px 22px rgba(34, 197, 94, 0.38);
}

.fall-btn {
    background: linear-gradient(135deg, var(--fall) 0%, var(--fall-dk) 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(239, 68, 68, 0.28);
}

.fall-btn:hover {
    box-shadow: 0 6px 22px rgba(239, 68, 68, 0.38);
}

.rise-btn ion-icon,
.fall-btn ion-icon {
    font-size: 18px;
}

@media (max-width: 1023px) {
    .trade-body {
        flex: 1 1 0;
        min-height: 120px;
        overflow: hidden;
    }

    .chart-wrapper {
        height: 100%;
    }

    .trade-bottom {
        display: flex;
        flex-direction: column;
        flex: 0 1 auto;
        max-height: 55dvh;
        min-height: 0;
        overflow: hidden;
    }

    .trade-bottom-inner {
        flex: 1 1 auto;
        min-height: 0;
    }

    #mobPanelP2p {
        overflow: hidden;
    }

    .hdr-mobile-balance {
        display: none !important;
    }

    .hdr-mobile-actions {
        display: flex;
    }

    .hdr-desktop-balance,
    .hdr-desktop-history {
        display: flex !important;
    }

    .t-header {
        gap: 8px;
        padding: 0 10px;
    }

    .t-header-pair-name {
        font-size: 14px;
    }

    .t-header-change-badge {
        font-size: 10px;
    }
}

@media (min-width: 1024px) {

    .hdr-mobile-balance,
    .hdr-mobile-actions {
        display: none !important;
    }

    .hdr-desktop-balance,
    .hdr-desktop-history {
        display: flex;
    }
}

/* -- Desktop Right Panel -- */
.t-desktop-right {
    width: 300px;
    flex-shrink: 0;
    background: var(--bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 1023px) {
    .t-desktop-right {
        display: none !important;
    }
}

.dr-symbol-card {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--card), var(--bg));
}

.dr-pair-name {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

.dr-pair-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

.dr-price {
    font-size: 28px;
    font-weight: 900;
    margin: 8px 0 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
}

.dr-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 10px;
    border-top: 1px solid var(--border);
}

.dr-stat {
    padding: 7px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dr-stat:nth-child(odd) {
    padding-right: 12px;
    border-right: 1px solid var(--border);
}

.dr-stat:nth-child(even) {
    padding-left: 12px;
}

.dr-stat:nth-child(1),
.dr-stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
}

.dr-stat-label {
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 0;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.dr-stat-val {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Desktop Trade Panel */
.dr-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg);
}

.dr-tab {
    flex: 1;
    padding: 11px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.dr-tab:hover {
    color: var(--txt);
}

.dr-tab.active {
    color: var(--accents);
    border-bottom-color: var(--accents);
    background: hsl(var(--primary) / 0.04);
}

.dr-panel {
    display: none;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
    gap: 10px;
}

.dr-panel.active {
    display: flex;
}

.dr-form-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 5px;
    display: block;
}

.dr-input {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--txt);
    font-size: 13px;
    padding: 10px 12px;
    outline: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.dr-input:focus {
    border-color: var(--accents);
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.10);
}

.dr-select {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--txt);
    font-size: 13px;
    padding: 10px 12px;
    outline: none;
    cursor: pointer;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.dr-select:focus {
    border-color: var(--accents);
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.10);
}

.dr-pct-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 6px;
}

.dr-pct-btn {
    padding: 6px 0;
    font-size: 11px;
    font-weight: 700;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 6px;
    color: var(--txt);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.dr-pct-btn:hover {
    background: hsl(var(--primary) / 0.10);
    border-color: var(--accents);
    color: var(--accents);
}

.dr-profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 8px;
    padding: 10px 14px;
}

.dr-profit-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.dr-profit-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--rise);
    font-variant-numeric: tabular-nums;
}

.dr-rise-btn,
.dr-fall-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 0;
    border: none;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 0.1s,
        opacity 0.15s,
        box-shadow 0.2s;
}

.dr-rise-btn:hover,
.dr-fall-btn:hover {
    transform: translateY(-1px);
}

.dr-rise-btn:active,
.dr-fall-btn:active {
    transform: scale(0.97);
}

.dr-rise-btn {
    background: linear-gradient(135deg, var(--rise), var(--rise-dk));
    color: #fff;
    box-shadow: 0 3px 14px rgba(34, 197, 94, 0.25);
}

.dr-rise-btn:hover {
    box-shadow: 0 5px 18px rgba(34, 197, 94, 0.35);
}

.dr-fall-btn {
    background: linear-gradient(135deg, var(--fall), var(--fall-dk));
    color: #fff;
    box-shadow: 0 3px 14px rgba(239, 68, 68, 0.25);
}

.dr-fall-btn:hover {
    box-shadow: 0 5px 18px rgba(239, 68, 68, 0.35);
}

/* Watchlist */
.dr-watchlist-header {
    padding: 10px 16px 6px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.dr-watchlist-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.dr-wl-search {
    margin-top: 8px;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--txt);
    font-size: 12px;
    padding: 7px 12px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.dr-wl-search:focus {
    border-color: var(--accents);
}

.dr-wl-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
}

.wl-row {
    display: grid;
    grid-template-columns: 1fr 70px 55px;
    align-items: center;
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 12px;
}

.wl-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.wl-row.active {
    background: hsl(var(--primary) / 0.08);
    border-left: 2px solid var(--accents);
}

.wl-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 6px;
}

.wl-sym {
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.wl-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.wl-chg {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    font-weight: 700;
}

.lm-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lmth-ex,
.lm-col-ex {
    flex: 0.8;
    min-width: 40px;
    display: flex;
    align-items: center;
}

.lmth-pair,
.lm-col-pair {
    flex: 1.6;
    min-width: 90px;
}

.lmth-val,
.lm-col-val {
    flex: 1.3;
    min-width: 70px;
    text-align: right;
}

.lmth-chg,
.lm-col-chg {
    flex: 1;
    min-width: 55px;
    text-align: right;
}

.lmth-info,
.lm-col-info {
    flex: 1.6;
    min-width: 70px;
}

.lmth-opts,
.lm-col-opts {
    flex: 1.2;
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.lm-row {
    display: flex;
    align-items: center;
    padding: 9px 8px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.1s;
    min-width: 360px;
    position: relative;
}

.lm-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: transparent;
    transition: background 0.1s;
}

.lm-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.lm-row:hover::before {
    background: #0ecb81;
}

.lm-row.active {
    background: rgba(99, 102, 241, 0.08);
}

.lm-row:last-child {
    border-bottom: none;
}

.lm-col-ex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lm-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
}

.lm-col-pair {
    min-width: 0;
}

.lm-sym {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #eaecef;
}

.lm-badge {
    display: inline-block;
    margin-top: 2px;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.lm-badge-spot {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.lm-col-val,
.lm-col-chg {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 11px;
}

.lm-col-val {
    color: #eaecef;
}

.lm-up {
    color: #0ecb81;
}

.lm-dn {
    color: #f6465d;
}

.lm-col-info {
    min-width: 0;
}

.lm-info-main {
    font-size: 10px;
    color: #eaecef;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lm-col-opts {
    display: flex;
    justify-content: flex-end;
}

.lm-trade-btn {
    border: 1px solid #2b2f36;
    background: #161a22;
    color: #eaecef;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s;
}

.lm-trade-btn:hover {
    border-color: #0ecb81;
    color: #0ecb81;
}

/* -- Mobile Market Sheet -- */
.t-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 49;
    display: none;
}

.t-sheet-backdrop.open {
    display: block;
}

.t-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.t-sheet.open {
    transform: translateY(0);
}

.t-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border2);
    margin: 12px auto 8px;
    flex-shrink: 0;
}

.t-sheet-header {
    padding: 4px 18px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.t-sheet-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.t-sheet-close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.t-sheet-close:hover {
    color: var(--txt);
}

.t-sheet-search {
    margin: 10px 16px;
    padding: 9px 14px;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 10px;
    color: var(--txt);
    font-size: 13px;
    outline: none;
    width: calc(100% - 32px);
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.t-sheet-search:focus {
    border-color: var(--accents);
}

.t-sheet-scroll {
    flex: 1;
    overflow-y: auto;
}

.t-mkt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}

.t-mkt-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.t-mkt-row.active {
    background: hsl(var(--primary) / 0.08);
    border-left: 3px solid var(--accents);
}

.t-mkt-sym {
    font-size: 13px;
    font-weight: 700;
}

.t-mkt-vol {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    font-weight: 500;
}

.t-mkt-price {
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.t-mkt-chg {
    font-size: 11px;
    font-weight: 700;
    text-align: right;
    margin-top: 2px;
}

/* -- Duration Sheet -- */
.dur-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 14px 18px;
}

.dur-btn {
    padding: 13px 0;
    background: var(--card);
    border: 1px solid var(--border2);
    border-radius: 10px;
    color: var(--txt);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.dur-btn:hover {
    background: hsl(var(--primary) / 0.08);
    border-color: var(--accents);
    color: var(--accents);
}

.dur-btn.active {
    background: linear-gradient(135deg, var(--accents), var(--accent2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px hsl(var(--primary) / 0.25);
}

/* -- Mobile Bottom Nav (Binary-style) -- */
.bnav {
    display: none;
    align-items: center;
    justify-content: space-around;
    gap: 2px;
    height: 58px;
    padding: 6px 8px 8px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.bnav-btn {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 4px 2px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition:
        color 0.15s,
        background 0.15s;
    position: relative;
}

.bnav-btn i,
.bnav-btn ion-icon {
    font-size: 14px;
    line-height: 1;
}

.bnav-btn.on {
    color: var(--accents);
    background: hsl(var(--primary) / 0.08);
}

.bnav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rise);
    position: absolute;
    top: 5px;
    right: 14px;
}

@media (max-width: 1023px) {
    .bnav {
        display: flex;
    }
}

/* -- Scrollbar tweaks -- */
* {
    box-sizing: border-box;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* -- Mobile Tab Panels (index.php) -- */
#mobMarketsView,
#mobStatsView,
#mobSettingsView {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #09090b;
}

#mobMarketsView.hidden,
#mobStatsView.hidden,
#mobSettingsView.hidden {
    display: none !important;
}

/* Stats tab: tighter spacing and cleaner card rhythm on mobile */
#mobStatsView .tab-hdr {
    padding: 10px 14px 6px;
}

#mobStatsView .flex-1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 12px !important;
}

#mobStatsView .crd {
    border-radius: 10px;
    border-color: rgba(255, 255, 255, 0.06);
}

#mobStatsView .grid.grid-cols-2 {
    gap: 8px !important;
    margin-bottom: 10px !important;
}

#mobStatsView .donut {
    width: 112px !important;
    height: 112px !important;
}

/* Toggle switch */
.tog {
    --tog-pad: 2px;
    --tog-dot-size: 18px;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #2a2e3a;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.tog.on {
    background: #818cf8;
}

.tog .dot {
    width: var(--tog-dot-size);
    height: var(--tog-dot-size);
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: var(--tog-pad);
    left: var(--tog-pad);
    transition: transform 0.2s;
}

.tog.on .dot {
    transform: translateX(calc(100% - var(--tog-dot-size) - (var(--tog-pad) * 2)));
}

/* Sub-tab button */
.stab {
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #161a22;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.stab.on {
    background: #818cf8;
    color: #fff;
    border-color: #818cf8;
}

/* ===== el-options Dropdown � Dark Trading Theme ===== */
el-options[popover] {
    background: #161b24 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 4px 16px rgba(0, 0, 0, 0.4) !important;
    padding: 4px !important;
    color: #e2e8f0 !important;
    overflow: hidden !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
}

/* Harmonize el-select trigger with .dr-input look & feel */
el-select {
    display: block;
}

el-select>button {
    width: 100% !important;
    padding: 11px 14px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
    border: 1px solid var(--border2) !important;
    background: var(--card) !important;
    color: var(--txt) !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    column-gap: 10px !important;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease !important;
}

el-select>button:hover {
    border-color: hsl(var(--primary) / 0.45) !important;
}

el-select>button:focus-visible,
el-select[open]>button {
    border-color: var(--accents) !important;
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15) !important;
}

el-select>button el-selectedcontent {
    min-width: 0 !important;
    color: var(--txt) !important;
    font-weight: 600 !important;
}

el-select>button svg {
    margin-left: auto !important;
    justify-self: end !important;
    color: var(--muted) !important;
    transition:
        transform 0.2s ease,
        color 0.15s ease;
}

el-select[open]>button svg {
    transform: rotate(180deg);
    color: var(--accents) !important;
}

el-option {
    border-radius: 7px !important;
    margin: 1px 0 !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    color: #cbd5e1 !important;
    transition:
        background 0.12s ease,
        color 0.12s ease !important;
}

el-option:hover,
el-option:focus {
    background: hsl(var(--primary) / 0.12) !important;
    color: #fff !important;
    outline: none !important;
}

el-option[aria-selected="true"] {
    background: hsl(var(--primary) / 0.18) !important;
    color: var(--accents) !important;
    font-weight: 600 !important;
}

el-option:focus {
    background: hsl(var(--primary) / 0.25) !important;
    color: #fff !important;
}

/* Scrollbar inside options list */
el-options[popover]::-webkit-scrollbar {
    width: 4px;
}

el-options[popover]::-webkit-scrollbar-track {
    background: transparent;
}

el-options[popover]::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

el-options[popover]::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== End el-options Dropdown ===== */

/* ===== Mobile Ticker Bar (Binance-style, above chart) =====================
   Only shown on mobile (lg:hidden via Tailwind).
   Structure:
     .mob-ticker-bar
       .mtb-top
         .mtb-left   � big price, USD price, mark price
         .mtb-right  � 2�2 stat grid
   ===================================================================== */
@media (max-width: 1023px) {
    .mob-ticker-bar {
        background: #0b0e16;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        padding: 8px 12px 8px;
        flex-shrink: 0;
    }

    .mtb-top {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    /* -- Left column: last price, usd+change, mark -- */
    .mtb-left {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

    .mtb-last-price {
        font-size: 22px;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
        letter-spacing: -0.5px;
        line-height: 1.1;
    }

    .mtb-usd-row {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 1px;
    }

    .mtb-usd-price {
        font-size: 11px;
        color: #8c949e;
        font-variant-numeric: tabular-nums;
    }

    .mtb-change-pct {
        font-size: 11px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }

    .mtb-mark-row {
        display: flex;
        align-items: center;
        gap: 4px;
        margin-top: 2px;
    }

    .mtb-mark-label {
        font-size: 10px;
        color: #8c949e;
    }

    .mtb-mark-val {
        font-size: 10px;
        color: #c4c9d2;
        font-variant-numeric: tabular-nums;
    }

    /* -- Right column: 2-row � 2-col stats -- */
    .mtb-right {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-end;
    }

    .mtb-stat-row {
        display: flex;
        gap: 16px;
        justify-content: flex-end;
        width: 100%;
    }

    .mtb-stat {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 1px;
        min-width: 64px;
    }

    .mtb-stat-lbl {
        font-size: 9.5px;
        color: #8c949e;
        white-space: nowrap;
        letter-spacing: 0.1px;
    }

    .mtb-stat-val {
        font-size: 11px;
        font-weight: 600;
        color: #c4c9d2;
        font-variant-numeric: tabular-nums;
    }

    .mtb-rise {
        color: #0ecb81 !important;
    }

    .mtb-fall {
        color: #f6465d !important;
    }

    /* colour helper classes that map to rise/fall variables */
    .mob-ticker-bar .c-rise {
        color: #0ecb81;
    }

    .mob-ticker-bar .c-fall {
        color: #f6465d;
    }

    /* hide when on history/markets/stats/settings tabs */
    .mob-ticker-bar.hidden {
        display: none !important;
    }
}

/* ===== End Mobile Ticker Bar ===== */

/* === SPOT MIGRATED FROM spot-layout.css === */
/* ═══════════════════════════════════════════════════════════════════════════
   SPOT TRADING — LAYOUT & COMPONENT STYLES
   Depends on: trading-theme.css (loaded before this file)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Host reset: hide surrounding page chrome ── */
#mainWrapper,
.main-content,
.page-wrapper,
[class*="main-wrapper"],
[class*="page-content"],
[class*="container"],
[class*="content-area"],
[class*="sidebar"],
.sidebar {
    /* display: none !important; */
}

body:has(#spotPage)>*:not(#spotPage) {
    display: none !important;
}

#spotPage {
    display: flex !important;
}

/* ── Spot-page local variable aliases (points to shared theme tokens) ── */
:root {
    --sp-bg: var(--trd-bg);
    --sp-bg2: var(--trd-surface);
    --sp-bg3: var(--trd-card);
    --sp-border: var(--trd-border);
    --sp-text: var(--trd-text);
    --sp-muted: var(--trd-muted);
    --sp-rise: var(--trd-rise);
    --sp-fall: var(--trd-fall);
    --sp-yellow: var(--trd-yellow);
    --sp-hdr: 46px;
    --sp-tabs: 0px;
    --sp-bnav: 60px;
    --sp-tf: 36px;
    --sp-font: var(--trd-font);
}

/* ── Root shell ── */
#spotPage {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: var(--sp-bg);
    color: var(--sp-text);
    font-family: var(--sp-font);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

/* ─────────────────────── HEADER (same structure as index.php) ─────────────────────── */
#spotPage .t-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    height: var(--sp-hdr);
    background: var(--sp-bg);
    border-bottom: 1px solid var(--sp-border);
    flex-shrink: 0;
    gap: 8px;
    position: relative;
    z-index: 20;
}

#spotPage .t-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 5%,
            var(--trd-accent) 50%,
            transparent 95%);
    opacity: 0.35;
}

#spotPage .t-header-pair {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

#spotPage .t-header-pair-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

#spotPage .t-header-change-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.2px;
}

#spotPage .t-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#spotPage .t-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0;
    min-width: 36px;
    height: 36px;
    cursor: pointer;
    flex-shrink: 0;
}

#spotPage .t-header-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

@media (max-width: 1023px) {
    #spotPage .t-header-logo {
        min-width: 30px;
        height: 30px;
    }

    #spotPage .t-header {
        gap: 8px;
        padding: 0 10px;
    }

    #spotPage .t-header-pair-name {
        font-size: 14px;
    }

    #spotPage .t-header-change-badge {
        font-size: 10px;
    }
}

#spotPage .t-balance-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: hsl(var(--primary) / 0.06);
    border: unset !important;
    border-radius: 10px;
    padding: 5px 12px 5px 9px;
    cursor: pointer;
    transition: all 0.2s;
}

#spotPage .t-balance-chip:hover {
    background: hsl(var(--primary) / 0.12);
    border-color: hsl(var(--primary) / 0.30);
}

#spotPage .t-balance-chip ion-icon {
    font-size: 15px;
    color: var(--trd-accent);
}

#spotPage .t-balance-val {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

#spotPage .t-balance-sub {
    font-size: 9px;
    color: var(--sp-muted);
    line-height: 1.2;
}

#spotPage .hdr-mobile-actions {
    display: none;
    align-items: center;
    gap: 4px;
}

#spotPage .hdr-desktop-balance,
#spotPage .hdr-desktop-history {
    display: flex;
}

@media (max-width: 1023px) {
    #spotPage .hdr-mobile-actions {
        display: flex !important;
    }

    #spotPage .hdr-desktop-balance,
    #spotPage .hdr-desktop-history {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    #spotPage .hdr-mobile-actions {
        display: none !important;
    }

    #spotPage .hdr-desktop-balance,
    #spotPage .hdr-desktop-history {
        display: flex;
    }
}

/* ─────────────────────── SCROLL BODY ─────────────────────── */
.sp-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--sp-bg);
}

.sp-scroll::-webkit-scrollbar {
    display: none;
}

/* ─────────────────────── PAGE PANELS ─────────────────────── */
.sp-panel {
    display: none;
    flex-direction: column;
}

.sp-panel.active {
    display: flex;
}

/* ═══════════════════ PRICE TAB ═══════════════════ */
.sp-ticker {
    padding: 12px 14px 10px;
    background: var(--sp-bg);
    border-bottom: 1px solid var(--sp-border);
}

.sp-ticker-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.sp-ticker-left {
    flex: 1;
    min-width: 0;
}

.sp-price {
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    line-height: 1.05;
}

.sp-rise {
    color: var(--sp-rise);
}

.sp-fall {
    color: var(--sp-fall);
}

.sp-ticker-usd {
    font-size: 12px;
    color: var(--sp-muted);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}

.sp-chg-badge {
    font-size: 12px;
    font-weight: 600;
}

.sp-ticker-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

.sp-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(240, 185, 11, 0.12);
    color: var(--sp-yellow);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sp-tag-sep {
    color: var(--sp-muted);
    font-size: 10px;
}

.sp-ticker-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 20px;
    flex-shrink: 0;
}

.sp-tstat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sp-tstat-lbl {
    font-size: 10px;
    color: var(--sp-muted);
}

.sp-tstat-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-text);
    font-variant-numeric: tabular-nums;
}

/* ── Timeframe bar ── */
.sp-tf-bar {
    display: flex;
    align-items: center;
    height: var(--sp-tf);
    padding: 0 6px;
    gap: 0;
    background: var(--sp-bg);
    border-bottom: none;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.sp-tf-bar::-webkit-scrollbar {
    display: none;
}

.sp-tf-btn {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 9px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.12s;
}

.sp-tf-btn.active {
    color: var(--sp-text);
    font-weight: 700;
}

.sp-tf-sep {
    width: 1px;
    height: 14px;
    background: var(--sp-border);
    margin: 0 6px;
    flex-shrink: 0;
}

.sp-tf-more {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.sp-tf-depth {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 12px;
    padding: 6px 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.sp-tf-indicator {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 17px;
    padding: 6px 6px 6px 0;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Chart area ── */
/* .sp-chart-wrap {
    height: 320px;
    flex-shrink: 0;
    background: var(--trd-bg);
    position: relative;
    margin: 0;
    padding: 0;
} */

@media (max-width: 1023px) {
    .sp-chart-wrap {
        flex: 1 1 0;
        min-height: 120px;
        overflow: hidden;
    }
}

.sp-chart-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    overflow: hidden;
}

#sp-tv-chart {
    width: 100%;
    height: 100%;
    border: none;
}

#sp-tv-chart iframe {
    border: none !important;
}

/* ── Indicators row ── */
.sp-ind-bar {
    display: flex;
    align-items: center;
    padding: 0 6px;
    height: 36px;
    border-top: none;
    border-bottom: 1px solid var(--sp-border);
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--sp-bg);
    gap: 0;
    flex-shrink: 0;
}

.sp-ind-bar::-webkit-scrollbar {
    display: none;
}

.sp-ind-btn {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 9px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-ind-btn.active {
    color: var(--sp-yellow);
    font-weight: 700;
}

.sp-ind-chart-icon {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 16px;
    padding: 6px 4px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Performance row ── */
.sp-perf {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--sp-border);
    background: var(--sp-bg2);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.sp-perf::-webkit-scrollbar {
    display: none;
}

.sp-perf-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    flex: 1;
    min-width: 72px;
    border-right: 1px solid var(--sp-border);
    gap: 2px;
}

.sp-perf-item:last-child {
    border-right: none;
}

.sp-perf-lbl {
    font-size: 10px;
    color: var(--sp-muted);
    white-space: nowrap;
}

.sp-perf-val {
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── Order book ── */
.sp-ob-tabs {
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid var(--sp-border);
    background: var(--sp-bg);
    flex-shrink: 0;
}

.sp-ob-tab {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 0;
    margin-right: 24px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.sp-ob-tab.active {
    color: var(--sp-text);
    font-weight: 700;
    border-bottom-color: var(--sp-text);
}

/* ── Depth bar ── */
.sp-depth-wrap {
    padding: 5px 12px 4px;
    background: var(--sp-bg);
    border-bottom: 1px solid var(--sp-border);
    flex-shrink: 0;
}

.sp-depth-pcts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
}

.sp-depth-bid {
    font-size: 12px;
    font-weight: 700;
    color: var(--sp-rise);
}

.sp-depth-ask {
    font-size: 12px;
    font-weight: 700;
    color: var(--sp-fall);
}

.sp-depth-bar {
    height: 6px;
    border-radius: 0;
    background: var(--sp-fall);
    position: relative;
    overflow: hidden;
}

.sp-depth-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--sp-rise);
    border-radius: 0;
    transition: width 0.5s ease;
}

/* ── Order book headers ── */
.sp-ob-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid var(--sp-border);
    flex-shrink: 0;
}

.sp-ob-hdr-bid {
    font-size: 11px;
    color: var(--sp-muted);
    font-weight: 500;
    flex: 1;
}

.sp-ob-hdr-ask {
    font-size: 11px;
    color: var(--sp-muted);
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.sp-ob-hdr-right {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--sp-muted);
    cursor: pointer;
    flex: 1;
    justify-content: flex-end;
}

.sp-ob-tick-sel {
    border: 1px solid var(--sp-border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    color: var(--sp-text);
    background: var(--sp-bg2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ── Merged order book rows ── */
.sp-ob-body {
    flex-shrink: 0;
}

.sp-mob-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    padding: 2px 12px;
    min-height: 24px;
    position: relative;
    overflow: hidden;
}

.sp-mob-bid-qty {
    font-size: 11px;
    color: var(--sp-muted);
    font-variant-numeric: tabular-nums;
    text-align: left;
    line-height: 1.3;
}

.sp-mob-bid-px {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-rise);
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.3;
}

.sp-mob-ask-px {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-fall);
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.3;
}

.sp-mob-ask-qty {
    font-size: 11px;
    color: var(--sp-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    line-height: 1.3;
}

.sp-mob-row-bid-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--sp-rise);
    opacity: 0.08;
    pointer-events: none;
}

.sp-mob-row-ask-fill {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--sp-fall);
    opacity: 0.08;
    pointer-events: none;
}

/* ═══════════════════ INFO TAB ═══════════════════ */
.sp-info-section {
    padding: 14px;
    border-bottom: 1px solid var(--sp-border);
}

.sp-info-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--sp-text);
}

.sp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--sp-border);
}

.sp-info-row:last-child {
    border-bottom: none;
}

.sp-info-label {
    font-size: 12px;
    color: var(--sp-muted);
}

.sp-info-value {
    font-size: 12px;
    color: var(--sp-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════ BOTTOM NAV (index-style) ═══════════════════ */
#spotPage .bnav {
    display: flex;
    align-items: center;
    height: 62px;
    background: var(--sp-bg);
    border-top: 1px solid var(--sp-border);
    flex-shrink: 0;
    padding: 2px 6px 4px;
    gap: 2px;
    justify-content: space-between;
}

#spotPage .bnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    justify-content: center;
    padding: 4px 6px;
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    min-width: 52px;
    flex: 1;
}

#spotPage .bnav-btn i,
#spotPage .bnav-btn ion-icon {
    font-size: 16px;
    line-height: 1;
}

#spotPage .bnav-btn.on {
    color: var(--sp-text);
}

/* ═══════════════════ TRADE MODAL ═══════════════════ */
.sp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: flex-end;
}

.sp-modal-backdrop.open {
    display: flex;
}

.sp-modal {
    width: 100%;
    max-height: 85vh;
    background: var(--sp-bg2);
    border-radius: 16px 16px 0 0;
    padding: 0 0 24px;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.sp-modal-backdrop.open .sp-modal {
    transform: translateY(0);
}

.sp-modal-handle {
    width: 36px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    margin: 10px auto 0;
}

.sp-modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--sp-border);
}

.sp-modal-title {
    font-size: 16px;
    font-weight: 700;
}

.sp-modal-close {
    background: none;
    border: none;
    color: var(--sp-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
}

.sp-modal-body {
    padding: 16px;
}

.sp-trade-dir {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.sp-trade-dir-btn {
    flex: 1;
    padding: 8px;
    border: 2px solid var(--sp-border);
    border-radius: 8px;
    background: transparent;
    color: var(--sp-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.sp-trade-dir-btn.buy.active {
    border-color: var(--sp-rise);
    color: var(--sp-rise);
    background: rgba(34, 197, 94, 0.08);
}

.sp-trade-dir-btn.sell.active {
    border-color: var(--sp-fall);
    color: var(--sp-fall);
    background: rgba(239, 68, 68, 0.08);
}

.sp-form-lbl {
    font-size: 11px;
    color: var(--sp-muted);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.sp-form-input {
    width: 100%;
    background: var(--sp-bg3);
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--sp-text);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
    margin-bottom: 12px;
}

.sp-form-input:focus {
    border-color: var(--trd-border-2);
}

.sp-pct-row {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.sp-pct-btn {
    flex: 1;
    padding: 6px;
    background: var(--sp-bg3);
    border: 1px solid var(--sp-border);
    border-radius: 6px;
    color: var(--sp-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.sp-pct-btn:hover {
    border-color: var(--trd-border-2);
    color: var(--sp-text);
}

.sp-modal-info-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 12px;
}

.sp-modal-info-row span:first-child {
    color: var(--sp-muted);
}

.sp-modal-info-row span:last-child {
    color: var(--sp-text);
    font-weight: 600;
}

.sp-confirm-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    letter-spacing: 0.3px;
}

.sp-confirm-btn.buy {
    background: var(--sp-rise);
    color: #fff;
}

.sp-confirm-btn.sell {
    background: var(--sp-fall);
    color: #fff;
}

.sp-available {
    font-size: 12px;
    color: var(--sp-muted);
    text-align: right;
    margin-bottom: 8px;
}

.sp-available span {
    color: var(--sp-text);
    font-weight: 600;
}

/* ── Trades tab ── */
.sp-trades-row {
    display: flex;
    align-items: center;
    padding: 6px 14px;
}

.sp-trades-time {
    width: 70px;
    font-size: 11px;
    color: var(--sp-muted);
}

.sp-trades-price {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sp-trades-price.buy {
    color: var(--sp-rise);
}

.sp-trades-price.sell {
    color: var(--sp-fall);
}

.sp-trades-qty {
    width: 80px;
    text-align: right;
    font-size: 12px;
    color: var(--sp-muted);
    font-variant-numeric: tabular-nums;
}

/* ── Toast ── */
.sp-toast {
    position: fixed;
    top: calc(var(--sp-hdr) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--sp-bg3);
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-text);
    z-index: 20000;
    opacity: 0;
    transition:
        opacity 0.2s,
        transform 0.2s;
    white-space: nowrap;
    pointer-events: none;
}

.sp-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.sp-toast.success {
    border-color: var(--sp-rise);
    color: var(--sp-rise);
}

.sp-toast.error {
    border-color: var(--sp-fall);
    color: var(--sp-fall);
}

/* ── Desktop split layout: chart left, trade right ── */
@media (min-width: 1024px) {
    :root {
        --sp-trade-col: 380px;
    }

    #spotPage {
        min-height: 100dvh;
    }

    #spotPage .bnav {
        display: none;
    }

    .sp-scroll {
        margin-right: var(--sp-trade-col);
        height: calc(100dvh - var(--sp-hdr) - var(--sp-tabs));
        overflow: hidden;
        min-height: 0;
    }

    .sp-panel {
        height: 100%;
        min-height: 0;
    }

    #spPanelPrice {
        display: flex;
        flex-direction: column;
    }

    .sp-chart-wrap {
        height: auto;
        flex: 1;
        min-height: 0;
    }

    #sp-tv-chart {
        min-height: 0;
    }

    .sp-modal-backdrop.desktop-docked {
        position: fixed;
        top: calc(var(--sp-hdr) + var(--sp-tabs));
        right: 0;
        bottom: 0;
        left: auto;
        width: var(--sp-trade-col);
        display: flex;
        align-items: stretch;
        background: transparent;
        border-left: 1px solid var(--sp-border);
    }

    .sp-modal-backdrop.desktop-docked .sp-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
        padding-bottom: 12px;
        transform: none;
        overflow-y: auto;
        background: var(--sp-bg2);
    }

    .sp-modal-backdrop.desktop-docked .sp-modal-handle {
        display: none;
    }

    .sp-modal-backdrop.desktop-docked .sp-modal-hdr {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--sp-bg2);
    }

    .sp-modal-backdrop.desktop-docked .sp-modal-close {
        display: none;
    }

    .sp-modal-backdrop.desktop-docked .sp-modal-body {
        padding-top: 14px;
    }

    .sp-modal-backdrop.desktop-docked .sp-confirm-btn {
        margin-top: 14px;
    }
}

/* -----------------------------------------------------------
   Binary trading � crypto logo images in market lists
   ----------------------------------------------------------- */
.lm-icon.lm-icon-img {
    /* background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border2); */
    padding: 2px;
    overflow: hidden;
}

.lm-icon.lm-icon-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

/* Mobile fullscreen button next to balance (binary header) */
.hdr-mobile-fs {
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 6px;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.hdr-mobile-fs ion-icon {
    font-size: 16px;
}

.hdr-mobile-fs:hover,
.hdr-mobile-fs:focus-visible {
    border-color: hsl(var(--primary) / 0.55);
    color: var(--accents, hsl(var(--primary)));
    background: hsl(var(--primary) / 0.08);
    outline: none;
}

@media (max-width: 1023px) {
    .hdr-mobile-fs {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .hdr-mobile-fs {
        display: none !important;
    }
}

/* -----------------------------------------------------------
   Binary trading - Investment plan picker (under Quantity)
   ----------------------------------------------------------- */
.bn-plans {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 2px;
}

.bn-plans-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--muted);
}

.bn-plans-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    font-size: 10px;
    color: var(--muted);
    opacity: 0.75;
}

.bn-plans-carousel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.bn-plans-viewport {
    flex: 1 1 auto;
    overflow: hidden;
    border-radius: 10px;
}

.bn-plans-track {
    display: flex;
    gap: 6px;
    transition: transform 0.3s ease;
    will-change: transform;
}

.bn-plans-nav {
    flex: 0 0 28px;
    width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: var(--card, rgba(255, 255, 255, 0.02));
    color: var(--muted);
    cursor: pointer;
    font-size: 11px;
    transition:
        border-color 0.15s ease,
        color 0.15s ease,
        background 0.15s ease,
        opacity 0.15s ease;
}

.bn-plans-nav:hover:not(:disabled) {
    color: var(--accents, hsl(var(--primary)));
    border-color: hsl(var(--primary) / 0.55);
    background: hsl(var(--primary) / 0.08);
}

.bn-plans-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.bn-plans-single .bn-plans-nav {
    display: none;
}

.bn-plans-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 2px;
}

.bn-plans-single+.bn-plans-dots,
.bn-plans-carousel.bn-plans-single~.bn-plans-dots {
    display: none;
}

.bn-plans-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border2);
    cursor: pointer;
    transition:
        background 0.15s ease,
        transform 0.15s ease;
}

.bn-plans-dot.active {
    background: var(--accents, hsl(var(--primary)));
    transform: scale(1.2);
}

.bn-plan {
    flex: 0 0 calc((100% - 6px) / 2);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border2);
    background: var(--card, rgba(255, 255, 255, 0.02));
    color: var(--txt);
    cursor: pointer;
    text-align: left;
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        transform 0.1s ease;
}

.bn-plan:hover {
    border-color: hsl(var(--primary) / 0.45);
    background: hsl(var(--primary) / 0.06);
}

.bn-plan:active {
    transform: scale(0.98);
}

.bn-plan.active {
    border-color: hsl(var(--primary) / 0.85);
    background: linear-gradient(135deg,
            hsl(var(--primary) / 0.18),
            hsl(var(--primary) / 0.12));
    box-shadow: 0 0 0 1px hsl(var(--primary) / 0.45) inset;
}

.bn-plan-name {
    font-size: 11px;
    font-weight: 800;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.bn-plan-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.bn-plan-modal {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bn-plan-profit {
    font-size: 10px;
    font-weight: 800;
    color: #0ecb81;
    background: rgba(14, 203, 129, 0.1);
    border: 1px solid rgba(14, 203, 129, 0.25);
    border-radius: 6px;
    padding: 1px 5px;
    letter-spacing: 0.2px;
}

.bn-plan.active .bn-plan-modal {
    color: var(--txt);
}

.bn-plan-custom {
    border-style: dashed;
}

.bn-plan-custom .bn-plan-name {
    color: var(--accents, hsl(var(--primary)));
}

/* =============================================================
   Binary trading — Timeframe-row action icons (moved from header on mobile)
   ============================================================= */
.bn-expiry-actions {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.bn-hdr-act {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border2);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

.bn-hdr-act ion-icon {
    font-size: 14px;
}

.bn-hdr-act:hover,
.bn-hdr-act:focus-visible {
    color: var(--accents, hsl(var(--primary)));
    border-color: hsl(var(--primary) / 0.55);
    background: hsl(var(--primary) / 0.08);
    outline: none;
}

@media (max-width: 1023px) {
    .bn-expiry-actions {
        display: inline-flex;
    }

    .bn-expiry {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .bn-expiry-pills {
        flex: 0 1 auto;
        flex-wrap: wrap;
    }

    .bn-expiry-cd {
        margin-left: auto;
    }
}

/* Chart-bar variant: action icons always visible inside chart tab timeframe row */
.bn-expiry-actions.chart-bar-actions {
    display: inline-flex;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* =============================================================
   Binary trading — Plan carousel: 1 card per page on mobile
   ============================================================= */
@media (max-width: 1023px) {
    .bn-plan {
        flex: 0 0 100%;
    }

    .bn-plans-nav {
        flex: 0 0 26px;
        width: 26px;
    }

    .bn-plans-carousel {
        gap: 4px;
    }

    .bn-plan-name {
        font-size: 12px;
    }

    .bn-plan-modal {
        font-size: 12px;
    }
}

/* =============================================================
   Binary trading — Market info inside trade panel top row
   ============================================================= */
.tv-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-market-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid var(--border2);
    background: var(--card, rgba(255, 255, 255, 0.02));
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}

.tv-market-info:hover,
.tv-market-info:focus-visible {
    border-color: hsl(var(--primary) / 0.55);
    background: hsl(var(--primary) / 0.06);
    outline: none;
}

.tv-mi-logo {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
}

.tv-mi-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.1;
    gap: 2px;
}

.tv-mi-name {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 800;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tv-mi-caret {
    font-size: 11px;
    color: var(--muted);
}

.tv-mi-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.tv-mi-price {
    font-weight: 700;
}

.tv-mi-badge {
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
}

.tv-mi-badge.is-rise {
    color: #0ecb81;
    background: rgba(14, 203, 129, 0.1);
}

.tv-mi-badge.is-fall {
    color: #f6465d;
    background: rgba(246, 70, 93, 0.1);
}

@media (max-width: 1023px) {
    .tv-mi-logo {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .tv-mi-name {
        font-size: 11px;
    }

    .tv-mi-sub {
        font-size: 9px;
    }
}

/* =================================================================
   GLOBAL CARD RADIUS — Unified rounded-xl (12px) for all card-like
   containers across trading & related pages. Smaller pill/badge/dot
   elements keep their original radius.
   ================================================================= */
:root {
    --card-radius: 12px;
}

/* --- Trading: panels, cards, tables, dropdowns, modals, sheets --- */
/* .t-header,
.t-balance-chip,
.hdr-mobile-balance,
.hdr-mobile-fs,
.hdr-desktop-history,
.chart-col,
.tv-chart-stage,
.trade-col,
.trade-form,
.trade-grid,
.form-body,
.bn-field,
.bn-avail,
.bn-exec-btn,
.bn-profit-line,
.bn-plans-viewport,
.bn-plan,
.bn-plans-nav,
.bn-hdr-act,
.tv-market-info,
.tv-icon-btn,
.bs-toggle,
.bs-btn,
.bots-card,
.bots-hdr-gear,
.lm-card,
.lm-table-wrap,
.lm-row,
.lm-icon,
.lm-opt-btn,
.mob-symbol-card,
.mob-balance-strip,
.mob-symbol-wrap,
.float-trades,
.float-trade,
.tab-panel,
.tab-card,
.iv-live,
.iv-btn,
.bn-expiry,
.ob-card,
.depth-card,
.history-card,
.analytics-card,
.settings-card,
.more-card,
.markets-card,
.binary-modal,
.confirm-modal,
.modal-card,
.dropdown-menu,
.menu-card,
.sheet-card,
.tv-top-row,
.tf-strip,
.tf-strip-inner,
.panel,
.panel-card,
.card,
.card-body,
.glass-card,
.surface-card {
    border-radius: var(--card-radius) !important;
} */

/* Sheets / drawers attached to the bottom should keep rounded top only */
.bottom-sheet,
.b-sheet,
.mob-sheet,
.binary-bottom-sheet,
.history-sheet,
.analytics-sheet,
.more-sheet,
.markets-sheet {
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
}

/* Inputs inside cards: slightly smaller radius for visual hierarchy */
.bn-input,
.bn-field-input input,
input.bn-input,
.form-input,
.input-pill {
    border-radius: 10px !important;
}

/* Tighten tiny pills & badges so they stay readable (NOT card radius) */
/* .bn-exp, */
.bn-plan-profit,
.tv-mi-badge,
.mob-sym-badge,
.lm-badge,
.tag,
.chip,
.dot {
    border-radius: 9999px;
}

/* Carousel viewport corner clipping needs to match plan card radius */
.bn-plans-viewport {
    overflow: hidden;
}

.bn-plans-track>.bn-plan:first-child {
    border-top-left-radius: var(--card-radius);
    border-bottom-left-radius: var(--card-radius);
}

.bn-plans-track>.bn-plan:last-child {
    border-top-right-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

/* Modal / dialog generic */
.modal-content,
.modal-dialog .modal-content,
[role="dialog"]>.panel,
[role="dialog"]>.card {
    border-radius: var(--card-radius) !important;
}

/* Dashboard / admin shared card classes (safe overrides) */
.kt-card,
.kt-portlet,
.dash-card,
.stat-card,
.product-card,
.invest-card,
.plan-card,
.wallet-card,
.balance-card,
.summary-card {
    border-radius: var(--card-radius) !important;
}

/* Tailwind-style helper alignment so any element with rounded-lg looks
   consistent with rounded-xl across the trading module */
.trading-scope .rounded,
.trading-scope .rounded-md,
.trading-scope .rounded-lg {
    border-radius: var(--card-radius) !important;
}

/* ═══════════════════════════════════════════════════════════════
   BUY/SELL FORM POLISH + HISTORY HEIGHT MATCH  (index.php, mobile)
   ─ Keeps form & history at identical vertical footprint
   ─ Polishes spacing, input sizing, action buttons, layout rhythm
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {

    /* Parent panel body ─ consistent inner rhythm */
    .p2p-panel-body {
        gap: 10px !important;
        padding: 10px 12px 12px !important;
    }

    /* Both views share the same flex footprint from parent */
    .p2p-view.active {
        gap: 12px !important;
    }

    /* ── Invest (Buy/Sell) form ── */
    .p2p-limit-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    /* Capital + Duration row: equal width, no overflow, proper gap */
    .p2p-limit-form>.flex.flex-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .p2p-limit-form>.flex.flex-row>div {
        min-width: 0;
    }

    /* Uniform field heights across all inputs / el-selects */
    .p2p-panel-body .dr-input,
    .p2p-panel-body .dr-select,
    .p2p-panel-body el-select>button {
        height: 46px !important;
        padding: 0 14px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        border: 1px solid hsl(var(--primary) / 0.18) !important;
        background: rgba(255, 255, 255, 0.025) !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
    }

    .p2p-panel-body el-select {
        display: block !important;
    }

    .p2p-panel-body el-select>button el-selectedcontent {
        line-height: 1 !important;
    }

    .p2p-panel-body .dr-input[readonly],
    .p2p-panel-body .dr-select[readonly],
    .p2p-panel-body el-select>button {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
    }

    /* Labels ─ tighter, cleaner hierarchy */
    .p2p-panel-body .dr-form-label {
        display: block !important;
        margin-bottom: 6px !important;
        font-size: 10px !important;
        font-weight: 800 !important;
        letter-spacing: 0.9px !important;
        text-transform: uppercase !important;
        color: var(--muted) !important;
    }

    /* Capital input ─ currency prefix alignment */
    .p2p-limit-form [style*="position:relative"] {
        position: relative !important;
        width: 100% !important;
    }

    .p2p-limit-form [style*="position:relative"]>span {
        left: 14px !important;
        min-width: 30px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        font-size: 13px !important;
        line-height: 1 !important;
        color: var(--muted) !important;
        z-index: 2;
    }

    .p2p-limit-form #mobInvestAmt,
    .p2p-limit-form #drInvestAmt {
        padding-left: 56px !important;
        text-align: left !important;
        font-variant-numeric: tabular-nums !important;
    }

    /* Action row ─ buttons pinned to bottom, equal weight */
    .p2p-limit-form .p2p-action-row,
    .p2p-market-view .p2p-action-row {
        margin-top: auto !important;
        padding-top: 8px !important;
        padding-bottom: 0 !important;
        gap: 10px !important;
    }

    .p2p-panel-body .tab-action-btn {
        height: 44px !important;
        padding: 0 14px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        border-radius: 10px !important;
        letter-spacing: 0.4px !important;
    }

    .p2p-panel-body .tab-action-btn ion-icon {
        font-size: 15px !important;
    }

    /* ── History view ─ match form height exactly ── */
    .p2p-history-view {
        display: none;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
    }

    .p2p-history-view.active {
        display: flex !important;
    }

    .p2p-history-view .recent-history {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
        gap: 0 !important;
    }

    .p2p-history-view .rh-card-single {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        margin: 0 !important;
    }

    .p2p-history-view .rh-card-single .rh-detail-card {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    /* Empty history state also fills */
    .p2p-history-view .rh-empty {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   HISTORY PANEL MINIMAL/COMPACT MODE (mobile, Historial tab)
   ─ Reduces padding, font sizes, and removes heavy decoration
   ─ Final height matches the Buy/Sell form footprint
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {

    /* Container ─ no extra gap, fill parent */
    .p2p-history-view .rh-card-single {
        border-radius: 14px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
    }

    .p2p-history-view .rh-card-single .rh-detail-card {
        padding: 10px !important;
        gap: 8px !important;
    }

    /* Decorative top gradient bar ─ remove to reclaim space */
    .p2p-history-view .rh-detail-card::before {
        display: none !important;
    }

    /* Hero block ─ compact */
    .p2p-history-view .rh-single-hero {
        padding: 10px 10px 10px !important;
        border-radius: 10px !important;
        margin-bottom: 0 !important;
        gap: 4px !important;
    }

    /* Identity row ─ tighter */
    .p2p-history-view .rh-single-identity {
        padding-bottom: 6px !important;
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .p2p-history-view .rh-single-name {
        font-size: 12px !important;
    }

    .p2p-history-view .rh-single-market {
        font-size: 8.5px !important;
        padding: 2px 6px !important;
    }

    /* Label + big amount ─ minimize */
    .p2p-history-view .rh-single-hero-label {
        font-size: 8.5px !important;
        margin-bottom: 2px !important;
        letter-spacing: 0.8px !important;
    }

    .p2p-history-view .rh-single-hero-amount {
        font-size: 22px !important;
        letter-spacing: -0.5px !important;
        line-height: 1.05 !important;
    }

    .p2p-history-view .rh-single-hero-roi {
        margin-top: 6px !important;
        font-size: 10px !important;
        padding: 3px 9px !important;
    }

    .p2p-history-view .rh-single-hero-roi ion-icon {
        font-size: 11px !important;
    }

    /* Progress bar ─ only when running, slimmer */
    .p2p-history-view .rh-progress-wrap {
        margin-bottom: 0 !important;
        padding: 7px 10px !important;
        border-radius: 9px !important;
    }

    .p2p-history-view .rh-progress-info {
        font-size: 8.5px !important;
        margin-bottom: 4px !important;
    }

    .p2p-history-view .rh-progress-bar {
        height: 3px !important;
    }

    /* 2×2 stats grid ─ very compact */
    .p2p-history-view .rh-single-stats {
        border-radius: 10px !important;
        margin-bottom: 0 !important;
    }

    .p2p-history-view .rh-single-stat {
        padding: 7px 9px !important;
        gap: 7px !important;
    }

    .p2p-history-view .rh-single-stat-icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 7px !important;
        font-size: 13px !important;
    }

    .p2p-history-view .rh-single-stat-label {
        font-size: 8.5px !important;
        letter-spacing: 0.4px !important;
    }

    .p2p-history-view .rh-single-stat-val {
        font-size: 11.5px !important;
    }

    /* Timeline ─ slimmer */
    .p2p-history-view .rh-single-timeline {
        padding: 8px 11px !important;
        border-radius: 10px !important;
        margin-bottom: 0 !important;
    }

    .p2p-history-view .rh-tl-dot {
        width: 8px !important;
        height: 8px !important;
    }

    .p2p-history-view .rh-tl-label {
        font-size: 7.5px !important;
    }

    .p2p-history-view .rh-tl-val {
        font-size: 10px !important;
    }

    .p2p-history-view .rh-tl-line {
        margin: 0 8px !important;
    }

    .p2p-history-view .rh-tl-line span {
        font-size: 8.5px !important;
        padding: 1px 6px !important;
    }

    /* Hide "view all" footer to save vertical space */
    .p2p-history-view .rh-single-viewall {
        display: none !important;
    }

    /* Empty state ─ centered compact */
    .p2p-history-view .rh-empty {
        padding: 20px 10px !important;
    }

    .p2p-history-view .rh-empty-icon {
        font-size: 30px !important;
        margin-bottom: 6px !important;
    }

    .p2p-history-view .rh-empty-text {
        font-size: 13px !important;
    }

    .p2p-history-view .rh-empty-sub {
        font-size: 11px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   rh-flat: flat minimal history layout (replaces rh-card/rh-detail-card)
   No badges, no nested cards, no icon boxes
   ═══════════════════════════════════════════════════════════════ */

/* Container — no card, just stacked rows */
.rh-flat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 0;
    background: none;
    border: none;
    border-radius: 0;
}

/* Row 1: name + market + status */
.rh-flat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.rh-flat-identity {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.rh-flat-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh-flat-mkt {
    font-size: 9.5px;
    color: var(--muted);
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.rh-flat-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.rh-flat-status ion-icon {
    font-size: 12px;
}

.rh-flat-status.is-win {
    color: var(--rise);
}

.rh-flat-status.is-loss {
    color: var(--fall);
}

.rh-flat-status.is-run {
    color: #eab308;
}

/* Row 2: big profit + roi */
.rh-flat-profit {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rh-flat-amount {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.5px;
    line-height: 1;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
}

.rh-flat-amount.is-win {
    color: var(--rise);
}

.rh-flat-amount.is-loss {
    color: var(--fall);
}

.rh-flat-amount.is-run {
    color: #eab308;
}

.rh-flat-roi {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.rh-flat-roi.is-win {
    color: var(--rise);
}

.rh-flat-roi.is-loss {
    color: var(--fall);
}

.rh-flat-roi.is-run {
    color: #eab308;
}

/* Row 3: progress (running only) */
.rh-flat-prog {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rh-flat-prog-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    overflow: hidden;
}

.rh-flat-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, #eab308, #fde047);
    border-radius: 3px;
    transition: width 0.4s;
}

.rh-flat-prog-text {
    font-size: 9.5px;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Row 4: flat 3-col stats — no box, just plain columns */
.rh-flat-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
}

.rh-flat-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0 0 0;
}

.rh-flat-stat:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 10px;
}

.rh-flat-stat:not(:first-child) {
    padding-left: 10px;
}

.rh-flat-sl {
    font-size: 8.5px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.rh-flat-sv {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--txt);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rh-flat-sv.is-win {
    color: var(--rise);
}

.rh-flat-sv.is-loss {
    color: var(--fall);
}

.rh-flat-sv.is-run {
    color: #eab308;
}

/* Row 4 bottom: dates + progress stacked together */
.rh-flat-bottom {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 6px;
}

/* Date strip */
.rh-flat-dates {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding-top: 0;
    border-top: none;
}

.rh-flat-date {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
}

.rh-flat-dur {
    font-size: 9.5px;
    color: var(--muted);
    font-weight: 600;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
}

/* history view wrapper: no extra padding so rh-flat fills correctly */
.p2p-history-view {
    padding: 0 !important;
}

.p2p-history-view .recent-history {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ---------------------------------------------------------------------------
   Unified header height: match shared dashboard/header height everywhere.
   Dashboard uses h-16 (64px); older trading headers were 46/52px.
   --------------------------------------------------------------------------- */
:root {
    --app-header-height: 64px;
}

#binApp > .hdr,
#fxPage > .t-header,
#spotPage .t-header,
.hdr,
.t-header {
    height: var(--app-header-height) !important;
    min-height: var(--app-header-height) !important;
    max-height: var(--app-header-height) !important;
    align-items: center !important;
}

.t-header-logo {
    height: var(--app-header-height) !important;
    min-height: var(--app-header-height) !important;
}

.hdr-logo,
.hdr-back,
.hdr-btn,
.hdr-wallet,
.t-balance-chip,
.t-header-right > * {
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    #binApp > .hdr,
    #fxPage > .t-header,
    #spotPage .t-header,
    .hdr,
    .t-header {
        height: var(--app-header-height) !important;
        min-height: var(--app-header-height) !important;
        max-height: var(--app-header-height) !important;
    }

    .t-header-logo {
        height: var(--app-header-height) !important;
        min-height: var(--app-header-height) !important;
    }
}

/* ========================================================================
   Source: pages/trading/assets/css/futures-theme.css - Futures page
   ======================================================================== */

/* ==================== FUTURES TRADING THEME ==================== */
/* Professional and optimized CSS for Futures Trading Module */
/* Version: 2.0 */

:root {
    /* Map --fx-* to the shared trading-theme.css tokens so futures looks consistent
       with index.php / spot.php / binary.php */
    --fx-bg: var(--trd-bg, #16181d);
    --fx-surface: var(--trd-surface, #1a1d24);
    --fx-surface-2: var(--trd-card, #1e2128);
    --fx-border: var(--trd-border, #262a34);
    --fx-border-2: var(--trd-border-2, #2e3140);
    --fx-text: var(--trd-text, #e2e5f0);
    --fx-text-dim: #9098b0;
    --fx-text-muted: var(--trd-muted, #5a5f78);
    --fx-rise: var(--trd-rise, #22c55e);
    --fx-fall: var(--trd-fall, #ef4444);
    --fx-rise-bg: rgba(34, 197, 94, 0.12);
    --fx-fall-bg: rgba(239, 68, 68, 0.12);
    --fx-accent: var(--trd-accent, hsl(var(--primary)));
    --fx-accent-dim: var(--trd-accent-2, hsl(var(--primary) / 0.82));
}

html,
body,
#fxPage {
    background: var(--fx-bg) !important;
    color: var(--fx-text);
}

/* Override layout-override.css body constraints for futures page (needs scroll) */
html,
body {
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
    overflow-x: hidden !important;
}

body {
    font-family: var(--trd-font, 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.ft-rise {
    color: var(--fx-rise);
}

.ft-fall {
    color: var(--fx-fall);
}

/* ==================== APP FRAME ==================== */
#fxPage {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fx-inner {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#fxPage>.bnav {
    margin-top: auto;
}

/* ==================== TOP PRODUCT TABS ==================== */
.fx-product-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 16px 10px;
    background: var(--fx-bg);
    overflow-x: auto;
    scrollbar-width: none;
}

.fx-product-tabs::-webkit-scrollbar {
    display: none;
}

.fx-product-tab {
    font-size: 17px;
    font-weight: 700;
    color: var(--fx-text-dim);
    white-space: nowrap;
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
}

.fx-product-tab.active {
    color: var(--fx-text);
}

.fx-product-tabs .fx-menu-btn {
    margin-left: auto;
    background: none;
    border: 0;
    color: var(--fx-text);
    font-size: 22px;
    padding: 4px;
    cursor: pointer;
}

/* ==================== ANNOUNCEMENT STRIP ==================== */
.fx-announce {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--fx-surface);
    font-size: 12px;
    color: var(--fx-accent);
}

.fx-announce ion-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.fx-announce .fx-announce-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d7d9db;
}

.fx-announce .fx-announce-close {
    background: none;
    border: 0;
    color: var(--fx-text-dim);
    cursor: pointer;
    font-size: 14px;
}

/* ==================== SYMBOL HEADER ==================== */
.fx-sym-header {
    padding: 10px 16px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.fx-sym-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fx-sym-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fx-sym-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--fx-text);
}

.fx-sym-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--fx-surface-2);
    color: var(--fx-text-dim);
    padding: 2px 6px;
    border-radius: 4px;
}

.fx-sym-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--fx-text-dim);
}

.fx-sym-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fx-sym-stat-val {
    color: var(--fx-text);
    font-weight: 600;
}

.fx-sym-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.fx-sym-price {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.fx-sym-change {
    font-size: 13px;
    font-weight: 600;
}
/* ==================== ORDER FORM ==================== */
.fx-of-wrap {
    padding: 16px;
    background: var(--fx-bg);
}

.fx-of-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: var(--fx-surface);
    border-radius: 8px;
    padding: 3px;
}

.fx-of-tab {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--fx-text-dim);
    padding: 8px 0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.fx-of-tab.active {
    background: var(--fx-surface-2);
    color: var(--fx-text);
}

.fx-of-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.fx-of-label {
    color: var(--fx-text-dim);
}

.fx-of-value {
    color: var(--fx-text);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.fx-of-value ion-icon {
    font-size: 14px;
    color: var(--fx-text-dim);
}

/* Duration/Time selector */
.fx-time-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.fx-time-pill {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    color: var(--fx-text-dim);
    font-size: 12px;
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    transition: all 0.15s;
}

.fx-time-pill.active {
    background: hsl(var(--primary) / 0.10);
    border-color: var(--fx-accent);
    color: var(--fx-accent);
}

/* Amount input */
.fx-of-input {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 6px 4px;
}

.fx-of-input .fx-pm {
    background: none;
    border: 0;
    color: var(--fx-text-dim);
    font-size: 18px;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

.fx-of-input .fx-field {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.fx-of-input .fx-field-lbl {
    font-size: 10px;
    color: var(--fx-text-dim);
}

.fx-of-input input {
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--fx-text);
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    text-align: center;
    padding: 0;
}

.fx-of-input input::placeholder {
    color: var(--fx-text-dim);
    font-weight: 400;
}

.fx-of-input input::-webkit-outer-spin-button,
.fx-of-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fx-of-input input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.fx-of-suffix {
    border-left: 1px solid var(--fx-border);
    padding: 0 10px;
    color: var(--fx-text);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    white-space: nowrap;
}

/* Size slider */
.fx-slider-wrap {
    position: relative;
    padding: 12px 4px 6px;
}

.fx-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    background: var(--fx-border);
    border-radius: 2px;
    outline: 0;
    cursor: pointer;
}

.fx-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fx-surface);
    border: 2px solid var(--fx-accent);
    cursor: pointer;
}

.fx-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--fx-surface);
    border: 2px solid var(--fx-accent);
    cursor: pointer;
}

.fx-slider-dots {
    position: absolute;
    top: 16px;
    left: 4px;
    right: 4px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.fx-slider-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fx-surface);
    border: 1px solid var(--fx-border-2);
    transform: rotate(45deg);
}

.fx-avail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 4px 0;
    font-size: 12px;
}

.fx-avail-l {
    color: var(--fx-text-dim);
}

.fx-avail-r {
    color: var(--fx-text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fx-avail-r .fx-swap {
    color: var(--fx-accent);
    cursor: pointer;
}

.fx-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    font-size: 12px;
    color: var(--fx-text-dim);
    cursor: pointer;
}

.fx-check {
    width: 14px;
    height: 14px;
    border: 1px solid var(--fx-border-2);
    border-radius: 2px;
    display: inline-block;
    position: relative;
}

.fx-check.checked {
    background: var(--fx-accent);
    border-color: var(--fx-accent);
}

.fx-check.checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fx-check-dual {
    display: flex;
    justify-content: space-between;
}

/* Action buttons */
.fx-cta-warn {
    background: rgba(252, 213, 53, 0.08);
    border: 1px solid rgba(252, 213, 53, 0.25);
    color: var(--fx-accent);
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 4px;
}

.fx-cta-warn ion-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.fx-cta-long {
    background: var(--fx-rise);
    color: #fff;
    border: 0;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 2px;
}

.fx-cta-short {
    background: var(--fx-fall);
    color: #fff;
    border: 0;
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
}

.fx-cta-long[disabled],
.fx-cta-short[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== POSITIONS PANEL ==================== */
.fx-pos-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px 10px;
    border-top: 8px solid var(--fx-bg);
    background: var(--fx-bg);
    font-size: 14px;
    color: var(--fx-text-dim);
    position: relative;
}

.fx-pos-tab {
    background: none;
    border: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fx-text-dim);
    padding: 0;
    cursor: pointer;
    position: relative;
}

.fx-pos-tab.active {
    color: var(--fx-text);
}

.fx-pos-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 20px;
    height: 3px;
    background: var(--fx-accent);
    border-radius: 2px;
}

.fx-pos-tabs .fx-hist-icon {
    margin-left: auto;
    background: none;
    border: 0;
    color: var(--fx-text-dim);
    font-size: 18px;
    cursor: pointer;
}

.fx-pos-body {
    background: var(--fx-bg);
    padding: 16px;
    flex: 1;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.fx-mini-chart-wrap {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 8px;
}

.fx-mini-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--fx-text-dim);
}

.fx-mini-chart-head .fx-mc-sym {
    color: var(--fx-text);
    font-weight: 600;
}

.fx-mini-chart-head .fx-mc-price {
    font-weight: 600;
}

.fx-mini-chart-el {
    width: 100%;
    height: 280px;
}

.fx-mini-chart-tfs {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.fx-mini-chart-tfs button {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--fx-text-dim);
    font-size: 11px;
    padding: 4px 0;
    border-radius: 4px;
    cursor: pointer;
}

.fx-mini-chart-tfs button.active {
    color: var(--fx-accent);
    background: hsl(var(--primary) / 0.10);
}

.fx-mini-fullscreen {
    margin-top: 10px;
    width: 100%;
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: 8px;
    color: var(--fx-text);
    padding: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.fx-mini-fullscreen ion-icon { 
    font-size: 16px; 
    color: var(--fx-text-dim); 
}

.fx-pane-fill {
    flex: 1;
    min-height: 0;
}

.fx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: var(--fx-text-dim);
    font-size: 13px;
    gap: 12px;
}

.fx-empty ion-icon {
    font-size: 48px;
    color: var(--fx-text-muted);
}

.fx-pos-card {
    background: var(--fx-surface);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--fx-border);
}

.fx-pos-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.fx-pos-sym {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

.fx-pos-side-chip {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
}

.fx-pos-side-chip.long {
    background: var(--fx-rise-bg);
    color: var(--fx-rise);
}

.fx-pos-side-chip.short {
    background: var(--fx-fall-bg);
    color: var(--fx-fall);
}

.fx-pos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    font-size: 11px;
}

.fx-pos-grid .fx-pos-lbl {
    color: var(--fx-text-dim);
    display: block;
    margin-bottom: 2px;
}

.fx-pos-grid .fx-pos-val {
    color: var(--fx-text);
    font-weight: 600;
    font-size: 12px;
}

.fx-pos-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--fx-surface-2);
    color: var(--fx-text-dim);
}

.fx-pos-status.running {
    background: rgba(240, 185, 11, 0.12);
    color: var(--fx-accent-dim);
}

.fx-pos-status.win {
    background: var(--fx-rise-bg);
    color: var(--fx-rise);
}

.fx-pos-status.loss {
    background: var(--fx-fall-bg);
    color: var(--fx-fall);
}

/* ==================== CHART DRAWER ==================== */
.fx-chart-drawer-btn {
    background: var(--fx-surface);
    border-top: 1px solid var(--fx-border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--fx-text);
    cursor: pointer;
    margin-top: 10px;
}

.fx-chart-drawer-btn ion-icon {
    color: var(--fx-text-dim);
}

/* Chart full view overlay */
.fx-chart-view {
    position: fixed;
    inset: 0;
    background: var(--fx-bg);
    z-index: 100;
    display: none;
    flex-direction: column;
}

.fx-chart-view-inner {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fx-chart-view.active {
    display: flex;
}

.fx-chart-head {
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--fx-border);
}

.fx-chart-head .fx-back {
    background: none;
    border: 0;
    color: var(--fx-text);
    font-size: 22px;
    cursor: pointer;
}

.fx-chart-head-center {
    flex: 1;
    padding: 0 12px;
}

.fx-chart-head-actions {
    display: flex;
    gap: 12px;
    color: var(--fx-text);
    font-size: 20px;
}

.fx-chart-sub {
    font-size: 11px;
    color: var(--fx-text-dim);
    margin-top: 2px;
}

.fx-cv-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--fx-border);
    overflow: hidden;
}

.fx-cv-tab {
    background: none;
    border: 0;
    color: var(--fx-text-dim);
    font-size: clamp(11px, 2.9vw, 13px);
    font-weight: 600;
    min-width: 0;
    padding: 8px 4px 10px;
    cursor: pointer;
    position: relative;
    text-align: center;
    line-height: 1.2;
    white-space: normal;
}

.fx-cv-tab.active {
    color: var(--fx-text);
}

.fx-cv-tab.active::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    width: auto;
    height: 3px;
    background: var(--fx-accent);
    border-radius: 2px;
}

.fx-cv-priceblock {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fx-cv-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fx-cv-p-lbl {
    font-size: 11px;
    color: var(--fx-text-dim);
    display: flex;
    align-items: center;
    gap: 2px;
}

.fx-cv-p-val {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.fx-cv-p-sub {
    font-size: 12px;
    color: var(--fx-text-dim);
}

.fx-cv-p-sub .fx-change {
    font-weight: 600;
    margin-left: 4px;
}

.fx-cv-p-mark {
    font-size: 12px;
    color: var(--fx-text-dim);
}

.fx-cv-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 11px;
    color: var(--fx-text-dim);
    align-self: end;
}

.fx-cv-stats .fx-stat-v {
    color: var(--fx-text);
    font-weight: 600;
}

.fx-cv-tfbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-top: 1px solid var(--fx-border);
    border-bottom: 1px solid var(--fx-border);
    overflow: hidden;
    font-size: 13px;
    color: var(--fx-text-dim);
}

.fx-cv-tf {
    background: none;
    border: 1px solid transparent;
    color: var(--fx-text-dim);
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    min-width: 0;
    padding: 6px 0;
    border-radius: 999px;
    text-align: center;
}

.fx-cv-tf.active {
    color: var(--fx-accent);
    background: hsl(var(--primary) / 0.10);
    border-color: hsl(var(--primary) / 0.22);
}

.fx-cv-tfbar .fx-cv-sp {
    display: none;
}

.fx-cv-tfbar .fx-cv-icn {
    color: var(--fx-text-dim);
    font-size: 18px;
    cursor: pointer;
    justify-self: center;
}

.fx-cv-tfbar .fx-cv-icn:nth-of-type(1) {
    grid-column: 3;
}

.fx-cv-tfbar .fx-cv-icn:nth-of-type(2) {
    grid-column: 4;
}

.fx-cv-tfbar .fx-cv-icn:nth-of-type(3) {
    grid-column: 5;
}

.fx-cv-chart {
    flex: 1;
    min-height: clamp(180px, 34dvh, 300px);
    position: relative;
    background: var(--fx-bg);
}

#fxChartEl {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fx-cv-indicators {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 16px;
    border-top: 1px solid var(--fx-border);
    border-bottom: 1px solid var(--fx-border);
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    color: var(--fx-text-dim);
}

.fx-cv-ind {
    cursor: pointer;
    min-width: 0;
    white-space: normal;
    text-align: center;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.fx-cv-ind.active {
    color: var(--fx-text);
    background: rgba(252, 213, 53, 0.1);
}

@media (max-width: 380px) {
    .fx-cv-tabs,
    .fx-cv-tfbar,
    .fx-cv-indicators {
        gap: 6px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .fx-cv-tab {
        font-size: 10px;
        padding: 8px 2px 10px;
    }

    .fx-cv-tf,
    .fx-cv-ind {
        font-size: 10px;
    }
}

.fx-cv-bottom {
    padding: 10px 16px;
    border-top: 1px solid var(--fx-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.fx-cv-bt-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: var(--fx-text-dim);
    background: none;
    border: 0;
    cursor: pointer;
    gap: 2px;
}

.fx-cv-bt-more ion-icon {
    font-size: 20px;
    color: var(--fx-text);
}

.fx-cv-long,
.fx-cv-short {
    flex: 1;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
}

.fx-cv-long {
    background: var(--fx-rise);
}

.fx-cv-short {
    background: var(--fx-fall);
}

/* ==================== MODALS ==================== */
.fx-modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.fx-modal-bg.active {
    display: flex;
}

.fx-modal {
    background: var(--fx-surface);
    width: 100%;
    max-width: 520px;
    border-radius: 14px 14px 0 0;
    padding: 18px 20px 30px;
    color: var(--fx-text);
    animation: fxslide 0.22s ease-out;
}

/* Pair selector sheet */
.fx-pair-modal {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
}

.fx-pair-modal h3 {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    margin: 0 0 12px; 
    font-size: 16px; 
    font-weight: 600;
}

.fx-pair-modal h3 button {
    background: none; 
    border: 0; 
    color: var(--fx-text-dim); 
    font-size: 22px; 
    cursor: pointer;
}

.fx-pair-search {
    display: flex; 
    align-items: center; 
    gap: 8px;
    background: var(--fx-bg); 
    border: 1px solid var(--fx-border); 
    border-radius: 8px;
    padding: 8px 12px; 
    margin-bottom: 10px;
}

.fx-pair-search ion-icon { 
    color: var(--fx-text-dim); 
    font-size: 16px; 
}

.fx-pair-search input {
    flex: 1; 
    background: transparent; 
    border: 0; 
    color: var(--fx-text);
    font-size: 13px; 
    outline: none;
}

.fx-pair-quotes {
    display: flex; 
    gap: 6px; 
    margin-bottom: 10px; 
    overflow-x: auto;
    scrollbar-width: none;
}

.fx-pair-quotes::-webkit-scrollbar { 
    display: none; 
}

.fx-pq {
    background: var(--fx-bg); 
    border: 1px solid var(--fx-border);
    color: var(--fx-text-dim); 
    padding: 6px 14px; 
    border-radius: 6px;
    font-size: 12px; 
    cursor: pointer; 
    white-space: nowrap;
}

.fx-pq.active {
    background: rgba(168,85,247,0.10); 
    border-color: var(--fx-accent); 
    color: var(--fx-accent);
}

.fx-pair-list {
    flex: 1; 
    overflow-y: auto; 
    min-height: 0;
    margin: 0 -8px; 
    padding: 0 8px;
}

.fx-pair-row {
    display: grid; 
    grid-template-columns: 1.4fr 1fr 0.8fr;
    align-items: center; 
    gap: 8px;
    padding: 10px 8px; 
    border-radius: 6px;
    cursor: pointer; 
    font-size: 13px;
}

.fx-pair-row:hover { 
    background: rgba(255,255,255,0.03); 
}

.fx-pair-row.active { 
    background: rgba(168,85,247,0.08); 
}

.fx-pair-base { 
    color: var(--fx-text); 
    font-weight: 600; 
}

.fx-pair-quote { 
    color: var(--fx-text-dim); 
    font-size: 11px; 
}

.fx-pair-price { 
    color: var(--fx-text); 
    text-align: right; 
    font-variant-numeric: tabular-nums; 
}

.fx-pair-chg { 
    text-align: right; 
    font-size: 12px; 
    font-variant-numeric: tabular-nums; 
}

@keyframes fxslide {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.fx-modal h3 {
    margin: 0 0 12px;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fx-modal h3 button {
    background: none;
    border: 0;
    color: var(--fx-text-dim);
    font-size: 20px;
    cursor: pointer;
}

.fx-lev-display {
    text-align: center;
    padding: 18px 0;
    font-size: 36px;
    font-weight: 700;
    color: var(--fx-accent);
}

.fx-lev-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--fx-border);
    border-radius: 2px;
    outline: 0;
    margin: 14px 0;
}

.fx-lev-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fx-accent);
    cursor: pointer;
}

.fx-lev-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fx-accent);
    cursor: pointer;
    border: 0;
}

.fx-lev-presets {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.fx-lev-preset {
    background: var(--fx-surface-2);
    border: 1px solid var(--fx-border);
    color: var(--fx-text);
    font-weight: 600;
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.fx-lev-preset.active {
    background: hsl(var(--primary) / 0.15);
    border-color: var(--fx-accent);
    color: var(--fx-accent);
}

.fx-lev-preset.active span {
    color: hsl(var(--primary) / 0.70);
}

.fx-lev-confirm {
    width: 100%;
    margin-top: 18px;
    background: var(--fx-accent);
    color: #000;
    border: 0;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.fx-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fx-surface-2);
    border: 1px solid var(--fx-border-2);
    color: var(--fx-text);
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.fx-toast.show {
    opacity: 1;
}

.fx-toast.ok {
    border-color: var(--fx-rise);
}

.fx-toast.err {
    border-color: var(--fx-fall);
}

/* ==================== SHEET (generic bottom sheet) ============ */
.fx-sheet-item {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--fx-text);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fx-sheet-item:hover {
    background: var(--fx-surface-2);
}

.fx-sheet-item.active {
    color: var(--fx-accent);
}

.fx-sheet-item.active::after {
    content: '\2713';
    font-size: 14px;
}

/* ==================== TP/SL PANEL ==================== */
.fx-tpsl-panel {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: 6px;
}

.fx-tpsl-panel.active {
    display: flex;
}

.fx-tpsl-row {
    display: flex;
    gap: 8px;
}

.fx-tpsl-row .fx-of-input {
    flex: 1;
    padding: 4px 4px;
}

.fx-tpsl-row .fx-of-input input {
    font-size: 13px;
}

.fx-tpsl-row .fx-of-input .fx-field-lbl {
    font-size: 9px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .fx-sym-header {
        padding: 8px 12px 6px;
    }
    
    .fx-of-wrap {
        padding: 12px;
    }
    
    .fx-pos-body {
        padding: 12px;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.fx-hide {
    display: none !important;
}

.fx-show {
    display: block !important;
}

.fx-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Loading states */
.fx-loading {
    position: relative;
    pointer-events: none;
}

.fx-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* Smooth transitions */
.fx-transition {
    transition: all 0.2s ease;
}

/* ========================================================================
   Source: pages/trading/assets/css/binance-pro.css - Binance/pro market UI
   ======================================================================== */

/* =====================================================================
   binance-pro.css
   Override layer that retunes the trading UI to Binance Futures look:
   - Kuning emas accent #F0B90B
   - Dark base #0B0E11 / surface #181A20
   - Compact pro-trader density
   - Tabular monospace for numeric data
   Loaded AFTER trading-theme.css and layout-override.css
   ===================================================================== */

/* ---------- 1. Token override: light + dark ---------- */
:root,
html:not(.dark) {
    --fx-bg:          #FFFFFF;
    --fx-surface:     #FAFAFA;
    --fx-surface-2:   #F5F5F5;
    --fx-border:      #EAECEF;
    --fx-border-2:    #D6D9DD;
    --fx-text:        #1E2329;
    --fx-text-dim:    #707A8A;
    --fx-text-muted:  #929AA5;
    --fx-rise:        #03A66D;
    --fx-fall:        #CF304A;
    --fx-rise-bg:     rgba(3, 166, 109, 0.08);
    --fx-fall-bg:     rgba(207, 48, 74, 0.08);
    /* --fx-accent:      #F0B90B;
    --fx-accent-dim:  #C99400; */
    --fx-chart-bg:    #FFFFFF;

    /* Bridge for Bicryptoo design tokens used by trade-details.php */
    --bn-gold:        #F0B90B;
    --bn-gold-hover:  #FCD535;
    --bn-gold-press:  #C99400;

    /* Compact density tokens (used by selectors below) */
    --bn-row-h:       28px;
    --bn-row-fs:      11px;
    --bn-num-fs:      12px;
    --bn-mono: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}

html.dark {
    --fx-bg:          #0B0E11;
    --fx-surface:     #181A20;
    --fx-surface-2:   #1E2329;
    --fx-border:      #2B3139;
    --fx-border-2:    #363C45;
    --fx-text:        #EAECEF;
    --fx-text-dim:    #848E9C;
    --fx-text-muted:  #5E6673;
    --fx-rise:        #0ECB81;
    --fx-fall:        #F6465D;
    --fx-rise-bg:     rgba(14, 203, 129, 0.10);
    --fx-fall-bg:     rgba(246, 70, 93, 0.10);
    /* --fx-accent:      #F0B90B;
    --fx-accent-dim:  #FCD535; */
    --fx-chart-bg:    #0B0E11;
}

/* ---------- 2. Tabular alignment for numeric data (use text font, NOT monospace) ---------- */
.fx-ob-row,
.fx-ob-midprice,
.fx-ob-midsub,
.fx-sym-name,
#fxPrice,
#fxAvail,
#fxAmountDisplay,
#fxEstProfit,
.fx-mc-price,
.fx-cv-price,
#fxCvPrice,
#fxCvPriceUsd,
.fx-pair-row .fx-pair-price,
.fx-pair-row .fx-pair-change,
.fx-hist-amt,
.fx-hist-pnl,
.fx-detail-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    letter-spacing: -0.01em;
}

/* ---------- 3. Order book density ---------- */
.fx-ob-row {
    height: var(--bn-row-h) !important;
    min-height: var(--bn-row-h) !important;
    font-size: var(--bn-row-fs) !important;
    line-height: 1 !important;
    padding: 0 8px !important;
}

.fx-ob-head {
    font-size: 10px !important;
    padding: 6px 8px !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--fx-text-muted);
}

.fx-ob-mid {
    padding: 6px 8px !important;
}

.fx-ob-midprice {
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

.fx-ob-midsub {
    font-size: 11px !important;
    color: var(--fx-text-dim) !important;
}

/* ---------- 4. Order form density + yellow accent ---------- */
.fx-of-input {
    padding: 6px 10px !important;
    border-radius: 4px !important;
}

.fx-of-input input {
    /* font-size: 13px !important; */
    font-variant-numeric: tabular-nums;
}

.fx-field-lbl {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fx-text-muted) !important;
}

.fx-chart-invest-grid .fx-invest-capital-field .fx-field-lbl,
#fxViewInvest .fx-invest-capital-field .fx-field-lbl {
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.fx-of-chip {
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-weight: 600;
}

.fx-of-chip.active,
.fx-of-chip:hover {
    color: var(--fx-accent) !important;
    border-color: var(--fx-accent) !important;
    background: rgba(240, 185, 11, 0.08) !important;
}

.fx-of-select {
    border-radius: 4px !important;
}

.fx-of-select:hover,
.fx-of-select.plan-active {
    border-color: var(--fx-accent) !important;
    background: rgba(240, 185, 11, 0.06) !important;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.12) !important;
}

/* "LIVE" badge → Binance gold */
.fx-of-input .fx-of-suffix {
    color: var(--fx-accent) !important;
}

/* ---------- 5. Plan badge → gold theme ---------- */
.fx-plan-badge {
    background: rgba(240, 185, 11, 0.08) !important;
    border-color: rgba(240, 185, 11, 0.35) !important;
    border-radius: 4px !important;
}

.fx-plan-badge:hover {
    border-color: var(--fx-accent) !important;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.15) !important;
}

.fx-plan-badge-name {
    color: var(--fx-accent) !important;
}

/* ---------- 6. Buy/Sell submit buttons ---------- */
.fx-submit-buy,
.fx-cv-long {
    background: var(--fx-rise) !important;
    border-color: var(--fx-rise) !important;
    color: #FFFFFF !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.fx-submit-sell,
.fx-cv-short {
    background: var(--fx-fall) !important;
    border-color: var(--fx-fall) !important;
    color: #FFFFFF !important;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.fx-submit-buy:hover,
.fx-cv-long:hover {
    background: #0BB573 !important;
}

.fx-submit-sell:hover,
.fx-cv-short:hover {
    background: #DC3B53 !important;
}

/* ---------- 7. Symbol header row ---------- */
.fx-sym-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

.fx-sym-badge {
    font-size: 11px !important;
    font-weight: 600;
}

.fx-icon-btn:hover {
    color: var(--fx-accent) !important;
}

/* ---------- 8. Bottom nav active = gold ---------- */
.bnav-btn.on,
.bnav-btn.on i,
.bnav-btn.on span {
    color: var(--fx-accent) !important;
}

/* Always visible on mobile/tablet — hide only on desktop (≥1024px).
   Overrides default `.bnav { display: none }` in layout-override.css and
   any view-state hiding (chart-mode, etc.) */
.bnav,
#mobileBottomNav {
    display: flex !important;
}

@media (min-width: 1024px) {
    .bnav,
    #mobileBottomNav {
        display: none !important;
    }
}

/* Trading.php Futures-tab fix: split-height was reserving only 144px,
   not enough for t-header(~52) + mob-symbol-card(~78) + mob-balance-strip(~36)
   + tf-strip(~44) + bnav(~58) = ~268px. Bnav got clipped by parent
   overflow:hidden. Reserve 280px so bnav fits within the viewport. */
@media (max-width: 1023px) {
    #tradeLayout.mobile-view-futures {
        --futures-split-height: calc((100dvh - 144px) / 2) !important;
    }

    #tradeLayout.mobile-view-futures #mobileBottomNav,
    #tradeLayout.mobile-view-futures .bnav {
        position: relative;
        z-index: 50;
        flex-shrink: 0 !important;
    }
}

/* ---------- 9. Markets list compact rows ---------- */
.fx-pair-row {
    padding: 8px 10px !important;
    border-bottom: 1px solid var(--fx-border) !important;
    transition: background 0.12s;
}

.fx-pair-row:hover {
    background: var(--fx-surface-2) !important;
}

.fx-pair-row .fx-pair-symbol {
    font-size: 13px !important;
    font-weight: 600 !important;
}

.fx-pair-row .fx-pair-price,
.fx-pair-row .fx-pair-change {
    font-size: 12px !important;
}

/* ---------- 10. History/positions cards compact ---------- */
.fx-hist-card,
.fx-pos-card {
    padding: 10px 12px !important;
    border-radius: 4px !important;
    border: 1px solid var(--fx-border) !important;
    background: var(--fx-surface) !important;
    margin-bottom: 6px !important;
}

.fx-hist-card .fx-hist-sym,
.fx-pos-card .fx-pos-sym {
    font-size: 13px !important;
    font-weight: 700;
}

.fx-hist-card .fx-hist-meta,
.fx-pos-card .fx-pos-meta {
    font-size: 10px !important;
    color: var(--fx-text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ---------- 11. Generic radius normalisation ---------- */
.fx-modal,
.fx-lev-preset,
.fx-pct-chip,
.fx-loadmore-btn,
.fx-toast,
.fx-detail-btn,
.fx-detail-btn-outline {
    border-radius: 4px !important;
}

/* ---------- 12. Hover states use gold ring ---------- */
.fx-lev-preset:hover,
.fx-lev-preset.active,
.fx-pct-chip.active {
    border-color: var(--fx-accent) !important;
    color: var(--fx-accent) !important;
    background: rgba(240, 185, 11, 0.08) !important;
}

/* ---------- 13. Selection color ---------- */
::selection {
    background: rgba(240, 185, 11, 0.30);
    color: var(--fx-text);
}

/* ---------- 14. Scrollbar (WebKit) — slim Binance style ---------- */
.fx-pos-body::-webkit-scrollbar,
.fx-tab-view::-webkit-scrollbar,
#fxObSells::-webkit-scrollbar,
#fxObBuys::-webkit-scrollbar,
#fxMktList::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.fx-pos-body::-webkit-scrollbar-thumb,
.fx-tab-view::-webkit-scrollbar-thumb,
#fxObSells::-webkit-scrollbar-thumb,
#fxObBuys::-webkit-scrollbar-thumb,
#fxMktList::-webkit-scrollbar-thumb {
    background: var(--fx-border-2);
    border-radius: 2px;
}

.fx-pos-body::-webkit-scrollbar-thumb:hover,
.fx-tab-view::-webkit-scrollbar-thumb:hover {
    background: var(--fx-text-muted);
}

/* ---------- 15. Trade detail page bridges (Bicryptoo classes) ---------- */
.pr-card .text-binance-yellow,
.text-binance-gold,
.text-fx-accent {
    color: var(--fx-accent) !important;
}

.bg-binance-yellow,
.bg-fx-accent {
    background: var(--fx-accent) !important;
    color: #1E2329 !important;
}

/* ---------- 16. Markets page (markets.php) overrides ---------- */
body.bn-markets-page {
    background: var(--fx-bg) !important;
    color: var(--fx-text) !important;
}

body.bn-markets-page .market-title {
    color: var(--fx-text) !important;
    font-size: 22px !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

body.bn-markets-page .container {
    padding: 12px !important;
}

body.bn-markets-page .market-row,
body.bn-markets-page .market-card {
    background: var(--fx-surface) !important;
    border: 1px solid var(--fx-border) !important;
    border-radius: 4px !important;
}

body.bn-markets-page .market-row:hover,
body.bn-markets-page .market-card:hover {
    border-color: var(--fx-accent) !important;
    background: var(--fx-surface-2) !important;
}

body.bn-markets-page .market-change.up,
body.bn-markets-page .price-up {
    color: var(--fx-rise) !important;
}

body.bn-markets-page .market-change.down,
body.bn-markets-page .price-down {
    color: var(--fx-fall) !important;
}

body.bn-markets-page .price-value,
body.bn-markets-page .market-change,
body.bn-markets-page .market-stats,
body.bn-markets-page .price-change-badge {
    font-variant-numeric: tabular-nums;
    font-family: inherit !important;
    letter-spacing: -0.01em;
}

body.bn-markets-page .market-name {
    color: var(--fx-text) !important;
    font-size: 14px !important;
}

body.bn-markets-page .market-symbol {
    color: var(--fx-text-dim) !important;
}

body.bn-markets-page .price-value {
    color: var(--fx-text) !important;
    font-size: 16px !important;
}

body.bn-markets-page .price-label {
    color: var(--fx-text-muted) !important;
}

/* ---------- 17. Catch-all: purple→gold for inline-CSS holdouts ----------
   These rules in inline <style> blocks bypass token overrides; force them. */
.fx-cv-ts-chip.roi,
.fx-cv-ts-status.active {
    background: rgba(240, 185, 11, 0.12) !important;
    color: var(--fx-accent) !important;
    border-color: rgba(240, 185, 11, 0.30) !important;
}

.fx-pq.active,
.fx-pair-row.active {
    background: rgba(240, 185, 11, 0.10) !important;
    color: var(--fx-accent) !important;
}

.fx-lev-preset.active {
    background: rgba(240, 185, 11, 0.15) !important;
    border-color: var(--fx-accent) !important;
    color: var(--fx-accent) !important;
}

.fx-lev-preset.active span,
#fxPlanPresets .fx-lev-preset.active .plan-modal {
    color: rgba(240, 185, 11, 0.75) !important;
}

/* PHP-rendered inline-style chips on positions */
.fx-pos-side-chip[style*="hsl(var(--primary)"] {
    background: rgba(240, 185, 11, 0.15) !important;
    color: var(--fx-accent) !important;
    border-color: rgba(240, 185, 11, 0.30) !important;
}

/* ==========================================================
   18. PRO HEADER — compact 2-row symbol header
   Row 1: Name + caret + change badge
   Row 2: Big live price + H / L / Vol inline
   ========================================================== */
.fx-chart-head-pro {
    padding: 8px 12px 6px !important;
    align-items: flex-start !important;
    gap: 6px;
}

.fx-chart-head-pro .fx-sym-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fx-chart-head-pro .fx-sym-name-row {
    display: flex !important;
    align-items: center;
    gap: 6px !important;
    flex-wrap: nowrap;
}

.fx-chart-head-pro .fx-sym-name {
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    color: var(--fx-text) !important;
}

.fx-chart-head-pro .fx-sym-caret {
    color: var(--fx-text-dim);
    font-size: 14px;
    line-height: 1;
}

.fx-chart-head-pro .fx-sym-badge {
    font-size: 11px !important;
    font-weight: 600;
    padding: 1px 0 1px 4px;
    background: transparent !important;
    border: 0 !important;
    font-variant-numeric: tabular-nums;
}

/* Row 2: price + inline stats */
.fx-sym-stats {
    display: flex !important;
    align-items: baseline;
    gap: 10px;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

.fx-sym-price {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.fx-sym-stat-grp {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-size: 10px;
    line-height: 1.1;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
}

.fx-sym-stat-grp .fx-sym-stat-l {
    color: var(--fx-text-muted);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.fx-sym-stat-grp .fx-sym-stat-v {
    color: var(--fx-text-dim);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-chart-head-pro .fx-sym-right {
    align-self: flex-start;
    margin-top: 0;
    flex-shrink: 0;
}

/* Mobile <380px: hide Vol to prevent crowding */
@media (max-width: 380px) {
    .fx-sym-stats .fx-sym-stat-grp:last-child {
        display: none;
    }
    .fx-sym-price { font-size: 16px; }
}

/* ==========================================================
   19. NO-SCROLL: chart pane elastic
   ========================================================== */
.fx-pos-tabs #fxPaneChart,
.fx-pos-tabs .fx-mini-chart-wrap {
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 0 !important;
}

/* Hide stats row when in chart-mode (full chart view) */
/* #fxPage.chart-mode .fx-chart-head-pro {
    display: none !important;
} */

/* ==========================================================
   20. CLASSIC LAYOUT: Chart full width on top, Orderbook | Form 50/50 below
   Both orderbook and form stretch to equal height (grid default).
   ========================================================== */
.fx-main-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 4px 10px 8px !important;
    align-items: stretch !important;  /* orderbook & form same height */
    flex-shrink: 0 !important;
}

.fx-orderbook,
.fx-orderform {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Orderbook internal scroll for overflow */
.fx-orderbook #fxObSells,
.fx-orderbook #fxObBuys {
    flex: 1 1 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    min-height: 0 !important;
    scrollbar-width: none;
}

.fx-orderbook #fxObSells::-webkit-scrollbar,
.fx-orderbook #fxObBuys::-webkit-scrollbar {
    width: 0;
    display: none;
}

.fx-orderbook .fx-ob-head,
.fx-orderbook .fx-ob-mid,
.fx-orderbook .fx-ob-ratio,
.fx-orderbook .fx-ob-footer {
    flex: 0 0 auto !important;
}

/* Buy/Sell stacked Binance-style */
.fx-cta-long,
.fx-cta-short {
    width: 100% !important;
    height: 40px !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    border: 0 !important;
    color: #FFFFFF !important;
    cursor: pointer;
    transition: background 0.12s;
}

.fx-cta-long  { background: var(--fx-rise) !important; }
.fx-cta-short { background: var(--fx-fall) !important; }
.fx-cta-long:hover  { background: #0BB573 !important; }
.fx-cta-short:hover { background: #DC3B53 !important; }
/* ========================================================================
   Single-file conflict guard
   Trading CSS contains intentional host resets for full-screen trading apps.
   Restore the shared shell everywhere else so this one bundle can be loaded
   safely across dashboard, wallet, transactions, profile, public, and admin.
   ======================================================================== */
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) {
  min-height: 100vh !important;
  height: auto !important;
  max-height: none !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
  /* padding-top: var(--app-header-height, 64px) !important; */
}

html:not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) {
  height: auto !important;
  max-height: none !important;
  overflow-x: clip !important;
  overflow-y: auto !important;
}

body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) #mainHeader,
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) footer,
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) nav#dash-bottom-nav,
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) nav#bottomNav,
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) .ih-bottom-nav,
body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) .safe-area-bottom {
  display: revert !important;
}

body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) #sidebarOverlay {
  display: block !important;
}

body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) #sidebarMenu {
  display: flex !important;
}

@media (max-width: 1023px) {
  body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) footer {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) footer {
    display: block !important;
  }

  body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) .ih-bottom-nav {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  body:not(.bn-markets-page):not(:has(#binApp)):not(:has(#tradeLayout)):not(:has(#spotPage)):not(:has(#fxPage)) {
    padding-bottom: var(--member-bottom-nav-offset, 78px) !important;
  }
}
