/*
=============================================================================
Aerodrome Market Making Bot - Styles
Author: Mohamed Arif Ali (https://ariworks.online/)
Project: RECORD/WETH Market Making on Base Network
Created: 2025-01-07
Copyright (c) 2025 Mohamed Arif Ali - AriWorks
=============================================================================
*/

:root {
  /* Light Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #dbeafe;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --success-border: #bbf7d0;
  --error-bg: #fef2f2;
  --error-text: #dc2626;
  --error-border: #fecaca;
  --warning-bg: #fef3c7;
  --warning-text: #d97706;
  --warning-border: #fde68a;
  --info-bg: #dbeafe;
  --info-text: #1d4ed8;
  --info-border: #bfdbfe;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

[data-theme="dark"] {
  /* Dark Theme Colors - Midnight Blue */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #475569;
  --border-hover: #64748b;
  --accent-primary: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: #1e3a8a;
  --success-bg: #064e3b;
  --success-text: #6ee7b7;
  --success-border: #065f46;
  --error-bg: #7f1d1d;
  --error-text: #fca5a5;
  --error-border: #991b1b;
  --warning-bg: #78350f;
  --warning-text: #fbbf24;
  --warning-border: #92400e;
  --info-bg: #1e3a8a;
  --info-text: #93c5fd;
  --info-border: #1e40af;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
  --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --gradient-success: linear-gradient(135deg, #059669 0%, #047857 100%);
  --gradient-warning: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --gradient-error: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: all 0.3s ease;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-primary);
  min-height: 100vh;
}

/* Header Styles */
.header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.title {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.theme-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

/* Header Actions */
.header-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
}

/* Logout Button */
.logout-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.logout-btn:hover {
  background: #ff4444;
  border-color: #ff4444;
  color: white;
  box-shadow: var(--shadow-md);
}

.logout-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Section Styles */
.section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 16px 16px 0 0;
}

.section:hover {
  box-shadow: var(--shadow-lg);
}

.section-header {
  padding: 1.5rem 2rem 1rem 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.section-header:hover {
  background: var(--bg-tertiary);
}

.section-header h2 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-icon {
  font-size: 1.5rem;
}

.section-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collapse-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.collapse-toggle:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.help-button {
  background: var(--accent-primary);
  border: none;
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-weight: bold;
}

.help-button:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

.section-content {
  padding: 0 2rem 2rem 2rem;
  transition: all 0.3s ease;
  overflow: visible;
}

.section.collapsed .section-content {
  max-height: 0;
  padding: 0 2rem;
  opacity: 0;
}

.section.expanded .section-content {
  max-height: none;
  opacity: 1;
}

.collapse-icon {
  transition: transform 0.3s ease;
}

.section.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

/* Status Styles */
.status {
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.status.success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.status.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: var(--error-border);
}

.status.info {
  background: var(--info-bg);
  color: var(--info-text);
  border-color: var(--info-border);
}

.status.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
  border-color: var(--warning-border);
}

/* Button Styles */
button {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

button:hover::before {
  left: 100%;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

button.secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

button.secondary:hover {
  border-color: var(--accent-primary);
  background: var(--accent-light);
}

/* Input Styles */
input, select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:hover, select:hover {
  border-color: var(--border-hover);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Log Styles */
.log {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  border: 1px solid var(--border-color);
}

.log::-webkit-scrollbar {
  width: 8px;
}

.log::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.log::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

.log::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-card {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tooltip Styles */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 300px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  text-align: left;
  border-radius: 12px;
  padding: 1rem;
  position: absolute;
  z-index: 9999;
  bottom: 125%;
  left: 50%;
  margin-left: -150px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg-tertiary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Ensure tooltips are always on top */
.tooltip {
  z-index: 10000;
}

/* Better tooltip positioning for mobile */
@media (max-width: 768px) {
  .tooltip .tooltiptext {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-left: 0;
    width: 90vw;
    max-width: 300px;
    z-index: 10000;
  }
  
  .tooltip .tooltiptext::after {
    display: none;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .title {
    font-size: 1.8rem;
  }
  
  .theme-toggle {
    position: relative;
    margin-bottom: 1rem;
  }
  
  .section-header {
    padding: 1rem 1.5rem 0.5rem 1.5rem;
  }
  
  .section-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }
  
  .tooltip .tooltiptext {
    width: 250px;
    margin-left: -125px;
    font-size: 0.85rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }
  
  .title {
    font-size: 1.5rem;
  }
  
  .section-header {
    padding: 0.8rem 1rem 0.5rem 1rem;
  }
  
  .section-content {
    padding: 0 1rem 1rem 1rem;
  }
  
  .tooltip .tooltiptext {
    width: 200px;
    margin-left: -100px;
    font-size: 0.8rem;
  }
}

/* Help Toggle Button */
.help-toggle {
  margin-top: 1.5rem;
  text-align: center;
}

.help-button {
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-button:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* Help Info Styles */
.help-info {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  z-index: 10;
  display: block;
}

.help-info:not(.collapsed) {
  max-height: 1000px;
  opacity: 1;
  visibility: visible;
}

.help-info.collapsed {
  max-height: 0;
  padding: 0 1.5rem;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
}

.help-info h4 {
  color: var(--accent-primary);
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.help-info p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.help-info p:last-child {
  margin-bottom: 0;
}

.help-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.help-info em {
  color: var(--text-muted);
  font-style: italic;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .section {
  background: linear-gradient(145deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

[data-theme="dark"] .help-info {
  background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* Wallet Stats Grid */
.wallet-stats-grid {
  margin-top: 1rem;
}

.wallet-stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-primary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-primary);
}

/* Mobile adjustments for wallet stats */
@media (max-width: 768px) {
  .wallet-stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .stat-item {
    padding: 0.5rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .wallet-stats-container {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Trade Execution Card Improvements */
.execution-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.days-input {
  width: 100px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  background: var(--bg-primary);
}

.input-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Custom Checkbox Design */
.checkbox-group {
  margin: 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.checkbox-label:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

.checkbox-input {
  display: none;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent-primary);
  border-radius: 4px;
  background: var(--bg-primary);
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-input:checked + .checkbox-custom {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-input:checked + .checkbox-custom::after {
  content: "✓";
  color: white;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  text-align: center;
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.checkbox-text strong {
  color: var(--text-primary);
  font-size: 1rem;
}

.checkbox-text small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.primary-action, .secondary-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  justify-content: center;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-hover) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.secondary-action {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.secondary-action:hover {
  background: var(--bg-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.button-icon {
  font-size: 1.2rem;
}

.button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.button-text strong {
  font-size: 1rem;
  font-weight: 600;
}

.button-text small {
  font-size: 0.8rem;
  opacity: 0.8;
}

/* Execution Status */
.execution-status {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .primary-action, .secondary-action {
    min-width: auto;
    width: 100%;
  }
  
  .control-group {
    padding: 1rem;
  }
  
  .checkbox-label {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .execution-controls {
    gap: 1.5rem;
  }
  
  .control-group {
    padding: 0.75rem;
  }
  
  .primary-action, .secondary-action {
    padding: 0.75rem 1rem;
  }
  
  .button-text strong {
    font-size: 0.9rem;
  }
  
  .button-text small {
    font-size: 0.75rem;
  }
}

[data-theme="dark"] .stat-card {
  background: linear-gradient(145deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* Sticky Status Bar */
.sticky-status-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.status-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--accent-primary);
}

/* Wallet Stats Header */
.wallet-stats-header {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stats-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

/* Full Width Section */
.full-width {
  grid-column: 1 / -1;
  width: 100%;
}

/* Wallet Management Single Row */
.wallet-management-row {
  display: flex;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.wallet-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Mobile Responsiveness for New Elements */
@media (max-width: 768px) {
  .sticky-status-bar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .status-item {
    min-width: 80px;
  }
  
  .status-label {
    font-size: 0.7rem;
  }
  
  .status-value {
    font-size: 1rem;
  }
  
  .wallet-management-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .wallet-actions {
    justify-content: center;
  }
  
  .wallet-stats-header {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .sticky-status-bar {
    padding: 0.5rem;
  }
  
  .status-item {
    min-width: 70px;
  }
  
  .status-label {
    font-size: 0.65rem;
  }
  
  .status-value {
    font-size: 0.9rem;
  }
}

/* Animation for status updates */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status, .stat-card {
  animation: fadeInUp 0.5s ease-out;
}

/* Pulse animation for active elements */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Network Notification Styles */
.network-notification {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease-out;
}

.testnet-notification {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #f59e0b;
  color: #92400e;
}

.mainnet-notification {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 2px solid #ef4444;
  color: #991b1b;
}

.notification-content {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.notification-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
}

.notification-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notification-description {
  font-size: 0.875rem;
  opacity: 0.9;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: inherit;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Dark theme adjustments for network notification */
[data-theme="dark"] .testnet-notification {
  background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
  border-color: #f59e0b;
  color: #fbbf24;
}

[data-theme="dark"] .mainnet-notification {
  background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
  border-color: #ef4444;
  color: #fca5a5;
}

[data-theme="dark"] .notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* File Management Styles */
.file-management-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.file-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.file-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.file-filters input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.file-filters input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.file-filters select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.file-filters select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

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

.file-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.file-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.file-size {
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
}

.file-date {
  color: var(--text-muted);
}

.file-type {
  background: var(--accent-light);
  color: var(--accent-primary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: capitalize;
}

.file-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.view-btn:hover {
  background: var(--info-bg);
  border-color: var(--info-border);
  color: var(--info-text);
}

.download-btn:hover {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.delete-btn:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.btn-icon {
  font-size: 1rem;
}

.loading, .no-files, .error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.error {
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 8px;
}

/* File Modal Styles */
.file-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 1.5rem;
}

.file-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 60vh;
  overflow: auto;
}

.modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  justify-content: flex-end;
}

/* Responsive Design for Network Notification */
@media (max-width: 768px) {
  .network-notification {
    margin-bottom: 0.75rem;
  }
  
  .notification-content {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  
  .notification-icon {
    font-size: 1.25rem;
  }
  
  .notification-title {
    font-size: 0.875rem;
  }
  
  .notification-description {
    font-size: 0.75rem;
  }
  
  .notification-close {
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
  }
}

/* Responsive Design for File Management */
@media (max-width: 768px) {
  .file-management-controls {
    padding: 0.75rem;
  }
  
  .file-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-filters input[type="text"] {
    min-width: auto;
  }
  
  .file-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .file-actions {
    justify-content: center;
  }
  
  .file-details {
    justify-content: center;
  }
  
  .modal-content {
    width: 95vw;
    max-height: 95vh;
  }
  
  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }
  
  .file-content {
    font-size: 0.75rem;
    max-height: 50vh;
  }
}

/* ===== MODERN WALLET CARDS STYLES ===== */

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-title-with-help {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title-with-help h4 {
  margin: 0;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.refresh-icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.refresh-btn:hover .refresh-icon {
  transform: rotate(180deg);
}

/* Wallet Addresses Container */
.wallet-addresses-container {
  height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  background: var(--bg-secondary);
}

/* Modern Wallet Grid */
.modern-wallet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
  align-items: stretch;
}

/* Modern Wallet Card */
.modern-wallet-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: auto;
}

.modern-wallet-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.modern-wallet-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-wallet-card:hover::before {
  opacity: 1;
}

/* Wallet Card Header */
.wallet-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.wallet-number {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-index {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.wallet-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.wallet-status.funded {
  background: var(--success-text);
  box-shadow: 0 0 0 2px var(--success-bg);
}

.wallet-status.empty {
  background: var(--warning-text);
  box-shadow: 0 0 0 2px var(--warning-bg);
}

.wallet-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.action-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: scale(1.05);
}

.action-btn svg {
  transition: all 0.2s ease;
}

/* Address Display */
.wallet-address-display {
  margin-bottom: 1rem;
}

.address-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

.address-preview:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
}

.address-short {
  color: var(--text-primary);
  font-weight: 500;
}

.expand-icon {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.address-full {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  word-break: break-all;
  line-height: 1.4;
}

.address-full code {
  background: none;
  padding: 0;
  color: var(--text-primary);
  font-size: inherit;
}

/* Balance Grid */
.wallet-balances-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.balance-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  min-width: 0;
  overflow: hidden;
}

.balance-item:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.balance-icon {
  font-size: 1rem;
  font-weight: bold;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.balance-item.eth .balance-icon {
  background: linear-gradient(135deg, #627eea, #4f46e5);
  color: white;
}

.balance-item.weth .balance-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.balance-item.record .balance-icon {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.balance-content {
  flex: 1;
  min-width: 0;
}

.balance-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.balance-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  word-break: break-all;
  line-height: 1.2;
}

/* Wallet Card Footer */
.wallet-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.trade-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.funding-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.funding-status.funded {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.funding-status.needs-funding {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: 1rem;
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.empty-action-btn {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.empty-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Error State */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 1rem;
  grid-column: 1 / -1;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--error-text);
}

.error-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--error-text);
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--error-text);
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.error-retry-btn {
  background: var(--error-text);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.error-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  opacity: 0.9;
}

/* Responsive Design for Wallet Cards */
@media (max-width: 1200px) {
  .modern-wallet-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .modern-wallet-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .modern-wallet-card {
    padding: 1.25rem;
  }
  
  .wallet-balances-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .balance-item {
    padding: 0.75rem;
    gap: 0.75rem;
  }
  
  .balance-icon {
    width: 28px;
    height: 28px;
    font-size: 1rem;
  }
  
  .balance-label {
    font-size: 0.75rem;
  }
  
  .balance-value {
    font-size: 0.875rem;
  }
  
  .wallet-card-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    text-align: center;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .refresh-btn {
    align-self: center;
  }
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 2rem;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header h1 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.login-form label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.login-form input {
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-btn {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1rem;
}

.login-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.login-status {
  margin-top: 1rem;
}

.login-status .status {
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.login-status .status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.login-status .status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Trade Preview Styles */
.trade-preview {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.trade-preview.collapsed {
  display: none;
}

.trade-preview h3 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.trade-statistics {
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card.buy {
  border-left: 4px solid #22c55e;
}

.stat-card.sell {
  border-left: 4px solid #ef4444;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.preview-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.preview-action {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.preview-action .button-icon {
  font-size: 1rem;
}

.preview-action .button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.preview-action .button-text strong {
  font-size: 0.9rem;
}

.preview-action .button-text small {
  font-size: 0.75rem;
  opacity: 0.9;
}
