/* ==========================================================================
   FALCON CRYPTO TRADING PLATFORM - ULTRA MODERN UI/UX STYLESHEET
   Matching Reference Design: Obsidian Dark, Neon Cyan & Mint Accents, Glassmorphism
   ========================================================================== */

/* === 1) CSS TOKENS & THEMING === */
:root {
  --bg-deep: #080B11;
  --bg-main: #0B0F19;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(24, 32, 50, 0.85);
  --bg-surface: #121826;
  --bg-surface-secondary: #171F32;
  --bg-input: #0E1320;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-card: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(0, 242, 254, 0.6);

  --accent-cyan: #00F2FE;
  --accent-cyan-glow: rgba(0, 242, 254, 0.25);
  --accent-teal: #00E5C9;
  --accent-green: #00E5A3;
  --accent-green-bg: rgba(0, 229, 163, 0.12);
  --accent-red: #FF4565;
  --accent-red-bg: rgba(255, 69, 101, 0.12);
  --accent-gold: #F7931A;
  --accent-purple: #627EEA;

  --text-main: #FFFFFF;
  --text-primary: #EAEFF8;
  --text-secondary: #8A96AA;
  --text-muted: #566479;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 24px var(--accent-cyan-glow);
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === 2) RESET & GLOBAL TYPOGRAPHY === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
  color-scheme: dark;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(0, 242, 254, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(98, 126, 234, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(0, 229, 163, 0.04) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100%;
  line-height: 1.5;
  overflow-x: hidden;
}

#main-app-wrapper {
  min-height: calc(100vh - 70px);
  padding-bottom: 90px; /* Space for fixed bottom navigation bar */
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 242, 254, 0.4);
}

/* === 3) TOP BAR / HEADER (MATCHING REFERENCE) === */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(8, 11, 17, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Info Bar (Left Header) */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}
.user-info-bar:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.12);
}

.avatar-ring {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-cyan), rgba(0, 242, 254, 0.1));
}
.profile-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-surface);
}

.user-online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border: 2px solid var(--bg-deep);
  border-radius: 50%;
}

.user-text-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-display-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Brand Logo (Center Header) */
.brand-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-logo-wrap {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 163, 255, 0.4);
}
.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-text {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.brand-text .brand-white {
  color: #FFFFFF;
}
.brand-text .brand-cyan {
  color: #00A3FF;
  background: linear-gradient(90deg, #00A3FF, #00F2FE);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header Action Buttons (Right Header) */
.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}
.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(0, 242, 254, 0.3);
}
.header-badge-dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* === 4) SLIDE-OVER PROFILE PANEL & BACKDROP === */
.profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.26s ease;
  pointer-events: none;
}
.profile-backdrop.show {
  opacity: 1;
  pointer-events: auto;
  display: block !important;
}

.profile-panel {
  position: fixed;
  top: 72px;
  right: -420px;
  width: 350px;
  max-width: 90vw;
  background: rgba(14, 19, 31, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--text-primary);
  z-index: 1200;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 242, 254, 0.1);
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-panel.show {
  right: 20px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-close-btn, .edit-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.panel-close-btn:hover, .edit-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.avatar-container {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.avatar-halo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--accent-cyan), rgba(98, 126, 234, 0.3));
  box-shadow: 0 0 24px rgba(0, 242, 254, 0.2);
  display: block;
  cursor: pointer;
  transition: transform var(--transition-fast);
}
.avatar-halo:hover {
  transform: scale(1.05);
}
.avatar-halo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
}

.profile-name-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.profile-panel .username {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  transition: color var(--transition-fast);
}
.profile-name-link:hover .username {
  color: var(--accent-cyan);
}
.user-tier-badge {
  text-align: center;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
  font-weight: 600;
}

.panel-balance-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin-bottom: 18px;
}
.balance-card-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.panel-balance-card .balance-display {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.panel-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-fast);
}
.panel-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 242, 254, 0.25);
  color: var(--accent-cyan);
  transform: translateX(3px);
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 69, 101, 0.08);
  border: 1px solid rgba(255, 69, 101, 0.2);
  color: var(--accent-red);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition-fast);
}
.logout-button:hover {
  background: rgba(255, 69, 101, 0.18);
  border-color: var(--accent-red);
}

/* === 5) DASHBOARD WRAPPER & MAIN LAYOUT === */
.dashboard-wrapper {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* === 6) HERO PORTFOLIO & BALANCE SECTION === */
.portfolio-hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

@media (min-width: 900px) {
  .portfolio-hero-section {
    grid-template-columns: 1.6fr 1fr;
    align-items: stretch;
  }
}

.hero-balance-card {
  position: relative;
  background: linear-gradient(135deg, rgba(17, 23, 36, 0.95) 0%, rgba(10, 14, 23, 0.98) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px 28px 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Ambient Cyan Glow behind hero card */
.hero-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.18) 0%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}

/* Floating 3D Crypto Decors */
.floating-crypto-decorations {
  position: absolute;
  top: 18px;
  right: 24px;
  display: flex;
  gap: 12px;
  pointer-events: none;
  opacity: 0.65;
  transition: opacity var(--transition-smooth);
}
.hero-balance-card:hover .floating-crypto-decorations {
  opacity: 0.9;
}
.decor-coin {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4));
}
.eth-diamond {
  transform: rotate(10deg);
}
.btc-circle {
  transform: translateY(16px) rotate(-8deg);
}

.hero-balance-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-balance-title {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-toggle-eye {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color var(--transition-fast);
}
.btn-toggle-eye:hover {
  color: var(--accent-cyan);
}

.hero-balance-amount-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.hero-main-amount {
  font-size: clamp(1.55rem, 4.8vw, 2.4rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  min-width: 0;
}
.currency-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-balance-substats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btc-equiv-wrap {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0.9;
}
.invested-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-green-bg);
  border: 1px solid rgba(0, 229, 163, 0.3);
  color: var(--accent-green);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* === 7) QUICK ACTIONS GRID (3 SQUIRCLE BUTTONS) === */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: linear-gradient(135deg, rgba(17, 23, 36, 0.8) 0%, rgba(10, 14, 23, 0.9) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  align-items: center;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  outline: none;
  border: none;
  transition: transform var(--transition-smooth);
}
.action-item:hover {
  transform: translateY(-3px);
}
.action-squircle-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #141A28;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.action-item:hover .action-squircle-icon {
  background: #192134;
  border-color: rgba(0, 242, 254, 0.45);
  color: #FFFFFF;
  box-shadow: 0 8px 20px rgba(0, 242, 254, 0.2);
}
.action-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.action-item:hover .action-label {
  color: var(--text-main);
}

/* === 8) TOP COINS & PORTFOLIO BREAKDOWN CARDS === */
.top-coins-section {
  margin-bottom: 30px;
}
.section-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-heading {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.see-all-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.see-all-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.top-coins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.coin-stat-card {
  position: relative;
  background: linear-gradient(180deg, rgba(19, 25, 38, 0.85) 0%, rgba(13, 17, 26, 0.95) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  cursor: pointer;
}
.coin-stat-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(0, 242, 254, 0.08);
  transform: translateY(-2px);
}

.coin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.coin-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.coin-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.btc-bg {
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid rgba(247, 147, 26, 0.3);
}
.btc-bg img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.eth-bg {
  background: rgba(98, 126, 234, 0.15);
  border: 1px solid rgba(98, 126, 234, 0.3);
}
.coin-names {
  display: flex;
  flex-direction: column;
}
.coin-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}
.coin-ticker {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.coin-arrow-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}
.coin-stat-card:hover .coin-arrow-btn {
  background: var(--accent-cyan);
  color: #050B14;
  border-color: var(--accent-cyan);
}

/* Sparkline area SVG */
.coin-sparkline-wrap {
  width: 100%;
  height: 65px;
  margin: 6px 0 12px;
  overflow: hidden;
}
.sparkline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.coin-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.price-time-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.coin-live-price {
  font-size: clamp(0.95rem, 3vw, 1.12rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.coin-time-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.coin-change-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.coin-change-badge.positive {
  background: var(--accent-green-bg);
  border: 1px solid rgba(0, 229, 163, 0.3);
  color: var(--accent-green);
}

/* Portfolio Stat Card (Matching Left Breakdown in Image) */
.portfolio-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20, 27, 42, 0.9) 0%, rgba(13, 18, 28, 0.95) 100%);
}
.portfolio-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.portfolio-stat-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.portfolio-stat-col.text-right {
  align-items: flex-end;
  flex-shrink: 0;
}
.stat-big-number {
  font-size: clamp(1.12rem, 3.6vw, 1.48rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.stat-sublabel {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.active-coins-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cyan-circle-arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-cyan);
  border: none;
  color: #050B14;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.4);
  transition: transform var(--transition-fast);
}
.cyan-circle-arrow-btn:hover {
  transform: scale(1.08);
}

/* === 9) TRADING TERMINAL LAYOUT === */
.main-trading-terminal {
  margin-bottom: 30px;
}
.main-container {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}
.left-panel {
  flex: 1 1 65%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.right-panel {
  flex: 0 0 350px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Pair Selector Bar */
.pair-selector-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.pair-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pair-market-status {
  max-width: 100%;
  min-width: 0;
}
.pair-coin-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(247, 147, 26, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pair-coin-badge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
#pair-select {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
#pair-select:focus {
  border-color: var(--accent-cyan);
}

.price-ticker-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}
.beacon-pulse {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulseBeacon 2s infinite;
}
@keyframes pulseBeacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 242, 254, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}
.live-ticker-text {
  font-size: clamp(0.76rem, 2.6vw, 0.88rem);
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chart Container */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 480px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.tradingview-widget-container,
.tradingview-widget-container iframe {
  width: 100% !important;
  height: 100% !important;
}

/* Open Positions Table Container */
.positions-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.positions-header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.positions-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.positions-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}
.positions-badge {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.positions-history-link {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.positions-history-link:hover {
  color: var(--accent-cyan);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#positions-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  text-align: left;
}
#positions-table th {
  padding: 12px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
#positions-table td {
  padding: 14px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
#positions-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Position Type badges (Long / Short) */
#positions-table td.long {
  color: var(--accent-green);
  font-weight: 700;
}
#positions-table td.short {
  color: var(--accent-red);
  font-weight: 700;
}
.pnl-positive {
  color: var(--accent-green) !important;
  font-weight: 700;
}
.pnl-negative {
  color: var(--accent-red) !important;
  font-weight: 700;
}
.pnl-neutral {
  color: var(--text-secondary) !important;
}

.btn-close {
  background: rgba(255, 69, 101, 0.12);
  border: 1px solid rgba(255, 69, 101, 0.3);
  color: var(--accent-red);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-close:hover {
  background: var(--accent-red);
  color: #FFF;
}

/* === 10) ORDER TERMINAL (RIGHT PANEL) === */
.new-order-form {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.order-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}
.market-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-green);
}
.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
}

.form-row {
  display: flex;
  gap: 10px;
}
.select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.custom-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.input-sublabel {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.margin-type-select, .leverage-select {
  width: 100%;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}
.margin-type-select:focus, .leverage-select:focus {
  border-color: var(--accent-cyan);
}

/* Long / Short Trade Buttons */
.trade-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn-trade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-trade.long {
  background: linear-gradient(135deg, #00E5A3 0%, #00B880 100%);
  color: #032517;
  box-shadow: 0 6px 18px rgba(0, 229, 163, 0.28);
}
.btn-trade.long:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 229, 163, 0.42);
}
.btn-trade.short {
  background: linear-gradient(135deg, #FF4565 0%, #D92548 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(255, 69, 101, 0.28);
}
.btn-trade.short:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 69, 101, 0.42);
}

/* Order Tabs (Market / Limit) */
.form-row.tabs {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.tab-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.tab-link.active {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Form Groups & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.label-row label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.currency-tag {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  font-weight: 700;
}

.input-with-adornment {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.input-with-adornment:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}
.input-adornment {
  position: static;
  padding: 0 6px 0 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.input-with-adornment input {
  width: 100%;
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 12px 14px 12px 4px;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  outline: none;
}
.input-with-adornment input:focus {
  border-color: transparent;
  box-shadow: none;
}

/* Margin Details Box */
.new-margin-info {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.margin-info-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}
.info-row .label {
  color: var(--text-secondary);
  flex-shrink: 0;
}
.info-row .info-val {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.info-row .bold {
  font-weight: 700;
  color: var(--text-main);
}
.info-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 4px 0;
}

/* === 11) RECENT TRANSACTIONS SECTION === */
.recent-transactions-section {
  margin-top: 20px;
}
.transactions-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  box-shadow: var(--shadow-card);
}
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.transaction-item:last-child {
  border-bottom: none;
}
.tx-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.tx-icon-box {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tx-icon-box.btc-color {
  background: rgba(247, 147, 26, 0.12);
  color: var(--accent-gold);
}
.tx-icon-box.withdraw-color {
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
}
.tx-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tx-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.tx-date {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}
.tx-amount {
  font-size: 0.92rem;
  font-weight: 700;
}
.tx-amount.positive {
  color: var(--accent-green);
}
.tx-amount.negative {
  color: var(--text-primary);
}
.tx-status {
  font-size: 0.72rem;
  font-weight: 600;
}
.tx-status.success {
  color: var(--accent-green);
}

/* === 12) BOTTOM NAVIGATION BAR (MATCHING DESIGN) === */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 0 14px;
}
.bottom-nav-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}
.nav-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}
.nav-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-tab:hover {
  color: var(--text-main);
}
.nav-tab.active {
  color: var(--accent-cyan);
}
.nav-tab.active .nav-icon-box {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.5));
}

/* === 13) CUSTOM MODAL DIALOGS === */
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.custom-modal-dialog {
  width: 100%;
  max-width: 460px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 242, 254, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-title-wrap h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.modal-close-btn:hover {
  color: var(--text-main);
}
.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.deposit-qr-placeholder {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(255, 255, 255, 0.1);
}
.deposit-address-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.deposit-address-box label {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.address-copy-row {
  display: flex;
  gap: 8px;
}
.address-copy-row input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: monospace;
  outline: none;
}
.btn-copy {
  background: var(--accent-cyan);
  border: none;
  border-radius: var(--radius-sm);
  color: #050B14;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.btn-copy:hover {
  filter: brightness(1.15);
}

/* === 14) TOAST NOTIFICATIONS === */
#toast-root {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 340px;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.success {
  border-left: 4px solid var(--accent-green);
}
.toast.error {
  border-left: 4px solid var(--accent-red);
}
.toast .title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.toast .body {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* === 15) STYLING FOR SECONDARY PAGES (WITHDRAW, TRADE HISTORY, PROFILE, AUTH) === */

/* Common Box / Container */
.main-container-centered, .withdrawal-form-container, .profile-edit-box {
  max-width: 680px;
  margin: 30px auto;
  padding: 0 16px;
}
.content-box, .withdrawal-form-content, .positions-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* Input Fields and Buttons in Forms */
.input-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), #0099FF);
  border: none;
  color: #050B14;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.25);
  transition: var(--transition-fast);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.4);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 600;
}
.back-link:hover {
  text-decoration: underline;
}

/* Withdraw Balance Info */
.balance-info {
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin-bottom: 22px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.balance-info strong {
  color: var(--text-main);
  font-size: 1.15rem;
  margin-left: 6px;
}

/* Tabs on History / Withdraw */
.history-tabs, .btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.history-tabs .tab-link, .filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.history-tabs .tab-link.active, .filter-btn.active {
  background: var(--accent-cyan);
  color: #050B14;
  border-color: var(--accent-cyan);
}
.history-tabs-select {
  display: none;
}

/* Icon Buttons (e.g. fullscreen) */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.icon-btn .icon-minimize {
  display: none;
}
.icon-btn[aria-pressed="true"] .icon-minimize {
  display: block;
}
.icon-btn[aria-pressed="true"] .icon-expand {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Authentication (Login / Register) Pages */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.auth-form {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 36px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}
.auth-logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.4);
  object-fit: cover;
}
.auth-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent-cyan);
  font-weight: 700;
}
.auth-switch a:hover {
  text-decoration: underline;
}

.message {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 0.85rem;
  line-height: 1.4;
}
.message.error {
  background: rgba(255, 69, 101, 0.12);
  border: 1px solid rgba(255, 69, 101, 0.3);
  color: var(--accent-red);
}
.message.success {
  background: var(--accent-green-bg);
  border: 1px solid rgba(0, 229, 163, 0.3);
  color: var(--accent-green);
}

/* === 16) WITHDRAW PAGE & HISTORY TABLE ENHANCEMENTS === */
.withdraw-page {
  max-width: 1100px;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: start;
  gap: 24px;
  padding: 0 16px;
}
.withdraw-page > .withdrawal-form-container {
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}
@media (max-width: 900px) {
  .withdraw-page {
    grid-template-columns: 1fr;
    margin: 18px auto;
  }
}

.history-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  width: 100%;
}
.history-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.withdraw-page .history-tabs {
  margin-bottom: 0;
}
.history-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

#transactions-history-table, #history-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
}
#trade-history-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
#transactions-history-table th, #trade-history-table th, #history-table th {
  padding: 12px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}
#transactions-history-table td, #trade-history-table td, #history-table td {
  padding: 13px 14px;
  font-size: 0.84rem;
  color: var(--text-primary);
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
#transactions-history-table tr:hover td, #trade-history-table tr:hover td, #history-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}
.status-pending {
  color: #F59E0B !important;
  font-weight: 700;
}
.status-completed {
  color: var(--accent-green) !important;
  font-weight: 700;
}
.status-failed, .status-rejected {
  color: var(--accent-red) !important;
  font-weight: 700;
}

/* === 17) PROFILE EDIT PAGE STYLES === */
.profile-card {
  max-width: 640px;
  margin: 0 auto;
}
.profile-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}
.profile-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 16px 0 10px;
  flex-wrap: wrap;
}
.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}
.form-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.form-inline .btn,
.back-home-container .btn {
  width: auto;
  padding: 10px 18px;
}
.input-file {
  font-size: 0.82rem;
  color: var(--text-secondary);
  max-width: 100%;
}
.input-file::file-selector-button {
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  padding: 8px 14px;
  margin-right: 10px;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger {
  background: rgba(255, 69, 101, 0.15) !important;
  border: 1px solid rgba(255, 69, 101, 0.3) !important;
  color: var(--accent-red) !important;
}
.btn-danger:hover {
  background: var(--accent-red) !important;
  color: #FFF !important;
}
.btn-outline {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #FFF !important;
}
.section-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 24px 0;
}
.muted-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.back-home-container {
  margin-top: 24px;
  display: flex;
  justify-content: flex-start;
}
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.alert-error {
  background: rgba(255, 69, 101, 0.12);
  border: 1px solid rgba(255, 69, 101, 0.3);
  color: var(--accent-red);
}
.alert-success {
  background: var(--accent-green-bg);
  border: 1px solid rgba(0, 229, 163, 0.3);
  color: var(--accent-green);
}
