/* ==========================================
   ArbiMax Wallet Page - Blue Identity Redesign
   Build: 20260204_WALLET_BLUE_IDENTITY
   ==========================================
   
   PURPOSE:
   Complete UI/UX redesign of the Wallet page
   using the new solid-blue ArbiMax identity.
   Matches bots.page.css design language.
   
   FEATURES:
   - Clean card-based layout for CEX/DEX tabs
   - Modern modal system with blur overlay
   - NO gradients, NO purple
   - RTL-first layout
   - Gas status indicators
   - Asset allocation cards
   
   ========================================== */

/* ==========================================
   SECTION 1: CSS VARIABLES (Wallet Scope)
   ========================================== */
.wallet-page,
.trader-page-wallet,
#wallet-container,
.wallet-modal {
  /* Primary Blue Identity */
  --wallet-accent: #2B8CFF;
  --wallet-accent-soft: rgba(43, 140, 255, 0.15);
  --wallet-accent-hover: rgba(43, 140, 255, 0.10);
  --wallet-accent-active: rgba(43, 140, 255, 0.22);
  --wallet-accent-border: rgba(43, 140, 255, 0.35);
  --wallet-accent-strong: rgba(43, 140, 255, 0.50);
  --wallet-accent-glow: rgba(43, 140, 255, 0.25);
  
  /* Dark Base Colors */
  --wallet-bg-base: #0B1220;
  --wallet-bg-card: #0E1626;
  --wallet-bg-elevated: rgba(14, 22, 38, 0.95);
  --wallet-bg-input: rgba(11, 18, 32, 0.8);
  
  /* Text Colors */
  --wallet-text: #EAF2FF;
  --wallet-text-muted: rgba(234, 242, 255, 0.65);
  --wallet-text-dim: rgba(234, 242, 255, 0.40);
  
  /* Border Colors */
  --wallet-border: rgba(43, 140, 255, 0.18);
  --wallet-border-hover: rgba(43, 140, 255, 0.35);
  --wallet-border-active: rgba(43, 140, 255, 0.50);
  
  /* Status Colors */
  --wallet-status-ok: #10B981;
  --wallet-status-warning: #F59E0B;
  --wallet-status-danger: #EF4444;
  --wallet-status-info: #3B82F6;
  
  /* Transitions */
  --wallet-transition: 160ms ease;
}

/* ==========================================
   SECTION 2: RESET LEGACY STYLES
   ========================================== */
.wallet-page .card,
.wallet-page .wallet-card,
.wallet-page .metric-grid,
.wallet-page .pill,
.wallet-page .btn,
.trader-page-wallet .card,
.trader-page-wallet .wallet-card {
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

/* ==========================================
   SECTION 3: PAGE SHELL
   ========================================== */
.wallet-page,
.trader-page-wallet {
  direction: rtl;
  padding: 24px;
  min-height: 100vh;
  background: var(--wallet-bg-base);
}

.wallet-page .page-shell,
.trader-page-wallet .page-shell {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================
   SECTION 4: PAGE HEADER
   ========================================== */
.wallet-page-header,
.trader-page-wallet .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--wallet-border);
}

.wallet-page-title,
.trader-page-wallet h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--wallet-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-page-title .icon,
.trader-page-wallet h2::before {
  font-size: 28px;
  opacity: 0.9;
}

.wallet-update-time {
  font-size: 11px;
  color: var(--wallet-text-muted);
}

.wallet-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ==========================================
   SECTION 5: TABS NAVIGATION
   ========================================== */
.wallet-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--wallet-border);
}

.wallet-tab {
  padding: 14px 28px;
  border: none;
  background: transparent;
  color: var(--wallet-text-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px 10px 0 0;
  transition: all var(--wallet-transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-tab:hover {
  background: var(--wallet-accent-hover);
  color: var(--wallet-text);
}

.wallet-tab.active {
  background: var(--wallet-accent);
  color: var(--wallet-bg-base);
  font-weight: 600;
}

.wallet-tab .tab-icon {
  font-size: 16px;
}

.wallet-tab .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  font-size: 11px;
  font-weight: 600;
}

.wallet-tab.active .tab-count {
  background: rgba(0,0,0,0.15);
}

/* ==========================================
   SECTION 6: TAB CONTENT
   ========================================== */
.wallet-tab-content {
  animation: wallet-fade-in 0.2s ease;
}

@keyframes wallet-fade-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   SECTION 7: ACCOUNT CARDS (CEX)
   ========================================== */
.cex-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .cex-accounts-grid {
    grid-template-columns: 1fr;
  }
}

.cex-account-card {
  background: var(--wallet-bg-card);
  border: 1px solid var(--wallet-border);
  border-radius: 16px;
  overflow: hidden;
  transition: 
    border-color var(--wallet-transition),
    transform var(--wallet-transition);
}

.cex-account-card:hover {
  border-color: var(--wallet-border-hover);
  transform: translateY(-2px);
}

.cex-account-card.selected {
  border-color: var(--wallet-accent-strong);
}

/* Card header with exchange icon */
.cex-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--wallet-border);
  background: rgba(43, 140, 255, 0.03);
}

.cex-account-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cex-exchange-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--wallet-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.cex-account-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--wallet-text);
  margin-bottom: 2px;
}

.cex-account-exchange {
  font-size: 12px;
  color: var(--wallet-text-muted);
}

.cex-account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.cex-account-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--wallet-status-ok);
}

.cex-account-status.inactive {
  background: rgba(107, 114, 128, 0.15);
  color: var(--wallet-text-muted);
}

/* Card body */
.cex-account-body {
  padding: 18px;
}

/* Balance display */
.cex-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(43, 140, 255, 0.08);
}

.cex-balance-row:last-child {
  border-bottom: none;
}

.cex-balance-label {
  font-size: 12px;
  color: var(--wallet-text-muted);
}

.cex-balance-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--wallet-text);
  font-family: var(--font-mono, monospace);
}

.cex-balance-value.positive {
  color: var(--wallet-status-ok);
}

.cex-balance-value.negative {
  color: var(--wallet-status-danger);
}

/* Card actions */
.cex-account-actions {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--wallet-border);
  background: rgba(11, 18, 32, 0.5);
}

/* ==========================================
   SECTION 8: DEX WALLET CARD
   ========================================== */
.dex-wallet-card {
  background: var(--wallet-bg-card);
  border: 1px solid var(--wallet-border);
  border-radius: 16px;
  overflow: hidden;
  max-width: 550px;
}

.dex-wallet-header {
  padding: 20px;
  border-bottom: 1px solid var(--wallet-border);
  background: rgba(43, 140, 255, 0.03);
}

.dex-wallet-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--wallet-text);
}

.dex-wallet-title .icon {
  font-size: 22px;
}

.dex-wallet-subtitle {
  font-size: 12px;
  color: var(--wallet-text-muted);
}

/* DEX Wallet Body */
.dex-wallet-body {
  padding: 20px;
}

/* Address display */
.dex-address-section {
  margin-bottom: 20px;
}

.dex-address-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wallet-text-muted);
  margin-bottom: 8px;
}

.dex-address-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--wallet-bg-input);
  border: 1px solid var(--wallet-border);
  border-radius: 10px;
}

.dex-address-text {
  flex: 1;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  color: var(--wallet-text);
  word-break: break-all;
}

.dex-address-copy {
  background: transparent;
  border: 1px solid var(--wallet-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--wallet-text-muted);
  transition: all var(--wallet-transition);
}

.dex-address-copy:hover {
  border-color: var(--wallet-accent);
  color: var(--wallet-accent);
}

/* Gas status */
.dex-gas-section {
  padding: 16px;
  background: var(--wallet-bg-input);
  border-radius: 12px;
  margin-bottom: 16px;
}

.dex-gas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dex-gas-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wallet-text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dex-gas-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.dex-gas-status.ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--wallet-status-ok);
}

.dex-gas-status.low {
  background: rgba(245, 158, 11, 0.15);
  color: var(--wallet-status-warning);
}

.dex-gas-status.empty {
  background: rgba(239, 68, 68, 0.15);
  color: var(--wallet-status-danger);
}

.dex-gas-balance {
  font-size: 24px;
  font-weight: 700;
  color: var(--wallet-text);
  font-family: var(--font-mono, monospace);
}

.dex-gas-balance small {
  font-size: 14px;
  font-weight: 400;
  color: var(--wallet-text-muted);
  margin-left: 6px;
}

/* Gas low warning */
.dex-gas-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  margin-bottom: 16px;
}

.dex-gas-warning .warning-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.dex-gas-warning .warning-text {
  flex: 1;
}

.dex-gas-warning .warning-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--wallet-status-warning);
  margin-bottom: 4px;
}

.dex-gas-warning .warning-description {
  font-size: 12px;
  color: var(--wallet-text-muted);
}

.dex-gas-warning .topup-btn {
  flex-shrink: 0;
}

/* DEX Wallet Not Configured State */
.dex-not-configured {
  text-align: center;
  padding: 40px 20px;
}

.dex-not-configured .icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.dex-not-configured h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--wallet-text);
}

.dex-not-configured p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--wallet-text-muted);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.dex-setup-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

/* DEX Wallet Actions */
.dex-wallet-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--wallet-border);
  background: rgba(11, 18, 32, 0.5);
}

/* ==========================================
   SECTION 9: BUTTONS (Wallet Scope)
   ========================================== */
.wallet-page .btn,
.trader-page-wallet .btn,
.wallet-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--wallet-transition);
  border: 1px solid transparent;
  background: var(--wallet-bg-input);
  color: var(--wallet-text);
}

.wallet-page .btn:hover,
.trader-page-wallet .btn:hover {
  background: var(--wallet-accent-hover);
  border-color: var(--wallet-border);
}

.wallet-page .btn.brand,
.trader-page-wallet .btn.brand,
.wallet-modal .btn.brand {
  background: var(--wallet-accent);
  color: var(--wallet-bg-base);
  font-weight: 600;
}

.wallet-page .btn.brand:hover,
.trader-page-wallet .btn.brand:hover {
  background: #4da3ff;
}

.wallet-page .btn.danger,
.trader-page-wallet .btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--wallet-status-danger);
}

.wallet-page .btn.danger:hover,
.trader-page-wallet .btn.danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.wallet-page .btn.ghost,
.trader-page-wallet .btn.ghost {
  background: transparent;
  border-color: var(--wallet-border);
  color: var(--wallet-text-muted);
}

.wallet-page .btn.ghost:hover,
.trader-page-wallet .btn.ghost:hover {
  border-color: var(--wallet-border-hover);
  color: var(--wallet-text);
}

.wallet-page .btn:disabled,
.trader-page-wallet .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wallet-page .btn .btn-icon,
.trader-page-wallet .btn .btn-icon {
  font-size: 14px;
}

/* Small buttons */
.wallet-page .btn.btn-sm,
.trader-page-wallet .btn.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==========================================
   SECTION 10: ASSETS LIST
   ========================================== */
.wallet-assets-panel {
  background: var(--wallet-bg-card);
  border: 1px solid var(--wallet-border);
  border-radius: 16px;
  margin-top: 24px;
  overflow: hidden;
}

.wallet-assets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--wallet-border);
}

.wallet-assets-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--wallet-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-assets-title .icon {
  font-size: 16px;
  opacity: 0.8;
}

.wallet-assets-list {
  max-height: 400px;
  overflow-y: auto;
}

.wallet-asset-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(43, 140, 255, 0.08);
  transition: background var(--wallet-transition);
}

.wallet-asset-row:hover {
  background: var(--wallet-accent-hover);
}

.wallet-asset-row:last-child {
  border-bottom: none;
}

.wallet-asset-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wallet-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--wallet-accent);
  margin-left: 14px;
}

.wallet-asset-info {
  flex: 1;
  min-width: 0;
}

.wallet-asset-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--wallet-text);
  margin-bottom: 2px;
}

.wallet-asset-symbol {
  font-size: 11px;
  color: var(--wallet-text-muted);
}

.wallet-asset-balance {
  text-align: left;
  margin-left: 14px;
}

.wallet-asset-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--wallet-text);
  font-family: var(--font-mono, monospace);
}

.wallet-asset-value {
  font-size: 11px;
  color: var(--wallet-text-muted);
}

/* Empty state */
.wallet-assets-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--wallet-text-muted);
}

.wallet-assets-empty .icon {
  font-size: 40px;
  opacity: 0.4;
  margin-bottom: 12px;
}

/* ==========================================
   SECTION 11: ALLOCATION BAR
   ========================================== */
.wallet-allocation {
  margin-top: 16px;
}

.wallet-allocation-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--wallet-text-muted);
  margin-bottom: 8px;
}

.wallet-allocation-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--wallet-bg-input);
  overflow: hidden;
}

.wallet-allocation-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wallet-accent), #4da3ff);
  transition: width 0.5s ease;
}

/* ==========================================
   SECTION 12: MODALS (Wallet Scope)
   ========================================== */
.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wallet-overlay-fade 0.2s ease;
}

@keyframes wallet-overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.wallet-modal {
  background: var(--wallet-bg-card);
  border: 1px solid var(--wallet-border);
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  animation: wallet-modal-slide 0.25s ease;
}

@keyframes wallet-modal-slide {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wallet-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--wallet-border);
}

.wallet-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--wallet-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-modal-title .icon {
  font-size: 20px;
}

.wallet-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--wallet-text-muted);
  padding: 4px;
  line-height: 1;
  transition: color var(--wallet-transition);
}

.wallet-modal-close:hover {
  color: var(--wallet-text);
}

.wallet-modal-body {
  padding: 22px;
}

.wallet-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--wallet-border);
  background: rgba(11, 18, 32, 0.5);
}

/* Modal form elements */
.wallet-modal .form-group {
  margin-bottom: 18px;
}

.wallet-modal .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--wallet-text-muted);
}

.wallet-modal .form-input,
.wallet-modal .form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--wallet-bg-input);
  border: 1px solid var(--wallet-border);
  border-radius: 8px;
  color: var(--wallet-text);
  font-size: 14px;
  transition: border-color var(--wallet-transition);
  box-sizing: border-box;
}

.wallet-modal .form-input:focus,
.wallet-modal .form-select:focus {
  outline: none;
  border-color: var(--wallet-accent);
}

.wallet-modal .form-input::placeholder {
  color: var(--wallet-text-dim);
}

.wallet-modal .form-hint {
  font-size: 11px;
  color: var(--wallet-text-dim);
  margin-top: 6px;
}

.wallet-modal .form-error {
  font-size: 12px;
  color: var(--wallet-status-danger);
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
}

/* Security notice in modal */
.wallet-modal .security-notice {
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  margin-bottom: 18px;
}

.wallet-modal .security-notice p {
  margin: 0;
  font-size: 13px;
  color: var(--wallet-status-ok);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.wallet-modal .security-notice .icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Warning notice in modal */
.wallet-modal .warning-notice {
  padding: 14px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  margin-bottom: 18px;
}

.wallet-modal .warning-notice p {
  margin: 0;
  font-size: 13px;
  color: var(--wallet-status-warning);
  line-height: 1.5;
}

/* Type-to-confirm field */
.wallet-modal .confirm-field {
  position: relative;
}

.wallet-modal .confirm-field .confirm-target {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--wallet-accent);
  font-family: var(--font-mono, monospace);
}

/* ==========================================
   SECTION 13: LOADING STATES
   ========================================== */
.wallet-skeleton {
  background: linear-gradient(
    90deg,
    var(--wallet-bg-input) 25%,
    rgba(43, 140, 255, 0.05) 50%,
    var(--wallet-bg-input) 75%
  );
  background-size: 200% 100%;
  animation: wallet-shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes wallet-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.wallet-skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.wallet-skeleton-box {
  height: 80px;
}

/* ==========================================
   SECTION 14: PNL SUMMARY
   ========================================== */
.wallet-pnl-section {
  margin-top: 30px;
}

.wallet-pnl-card {
  background: var(--wallet-bg-card);
  border: 1px solid var(--wallet-border);
  border-radius: 16px;
  padding: 20px;
}

.wallet-pnl-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--wallet-text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wallet-pnl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.wallet-pnl-metric {
  background: var(--wallet-bg-input);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.wallet-pnl-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--wallet-text-muted);
  margin-bottom: 6px;
}

.wallet-pnl-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--wallet-text);
  font-family: var(--font-mono, monospace);
}

.wallet-pnl-metric-value.positive {
  color: var(--wallet-status-ok);
}

.wallet-pnl-metric-value.negative {
  color: var(--wallet-status-danger);
}

/* ==========================================
   SECTION 15: RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
  .wallet-page,
  .trader-page-wallet {
    padding: 16px;
  }
  
  .wallet-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .wallet-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .wallet-tab {
    padding: 12px 20px;
    font-size: 13px;
    white-space: nowrap;
  }
  
  .cex-accounts-grid {
    grid-template-columns: 1fr;
  }
  
  .wallet-pnl-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .dex-wallet-card {
    max-width: none;
  }
  
  .wallet-modal {
    max-width: 100%;
    margin: 10px;
    max-height: 90vh;
  }
  
  .wallet-modal-footer {
    flex-direction: column;
  }
  
  .wallet-modal-footer .btn {
    width: 100%;
  }
}

/* ==========================================
   SECTION 16: RTL ADJUSTMENTS
   ========================================== */
[dir="rtl"] .wallet-page,
.wallet-page[dir="rtl"],
[dir="rtl"] .trader-page-wallet {
  direction: rtl;
}

[dir="rtl"] .wallet-asset-icon {
  margin-left: 0;
  margin-right: 14px;
}

[dir="rtl"] .wallet-asset-balance {
  margin-left: 0;
  margin-right: 14px;
  text-align: right;
}

[dir="rtl"] .wallet-modal-close {
  order: -1;
}

[dir="rtl"] .dex-gas-balance small {
  margin-left: 0;
  margin-right: 6px;
}

/* ==========================================
   SECTION 17: ADD ACCOUNT CARD
   ========================================== */
.cex-add-account-card {
  background: transparent;
  border: 2px dashed var(--wallet-border);
  border-radius: 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--wallet-transition);
}

.cex-add-account-card:hover {
  border-color: var(--wallet-accent);
  background: var(--wallet-accent-hover);
}

.cex-add-account-card .icon {
  font-size: 36px;
  color: var(--wallet-accent);
  margin-bottom: 10px;
}

.cex-add-account-card .text {
  font-size: 14px;
  color: var(--wallet-text-muted);
}
