/* ═══ CALXT Ecosystem — Professional Stylesheet ═══ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #0a0d12;
  --bg-secondary: #0f1318;
  --bg-card: rgba(18, 22, 30, 0.85);
  --bg-card-solid: #12161e;
  --bg-card-hover: #1a1f2e;
  --bg-input: #151a24;
  --bg-input-focus: #1a2030;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(240, 185, 11, 0.3);

  --text-primary: #edf0f4;
  --text-secondary: #8b95a5;
  --text-muted: #4a5568;
  --text-dim: #2d3748;

  --accent: #f0b90b;
  --accent-hover: #d4a30a;
  --accent-dim: rgba(240, 185, 11, 0.12);
  --accent-glow: rgba(240, 185, 11, 0.25);

  --purple: #e040fb;
  --purple-dim: rgba(224, 64, 251, 0.12);
  --green: #0ecb81;
  --green-dim: rgba(14, 203, 129, 0.12);
  --red: #f6465d;
  --red-dim: rgba(246, 70, 93, 0.12);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.12);

  --gradient-primary: linear-gradient(135deg, #f0b90b 0%, #e040fb 100%);
  --gradient-card: linear-gradient(135deg, rgba(240, 185, 11, 0.05) 0%, rgba(224, 64, 251, 0.05) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(240, 185, 11, 0.03) 0%, rgba(224, 64, 251, 0.03) 100%);

  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(240, 185, 11, 0.08);

  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --topbar-height: 64px;

  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background gradient effect */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, rgba(240, 185, 11, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(224, 64, 251, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ═══ Glass Card ═══ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  border-color: var(--border-hover);
}

/* ═══ Sidebar ═══ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: width var(--transition-slow), transform var(--transition-slow);
  overflow: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.brand-logo {
  flex-shrink: 0;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.25);
}

.brand-icon.small {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
  display: none;
}

.sidebar-toggle:hover {
  color: var(--text-primary);
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 12px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  margin: 2px 0;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-link svg {
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  background: var(--purple-dim);
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.calxt-price-widget {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--gradient-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.price-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.price-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

/* ═══ Main Wrapper ═══ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  transition: margin-left var(--transition-slow);
}

/* ═══ Top Bar ═══ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: var(--topbar-height);
  background: rgba(10, 13, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.network-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--green-dim);
  border: 1px solid rgba(14, 203, 129, 0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.net-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(14, 203, 129, 0.5);
  animation: pulse-dot 2s infinite;
}

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

/* ═══ Content ═══ */
.content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ═══ Views ═══ */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

/* ═══ Buttons ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-gradient {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.2);
}

.btn-gradient:hover {
  box-shadow: 0 6px 24px rgba(240, 185, 11, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(246, 70, 93, 0.3);
}

.btn-danger-outline:hover {
  background: var(--red-dim);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: var(--radius-xs);
}

.btn-inline {
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition);
}

.btn-inline:hover {
  background: var(--accent);
  color: #0a0d12;
}

.icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.full-width { width: 100%; }

.btn-trio {
  display: flex;
  gap: 8px;
}

.btn-trio .btn {
  flex: 1;
}

/* ═══ Hero Stats ═══ */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.hero-stat:hover::before {
  opacity: 1;
}

.hero-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-balance { background: var(--accent-dim); color: var(--accent); }
.icon-supply { background: var(--purple-dim); color: var(--purple); }
.icon-staked { background: var(--green-dim); color: var(--green); }
.icon-ai { background: var(--blue-dim); color: var(--blue); }

.hero-stat-data {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Signal colors */
.signal-off { color: var(--text-muted); }
.signal-up { color: var(--green); }
.signal-down { color: var(--red); }

/* ═══ Dashboard Grid ═══ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══ Cards ═══ */
.card {
  overflow: hidden;
}

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

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

.card-title svg {
  color: var(--text-muted);
}

.card-badge {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-live {
  background: var(--green-dim);
  color: var(--green);
}

.card-body {
  padding: 20px;
}

/* ═══ Forms ═══ */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}

.input:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
}

.input::placeholder {
  color: var(--text-muted);
}

.input-with-action {
  display: flex;
  align-items: stretch;
}

.input-with-action .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

/* ═══ Staking Grid ═══ */
.staking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px;
  background: var(--gradient-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stake-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stake-info-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stake-info-value {
  font-size: 15px;
  font-weight: 700;
}

.accent-text { color: var(--accent); }
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.purple-text { color: var(--purple); }

.contract-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.contract-link:hover {
  color: var(--accent);
}

/* ═══ Chart ═══ */
.chart-wrapper {
  position: relative;
  height: 240px;
}

.chart-timeframes {
  display: flex;
  gap: 4px;
}

.tf-btn {
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.tf-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.tf-btn.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ═══ Transactions ═══ */
.tx-list {
  max-height: 320px;
  overflow-y: auto;
}

.tx-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 8px;
}

.tx-item:last-child { border-bottom: none; }

.tx-hash {
  color: var(--blue);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.tx-hash:hover { text-decoration: underline; }

.tx-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
  white-space: nowrap;
}

.tx-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  min-width: 32px;
}

.tx-in { background: var(--green-dim); color: var(--green); }
.tx-out { background: var(--red-dim); color: var(--red); }

.tx-amount {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: auto;
  margin-right: 12px;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ═══ Status Text ═══ */
.status-text {
  margin-top: 10px;
  font-size: 13px;
  min-height: 20px;
}

.status-text.success { color: var(--green); }
.status-text.error { color: var(--red); }
.status-text.pending { color: var(--accent); }

/* ═══ Spinner ═══ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

/* ═══ Chain Bar ═══ */
.chain-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.chain-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.chain-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.chain-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.chain-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══ Swap Card ═══ */
.swap-card {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.swap-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.swap-card-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.swap-via {
  font-size: 12px;
  color: var(--text-muted);
}

.swap-settings {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.settings-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

.settings-value {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

.slippage-options {
  display: flex;
  gap: 6px;
}

.slippage-btn {
  padding: 6px 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.slippage-btn:hover { border-color: var(--border-hover); }

.slippage-btn.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

.slippage-input {
  width: 80px;
  padding: 6px 10px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.slippage-input:focus { border-color: var(--accent); }

/* ═══ Swap Input Box ═══ */
.swap-input-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color var(--transition);
}

.swap-input-box:focus-within {
  border-color: var(--border-accent);
}

.swap-input-box.compact {
  padding: 12px;
}

.swap-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.swap-input-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.swap-input-balance {
  font-size: 12px;
  color: var(--text-secondary);
}

.max-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.max-link:hover { text-decoration: underline; }

.swap-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  min-width: 130px;
}

.token-select-btn:hover { border-color: var(--accent); }

.swap-token-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.swap-token-sym { font-size: 15px; }
.token-placeholder { color: var(--text-muted); font-weight: 600; font-size: 14px; }

.chevron-down {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  margin-left: 4px;
}

.swap-amount-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  text-align: right;
  outline: none;
  min-width: 0;
  font-family: 'JetBrains Mono', monospace;
}

.swap-amount-input::placeholder { color: var(--text-muted); }

.swap-amount-input::-webkit-outer-spin-button,
.swap-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.swap-direction-wrapper {
  display: flex;
  justify-content: center;
  margin: -8px 0;
  position: relative;
  z-index: 2;
}

.swap-direction-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card-solid);
  border: 3px solid var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.swap-direction-btn:hover {
  color: var(--accent);
  transform: rotate(180deg);
}

.swap-details {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13px;
}

.detail-row span:first-child { color: var(--text-secondary); }
.detail-row span:last-child { color: var(--text-primary); font-weight: 600; }

.impact-medium { color: var(--accent) !important; }
.impact-high { color: var(--red) !important; }

.swap-btn {
  margin-top: 16px;
  padding: 14px 20px;
  font-size: 16px;
}

/* ═══ Page Hero ═══ */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  background: var(--gradient-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.page-hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.page-hero-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ═══ Pool Page ═══ */
.pool-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.pool-stat {
  padding: 20px;
  text-align: center;
}

.pool-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.pool-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.pool-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 80px;
  padding: 10px 16px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.pool-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 80px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.pool-row:last-child { border-bottom: none; }
.pool-row:hover { background: rgba(255, 255, 255, 0.02); }

.pool-pair {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pool-pair-icons {
  display: flex;
}

.mini-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  color: #fff;
  border: 2px solid var(--bg-card-solid);
}

.mini-icon + .mini-icon {
  margin-left: -8px;
}

.pool-pair-name {
  font-weight: 600;
  font-size: 14px;
  display: block;
}

.pool-pair-fee {
  font-size: 11px;
  color: var(--text-muted);
}

.pool-cell {
  font-size: 14px;
  font-weight: 600;
}

/* ═══ Bridge Page ═══ */
.bridge-card {
  max-width: 500px;
  margin: 0 auto;
  padding: 28px;
}

.bridge-section {
  padding: 20px 0;
}

.bridge-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.bridge-chain-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.bridge-chain-btn:hover { border-color: var(--border-hover); }

.bridge-amount-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.bridge-balance {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: right;
}

.bridge-arrow {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.bridge-arrow-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(240, 185, 11, 0.25);
}

.bridge-receive-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 12px;
}

.bridge-receive-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.bridge-receive-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.bridge-info {
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.bridge-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ═══ Portfolio Page ═══ */
.portfolio-value-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  margin-bottom: 24px;
}

.portfolio-total {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portfolio-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  font-family: 'JetBrains Mono', monospace;
}

.portfolio-change {
  font-size: 14px;
  font-weight: 700;
}

.portfolio-chart-mini {
  width: 200px;
  height: 60px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.holdings-list {
  max-height: 300px;
  overflow-y: auto;
}

.holding-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.holding-item:last-child { border-bottom: none; }

.holding-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 14px;
}

.holding-info {
  flex: 1;
}

.holding-name {
  font-weight: 600;
  font-size: 14px;
}

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

.holding-value {
  text-align: right;
}

.holding-usd {
  font-weight: 700;
  font-size: 14px;
}

.holding-pct {
  font-size: 12px;
}

/* DeFi Positions */
.defi-position-item {
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

.defi-pos-protocol {
  font-weight: 700;
  font-size: 14px;
}

.defi-pos-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ═══ Tokenomics Page ═══ */
.tokenomics-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.token-info-card {
  padding: 18px;
  text-align: center;
}

.token-info-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.token-info-value {
  font-size: 16px;
  font-weight: 700;
  display: block;
}

.link-accent {
  color: var(--accent);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.link-accent:hover { text-decoration: underline; }

.tokenomics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.distribution-chart-wrapper {
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
}

.distribution-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Ecosystem Features */
.ecosystem-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eco-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.eco-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eco-feature h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.eco-feature p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Roadmap */
.roadmap {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 24px;
}

.roadmap::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.roadmap-item {
  position: relative;
  padding: 16px 0 16px 24px;
}

.roadmap-marker {
  position: absolute;
  left: -24px;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 3px solid var(--text-muted);
  z-index: 1;
}

.roadmap-item.completed .roadmap-marker {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px rgba(14, 203, 129, 0.3);
}

.roadmap-item.active .roadmap-marker {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(240, 185, 11, 0.3);
  animation: pulse-dot 2s infinite;
}

.roadmap-phase {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.roadmap-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0;
}

.roadmap-item.completed .roadmap-content h4 { color: var(--green); }
.roadmap-item.active .roadmap-content h4 { color: var(--accent); }

.roadmap-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══ Footer ═══ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding: 40px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
}

.footer-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-dim);
}

/* ═══ Modals ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 420px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

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

.modal-desc {
  padding: 8px 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.modal-body {
  padding: 16px 24px;
}

.modal-search {
  padding: 0 24px 16px;
}

.modal-footer {
  padding: 16px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.modal-footer p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Token Modal */
.token-modal {
  max-height: 520px;
}

.token-modal-list {
  padding: 0 16px 16px;
  max-height: 360px;
  overflow-y: auto;
}

.token-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-primary);
  text-align: left;
}

.token-list-item:hover {
  background: var(--bg-input);
  border-color: var(--border);
}

.token-list-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.token-list-sym {
  font-weight: 700;
  font-size: 14px;
}

.token-list-name {
  font-size: 12px;
  color: var(--text-muted);
}

/* Wallet Options */
.wallet-options {
  padding: 0 16px;
}

.wallet-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 8px 8px 4px;
}

.wallet-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  margin: 4px 0;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-primary);
  font-size: 14px;
}

.wallet-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.wallet-option.wallet-detected:hover {
  border-color: var(--accent);
}

.wallet-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.wallet-icon-fallback {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-card-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}

.wallet-option-name { font-weight: 600; }

.wallet-option-right { display: flex; align-items: center; }

.wallet-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(14, 203, 129, 0.5);
}

.wallet-status-text {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.wallet-modal-status {
  padding: 0 24px;
  font-size: 13px;
  min-height: 20px;
  margin-top: 8px;
}

.wallet-modal-status.pending { color: var(--accent); }
.wallet-modal-status.success { color: var(--green); }
.wallet-modal-status.error { color: var(--red); }

/* Connected State */
.wallet-connected-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 8px;
}

.wallet-icon-lg { width: 48px; height: 48px; border-radius: 12px; }

.wallet-icon-fallback-lg {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: var(--accent);
}

.wallet-connected-details { display: flex; flex-direction: column; gap: 2px; }
.wallet-connected-name { font-weight: 700; font-size: 15px; }

.wallet-connected-addr {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  word-break: break-all;
}

.wallet-connected-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px;
}

.wallet-connected-actions .btn {
  text-align: center;
  text-decoration: none;
  display: block;
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .pool-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tokenomics-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tokenomics-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 16px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stat-value {
    font-size: 16px;
  }

  .pool-stats {
    grid-template-columns: 1fr;
  }

  .pool-table-header,
  .pool-row {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .pool-table-header span:nth-child(4),
  .pool-row .pool-cell:nth-child(4),
  .pool-table-header span:nth-child(5),
  .pool-row .btn {
    display: none;
  }

  .tokenomics-stats {
    grid-template-columns: 1fr;
  }

  .page-hero {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .btn-trio {
    flex-direction: column;
  }

  .topbar-title {
    font-size: 15px;
  }

  .portfolio-value-card {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .portfolio-amount {
    font-size: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .bridge-card {
    padding: 20px;
  }

  .swap-card {
    padding: 18px;
  }
}

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

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

/* ═══ Selection ═══ */
::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

/* ═══ Overlay for mobile sidebar ═══ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  display: none;
}

.sidebar-overlay.visible {
  display: block;
}
