/* =========================================
   1. VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
  /* Palette */
  --bg-dark: #0b0c15;
  --bg-gradient: radial-gradient(circle at top right, #1a1f35 0%, #0b0c15 60%);
  --card-bg: rgba(30, 34, 48, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  
  /* Brand Colors */
  --accent: #2d6cdf;
  --accent-glow: rgba(45, 108, 223, 0.4);
  --success: #00e0ff;
  --warning: #f9e061;
  --danger: #ff5555;
  
  /* Text */
  --text-main: #ffffff;
  --text-muted: #8fa2b7;
  
  /* Effects */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --font-main: 'Inter', sans-serif;
}

/* =========================================
   2. RESET & BASE
   ========================================= */
* { box-sizing: border-box; outline: none; }

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden; 
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* =========================================
   3. LAYOUT (APP SHELL)
   ========================================= */
.app-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0; /* Prevents grid blowout */
}

/* Header & Nav Groups */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap; /* Mobile friendly */
  gap: 15px;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* =========================================
   4. SIDEBAR COMPONENT
   ========================================= */
.sidebar {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 50;
}

.logo-area {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-muted);
  border-radius: 12px;
  transition: all var(--transition-medium);
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.05);
  color: #fff;
  transform: translateX(5px);
}

.nav-link.active {
  border-left: 3px solid var(--success);
}

/* =========================================
   5. UI COMPONENTS (Glass, Cards, Buttons)
   ========================================= */
/* Glass Panel */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--glass-shadow);
}

/* Stat Cards */
.overview-grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card h3 {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, #ccc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Inputs & Selects */
input, select, .action-input, .network-select {
  appearance: none;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff !important;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
  outline: none;
  width: 100%;
}

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

/* Network Select Specifics */
.network-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  text-align: center;
  min-width: 160px;
  cursor: pointer;
}
.network-select option { background: #1a1f35; color: #fff; padding: 10px; }

/* Buttons */
.btn-primary, .action-btn, .btn-scan, .btn-claim {
  border: none;
  border-radius: 12px;
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-primary {
  background: var(--accent);
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-connected {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: 0.2s;
}
.btn-connected:hover { background: rgba(255, 255, 255, 0.15); }

.btn-ghost {
  background: rgba(255,255,255,0.05); color: white;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 20px; border-radius: 12px;
  cursor: pointer; font-weight: 600;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* Account Dropdown */
.btn-account-wrapper { position: relative; }
.account-dropdown {
  position: absolute;
  top: 110%; right: 0;
  width: 240px;
  background: #1a1f35;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  animation: fadeIn 0.15s ease-out;
}
.account-dropdown.show { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 8px;
  color: var(--text-muted); cursor: pointer;
  transition: 0.2s; font-size: 0.9rem;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.menu-divider { height: 1px; background: rgba(255, 255, 255, 0.1); margin: 6px 0; }

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

/* =========================================
   6. TABLES
   ========================================= */
.table-container { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; min-width: 600px; } /* Ensure min width for scroll */
th {
  text-align: left; color: var(--text-muted);
  font-size: 0.75rem; text-transform: uppercase;
  padding: 16px; border-bottom: 1px solid var(--card-border);
}
td {
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

.asset-flex { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.asset-icon { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.3); object-fit: cover; }
.apy-badge {
  background: rgba(45, 108, 223, 0.15); color: #6495ed;
  padding: 4px 8px; border-radius: 6px; font-size: 0.85rem; font-weight: 600;
}
.apy-badge.borrow { background: rgba(255, 179, 71, 0.15); color: #ffb347; }

/* =========================================
   7. MODAL (WALLET & OTHERS)
   ========================================= */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px);
  z-index: 9999; display: none; opacity: 0; transition: opacity 0.3s;
  align-items: center; justify-content: center;
  padding: 20px; /* Safe area for mobile */
}
.modal-overlay.open { display: flex; opacity: 1; }

.modal-card {
  background: #14161f;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transform: scale(0.95); transition: transform 0.3s;
  position: relative;
}
.modal-overlay.open .modal-card { transform: scale(1); }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0; }

.btn-close {
  background: rgba(255,255,255,0.05); border: none; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.wallet-grid { display: grid; gap: 12px; }
.wallet-btn {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  padding: 16px 20px; border-radius: 16px; cursor: pointer;
  transition: all 0.2s; color: #fff; font-weight: 600;
}
.wallet-btn:hover { background: rgba(255,255,255,0.08); border-color: var(--accent); transform: translateX(5px); }
.wallet-info { display: flex; align-items: center; gap: 16px; }
.wallet-badge { font-size: 0.7rem; background: rgba(45, 108, 223, 0.2); color: var(--accent); padding: 4px 8px; border-radius: 6px; }

/* =========================================
   8. PAGE SPECIFIC: DASHBOARD
   ========================================= */
/* Action Panel (Sidebar Widget) */
.action-panel {
  background: rgba(20, 22, 30, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 16px; padding: 16px; margin-top: 10px;
  display: flex; flex-direction: column; gap: 12px;
}
.action-panel h4 { margin: 0 0 4px 0; color: #fff; font-size: 0.9rem; display: flex; align-items: center; gap:6px; }
.action-btn { background: var(--accent); width: 100%; font-size: 0.85rem; }
.action-btn:hover { background: #3a7bf0; }
.action-status { font-size: 0.75rem; color: var(--text-muted); text-align: center; min-height: 1.2em; }

/* Simulation Panel */
.sim-panel { background: linear-gradient(145deg, rgba(30,34,48,0.6), rgba(20,22,30,0.8)); }
.sim-controls { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; margin-top: 20px; }
.sim-controls .input-group { flex: 1; min-width: 140px; }
.btn-simulate {
  background: transparent; border: 1px solid var(--warning);
  color: var(--warning); padding: 0 24px; height: 48px;
  border-radius: 10px; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.btn-simulate:hover { background: rgba(249, 224, 97, 0.1); transform: translateY(-1px); }

/* Health Bars */
.health-wrap { margin-top: 10px; }
.bar-container {
  background: rgba(255,255,255,0.05); height: 10px;
  border-radius: 5px; overflow: hidden; margin-top: 12px; position: relative;
}
.bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--warning), #ffb347);
  width: 0%; transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 5px; box-shadow: 0 0 10px rgba(249, 224, 97, 0.4);
}
.bar-fill.simulated { background: rgba(249, 224, 97, 0.3); position: absolute; top: 0; left: 0; z-index: 0; }
.bar-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; }

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333; transition: .4s; border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.1);
}
.slider:before {
  position: absolute; content: ""; height: 16px; width: 16px;
  left: 3px; bottom: 2px; background-color: white;
  transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--success); border-color: var(--success); }
input:checked + .slider:before { transform: translateX(18px); }

/* =========================================
   9. PAGE SPECIFIC: MARKETS
   ========================================= */
.util-bar-bg {
  width: 100px; height: 6px; background: rgba(255,255,255,0.1);
  border-radius: 3px; margin-top: 6px; overflow: hidden;
}
.util-bar-fill { height: 100%; background: var(--success); width: 0%; border-radius: 3px; }
.text-green { color: var(--success); }
.text-yellow { color: var(--warning); }

/* =========================================
   10. PAGE SPECIFIC: VAULT
   ========================================= */
.vault-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vault-stat-card {
  background: linear-gradient(180deg, rgba(30,34,48,0.8) 0%, rgba(249, 224, 97, 0.05) 100%);
  border: 1px solid rgba(249, 224, 97, 0.2);
  border-radius: 24px; padding: 30px; text-align: center;
}
.vault-value {
  font-size: 2.5rem; font-weight: 700; color: var(--warning);
  margin: 10px 0; text-shadow: 0 0 20px rgba(249, 224, 97, 0.3);
}
.btn-claim {
  background: var(--warning); color: #000; width: 100%; margin-top: 15px;
}
.btn-claim:disabled { opacity: 0.5; cursor: not-allowed; background: #444; color: #888; }
.apy-list { margin-top: 20px; text-align: left; }
.apy-item {
  display: flex; justify-content: space-between;
  padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.apy-item:last-child { border-bottom: none; }
.apy-val { color: var(--warning); font-weight: 600; }
.vibe-card { border: 1px solid rgba(249, 224, 97, 0.2); background: linear-gradient(180deg, rgba(30,34,48,0.8) 0%, rgba(249, 224, 97, 0.05) 100%); }
.vibe-title { color: var(--warning); display: flex; align-items: center; gap: 8px;}

/* =========================================
   11. PAGE SPECIFIC: LIQUIDATOR
   ========================================= */
.scanner-input-group { display: flex; gap: 10px; margin-top: 15px; }
.scanner-input { flex-grow: 1; font-family: monospace; }
.scanner-input:focus { border-color: var(--danger); }
.btn-scan {
  background: var(--danger); color: #fff; padding: 0 30px;
}
.btn-scan:hover { background: #ff3333; box-shadow: 0 0 15px rgba(255, 85, 85, 0.4); }

.target-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; }
.t-stat { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.t-stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.t-stat-val { font-size: 1.2rem; font-weight: 700; margin-top: 5px; }

.hf-container { margin-bottom: 25px; }
.hf-bar-bg { height: 8px; background: #333; border-radius: 4px; overflow: hidden; display:flex; }
.hf-bar-danger { width: 33%; background: var(--danger); height: 100%; }
.hf-bar-warn { width: 33%; background: var(--warning); height: 100%; }
.hf-bar-safe { width: 34%; background: var(--success); height: 100%; }
.hf-marker { width: 4px; height: 16px; background: #fff; margin-top: -12px; position: relative; transition: left 0.5s; box-shadow: 0 0 10px #fff; }

.liq-tables-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.liq-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.02); border-radius: 10px; margin-bottom: 8px; border: 1px solid transparent; }
.liq-row:hover { border-color: rgba(255,255,255,0.1); }
.liq-action-btn { background: rgba(255, 85, 85, 0.15); color: var(--danger); border: 1px solid var(--danger); padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.liq-action-btn:hover { background: var(--danger); color: #fff; }

.execution-panel { margin-top: 20px; background: rgba(255, 85, 85, 0.05); border: 1px solid var(--danger); padding: 20px; border-radius: 16px; display: none; }
.execution-controls { display: flex; gap: 10px; margin-top: 10px; }
.execution-controls > div { flex: 1; }

/* =========================================
   12. LANDING PAGE (Index) SPECIFIC
   ========================================= */
/* Navbar override for landing */
.landing-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 40px; max-width: 1280px; margin: 0 auto;
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px);
}
.landing-links a {
  color: var(--text-muted); text-decoration: none; margin-left: 30px;
  font-weight: 500; transition: color 0.2s;
}
.landing-links a:hover { color: #fff; }
.btn-launch { background: var(--accent); color: white; padding: 10px 24px; border-radius: 12px; font-weight: 600; box-shadow: 0 4px 15px var(--accent-glow); }

.hero { text-align: center; padding: 100px 20px; max-width: 1000px; margin: 0 auto; }
.hero h1 {
  font-size: 4rem; line-height: 1.1; margin-bottom: 20px;
  background: linear-gradient(180deg, #fff, #a5b4fc);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px auto; line-height: 1.6; }

.stats-strip { display: flex; justify-content: center; gap: 60px; margin-bottom: 60px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item .stat-num { font-size: 2.5rem; font-weight: 800; color: #fff; }
.stat-item .stat-label { color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; margin-top: 5px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1280px; margin: 0 auto 100px auto; padding: 0 20px; }
.feature-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 30px; border-radius: 24px; transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.icon-box {
  width: 50px; height: 50px; background: rgba(45, 108, 223, 0.1);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--accent); font-size: 1.5rem;
}

footer { border-top: 1px solid var(--card-border); padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* =========================================
   13. GLOBAL RESPONSIVENESS (MOBILE/TABLET)
   ========================================= */
@media (max-width: 900px) {
  /* Layout reset */
  .app-container { grid-template-columns: 1fr; padding: 15px; gap: 20px; }
  
  /* Sidebar becomes horizontal scroll nav */
  .sidebar {
    height: auto; position: relative; top: 0;
    flex-direction: row; overflow-x: auto;
    padding-bottom: 10px; white-space: nowrap;
    align-items: center;
    border-radius: 16px;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .logo-area { margin-bottom: 0; margin-right: 20px; font-size: 1.2rem; }
  /* .action-panel { display: none; Hide sidebar widgets on mobile } */
  .sidebar .nav-link { padding: 10px 14px; font-size: 0.9rem; }
  
  /* Grids to single column */
  .vault-grid, .liq-tables-grid { grid-template-columns: 1fr; }
  
  /* Hero Text */
  .hero h1 { font-size: 2.5rem; }
  .landing-links { display: none; }
  
  /* Buttons full width on mobile actions */
  .execution-controls { flex-direction: column; }
  
  /* Header Adjustments */
  header { flex-direction: column; align-items: flex-start; gap: 15px; }
  .nav-group { width: 100%; justify-content: space-between; }
  .network-select { flex-grow: 1; }
}
/* --- NUEVOS ESTILOS PARA ACTION PANEL EN MAIN CONTENT --- */

.trade-grid {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

/* En PC se ve horizontal y bonito */
@media (min-width: 901px) {
    .action-panel {
        background: rgba(20, 22, 30, 0.6);
        border: 1px solid var(--card-border);
        border-radius: 24px; /* Igual que glass-panel */
        padding: 24px;
        margin-top: 0; /* Reset margen anterior */
    }
}

/* En Móvil se ve vertical (stack) para que sea fácil de tocar */
@media (max-width: 900px) {
  /* Aseguramos que se vea */
  .action-panel {
      display: flex !important; /* Forzar visibilidad */
      background: var(--card-bg);
      border: 1px solid var(--card-border);
      border-radius: 16px;
      padding: 16px;
  }
  
  .trade-grid {
      flex-direction: column;
      gap: 15px;
      align-items: stretch; /* Estira los inputs al ancho total */
  }

  .trade-grid .input-group {
      width: 100%;
  }

  /* Botón grande y fácil de tocar en móvil */
  #btnQuickExecute {
      width: 100%;
      padding: 14px;
      margin-top: 5px;
  }
}
/* ... [KEEP ALL PREVIOUS CSS] ... */

/* =========================================
   14. DOCS SPECIFIC STYLES
   ========================================= */
.doc-section { margin-bottom: 30px; line-height: 1.6; }
.doc-header { color: var(--success); font-size: 1.2rem; margin-top: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; margin-bottom: 20px; }

.doc-list { list-style: disc; padding-left: 20px; color: var(--text-muted); }
.doc-list li { margin-bottom: 8px; }
.doc-list strong { color: #fff; }

.code-tag {
  font-family: monospace;
  background: rgba(0, 224, 255, 0.1);
  color: var(--success);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.doc-callout {
  background: rgba(45, 108, 223, 0.1);
  border-left: 4px solid var(--accent);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  color: #fff;
}

/* Docs Table */
.doc-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.doc-table th { background: rgba(0,0,0,0.3); color: #fff; text-align: left; padding: 12px; }
.doc-table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.9rem; }
.doc-table tr:last-child td { border-bottom: none; }

/* Timeline */
.doc-timeline { margin-top: 20px; border-left: 2px solid rgba(255,255,255,0.1); padding-left: 20px; }
.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item::before {
  content: ''; position: absolute; left: -25px; top: 5px;
  width: 8px; height: 8px; background: var(--text-muted); border-radius: 50%;
}
.timeline-item.active::before { background: var(--success); box-shadow: 0 0 10px var(--success); }
.timeline-date { font-weight: 700; color: #fff; margin-bottom: 5px; font-size: 0.9rem; }
.timeline-content { color: var(--text-muted); font-size: 0.9rem; }
/* ... (Tus estilos existentes) ... */

/* ... (Mantén todo lo anterior hasta llegar a la sección SWAP) ... */

/* =========================================
   15. GOD TIER SWAP UI (REMASTERED)
   ========================================= */

.swap-container {
  max-width: 480px;
  margin: 40px auto; /* Más espacio arriba */
  position: relative;
}

/* El fondo brillante detrás del swap (Aura) */
.swap-container::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(45, 108, 223, 0.2) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.swap-card {
  background: rgba(20, 22, 30, 0.7); /* Más oscuro para contraste */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden; /* Para contener brillos */
}

/* Cabecera del Swap */
.swap-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  padding: 0 4px;
}
.swap-header h3 { margin: 0; font-size: 1.1rem; color: #fff; font-weight: 600; }
.settings-icon { 
  opacity: 0.6; cursor: pointer; transition: 0.3s; font-size: 1.2rem;
}
.settings-icon:hover { opacity: 1; transform: rotate(90deg); color: var(--success); }

/* Cajas de Input (Token Input Box) */
.token-input-box {
  background: rgba(0, 0, 0, 0.4); /* Fondo profundo */
  border-radius: 20px;
  padding: 16px 20px;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px; /* Espacio mínimo para el botón de flecha */
}

.token-input-box:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.05);
}

.token-input-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(45, 108, 223, 0.2);
  background: rgba(0, 0, 0, 0.6);
}

/* Etiquetas y Balances */
.token-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.input-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.balance-label { font-size: 0.8rem; color: var(--text-muted); cursor: pointer; }
.balance-label:hover { color: var(--accent); }

/* El Input Gigante */
.swap-input {
  background: transparent !important;
  border: none !important;
  font-size: 2rem !important; /* GIGANTE */
  font-weight: 700;
  color: #fff !important;
  padding: 0 !important;
  width: 60%;
  height: auto;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.swap-input::placeholder { color: rgba(255,255,255,0.15); }

/* Selector de Token (Píldora) */
.token-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 12px 6px 8px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.token-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.token-badge span { font-weight: 700; font-size: 1.1rem; color: #fff; }
.token-badge img { width: 24px; height: 24px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

/* Flecha Flotante */
.swap-arrow {
  display: flex; justify-content: center; align-items: center;
  height: 12px; z-index: 10; position: relative;
}
.btn-arrow {
  background: #1a1f35; /* Color sólido para tapar la unión */
  border: 4px solid var(--bg-dark); /* Borde del color del fondo de la página */
  width: 40px; height: 40px;
  border-radius: 12px;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.btn-arrow:hover { 
  transform: scale(1.1) rotate(180deg);
  background: var(--accent);
  color: #fff;
  border-color: #1a1f35;
}

/* Detalles del Swap (Acordeón) */
.swap-details {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 16px;
  margin-top: 20px;
}
.detail-row {
  display: flex; justify-content: space-between;
  margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted);
}
.detail-row:last-child { margin-bottom: 0; }
.detail-val { color: #fff; font-weight: 500; font-family: monospace; }

/* Botón de Acción Principal */
#btnSwapAction, #btnZapAction {
  width: 100%;
  margin-top: 20px;
  padding: 18px;
  font-size: 1.2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #1e4b9e 100%);
  box-shadow: 0 8px 20px rgba(45, 108, 223, 0.3);
  border: none;
  transition: all 0.2s;
}
#btnSwapAction:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(45, 108, 223, 0.5);
  filter: brightness(1.1);
}
#btnSwapAction:disabled {
  background: #333; color: #666; box-shadow: none; transform: none; cursor: not-allowed;
}

/* Tabs Estilizados */
.swap-tabs {
  display: flex;
  background: rgba(0,0,0,0.4);
  padding: 4px;
  border-radius: 20px;
  margin-bottom: 25px;
  border: 1px solid rgba(255,255,255,0.05);
}
.swap-tab {
  flex: 1; text-align: center; padding: 12px;
  border-radius: 16px; cursor: pointer;
  font-weight: 600; color: var(--text-muted);
  transition: all 0.3s;
}
.swap-tab:hover { color: #fff; }
.swap-tab.active {
  background: var(--card-bg);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Animación de carga para precio */
@keyframes pulse { 0% { opacity:0.5; } 50% { opacity:1; } 100% { opacity:0.5; } }
.loading-price { animation: pulse 1.5s infinite; }
/* =========================================
   16. PRO SWAP UI (GOD TIER)
   ========================================= */

/* Layout de 2 columnas para Desktop */
.pro-dex-grid {
  display: grid;
  grid-template-columns: 1fr 420px; /* Gráfico flexible | Swap fijo */
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .pro-dex-grid { grid-template-columns: 1fr; }
  .chart-panel { display: none; /* Ocultar gráfico en móvil para limpieza */ }
  .swap-container-pro { margin: 0 auto; width: 100%; max-width: 420px; }
}

/* Panel del Gráfico */
.chart-panel {
  min-height: 400px;
  display: flex; flex-direction: column;
}
.chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 1px solid var(--card-border);
}
.chart-intervals {
  display: flex; gap: 5px; background: rgba(0,0,0,0.3);
  padding: 4px; border-radius: 8px;
}
.chart-intervals span {
  padding: 4px 10px; border-radius: 6px; font-size: 0.75rem;
  color: var(--text-muted); cursor: pointer; transition: 0.2s;
}
.chart-intervals span:hover, .chart-intervals span.active {
  background: var(--card-bg); color: #fff;
}

/* Panel de Swap Pro */
.swap-card-pro {
  background: #13161f; /* Fondo más sólido para contraste */
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.swap-header-pro {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 15px;
}
.swap-header-pro h3 { margin: 0; font-size: 1.1rem; color: #fff; }

/* Inputs Pro */
.token-input-box-pro {
  background: #0b0c15; /* Muy oscuro */
  border-radius: 16px;
  padding: 16px;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.token-input-box-pro:focus-within {
  border-color: var(--accent);
  background: #0f111a;
}

.token-flex-main {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}

.swap-input-pro {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 2rem;
  font-weight: 600;
  color: #fff !important;
  width: 60%;
}
.swap-input-pro::placeholder { color: #444; }

.token-badge-pro {
  display: flex; align-items: center; gap: 8px;
  background: #2c2f3e;
  padding: 6px 12px 6px 8px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: 0.2s;
}
.token-badge-pro:hover { background: #3a3e52; }

.usd-approx {
  font-size: 0.8rem; color: var(--text-muted);
  margin-top: 4px; text-align: left;
}

/* Botón central */
.swap-arrow-pro {
  display: flex; justify-content: center;
  margin: -14px 0; z-index: 10; position: relative;
}
.btn-arrow-pro {
  background: #13161f;
  border: 4px solid #13161f;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--text-muted);
  background-color: #2c2f3e;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: 0.2s;
}
.btn-arrow-pro:hover { background-color: var(--accent); color: #fff; }

/* Botón Acción Grande */
.btn-primary-pro {
  background: var(--accent);
  color: #fff; border: none;
  width: 100%; border-radius: 16px;
  padding: 18px; font-size: 1.2rem; font-weight: 600;
  margin-top: 15px; cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: 0.2s;
}
.btn-primary-pro:hover { transform: translateY(-2px); }
.btn-primary-pro:disabled { background: #333; color: #666; box-shadow: none; transform: none; }
/* ... (Tus estilos anteriores) ... */

/* =========================================
   15. PAGE SPECIFIC: FARM & SOUS CHEF
   ========================================= */
.farm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }

.farm-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 24px; position: relative;
  overflow: hidden; transition: transform 0.3s, border-color 0.3s;
}
.farm-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.farm-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.icon-stack { display: flex; align-items: center; }
.icon-stack img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #1a1f35; }
.icon-stack img:nth-child(2) { margin-left: -15px; z-index: 0; }
.icon-stack img:nth-child(1) { z-index: 1; }

.farm-badge {
  background: rgba(45, 108, 223, 0.2); color: var(--accent);
  padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.farm-badge.hot { background: rgba(249, 224, 97, 0.2); color: var(--warning); }

.farm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; }
.stat-row { display: flex; flex-direction: column; }
.stat-label-sm { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.stat-val-lg { font-size: 1.2rem; font-weight: 700; color: #fff; }

.harvest-box {
  background: rgba(0,0,0,0.2); border-radius: 16px; padding: 15px;
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px;
}
.btn-harvest {
  background: var(--success); color: #000; border: none;
  padding: 8px 16px; border-radius: 8px; font-weight: 700; cursor: pointer;
  font-size: 0.85rem;
}
.btn-harvest:disabled { opacity: 0.5; cursor: not-allowed; }

/* Sous Chef Specific */
.chef-card { border-top: 4px solid var(--warning); background: linear-gradient(145deg, rgba(30,34,48,0.8), rgba(249,224,97,0.05)); }
/* MINI TOKEN SELECTOR */
.token-select-mini {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    appearance: none; /* Quita la flecha por defecto fea */
    text-align: center;
    min-width: 80px;
}
.token-select-mini:hover {
    background: rgba(255, 255, 255, 0.2);
}
.token-select-mini option {
    background: #1a1f35;
    color: #fff;
}
/* --- DASHBOARD WIDGET PRO EXTRAS --- */
.mini-slippage-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mini-slippage-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent);
}