/* =====================================================
   ARC LP Farm — Premium Dark UI
   ===================================================== */

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

:root {
  --bg: #060c1a;
  --bg2: #0d1526;
  --bg3: #111d35;
  --bg4: #162040;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(0,212,255,0.25);
  --text: #e8edf8;
  --text-2: #8b96b0;
  --text-3: #4d5d7a;
  --accent: #00d4ff;
  --accent-2: #6366f1;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --purple: #8b5cf6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 40px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 30px rgba(0,212,255,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Background Animations ─── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-orb {
  position: fixed; z-index: 0; border-radius: 50%;
  pointer-events: none; filter: blur(80px);
  animation: float 20s ease-in-out infinite;
}
.bg-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  top: -200px; left: -200px;
}
.bg-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.07) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation-delay: -8s;
}
.bg-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,0.05) 0%, transparent 70%);
  top: 50%; left: 50%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ─── Header ─── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 12, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; gap: 24px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
  flex-shrink: 0;
}
.logo-icon { display: flex; }
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px;
}
.logo-accent { color: var(--accent); }
.logo-badge {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em;
  background: rgba(0,212,255,0.12); color: var(--accent);
  border: 1px solid rgba(0,212,255,0.25);
  padding: 2px 6px; border-radius: 4px;
  vertical-align: middle; margin-bottom: 2px;
}

.header-nav {
  display: flex; gap: 4px; flex: 1; justify-content: center;
}
.nav-link {
  text-decoration: none; color: var(--text-2);
  padding: 6px 16px; border-radius: 8px;
  font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); background: rgba(0,212,255,0.1); }

.header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.network-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 500; color: var(--text-2);
}
.network-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-3);
}
.network-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); animation: pulse-dot 2s infinite; }
.network-dot.offline { background: var(--text-3); }
.network-dot.wrong { background: var(--red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.btn-connect {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 600; font-size: 0.875rem;
  border: none; cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-connect:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,212,255,0.3); }
.btn-connect.connected {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ─── Main ─── */
.main {
  position: relative; z-index: 1;
  max-width: 1400px; margin: 0 auto;
  padding: 24px 24px 80px;
}

.price-banner {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}
.price-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,212,255,0.05) 0%, transparent 40%, rgba(99,102,241,0.05) 100%);
  pointer-events: none;
  animation: shimmerBanner 6s ease-in-out infinite alternate;
}
@keyframes shimmerBanner {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

.price-card {
  flex: 1;
  padding: 4px 0;
}
.price-card-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--text-2); text-transform: uppercase; margin-bottom: 8px;
}
.price-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem; font-weight: 700; color: var(--text);
  letter-spacing: -0.5px;
}
.price-sub {
  font-size: 0.75rem; color: var(--text-3); margin-top: 4px;
}

.price-card-ref .price-value { color: var(--accent); }
.price-card-opportunity .price-value { color: var(--green); }

.price-arrow {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--text-3);
}
.discount-badge {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px; padding: 6px 12px;
  color: var(--yellow); font-weight: 700; font-size: 1rem; text-align: center;
}
.discount-badge .discount-label { font-size: 0.65rem; font-weight: 500; opacity: 0.8; }

.token-pair-icon { display: flex; }
.token-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; font-family: 'Space Grotesk', sans-serif;
}
.token-icon.usdc { background: linear-gradient(135deg, #2775ca, #1a5fa0); color: white; }
.token-icon.crcl { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; }
.token-icon-sm {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800;
}
.token-icon-sm.usdc { background: linear-gradient(135deg, #2775ca, #1a5fa0); color: white; }
.token-icon-sm.crcl { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; }

.refresh-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px; cursor: pointer; color: var(--text-2);
  transition: all 0.2s; flex-shrink: 0;
}
.refresh-btn:hover { color: var(--accent); border-color: var(--border-hover); }
.refresh-btn.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Cards ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}
.card:hover { border-color: rgba(0,212,255,0.12); }
.card + .card { margin-top: 16px; }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem; font-weight: 600; color: var(--text);
}

/* ─── Farm Layout ─── */
.farm-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .farm-layout { grid-template-columns: 1fr; }
}

/* ─── Pool Version Toggle ─── */
.pool-version-toggle {
  display: flex; background: var(--bg3); border-radius: 8px; padding: 3px; gap: 2px;
}
.version-btn {
  padding: 5px 14px; border-radius: 6px; border: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-2); background: transparent;
  transition: all 0.2s;
}
.version-btn.active {
  background: var(--bg4); color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0,212,255,0.2);
}

/* ─── Pool Info Row ─── */
.pool-info-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 14px;
}
.pool-stat {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg3); border-radius: 10px; padding: 12px;
}
.pool-stat-label { font-size: 0.7rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.pool-stat-val { font-size: 0.95rem; font-weight: 700; color: var(--text); }

.pool-address-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.pool-label { font-size: 0.75rem; color: var(--text-3); }
.pool-addr-link {
  display: flex; align-items: center; gap: 4px;
  color: var(--accent); text-decoration: none; font-size: 0.8rem; font-family: monospace;
}
.pool-addr-link:hover { text-decoration: underline; }
.uniswap-link {
  color: var(--accent-2); text-decoration: none; font-size: 0.75rem; margin-left: auto;
}
.uniswap-link:hover { text-decoration: underline; }

/* ─── Range Tabs ─── */
.range-tabs {
  display: flex; gap: 8px; margin-bottom: 14px;
}
.range-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text-2);
  font-size: 0.8rem; font-weight: 500; cursor: pointer;
  transition: all 0.2s;
}
.range-tab:hover { border-color: var(--border-hover); color: var(--text); }
.range-tab.active {
  background: rgba(0,212,255,0.08); border-color: rgba(0,212,255,0.3);
  color: var(--accent);
}

.range-desc {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg3); border-radius: 10px; padding: 14px;
  font-size: 0.825rem; color: var(--text-2); line-height: 1.5;
}
.range-desc-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.range-desc strong { color: var(--text); }

/* ─── Price Range Config ─── */
.price-range-config { margin-top: 12px; }
.current-price-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-2); margin-bottom: 12px;
  justify-content: center;
}
.current-price-val { color: var(--accent); font-weight: 700; font-size: 0.95rem; }

.range-inputs {
  display: flex; align-items: center; gap: 10px;
}
.range-input-group { flex: 1; }
.range-input-group label {
  display: block; font-size: 0.75rem; color: var(--text-3);
  margin-bottom: 6px; font-weight: 500;
}
.range-hint { color: var(--text-3); font-size: 0.7rem; }
.price-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s;
  appearance: none;
}
.price-input:focus { outline: none; border-color: var(--accent); }

.range-separator { color: var(--text-3); font-size: 1.2rem; }

.range-presets {
  display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.preset-btn {
  padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text-2); font-size: 0.75rem; cursor: pointer;
  transition: all 0.15s;
}
.preset-btn:hover { border-color: var(--border-hover); color: var(--accent); }

/* ─── Single Sided ─── */
.single-sided-config { margin-top: 12px; }
.info-box {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px; padding: 12px; font-size: 0.8rem; color: var(--text-2);
  line-height: 1.5; margin-bottom: 12px;
}
.info-box svg { flex-shrink: 0; color: var(--accent-2); margin-top: 2px; }
.info-box strong { color: var(--text); }

.single-side-toggle {
  display: flex; background: var(--bg3); border-radius: 10px; padding: 4px; gap: 4px;
}
.side-btn {
  flex: 1; padding: 8px; border-radius: 7px; border: none; cursor: pointer;
  font-size: 0.825rem; font-weight: 600;
  color: var(--text-2); background: transparent; transition: all 0.2s;
}
.side-btn.active { background: var(--bg4); color: var(--text); box-shadow: 0 0 0 1px var(--border-hover); }

/* ─── Amount Inputs ─── */
.amount-inputs { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }

.amount-input-group {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  transition: border-color 0.2s;
}
.amount-input-group:focus-within { border-color: rgba(0,212,255,0.3); }

.amount-label-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.token-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.balance-label { font-size: 0.75rem; color: var(--text-3); }

.amount-input-row { display: flex; align-items: center; gap: 8px; }
.amount-input {
  flex: 1; background: transparent; border: none;
  color: var(--text); font-size: 1.4rem; font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  appearance: none; outline: none;
}
.amount-input::placeholder { color: var(--text-3); }
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.max-btn {
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(0,212,255,0.2);
  background: rgba(0,212,255,0.08); color: var(--accent);
  font-size: 0.7rem; font-weight: 700; cursor: pointer; letter-spacing: 0.05em;
  transition: all 0.15s;
}
.max-btn:hover { background: rgba(0,212,255,0.15); }

.amount-usd { font-size: 0.75rem; color: var(--text-3); margin-top: 6px; }

.amount-divider {
  display: flex; justify-content: center; align-items: center;
  position: relative; height: 28px;
}
.plus-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 14px; z-index: 1;
}

.max-all-btn {
  padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text-2); font-size: 0.75rem; cursor: pointer;
  transition: all 0.15s;
}
.max-all-btn:hover { color: var(--accent); border-color: var(--border-hover); }

/* ─── Fee Estimate ─── */
.fee-estimate {
  border-top: 1px solid var(--border);
  padding-top: 12px; margin-bottom: 16px;
}
.fee-row {
  display: flex; justify-content: space-between;
  font-size: 0.8rem; color: var(--text-2); padding: 3px 0;
}
.fee-row span:last-child { color: var(--text); }

/* ─── Action Area ─── */
.action-area { display: flex; flex-direction: column; gap: 10px; }

.approve-steps { display: flex; gap: 8px; }

.btn-approve {
  flex: 1; padding: 12px; border-radius: 10px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent-2); font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-approve:hover { background: rgba(99,102,241,0.2); }

.btn-primary {
  width: 100%; padding: 14px 24px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 0.95rem;
  border: none; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.btn-primary:hover:not(:disabled)::before { opacity: 1; }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 30px rgba(0,212,255,0.25); }
.btn-primary:disabled {
  background: var(--bg3); color: var(--text-3);
  cursor: not-allowed; transform: none; box-shadow: none;
}

.btn-secondary {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-2); font-size: 0.875rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text); }

.btn-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

/* ─── Quick Links ─── */
.quick-links-card { }
.quick-links-grid { display: flex; flex-direction: column; gap: 8px; }

.quick-link-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  transition: all 0.2s;
}
.quick-link-btn:hover { border-color: var(--border-hover); background: var(--bg4); }
.quick-link-btn svg { margin-left: auto; color: var(--text-3); }

.ql-icon { font-size: 1.3rem; }
.ql-text { display: flex; flex-direction: column; gap: 1px; }
.ql-title { font-size: 0.875rem; font-weight: 600; }
.ql-sub { font-size: 0.72rem; color: var(--text-3); }

/* ─── Strategy Tips ─── */
.strategy-tips { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  padding: 12px 14px; border-radius: 10px; border-left: 3px solid;
  font-size: 0.8rem; color: var(--text-2); line-height: 1.5;
}
.tip-item.tip-green { background: rgba(16,185,129,0.06); border-color: var(--green); }
.tip-item.tip-blue { background: rgba(0,212,255,0.06); border-color: var(--accent); }
.tip-item.tip-purple { background: rgba(139,92,246,0.06); border-color: var(--purple); }
.tip-item.tip-yellow { background: rgba(245,158,11,0.06); border-color: var(--yellow); }
.tip-header { font-weight: 700; color: var(--text); margin-bottom: 4px; font-size: 0.825rem; }

/* ─── Pool Details ─── */
.pool-details-list { display: flex; flex-direction: column; gap: 2px; }
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.8rem; color: var(--text-2);
}
.detail-row:last-child { border-bottom: none; }
.detail-val { color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 4px; }
.detail-addr { color: var(--accent); text-decoration: none; font-family: monospace; font-size: 0.78rem; }
.detail-addr:hover { text-decoration: underline; }

/* ─── Positions Tab ─── */
.positions-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.positions-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem; font-weight: 700;
}
.positions-grid { display: flex; flex-direction: column; gap: 14px; }

.empty-state {
  text-align: center; padding: 80px 20px;
  background: var(--bg2); border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.empty-sub { color: var(--text-2); font-size: 0.875rem; margin-bottom: 20px; }

/* ─── Position Card ─── */
.position-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  transition: all 0.2s;
}
.position-card:hover { border-color: rgba(0,212,255,0.15); }

.position-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.position-id { font-size: 0.75rem; color: var(--text-3); font-family: monospace; }
.position-pair { font-size: 1rem; font-weight: 700; }
.position-version-badge {
  padding: 3px 10px; border-radius: 6px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
}
.position-version-badge.v3 { background: rgba(0,212,255,0.1); color: var(--accent); }
.position-version-badge.v4 { background: rgba(139,92,246,0.1); color: var(--purple); }

.position-range-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; font-size: 0.8rem;
}
.range-indicator {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--bg3); position: relative; overflow: hidden;
}
.range-fill {
  position: absolute; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.range-price { color: var(--text-2); }

.position-amounts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.pos-amount-box {
  background: var(--bg3); border-radius: 10px; padding: 12px;
}
.pos-amount-label { font-size: 0.7rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.pos-amount-val { font-size: 1rem; font-weight: 700; }

.position-fees {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
  border-radius: 10px; padding: 12px; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.fees-label { font-size: 0.75rem; color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.fees-amounts { font-size: 0.875rem; color: var(--text); }

.position-actions { display: flex; gap: 8px; }
.btn-collect {
  flex: 1; padding: 10px; border-radius: 8px;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  color: var(--green); font-weight: 600; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-collect:hover { background: rgba(16,185,129,0.18); }
.btn-remove {
  flex: 1; padding: 10px; border-radius: 8px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: var(--red); font-weight: 600; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-remove:hover { background: rgba(239,68,68,0.15); }
.btn-increase {
  flex: 1; padding: 10px; border-radius: 8px;
  background: rgba(0,212,255,0.08); border: 1px solid rgba(0,212,255,0.2);
  color: var(--accent); font-weight: 600; font-size: 0.8rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-increase:hover { background: rgba(0,212,255,0.15); }

/* ─── Analytics ─── */
.analytics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 0;
}
@media (max-width: 900px) { .analytics-grid { grid-template-columns: repeat(2, 1fr); } }

.analytics-card { padding: 20px 20px; }
.analytics-label {
  font-size: 0.75rem; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.analytics-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem; font-weight: 700; color: var(--text);
}
.analytics-sub { font-size: 0.75rem; color: var(--text-3); margin-top: 4px; }

/* ─── Pool Compare ─── */
.pool-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.pool-compare-item {
  background: var(--bg3); border-radius: 12px; padding: 16px;
}
.pc-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 600; margin-bottom: 12px;
}
.pc-badge {
  padding: 2px 8px; border-radius: 5px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
}
.pc-badge.v3 { background: rgba(0,212,255,0.15); color: var(--accent); }
.pc-badge.v4 { background: rgba(139,92,246,0.15); color: var(--purple); }
.pc-stats { display: flex; flex-direction: column; gap: 6px; }
.pc-stat {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-2);
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pc-stat:last-child { border-bottom: none; }
.pc-stat span:last-child { color: var(--text); font-weight: 500; }

/* ─── Steps Guide ─── */
.steps-list { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.step-item { display: flex; gap: 14px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white; font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.step-content { }
.step-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.step-desc { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; }
.inline-link { color: var(--accent); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* ─── Tab Content ─── */
.tab-content { }

/* ─── Toast ─── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  padding: 14px 18px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); font-size: 0.875rem; max-width: 360px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  display: flex; align-items: flex-start; gap: 10px;
}
.toast.success { border-color: rgba(16,185,129,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.info { border-color: rgba(0,212,255,0.3); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }
@keyframes slideOut { to { transform: translateX(120%); opacity: 0; } }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 440px;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-2);
  font-size: 1.4rem; cursor: pointer; line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }

.tx-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.tx-step {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 10px; background: var(--bg3);
}
.tx-step-icon { font-size: 1.1rem; }
.tx-step-label { font-size: 0.875rem; font-weight: 500; }
.tx-step-status { margin-left: auto; font-size: 0.8rem; }
.tx-step.pending .tx-step-status { color: var(--yellow); }
.tx-step.done .tx-step-status { color: var(--green); }
.tx-step.error .tx-step-status { color: var(--red); }

.tx-hash-row {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.8rem; color: var(--text-2);
}
.tx-hash-link {
  color: var(--accent); text-decoration: none; font-family: monospace; font-size: 0.78rem;
}
.tx-hash-link:hover { text-decoration: underline; }

/* ─── Utilities ─── */
.hidden { display: none !important; }

input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .price-banner { flex-wrap: wrap; }
  .price-card { min-width: calc(50% - 8px); }
  .price-arrow { display: none; }
  .pool-info-row { grid-template-columns: repeat(2, 1fr); }
  .pool-compare-grid { grid-template-columns: 1fr; }
}

/* ─── Mode Toggle ─────────────────────────────────────────────────────────── */
.mode-toggle {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.mode-btn:hover:not(.active) { color: var(--text); }

/* ─── Bot Connect Panel (replaces old config bar) ─────────────────────────── */
.bot-connect-panel { margin-bottom: 24px; }
.bot-connect-card { padding: 28px 28px 24px; }

.bot-connect-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}
.bot-connect-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(99,102,241,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.bot-connect-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px;
}
.bot-connect-sub {
  font-size: 0.82rem; color: var(--text-2); line-height: 1.4;
}

.bot-connect-fields {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.bot-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}
.bot-field label {
  font-size: 0.75rem;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.bot-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.875rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.bot-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,212,255,0.08); }
.bot-input::placeholder { color: var(--text-3); }

.bot-connect-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.bot-connect-status-text {
  font-size: 0.82rem;
  color: var(--text-3);
  white-space: nowrap;
}


/* ─── Bot State Badge ────────────────────────────────────────────────────── */
.bot-state-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid currentColor;
}
.state-running { color: var(--green); border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.08); }
.state-paused  { color: var(--yellow); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.state-stopped { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.state-idle    { color: var(--text-3); border-color: var(--border); background: transparent; }

/* ─── Bot Dashboard ──────────────────────────────────────────────────────── */
.bot-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bot-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
}
.bot-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.bot-control-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-bot-start, .btn-bot-pause, .btn-bot-stop, .btn-bot-collect {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-bot-start  { background: rgba(16,185,129,0.15); color: var(--green); border-color: rgba(16,185,129,0.3); }
.btn-bot-start:hover:not(:disabled) { background: rgba(16,185,129,0.25); }
.btn-bot-pause  { background: rgba(245,158,11,0.15); color: var(--yellow); border-color: rgba(245,158,11,0.3); }
.btn-bot-pause:hover:not(:disabled) { background: rgba(245,158,11,0.25); }
.btn-bot-stop   { background: rgba(239,68,68,0.15); color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-bot-stop:hover:not(:disabled) { background: rgba(239,68,68,0.25); }
.btn-bot-collect { background: rgba(0,212,255,0.12); color: var(--accent); border-color: rgba(0,212,255,0.3); }
.btn-bot-collect:hover { background: rgba(0,212,255,0.2); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Bot Stats Grid ─────────────────────────────────────────────────────── */
.bot-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.bot-stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 14px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.bot-stat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.bot-stat-icon { font-size: 1.3rem; line-height: 1; margin-bottom: 2px; }
.bot-stat-label { font-size: 0.68rem; color: var(--text-3); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.bot-stat-val { font-size: 1.05rem; font-weight: 700; color: var(--text); font-family: 'Space Grotesk', sans-serif; }

/* ─── Bot Info Row ───────────────────────────────────────────────────────── */
.bot-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 16px;
}
@media (max-width: 900px) { .bot-info-row { grid-template-columns: 1fr; } }
.bot-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.bot-price-row:last-child { border-bottom: none; }
.bot-price-card, .bot-cfg-card, .bot-activity-card { min-height: 200px; }

/* ─── Activity Log ───────────────────────────────────────────────────────── */
.activity-log {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}
.activity-log::-webkit-scrollbar { width: 4px; }
.activity-log::-webkit-scrollbar-track { background: transparent; }
.activity-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.activity-entry {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  transition: background 0.3s;
}
.activity-entry.new { background: rgba(0,212,255,0.08); }
.activity-time { color: var(--text-3); white-space: nowrap; font-family: monospace; }
.activity-msg { color: var(--text-2); flex: 1; }

/* ─── Position actions (bot mode) ────────────────────────────────────────── */
.btn-collect, .btn-remove {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-collect { background: rgba(0,212,255,0.1); color: var(--accent); border-color: rgba(0,212,255,0.3); }
.btn-collect:hover { background: rgba(0,212,255,0.2); }
.btn-remove { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-remove:hover { background: rgba(239,68,68,0.2); }
.position-actions { display: flex; gap: 8px; margin-top: 12px; }
.position-fees { padding: 8px 0; display: flex; justify-content: space-between; font-size: 0.82rem; }
.fees-label { color: var(--text-3); }
.fees-amounts { color: var(--green); font-weight: 500; }

/* ─── Spinning refresh ───────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin 0.8s linear infinite; }
@keyframes slideOut { to { transform: translateX(110%); opacity: 0; } }

