/* =====================================================================
   Cicada Labs - Main Stylesheet
   Consolidated from Figma mockups. Vanilla CSS, no preprocessors.
   ===================================================================== */

/* ===================== FONT ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===================== CSS VARIABLES ===================== */
:root {
  --bg: #12110f;
  --bg-card: #1a1a1a;
  --bg-input: #262626;
  --bg-input-border: #333333;
  --accent: #49c4c9;
  --accent-hover: #5dd0d5;
  --accent-dim: rgba(73, 196, 201, 0.15);
  --accent-border: rgba(73, 196, 201, 0.3);
  --text: #d9d9d9;
  --text-secondary: #b5b5b5;
  --text-muted: #919191;
  --text-dark: #0f0f0f;
  --border: #262626;
  --border-light: #404040;
  --divider: #1a1a1a;
  --white: #ffffff;
  --green-light: #97fbfc;
  --gray-50: #333333;
  --gray-30: #a3a3a3;
  --error: #e11c2a;
  --overlay: rgba(0, 0, 0, 0.45);
  --overlay-dark: rgba(0, 0, 0, 0.6);
  --font: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --page-width: 1366px;
  --table-width: min(988px, calc(100% - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: var(--font);
  margin: 0;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  width: 100%;
}

.dev-mode-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 10000;
  background: var(--error);
  color: var(--white);
  font-size: 8px;
  font-weight: 700;
  line-height: 10px;
  text-align: center;
  letter-spacing: 0.04em;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font-family: var(--font);
  border: none;
  outline: none;
  background: var(--bg-card);
}

/* ===================== PAGE CONTAINER ===================== */
.page {
  width: 100%;
  max-width: var(--page-width);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================== HEADER ===================== */
.header {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.header-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.header-brand {
  font-weight: 600;
  font-size: 20px;
  color: var(--text);
  line-height: 1;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  margin: 0 clamp(12px, 2vw, 24px);
}

.header-nav a {
  font-weight: 400;
  font-size: 16px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.header-nav a:hover {
  color: var(--text);
}

.header-nav a.active {
  color: var(--text);
}

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

/* ===================== WALLET BUTTON ===================== */
.wallet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  min-width: 156px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.wallet-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.wallet-icon svg {
  width: 28px;
  height: 28px;
  display: block;
}

.wallet-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wallet-balance {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
  line-height: 1.2;
}

.wallet-address {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

.wallet-btn.disconnected {
  background: var(--text);
  border-color: var(--text);
}

.wallet-connect-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
}

html.wallet-state-pending .wallet-btn {
  background: transparent;
  border-color: var(--border);
}

html.wallet-state-pending .wallet-btn .wallet-connect-text {
  visibility: hidden;
}

html.wallet-state-pending .wallet-btn::after {
  content: '';
  width: 84px;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-input);
}

/* ===================== BUTTON: Go to App (home page) ===================== */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  background: var(--text);
  color: var(--text-dark);
  font-weight: 400;
  font-size: 16px;
  border-radius: 4px;
  text-decoration: none;
}

.btn-secondary:hover {
  color: var(--gray-50);
}

.btn-secondary:disabled, .btn-secondary.disabled {
  background: var(--gray-50);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-secondary-icon {
  display: none;
}

/* ===================== HAMBURGER (MOBILE) ===================== */
.header-hamburger {
  display: none;
  width: 24px;
  height: 24px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.header-hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ===================== HERO ===================== */
.hero {
  text-align: center;
  padding-top: 64px;
}

.hero-title {
  font-weight: 600;
  font-size: 40px;
  color: var(--text);
  line-height: 1.2;
  max-width: 888px;
  margin: 0 auto;
}

.hero-title .accent,
.text-accent {
  color: var(--accent);
}

.hero-title .italic-accent {
  color: var(--accent);
  font-style: italic;
}

.hero-subtitle {
  font-weight: 400;
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 28px;
  max-width: 700px;
  margin: 0 auto;
  padding-top: 16px;
}

/* Inner pages have smaller subtitles */
.page-lend .hero-subtitle,
.page-borrow .hero-subtitle,
.page-wrappers .hero-subtitle,
.page-portfolio .hero-subtitle {
  font-size: 16px;
  line-height: 24px;
}

.page-lend .hero { padding-top: 68px; }
.page-borrow .hero { padding-top: 48px; }
.page-wrappers .hero { padding-top: 40px; }
.page-portfolio .hero { padding-top: 68px; }

/* ===================== HOME CARDS ===================== */
.cards-section {
  display: flex;
  justify-content: center;
  padding: 40px 0 0;
}

.cards-row {
  display: flex;
  gap: 12px;
  width: 1080px;
  max-width: 100%;
}

.card {
  width: 352px;
  min-height: 337px;
  background: transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
}

.card-bg-shape {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  border-radius: 20px;
}

.card-bg-shape img {
  position: absolute;
  top: 0;
  right: 0;
  width: 352px;
  height: 337px;
  object-fit: none;
  object-position: right top;
}

.card-content {
  position: relative;
  z-index: 1;
  padding: 40px 40px 0 40px;
}

.card-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
}

.card-icon img {
  width: 100%;
  height: 100%;
}

.card-title {
  font-weight: 600;
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}

.card-description {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
  line-height: 20px;
}

.card-footer {
  position: relative;
  z-index: 1;
  padding: 0 40px 40px 40px;
  margin-top: auto;
}

/* ===================== PRIMARY BUTTON ===================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 400;
  font-size: 16px;
  font-family: var(--font);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-primary:hover {
  color: #333333;
}

.btn-primary:disabled, .btn-primary.disabled {
  background: var(--gray-50);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-primary svg {
  width: 12px;
  height: 12px;
}

.btn-primary,
.btn-secondary,
.btn-deposit,
.btn-withdraw-outline,
.btn-approve,
.btn-full,
.btn-deposit-full,
.deposit-btn,
.modal-btn,
.wallet-btn,
.wallet-modal-option,
.wallet-modal-copy,
.wallet-modal-disconnect,
.btn-outline,
.peek-btn,
.btn-add-wallet {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-primary,
.btn-secondary,
.btn-deposit,
.btn-approve,
.btn-full,
.btn-deposit-full,
.deposit-btn,
.modal-btn {
  --ripple-color: rgba(5, 45, 48, 0.48);
}

.btn-withdraw-outline,
.wallet-btn,
.wallet-modal-option,
.wallet-modal-copy,
.wallet-modal-disconnect,
.btn-outline,
.peek-btn,
.btn-add-wallet {
  --ripple-color: rgba(18, 94, 99, 0.44);
}

.ripple-wave {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: var(--ripple-color, rgba(18, 94, 99, 0.44));
  transform: scale(0.02);
  transform-origin: center;
  opacity: 0.82;
  will-change: transform, opacity;
  animation: cicada-ripple 820ms cubic-bezier(0.18, 0.72, 0.22, 1);
}

@keyframes cicada-ripple {
  42% {
    opacity: 0.62;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ripple-wave {
    animation: none;
    display: none;
  }
}

.cell-tvl.is-loading,
.card-stat .stat-value.is-loading,
.info-value.is-loading,
.receive-amount.is-loading,
.input-balance-loading.is-loading {
  min-height: 20px;
  display: flex;
  align-items: center;
}

.input-balance-loading[hidden] {
  display: none;
}

.field-loader {
  position: relative;
  display: block;
  width: 92px;
  height: 20px;
  max-width: 100%;
  background: var(--bg-card);
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.field-loader.field-loader-inline {
  width: 64px;
  height: 14px;
}

.tvl-loader {
  position: relative;
  display: block;
  width: 92px;
  height: 20px;
  max-width: 100%;
  background: var(--bg-card);
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.field-loader-wave {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(145, 145, 145, 0.32);
  transform: scale(0.02);
  transform-origin: center;
  opacity: 0.82;
  will-change: transform, opacity;
  animation: field-loader-wave 920ms cubic-bezier(0.18, 0.72, 0.22, 1);
}

.tvl-loader-wave {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(145, 145, 145, 0.32);
  transform: scale(0.02);
  transform-origin: center;
  opacity: 0.82;
  will-change: transform, opacity;
  animation: tvl-loader-wave 920ms cubic-bezier(0.18, 0.72, 0.22, 1);
}

@keyframes field-loader-wave {
  44% {
    opacity: 0.68;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes tvl-loader-wave {
  44% {
    opacity: 0.68;
  }
  to {
    transform: scale(1);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .field-loader-wave,
  .tvl-loader-wave {
    animation: none;
    display: none;
  }
}

/* ===================== TABLE COMPONENTS ===================== */
.table-section {
  padding: 32px 0 0 0;
  display: flex;
  justify-content: center;
}
.page-borrow .table-section {
  padding-top: 24px;
}

.data-table {
  width: var(--table-width);
}

.table-divider {
  width: 100%;
  height: 1px;
  background: var(--divider);
}

.table-header {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
}

.table-header .col {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.table-header .col:hover {
  color: var(--text-secondary);
}

.table-header .col.sort-active {
  color: var(--text);
}

.sort-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
  opacity: 0.6;
}

.sort-arrow.desc {
  transform: rotate(180deg);
}

.table-row {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  position: relative;
  transition: background 0.15s;
}

.table-row:hover {
  background: var(--bg-card);
}

.table-row.highlighted {
  background: var(--bg-card);
  border-radius: 0;
}

.table-row.active {
  background: var(--bg-card);
}

/* Token cell */
.token-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-icon svg, .token-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.token-name {
  font-weight: 400;
  font-size: 16px;
  color: var(--text);
}

.cell-value {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
}

/* ===================== LEND TABLE COLUMNS ===================== */
.col-market  { width: 240px; flex-shrink: 0; }
.col-asset   { width: 150px; flex-shrink: 0; }
.col-tvl     { width: 140px; }
.col-apr     { width: 120px; }
.col-position { flex: 1; }
.col-action  { width: 130px; display: flex; justify-content: flex-end; }

.cell-tvl    { width: 140px; }
.cell-apr    { width: 120px; }
.cell-position {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cell-position .dash {
  color: var(--text-muted);
  font-size: 14px;
}

.cell-action {
  width: 130px;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.15s;
}

.table-row:hover .cell-action {
  opacity: 1;
}

/* Position icon */
.position-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

/* ===================== BORROW TABLE COLUMNS ===================== */
.col-collateral    { width: 17%; flex-shrink: 0; }
.col-loan          { width: 15%; flex-shrink: 0; }
.col-available     { width: 18%; flex-shrink: 0; }
.col-ltv           { width: 12%; flex-shrink: 0; }
.borrow-table .col-position { width: 14%; flex: 0 0 14%; }
.col-rate          { width: 12%; flex-shrink: 0; }
.borrow-table .col-rate { width: auto; min-width: 90px; flex: 1 1 12%; }
.borrow-table .col-borrow-action { width: 130px; flex: 0 0 130px; display: flex; justify-content: flex-end; }

.col-loan-cell     { width: 15%; flex-shrink: 0; }
.cell-available    { width: 18%; flex-shrink: 0; }
.cell-ltv          { width: 12%; flex-shrink: 0; }
.borrow-table .cell-position { width: 14%; flex: 0 0 14%; }
.cell-rate         { width: 12%; flex-shrink: 0; }
.borrow-table .cell-rate { width: auto; min-width: 90px; flex: 1 1 12%; }

/* Borrow button appears on hover */
.table-row .borrow-btn-cell {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.15s;
}

.table-row:hover .borrow-btn-cell {
  opacity: 1;
}

/* ===================== SEARCH BOX (BORROW FILTER) ===================== */
.search-section {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.search-box {
  width: 260px;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 8px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
}

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

/* Collateral filter chips */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: var(--table-width);
  padding: 0 20px;
}
.filter-label {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-chip:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-dark);
}
.filter-chip img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.search-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.5;
}

.search-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* ===================== WRAPPERS TABLE COLUMNS ===================== */
.col-wrapper  { width: 220px; }
.col-base     { width: 180px; }

.base-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
}

.base-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.base-icon svg { display: block; }

.base-name {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
}

.wrapper-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wrapper-icon svg { display: block; }

/* Wrapper action buttons */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.15s;
}
.table-row:hover .action-buttons {
  opacity: 1;
}

.wrapper-table .action-buttons {
  opacity: 1;
}

.wrapper-table .action-buttons > :not(.info-icon) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}

.wrapper-table .table-row:hover .action-buttons > :not(.info-icon) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.btn-deposit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 24px;
  background: var(--accent);
  color: var(--text-dark);
  font-weight: 400;
  font-size: 16px;
  font-family: var(--font);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.btn-deposit:hover { color: #333333; }

.btn-withdraw-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 24px;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 16px;
  font-family: var(--font);
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

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

.btn-withdraw-outline.is-hidden,
.btn-withdraw-outline[hidden] {
  display: none;
}

/* Single "Connect Wallet" button when disconnected */
.btn-connect-single {
  width: 100%;
  min-width: 144px;
}

html.wallet-state-pending .btn-connect-single {
  visibility: hidden;
}

/* Info icon */
.info-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--accent);
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
}

.info-icon:hover {
  opacity: 0.7;
}
.info-icon svg { width: 24px; height: 24px; display: block; }

.wrapper-table .info-icon {
  color: var(--text-muted);
  opacity: 0.72;
}

.wrapper-table .info-icon:hover {
  color: var(--accent);
  opacity: 1;
}

/* Add-to-wallet button */
.btn-add-wallet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  flex-shrink: 0;
  margin-left: 0;
  border-radius: 50%;
}
.btn-add-wallet:hover {
  color: var(--accent);
  opacity: 1;
  background: rgba(73, 196, 201, 0.08);
}
.btn-add-wallet[hidden] { display: none; }
.btn-add-wallet.is-loading {
  cursor: progress;
  opacity: 0.45;
}
.btn-add-wallet svg {
  width: 14px;
  height: 14px;
  display: block;
}

/* ===================== WRAPPERS INFO PANEL ===================== */
.content-area {
  display: flex;
  justify-content: center;
  padding: 32px 32px 0;
  gap: 0;
}

.table-wrapper {
  flex: 1;
  max-width: 640px;
}

.info-panel {
  width: 420px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 24px;
  margin-left: 24px;
  align-self: flex-start;
  position: relative;
  animation: slideIn 0.2s ease-out;
}

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

.info-section { margin-bottom: 20px; }
.info-section:last-child { margin-bottom: 0; }

.info-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 8px;
}

.info-text {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-text .accent { color: var(--accent); }

.info-value {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
}

.info-link {
  font-weight: 400;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}

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

.info-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.info-important {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.info-important-text {
  font-weight: 400;
  font-size: 14px;
}

.info-important-text a {
  color: var(--accent);
  text-decoration: none;
}

.info-important-text a:hover { text-decoration: underline; }

.info-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.info-close:hover { opacity: 1; }

.info-btn {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.info-btn:hover, .info-btn.active { opacity: 0.8; }

/* ===================== FILTER PILLS ===================== */
.filter-section {
  display: flex;
  justify-content: center;
  padding-top: 24px;
  gap: 8px;
}

.filter-pill {
  height: 36px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-pill:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.filter-pill.active {
  background: var(--bg-input);
  border-color: var(--border-light);
  color: var(--text);
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: 510px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  animation: modalIn 0.2s ease-out;
}

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

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-weight: 600;
  font-size: 24px;
  color: var(--text);
  line-height: 1.3;
}

.modal-title .vault-name,
.modal-title .teal {
  color: var(--accent);
}

.modal-close {
  width: 24px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 16px;
  margin-top: 2px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.modal-close:hover { opacity: 1; }
.modal-close svg { width: 24px; height: 24px; display: block; }

/* ===================== MODAL: WITHDRAW TYPE ===================== */
.withdraw-type {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.withdraw-type-label {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.radio-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.radio-option.active .radio-circle {
  border-color: var(--accent);
}

.radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: none;
}

.radio-option.active .radio-dot {
  display: block;
}

.radio-label {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
}

/* ===================== MODAL: INPUT FIELD ===================== */
.input-container {
  background: var(--text-dark);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border: 1px solid var(--gray-50);
  transition: border-color 0.15s, background 0.15s;
}

.input-container:hover {
  border-color: var(--accent);
}

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

.input-container.error {
  border-color: var(--error);
}
.input-error-msg {
  color: var(--error);
  font-size: 12px;
  margin-top: 6px;
  margin-bottom: 0;
}

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

.input-field {
  font-weight: 600;
  font-size: 32px;
  color: var(--text);
  line-height: 1;
  background: transparent;
  border: none;
  outline: none;
  width: 50%;
}

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

.input-token {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-token-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.input-token-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.input-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 16px;
}

.input-usd {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

.input-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
}

.input-balance-value {
  font-weight: 600;
  font-size: 12px;
  color: var(--text);
}

.pct-btn {
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
}

.max-btn {
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  background: var(--accent-dim);
  border: none;
  border-radius: 2px;
  padding: 2px 6px;
  font-family: var(--font);
}

/* ===================== MODAL: DEPOSIT INPUT ===================== */
.deposit-input-area {
  background: var(--bg-input);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.deposit-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.deposit-amount-input {
  font-weight: 600;
  font-size: 32px;
  color: var(--text);
  line-height: 1;
  background: transparent;
  border: none;
  outline: none;
  width: 50%;
}

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

.deposit-token-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deposit-token-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.deposit-token-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}

.deposit-details-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.deposit-usd {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
}

.deposit-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
}

.deposit-balance-value {
  color: var(--text);
}

.deposit-pct-btn {
  font-family: var(--font);
  font-weight: 400;
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
}

.deposit-max-btn {
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
}

/* ===================== MODAL: RECEIVE SECTION ===================== */
.receive-section {
  margin-top: 16px;
  margin-bottom: 14px;
}

.receive-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 12px;
}

.receive-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.receive-tokens {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.receive-token {
  display: flex;
  align-items: center;
  gap: 8px;
}

.receive-token-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.receive-amount {
  display: inline-flex;
  align-items: center;
  height: 24px;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  color: var(--text);
}

.receive-amount.is-loading {
  min-height: 24px;
  height: 24px;
}

.receive-amount .field-loader {
  height: 24px;
}

.receive-name {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
}

.receive-and {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
}

.receive-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.receive-description {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ===================== MODAL: INFO BOX ===================== */
.info-box {
  background: var(--bg-input);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.info-row + .info-row {
  margin-top: 4px;
}

.info-box .info-value {
  display: inline-flex;
  align-items: center;
  height: 20px;
  font-size: 14px;
  line-height: 20px;
}

.info-box .info-value.is-loading {
  height: 20px;
}

.info-label {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
}

.info-value-accent {
  font-weight: 600;
  font-size: 14px;
  color: var(--accent);
}

.info-value-white {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
}

/* ===================== MODAL: DISCLAIMER ===================== */
.disclaimer {
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.disclaimer a {
  color: var(--text);
  text-decoration: none;
}

/* ===================== MODAL: WARNING TEXT ===================== */
.warning-text {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  background: rgba(73, 196, 201, 0.05);
  border: 1px solid rgba(73, 196, 201, 0.1);
  border-radius: 8px;
  padding: 12px;
}

.warning-text a {
  color: var(--accent);
  text-decoration: none;
}

.warning-text a:hover { text-decoration: underline; }

/* ===================== MODAL: FULL-WIDTH BUTTONS ===================== */
.btn-full {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background: var(--accent);
  color: var(--text-dark);
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-full:hover { color: #333333; }

.btn-full.disabled {
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-full.loading {
  position: relative;
  color: transparent;
}

.btn-full.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-dark);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ===================== MODAL: TRANSACTION ACCEPTED ===================== */
.modal-success {
  width: 400px;
  padding: 32px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-checkmark {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  margin-top: -56px;
  position: relative;
}

.checkmark-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #262626;
}

.checkmark-circle::before {
  content: '';
  position: absolute;
  top: -6px; left: -6px; right: -6px; bottom: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(73, 196, 201, 0.3);
}

.modal-amount-pill {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 20px;
  margin-bottom: 16px;
}

.modal-amount-icon { width: 24px; height: 24px; flex-shrink: 0; }
.modal-amount-value { font-weight: 600; font-size: 20px; color: var(--text); }
.modal-amount-usd { font-weight: 400; font-size: 14px; color: var(--text-muted); margin-left: auto; }

.modal-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.modal-info-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.modal-info-value {
  font-weight: 400;
  font-size: 14px;
  color: var(--text);
}

.modal-info-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ===================== PORTFOLIO ACCORDIONS ===================== */
.portfolio-content {
  padding: 48px 0 0 0;
  display: flex;
  justify-content: center;
}

.portfolio-container {
  width: var(--table-width);
}

.portfolio-section {
  border-bottom: 1px solid var(--divider);
}

.section-header {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  cursor: pointer;
  transition: background 0.15s;
}

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

.section-label {
  font-weight: 400;
  font-size: 16px;
  color: var(--text-muted);
  width: 100px;
}

.section-value {
  font-weight: 400;
  font-size: 16px;
  color: var(--text);
  flex: 1;
}

.section-chevron {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.section-chevron svg {
  width: 16px;
  height: 16px;
}

.section-chevron.open {
  transform: rotate(180deg);
}

.accordion-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.accordion-body.open {
  max-height: 500px;
}

/* Portfolio inner table */
.portfolio-table-header {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
}

.portfolio-table-header .col {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.portfolio-row {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 20px;
  position: relative;
  transition: background 0.15s;
}

.portfolio-row:hover {
  background: var(--bg-card);
}

.portfolio-row .cell-action {
  opacity: 0;
  transition: opacity 0.15s;
}

.portfolio-row:hover .cell-action {
  opacity: 1;
}

/* Portfolio column widths - Lend/Wrappers layout */
.col-p-market { flex: 1.6; min-width: 0; }
.col-p-asset { flex: 1.5; min-width: 0; }
.col-p-tvl { flex: 1; }
.col-p-apr { flex: 1; }
.col-p-position { flex: 1; }
.col-p-action { width: 130px; display: flex; justify-content: flex-end; flex-shrink: 0; }

/* Portfolio column widths - Borrow layout */
.col-p-collateral { flex: 1.2; min-width: 0; }
.col-p-loan { flex: 1; min-width: 0; }
.col-p-available { flex: 1; }
.col-p-ltv { flex: 0.8; }
.portfolio-borrow-header .col-p-position,
.portfolio-borrow-row .cell-value.col-p-position { flex: 0.9; }
.portfolio-borrow-header .col-p-health,
.portfolio-borrow-row .cell-value.col-p-health { flex: 0.8; }
.col-p-rate { flex: 0.8; }

/* ===================== VAULTS PAGE ===================== */
.page-vaults .header-tagline {
  font-size: clamp(12px, 1.2vw, 14px);
  color: var(--text-muted);
  margin-left: 12px;
}

.vaults-content {
  width: 100%;
  max-width: var(--table-width);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 3vw, 20px) 0;
}

.vaults-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: clamp(16px, 2vw, 24px);
}

/* Token selector pills */
.vaults-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.vault-tokens {
  display: flex;
  gap: clamp(8px, 1.5vw, 16px);
  align-items: center;
  flex-wrap: wrap;
}

.vault-token {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text);
  font-size: clamp(12px, 1.3vw, 14px);
  cursor: pointer;
  padding: 4px 0;
}

.vault-token-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: var(--bg-input);
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
}

.vault-token.active .vault-token-dot {
  background: var(--accent);
  border-color: var(--text-muted);
}

.chart-legend {
  width: 988px;
  max-width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  margin: -8px auto 12px auto;
  color: var(--text-muted);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-line {
  width: 24px;
  height: 0;
  border-top: 2px solid #97fbfc;
}

.legend-oracle {
  border-top-color: #49c4c9;
  border-top-style: dashed;
}

/* Time range buttons */
.vault-timerange {
  display: flex;
  gap: clamp(4px, 0.8vw, 8px);
  flex-wrap: wrap;
}

.time-btn {
  padding: clamp(6px, 0.8vw, 8px) clamp(10px, 1.5vw, 16px);
  border-radius: 8px;
  border: 1px solid rgba(37, 38, 34, 0.88);
  background: transparent;
  color: var(--text);
  font-size: clamp(12px, 1.3vw, 14px);
  cursor: pointer;
  transition: background 0.15s;
}

.time-btn.active {
  background: rgba(37, 38, 34, 0.88);
}

.time-btn:hover {
  background: rgba(37, 38, 34, 0.6);
}

/* Chart */
.vault-chart {
  margin-bottom: clamp(24px, 3vw, 40px);
  border: 1px solid var(--gray-50);
  border-radius: 8px;
  padding: clamp(12px, 2vw, 20px);
  position: relative;
  overflow: hidden;
}

/* vault-chart in wrappers info modal (small inline chart) */
.modal .vault-chart { width: 100%; height: 60px; margin-bottom: 12px; position: relative; overflow: hidden; }
.modal .vault-chart svg { width: 100%; height: 100%; }

.chart-inner {
  display: flex;
  min-height: clamp(180px, 25vw, 300px);
}

.chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-right: clamp(6px, 1vw, 12px);
  width: clamp(30px, 4vw, 40px);
  flex-shrink: 0;
  align-self: stretch;
}

.chart-y-axis span {
  font-size: clamp(10px, 1.1vw, 12px);
  color: var(--text-muted);
  text-align: right;
}

.chart-area {
  flex: 1;
  min-width: 0;
  min-height: clamp(180px, 25vw, 300px);
  border-left: 1px solid var(--gray-50);
  border-bottom: 1px solid var(--gray-50);
  position: relative;
}

.chart-state {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  min-width: 144px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.chart-state[hidden] {
  display: none;
}

.chart-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: absolute;
  background: var(--bg-card);
  border-radius: 4px;
  padding: 8px 12px;
  pointer-events: none;
}

.tooltip-date {
  font-size: clamp(9px, 1vw, 11px);
  color: var(--text-muted);
}

.tooltip-value {
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 600;
  color: var(--accent);
}

.tooltip-value-secondary {
  color: var(--text);
  font-size: 13px;
  margin-top: 3px;
}

.chart-tooltip[hidden],
.chart-dot[hidden] {
  display: none;
}

.chart-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--text);
  transform: translate(-50%, -50%);
}

.chart-x-axis {
  display: flex;
  justify-content: space-between;
  padding: 8px 0 0 clamp(38px, 5vw, 52px);
}

.chart-x-axis span {
  font-size: clamp(10px, 1.1vw, 12px);
  color: var(--text-muted);
}

/* Bottom section: Tx History + Sidebar */
.vaults-bottom {
  display: flex;
  gap: clamp(16px, 2vw, 24px);
  align-items: flex-start;
  flex-wrap: wrap;
}

.tx-history {
  flex: 1 1 400px;
  min-width: 0;
}

.tx-history-title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.tx-header {
  display: flex;
  padding: 0 0 8px;
}

.tx-header .tx-col {
  font-size: clamp(12px, 1.3vw, 14px);
  color: var(--text-muted);
  font-weight: 400;
}

.tx-row {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.tx-col.tx-date { flex: 1.5; }
.tx-col.tx-type { flex: 0.8; }
.tx-col.tx-qty { flex: 0.8; }
.tx-col.tx-hash { flex: 1.5; }

.tx-row .tx-col {
  font-size: clamp(12px, 1.3vw, 14px);
  color: var(--text);
}

.tx-link {
  color: var(--accent);
  text-decoration: none;
}

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

/* Vault info card */
.vault-info-card {
  flex: 0 1 304px;
  min-width: 260px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: clamp(16px, 2vw, 24px);
}

.vault-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 20px;
}

.vault-stat-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.vault-stat-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--text);
}

.vault-stat-value .info-icon {
  opacity: 0.6;
}

.vault-balance {
  border-top: 1px solid var(--gray-50);
  padding-top: 16px;
}

.vault-balance-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.vault-balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-balance-amount {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.vault-balance-usd {
  font-size: 14px;
  color: var(--text-muted);
}

/* Yield Basis footer variant */
.footer-yb .footer-audit {
  font-size: 12px;
  color: var(--gray-30);
  display: flex;
  align-items: center;
  gap: 4px;
}

.footer-auditor {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  margin-left: 12px;
}

.footer-auditor:hover {
  text-decoration: underline;
}

/* ===================== FOOTER ===================== */
.footer {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  flex-shrink: 0;
  margin-top: auto;
}

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

.footer-copyright {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-info {
  font-weight: 400;
  font-size: 12px;
  color: var(--gray-30);
}

.footer-info a {
  color: var(--gray-30);
  text-decoration: underline;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.footer-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

.footer-email {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-email:hover { color: var(--text-secondary); }

.footer-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.footer-icon:hover { opacity: 1; }
.footer-icon svg { width: 20px; height: 20px; display: block; }

/* ===================== MOBILE MENU OVERLAY ===================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
}

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

body:has(.mobile-menu.open) {
  overflow: hidden;
}

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

.menu-title {
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
}

.menu-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  color: #919191;
  padding: 0;
}

.menu-items {
  display: flex;
  flex-direction: column;
  padding: 32px 24px 0 24px;
}

.menu-item {
  font-weight: 400;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
  line-height: 1;
  padding: 14px 0;
}

.menu-item:first-child { padding-top: 0; }

.menu-card {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: #1a1917;
  border: 1px solid #2a2a28;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.card-social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 240px;
  margin: 0 auto;
}

.card-email {
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.card-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.card-copyright {
  font-weight: 400;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.card-info {
  font-weight: 400;
  font-size: 11px;
  color: #a3a3a3;
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
}

.card-info a {
  color: #a3a3a3;
  text-decoration: underline;
}

/* ===================== EXTRA TABLE SELECTORS ===================== */
.lend-table { width: 988px; max-width: 100%; }
.borrow-table { width: 988px; max-width: 100%; padding: 0 0 8px 0; }
.wrapper-table { width: 988px; max-width: 100%; }
.borrow-table-header { display: flex; align-items: center; height: 40px; padding: 0 20px; }
.borrow-table-header .col { font-weight: 400; font-size: 14px; color: #919191; display: flex; align-items: center; gap: 4px; }
.borrow-row { display: flex; align-items: center; height: 60px; padding: 0 20px; position: relative; }
.borrow-row.highlighted { background: #1a1a1a; }
.borrow-divider { width: 100%; height: 1px; background: #1a1a1a; }
.token-cell-collateral { width: 190px; }
.token-cell-loan { width: 170px; }
.cell-borrow-action { width: 130px; display: flex; justify-content: flex-end; }
.arrow-down-sm { width: 10px; height: 8px; }
.position-icon svg { display: block; }

/* ===================== MODAL EXTRA SELECTORS ===================== */
.modal-title .accent { color: #49c4c9; }
.modal-btn { width: 172px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #0f0f0f; font-family: var(--font); font-weight: 600; font-size: 16px; border: none; border-radius: 4px; cursor: pointer; }
.modal-btn:hover { color: #333333; }
.modal-info { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.modal-info-icon { width: 14px; height: 14px; opacity: 0.6; }
.modal-info-icon svg { width: 14px; height: 14px; display: block; }
.modal-header-left { display: flex; align-items: center; gap: 10px; }
.modal-token-icon { width: 24px; height: 24px; flex-shrink: 0; }
.modal-actions { padding: 0 20px 20px 20px; display: flex; gap: 8px; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.info-modal .modal-body { padding: 0; }
.info-modal .modal-actions { padding: 20px 0 0 0; }
.modal-amount { width: 100%; display: flex; align-items: center; gap: 10px; background: #1a1a1a; border: 1px solid #333333; border-radius: 20px; padding: 10px 16px; margin-bottom: 12px; }
.modal-amount-icon svg { width: 28px; height: 28px; display: block; }

.add-token-modal {
  width: 420px;
  max-width: calc(100vw - 32px);
}

.add-token-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.add-token-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.add-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.add-token-row strong {
  color: var(--text);
  font-weight: 500;
}

.add-token-address {
  color: var(--text);
  font-family: 'Inter', monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ===================== CHECKMARK DOTS (transaction accepted) ===================== */
.checkmark-dots { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.checkmark-svg { width: 32px; height: 32px; }
.dot { position: absolute; width: 3.6px; height: 3.6px; border-radius: 50%; background: #49c4c9; }
.dot-1 { top: -2px; left: 50%; transform: translateX(-50%); }
.dot-2 { top: 8px; right: 2px; }
.dot-3 { bottom: 8px; right: 2px; }
.dot-4 { bottom: -2px; left: 50%; transform: translateX(-50%); }
.dot-5 { bottom: 8px; left: 2px; }
.dot-6 { top: 8px; left: 2px; }
.dot-7 { top: 1px; right: 12px; width: 2.5px; height: 2.5px; opacity: 0.5; }
.dot-8 { top: 1px; left: 12px; width: 2.5px; height: 2.5px; opacity: 0.5; }
.dot-sm { width: 2.5px; height: 2.5px; opacity: 0.5; }

/* No-balance link */
.input-no-balance { font-size: 12px; color: var(--text-muted); }
.input-no-balance a { color: var(--accent); text-decoration: none; }
.input-no-balance a:hover { text-decoration: underline; }

/* ===================== DEPOSIT/APPROVE EXTRA SELECTORS ===================== */
.deposit-btn { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; background: #49c4c9; color: #0f0f0f; font-family: var(--font); font-weight: 600; font-size: 18px; border: none; border-radius: 4px; cursor: pointer; }
.deposit-btn:hover { color: #333333; }
.deposit-amount { font-weight: 600; font-size: 32px; color: #d9d9d9; line-height: 1; background: transparent; border: none; outline: none; width: 50%; }
.deposit-token-icon svg { width: 24px; height: 24px; display: block; }
.btn-deposit-full { width: 100%; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #0f0f0f; font-family: var(--font); font-weight: 600; font-size: 18px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; }
.btn-deposit-full:hover { color: #333333; }
.btn-approve { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #0f0f0f; font-family: var(--font); font-weight: 600; font-size: 16px; border: none; border-radius: 4px; cursor: pointer; text-decoration: none; }
.btn-approve:hover { color: #333333; }
.btn-approve:disabled { background: var(--gray-50); color: #515151; cursor: not-allowed; }

/* Input variants */
.input-amount { font-weight: 600; font-size: 24px; color: #d9d9d9; line-height: 1; background: transparent; border: none; outline: none; width: 50%; }
.input-amount::placeholder { color: var(--text-muted); opacity: 0.65; }
.input-amount:focus::placeholder { opacity: 0; }
.input-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.input-bottom-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 16px; }
.input-inline-error { flex: 1 1 auto; min-width: 0; min-height: 16px; font-weight: 400; font-size: 12px; line-height: 16px; color: var(--error); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; visibility: hidden; }
.input-inline-error.is-visible { visibility: visible; }
.input-balance-label { font-weight: 400; font-size: 11px; color: #919191; }
.input-usd-value { font-weight: 400; font-size: 12px; color: #919191; }
.input-pct-btn { font-weight: 400; font-size: 11px; color: #49c4c9; cursor: pointer; background: none; border: none; font-family: var(--font); padding: 0; }
.input-max-btn { font-weight: 400; font-size: 11px; color: #49c4c9; cursor: pointer; background: rgba(73, 196, 201, 0.15); border: 1px solid rgba(73, 196, 201, 0.3); border-radius: 4px; padding: 1px 5px; font-family: var(--font); }
.input-token-icon svg { width: 20px; height: 20px; display: block; }

/* Receive extra */
.receive-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.receive-icon { width: 18px; height: 18px; flex-shrink: 0; }
.receive-icon svg { width: 18px; height: 18px; display: block; }
.receive-token-icon svg { width: 24px; height: 24px; display: block; }
.receive-token-name { font-weight: 400; font-size: 13px; color: #919191; margin-left: 4px; }

/* ===================== WITHDRAW EXTRA ===================== */
.bg-content { text-align: center; padding-top: 40px; opacity: 0.4; }
.bg-title { font-weight: 600; font-size: 40px; color: #d9d9d9; line-height: 1.2; }
.bg-title .accent { color: #49c4c9; }
.bg-subtitle { font-weight: 400; font-size: 16px; color: #b5b5b5; line-height: 24px; padding-top: 12px; }
.info-value-highlight { font-weight: 600; font-size: 14px; color: #49c4c9; }
.info-value .accent { color: #49c4c9; font-weight: 600; }
.info-value.white { color: #d9d9d9; font-weight: 400; }
.info-label strong { font-weight: 600; }
.info-label svg { width: 12px; height: 12px; opacity: 0.5; }
.info-row:last-child { border-bottom: none; }
.info-section-title { font-weight: 600; font-size: 13px; color: #919191; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.modal .btn-withdraw { width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--text-muted); font-family: var(--font); font-weight: 600; font-size: 18px; border: 1px solid var(--border-light); border-radius: 4px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.modal .btn-withdraw:hover { color: var(--accent); border-color: var(--accent); }
.modal .btn-withdraw:disabled { background: transparent; color: var(--text-muted); border-color: var(--border-light); cursor: not-allowed; opacity: 0.55; }
.btn-withdraw { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 24px; background: transparent; color: var(--text-muted); font-family: var(--font); font-weight: 400; font-size: 14px; border: 1px solid var(--border-light); border-radius: 4px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: color 0.15s, border-color 0.15s; }
.btn-withdraw.disabled { color: var(--text-muted); border-color: var(--border-light); cursor: not-allowed; opacity: 0.55; }
.btn-withdraw:hover { color: var(--accent); border-color: var(--accent); }

/* Hide mobile wrapper cards on desktop */
.wrapper-cards-mobile { display: none; }

/* ===================== MOBILE WRAPPERS CARDS ===================== */
.cards-container { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.wrapper-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-labels {
  display: flex;
  justify-content: space-between;
}
.card-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}
.card-tokens {
  display: flex;
  justify-content: space-between;
}
.card-token {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.card-token img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.card-stats {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-stat .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}
.card-stat .stat-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-icon { color: var(--text-muted); flex-shrink: 0; }
.card-buttons { display: flex; gap: 8px; }
.card-buttons .btn-deposit {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--text-dark);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.card-buttons .btn-withdraw-outline {
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.card-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  padding-top: 4px;
}
.card-info svg { color: var(--text-muted); }

/* Mobile wrappers info modal */
.contract-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.contract-label { font-size: 12px; color: #919191; }
.contract-value { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #49c4c9; text-decoration: none; }
a.contract-value:hover { color: var(--accent-hover); }
.contract-value svg { width: 12px; height: 12px; }
.token-amount-section { background: var(--bg); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.token-amount-row { display: flex; align-items: center; justify-content: space-between; }
.token-amount-left { display: flex; align-items: center; gap: 8px; }
.token-amount-icon { width: 20px; height: 20px; flex-shrink: 0; }
.token-amount-name { font-size: 13px; color: #d9d9d9; }
.token-amount-value { font-size: 13px; color: #d9d9d9; font-weight: 500; }
.token-amount-usd { font-size: 11px; color: #919191; text-align: right; }

/* ===================== MOBILE LANDING EXTRA ===================== */
.header-app-btn { width: 36px; height: 36px; border-radius: 8px; background: #49c4c9; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.header-app-btn svg { width: 18px; height: 18px; }
.hero-subtitle strong { color: #ffffff; font-weight: 500; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 20px; border-radius: 8px; border: 1.5px solid #49c4c9; background: transparent; color: #49c4c9; font-family: var(--font); font-weight: 500; font-size: 13px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.card-bg { position: absolute; top: -20px; right: -20px; width: 200px; height: 200px; opacity: 0.12; pointer-events: none; }
.card-bg-shape svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.card-icon path { fill: #C0C0C0; }
.card-icon svg { width: 20px; height: 20px; }

/* Mobile menu extra */
.menu-close svg { width: 16px; height: 16px; }
.card-email:hover { color: #b5b5b5; }
.bg-peek { position: absolute; bottom: 0; left: 0; right: 0; height: 130px; display: flex; flex-direction: column; align-items: center; padding-top: 20px; opacity: 0.3; pointer-events: none; }
.peek-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 28px; border-radius: 8px; border: 1.5px solid #4fd1c5; background: transparent; color: #4fd1c5; font-family: var(--font); font-weight: 600; font-size: 14px; white-space: nowrap; }
.peek-illustration { margin-top: 16px; width: 72px; height: 72px; opacity: 0.7; }

/* ===================== RISK DASHBOARD ===================== */
.page-risk {
  min-height: 100vh;
}

.risk-content {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.risk-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.risk-title {
  font-weight: 600;
  font-size: 34px;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 8px;
}

.risk-subtitle {
  max-width: 760px;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.risk-status {
  min-width: 92px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  background: var(--bg-card);
}

.risk-controls {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr;
  gap: 12px;
  margin-bottom: 18px;
}

.risk-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
}

.risk-control select {
  height: 38px;
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 12px;
}

.risk-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--divider);
  margin-bottom: 18px;
}

.risk-summary-item {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  padding: 12px 16px;
}

.risk-summary-label {
  color: var(--text-muted);
  font-size: 12px;
}

.risk-summary-value {
  min-height: 20px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.risk-block {
  min-width: 0;
}

.risk-block-full {
  margin-top: 18px;
}

.risk-block-header {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.risk-block-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.risk-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.risk-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.risk-table th,
.risk-table td {
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.risk-table th {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}

.risk-table td {
  color: var(--text);
  font-size: 13px;
}

.risk-table td:last-child,
.risk-table th:last-child {
  text-align: right;
}

.risk-table tr:last-child td {
  border-bottom: none;
}

.risk-table tbody tr:hover td {
  background: var(--bg-card);
}

.risk-liquidation-table th:nth-child(1),
.risk-liquidation-table td:nth-child(1) {
  width: 150px;
}

.risk-liquidation-table th:nth-child(4),
.risk-liquidation-table td:nth-child(4),
.risk-liquidation-table th:nth-child(5),
.risk-liquidation-table td:nth-child(5),
.risk-liquidation-table th:nth-child(6),
.risk-liquidation-table td:nth-child(6) {
  width: 110px;
  text-align: right;
}

.risk-liquidation-table th:nth-child(7),
.risk-liquidation-table td:nth-child(7) {
  width: 120px;
  text-align: right;
}

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

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

.risk-empty {
  color: var(--text-muted);
  text-align: center !important;
}

.risk-table [data-risk-loading] {
  min-height: 20px;
}

/* Mobile wallet compact */
.wallet-compact { display: flex; align-items: center; gap: 6px; }
.wallet-compact-icon { width: 20px; height: 20px; flex-shrink: 0; }
.wallet-compact-icon svg { width: 20px; height: 20px; display: block; }
.wallet-compact-balance { font-weight: 400; font-size: 13px; color: #d9d9d9; }

/* Footer mobile extra */
.footer-top { display: flex; align-items: center; gap: 12px; }
.footer-bottom { display: flex; flex-direction: column; gap: 2px; }
.footer-links { display: flex; align-items: center; gap: 10px; }
.footer-legal { text-align: center; }

/* ===================== RESPONSIVE: TABLET (901-1024px) ===================== */
@media (max-width: 1024px) {
  /* Show action buttons always (no hover on touch) */
  .cell-action { opacity: 1; }
  .action-buttons { opacity: 1; }
  .wrapper-table .action-buttons > :not(.info-icon) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .col-borrow-action { min-width: 0; }
  .data-table { overflow-x: auto; }
  .cards-row { flex-wrap: wrap; }
  .card { flex: 1 1 300px; }

  /* Compact header nav for tablet */
  .header-nav { gap: clamp(8px, 1.5vw, 16px); }
  .header-nav a { font-size: 13px; }

  /* Slightly smaller hero */
  .hero-title { font-size: 36px; }

  /* Tables: tighter columns */
  .table-header .col { font-size: 13px; }
  .table-row { padding: 0 12px; }

  /* Lend: hide position column header text to save space */
  .col-position { min-width: 100px; }
  .col-action { min-width: 80px; }

  /* Vaults: tagline smaller on tablet */
  .page-vaults .header-tagline { font-size: 12px; }

  .risk-content { width: calc(100% - 32px); }
  .risk-grid { grid-template-columns: 1fr; }
  .risk-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===================== RESPONSIVE: MOBILE ===================== */
@media (max-width: 900px) {
  .page {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── Header ── */
  .header {
    height: 56px;
    padding: 0 16px;
  }

  .header-left {
    flex: 1;
    min-width: 0;
    gap: 10px;
  }

  .header-logo { width: 32px; height: 32px; }
  .header-brand { font-size: 14px; letter-spacing: 0.02em; }
  .header-nav { display: none; }

  .header-hamburger {
    display: flex;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
  }

  /* Wallet: mobile (from Figma screenshot) */
  .wallet-btn {
    height: 40px;
    width: 128px;
    min-width: 128px;
    padding: 0 12px;
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 8px;
    gap: 8px;
    justify-content: center;
  }
  .wallet-icon { width: 26px; height: 26px; }
  .wallet-icon svg { width: 26px; height: 26px; }
  .wallet-balance { font-weight: 400; font-size: 13px; color: #d9d9d9; }
  .wallet-address { display: none; }

  /* "Go to App" → square accent icon button (Figma) */
  .btn-secondary {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 0;
    background: var(--text);
    color: var(--text-dark);
    flex-shrink: 0;
  }
  .btn-secondary-icon {
    display: block;
    width: 18px;
    height: 18px;
  }
  .btn-secondary-icon path {
    stroke: var(--text-dark);
  }

  /* ── Hero ── */
  .hero {
    text-align: center;
    padding: 24px 20px 0;
  }

  .hero-title {
    font-size: 24px;
    font-weight: 600;
    max-width: 100%;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
    padding-top: 12px;
    max-width: 100%;
  }

  .risk-content {
    width: calc(100% - 24px);
    padding: 24px 0 36px;
  }

  .risk-title-row {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .risk-title {
    font-size: 26px;
  }

  .risk-status {
    align-self: flex-start;
  }

  .risk-controls,
  .risk-grid,
  .risk-summary {
    grid-template-columns: 1fr;
  }

  .risk-summary-item {
    min-height: 58px;
  }

  .risk-table {
    min-width: 520px;
  }

  .risk-liquidation-table {
    min-width: 820px;
  }

  .page-lend .hero,
  .page-borrow .hero,
  .page-wrappers .hero,
  .page-portfolio .hero {
    padding: 16px 20px 0;
  }

  .page-lend .hero-title,
  .page-borrow .hero-title,
  .page-wrappers .hero-title {
    font-size: 20px;
  }

  .page-wrappers .hero-subtitle {
    font-size: 13px;
    color: var(--text-muted);
  }

  /* ── Cards (landing) ── */
  .cards-section {
    padding: 24px 16px;
  }

  .cards-row {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }

  .card {
    width: 100%;
    height: auto;
    min-height: 260px;
    border-radius: 16px;
    padding: 24px;
  }

  .card-content { padding: 0; }
  .card-footer { padding: 0; margin-top: 16px; }
  .card > .card-icon { width: 72px; height: 72px; margin-bottom: 12px; }
  .card-title { font-size: 20px; }
  .card-description { font-size: 13px; line-height: 1.5; }

  /* Buttons → outlined on mobile (per Figma) */
  .btn-primary {
    border-radius: 8px;
    border: 1.5px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-weight: 500;
    font-size: 13px;
  }

  /* ── Tables → Card Layout ── */
  .table-section { padding: 16px 8px 0; }
  .data-table { width: 100%; padding: 0 16px; }

  /* Hide header & dividers, use card gaps */
  .data-table .table-header { display: none; }
  .data-table .table-divider { display: none; }

  /* Each row → card */
  .table-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 0;
  }
  .table-row:hover { background: var(--bg-card); }

  /* ── Lend table mobile ── */
  .lend-table .token-cell.col-market {
    width: 100%;
    margin-bottom: 8px;
    order: 1;
  }
  .lend-table .token-cell.col-market .token-name { font-size: 14px; font-weight: 500; }

  .lend-table .token-cell.col-asset {
    width: auto;
    flex: none;
    margin-bottom: 12px;
    order: 2;
  }
  .lend-table .token-cell.col-asset::before {
    content: 'Asset';
    color: var(--text-muted);
    font-size: 12px;
  }
  .lend-table .token-cell.col-asset .token-name { font-size: 13px; font-weight: 500; }

  .lend-table .cell-tvl,
  .lend-table .cell-apr,
  .lend-table .cell-position {
    width: auto;
    flex: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .lend-table .cell-tvl::before {
    content: 'TVL';
    color: var(--text-muted);
    font-size: 12px;
  }
  .lend-table .cell-apr::before {
    content: 'APR';
    color: var(--text-muted);
    font-size: 12px;
  }
  .lend-table .cell-position::before {
    content: 'Position';
    color: var(--text-muted);
    font-size: 12px;
  }

  /* Stats row separators */
  .lend-table .cell-tvl,
  .lend-table .cell-apr {
    margin-right: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(145, 145, 145, 0.3);
  }

  /* Force stats to new line after token name */
  .lend-table .table-row::before {
    content: '';
    width: 100%;
    order: 3;
    height: 0;
  }
  .lend-table .cell-tvl { order: 4; }
  .lend-table .cell-apr { order: 5; }
  .lend-table .cell-position { order: 6; }
  .lend-table .cell-action { order: 8; }
  .lend-table .table-row::after {
    content: '';
    width: 100%;
    order: 7;
    height: 0;
  }

  /* Lend action button → full width */
  .lend-table .cell-action {
    width: 100%;
    display: flex;
    justify-content: stretch;
    opacity: 1;
    margin-top: 12px;
  }
  .lend-table .cell-action .btn-primary {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: var(--accent);
    color: var(--text-dark);
    border: none;
  }

  /* ── Borrow table mobile ── */
  .borrow-table .table-row {
    gap: 0;
  }

  /* Collateral + Loan on top row */
  .borrow-table .token-cell.col-collateral {
    width: auto;
    flex: none;
  }
  .borrow-table .token-cell.col-collateral::after {
    content: '→';
    color: var(--text-muted);
    margin: 0 8px;
    font-size: 14px;
  }
  .borrow-table .token-cell.col-loan-cell {
    width: auto;
    flex: 1;
  }
  .borrow-table .token-cell .token-name { font-size: 14px; font-weight: 500; }

  /* Stats row (break to new line) */
  .borrow-table .cell-available,
  .borrow-table .cell-ltv,
  .borrow-table .cell-position,
  .borrow-table .cell-rate {
    width: auto;
    flex: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .borrow-table .cell-available::before {
    content: 'Avail.';
    color: var(--text-muted);
    font-size: 12px;
  }
  .borrow-table .cell-ltv::before {
    content: 'maxLTV';
    color: var(--text-muted);
    font-size: 12px;
  }
  .borrow-table .cell-position::before {
    content: 'Position';
    color: var(--text-muted);
    font-size: 12px;
  }
  .borrow-table .cell-rate::before {
    content: 'Rate';
    color: var(--text-muted);
    font-size: 12px;
  }

  .borrow-table .cell-available,
  .borrow-table .cell-ltv,
  .borrow-table .cell-position {
    margin-right: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(145, 145, 145, 0.3);
  }

  /* Use flex-wrap with ordering to break lines */
  .borrow-table .token-cell.col-collateral { order: 1; }
  .borrow-table .token-cell.col-loan-cell { order: 2; flex: 1; }
  .borrow-table .cell-available { order: 4; }
  .borrow-table .cell-ltv { order: 5; }
  .borrow-table .cell-position { order: 6; }
  .borrow-table .cell-rate { order: 7; }
  .borrow-table .cell-action { order: 8; }

  /* Force stats row to new line via invisible break */
  .borrow-table .table-row::before {
    content: '';
    width: 100%;
    order: 3;
    height: 0;
    margin-top: 12px;
  }
  /* Force action button to new line */
  .borrow-table .table-row::after {
    content: '';
    width: 100%;
    order: 6;
    height: 0;
  }

  /* Borrow action → full width on separate line */
  .borrow-table .cell-action,
  .borrow-table .borrow-btn-cell {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    justify-content: stretch;
    opacity: 1;
    margin-top: 8px;
  }
  .borrow-table .cell-action .btn-primary,
  .borrow-table .borrow-btn-cell .btn-primary {
    width: 100%;
    padding: 0 24px;
    height: 40px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: var(--accent);
    color: var(--text-dark);
    border: none;
    justify-content: center;
  }

  /* ── Wrappers: hide table, show cards on mobile ── */
  .page-wrappers .table-section { display: none; }
  .wrapper-cards-mobile { display: block; padding-bottom: 24px; }
  .wrapper-cards-mobile .cards-container { padding: 0 20px; }
  .wrapper-cards-mobile .stat-label { font-weight: 400; text-transform: none; letter-spacing: normal; }

  /* ── Search ── */
  .search-section { padding: 16px 16px 0; }
  .search-box { width: 100%; }

  /* ── Filter ── */
  .filter-section { padding: 16px 16px 0; flex-wrap: wrap; }

  /* ── Modal ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-overlay:has(.modal-success) {
    align-items: center;
    justify-content: center;
    padding-top: 0;
  }
  .modal {
    width: calc(100% - 32px);
    max-width: 510px;
    padding: 24px;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .modal.modal-success {
    width: 280px;
    max-width: 280px;
    border-radius: 12px;
    padding: 32px 20px 24px;
    max-height: none;
    overflow-y: visible;
    background: #262626;
  }
  .modal .deposit-amount,
  .modal .input-amount { font-size: 24px; }
  .modal-title { font-size: 20px; }
  .withdraw-type { flex-direction: row; gap: 16px; flex-wrap: wrap; }
  .radio-group { gap: 16px; }
  .info-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* ── Footer ── */
  .footer {
    position: relative;
    height: auto;
    flex-direction: column;
    padding: 24px 12px;
    gap: 12px;
  }

  .footer-left, .footer-right {
    width: 100%;
    justify-content: center;
  }

  .footer-left {
    gap: 12px;
  }

  .footer-icon svg { width: 20px; height: 20px; }
  .footer-separator { width: 4px; height: 4px; border-radius: 50%; }
  .footer-email { font-size: 12px; }
  .footer-copyright { font-size: 12px; }
  .footer-info { font-size: 12px; }
  .footer-info a { color: var(--text-muted); }

  .footer-right {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
  }
  .footer-right br { display: none; }
  .footer-copyright { font-size: 11px; }
  .footer-info { font-size: 10px; text-align: center; }

  /* ── Content area (wrappers info panel) ── */
  .content-area {
    flex-direction: column;
    padding: 16px;
  }

  .table-wrapper { max-width: 100%; }

  .info-panel {
    width: 100%;
    margin-left: 0;
    margin-top: 16px;
  }

  /* ── Portfolio ── */
  .portfolio-container { width: 100%; padding: 0 16px; }
  .portfolio-section { margin-bottom: 8px; }
  .section-header {
    padding: 0 20px;
  }
  .section-label { font-size: 14px; }
  .section-value { font-size: 12px; }

  /* ── Portfolio tables → card layout on mobile ── */
  .portfolio-table-header { display: none; }
  .accordion-body .table-divider { display: none; }

  .portfolio-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    margin: 0 0 8px;
    gap: 0;
  }
  .portfolio-row:hover { background: var(--bg-card); }

  /* Always show action buttons on mobile */
  .portfolio-row .cell-action { opacity: 1; }

  /* ── Portfolio Lend/Wrappers card layout ── */
  .portfolio-row .token-cell.col-p-asset {
    width: 100%;
    flex: none;
    margin-bottom: 0;
    order: 1;
  }
  .portfolio-row .token-cell.col-p-asset .token-name { font-size: 14px; font-weight: 500; }

  .portfolio-lend-row .token-cell.col-p-market {
    width: 100%;
    flex: none;
    margin-bottom: 8px;
    order: 1;
  }
  .portfolio-lend-row .token-cell.col-p-market .token-name { font-size: 14px; font-weight: 500; }
  .portfolio-lend-row .token-cell.col-p-asset {
    width: auto;
    margin-bottom: 0;
    order: 2;
  }
  .portfolio-lend-row .token-cell.col-p-asset::before {
    content: 'Asset';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-lend-row .token-cell.col-p-asset .token-name { font-size: 13px; }

  .portfolio-row .cell-value.col-p-tvl,
  .portfolio-row .cell-value.col-p-apr,
  .portfolio-row .cell-value.col-p-position {
    width: auto;
    flex: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .portfolio-row .cell-value.col-p-tvl::before {
    content: 'TVL';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-row .cell-value.col-p-apr::before {
    content: 'APR';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-row .cell-value.col-p-position::before {
    content: 'Position';
    color: var(--text-muted);
    font-size: 12px;
  }

  /* Separators between stats */
  .portfolio-row .cell-value.col-p-tvl,
  .portfolio-row .cell-value.col-p-apr {
    margin-right: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(145, 145, 145, 0.3);
  }

  /* Ordering: token name (1), [loan(2)], break(3), stats (4-6), break(8), action (9) */
  .portfolio-row .cell-value.col-p-tvl { order: 4; }
  .portfolio-row .cell-value.col-p-apr { order: 5; }
  .portfolio-row .cell-value.col-p-position { order: 6; }
  .portfolio-row .cell-action.col-p-action { order: 9; }

  /* Force stats to new line (after token name or collateral+loan pair) */
  .portfolio-row::before {
    content: '';
    width: 100%;
    order: 3;
    height: 0;
  }
  /* Force action to new line */
  .portfolio-row::after {
    content: '';
    width: 100%;
    order: 8;
    height: 0;
  }

  /* Action button full width */
  .portfolio-row .cell-action.col-p-action {
    width: 100%;
    display: flex;
    justify-content: stretch;
    margin-top: 12px;
  }
  .portfolio-row .cell-action.col-p-action .btn-primary {
    flex: 1;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: var(--accent);
    color: var(--text-dark);
    border: none;
    justify-content: center;
  }

  /* ── Portfolio Borrow card layout ── */
  .portfolio-borrow-row .token-cell.col-p-collateral {
    width: auto;
    flex: none;
    order: 1;
  }
  .portfolio-borrow-row .token-cell.col-p-collateral::after {
    content: '\2192';
    color: var(--text-muted);
    margin: 0 8px;
    font-size: 14px;
  }
  .portfolio-borrow-row .token-cell.col-p-loan {
    width: auto;
    flex: none;
    order: 2;
    margin-bottom: 12px;
  }
  .portfolio-row .token-cell .token-name { font-size: 14px; font-weight: 500; }

  .portfolio-borrow-row .cell-value.col-p-available,
  .portfolio-borrow-row .cell-value.col-p-ltv,
  .portfolio-borrow-row .cell-value.col-p-position,
  .portfolio-borrow-row .cell-value.col-p-health,
  .portfolio-borrow-row .cell-value.col-p-rate {
    width: auto;
    flex: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .portfolio-borrow-row .cell-value.col-p-available::before {
    content: 'Avail.';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-borrow-row .cell-value.col-p-ltv::before {
    content: 'maxLTV';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-borrow-row .cell-value.col-p-position::before {
    content: 'Position';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-borrow-row .cell-value.col-p-health::before {
    content: 'HF';
    color: var(--text-muted);
    font-size: 12px;
  }
  .portfolio-borrow-row .cell-value.col-p-rate::before {
    content: 'Rate';
    color: var(--text-muted);
    font-size: 12px;
  }

  /* Separators for borrow stats */
  .portfolio-borrow-row .cell-value.col-p-available,
  .portfolio-borrow-row .cell-value.col-p-ltv,
  .portfolio-borrow-row .cell-value.col-p-position,
  .portfolio-borrow-row .cell-value.col-p-health {
    margin-right: 6px;
    padding-right: 6px;
    border-right: 1px solid rgba(145, 145, 145, 0.3);
  }

  /* Borrow stats ordering */
  .portfolio-borrow-row .cell-value.col-p-available { order: 5; }
  .portfolio-borrow-row .cell-value.col-p-ltv { order: 6; }
  .portfolio-borrow-row .cell-value.col-p-position { order: 7; }
  .portfolio-borrow-row .cell-value.col-p-health { order: 8; }
  .portfolio-borrow-row .cell-value.col-p-rate { order: 9; }
  .portfolio-borrow-row .cell-action.col-p-action { order: 10; }

  /* ── Mobile Menu ── */
  .mobile-menu {
    padding: 16px;
  }

  .menu-item {
    font-size: 18px;
    padding: 14px 0;
  }

  .menu-card {
    background: #1a1917;
    border: 1px solid #2a2a28;
    border-radius: 12px;
    padding: 20px;
    margin: auto 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .card-social-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 16px;
  }
  .menu-card .card-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  .menu-card .card-icon svg {
    width: 20px;
    height: 20px;
  }
  .card-email {
    font-weight: 400;
    font-size: 13px;
    color: #919191;
    text-decoration: none;
  }
  .card-legal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .card-copyright {
    font-weight: 400;
    font-size: 12px;
    color: #b5b5b5;
    text-align: center;
  }
  .menu-card .card-info {
    font-weight: 400;
    font-size: 12px;
    color: #a3a3a3;
    text-align: center;
    line-height: 1.5;
  }
  .menu-card .card-info a {
    color: #a3a3a3;
    text-decoration: underline;
  }

  /* ── Vaults page mobile ── */
  .page-vaults .header-tagline { display: none; }

  .vaults-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-x-axis span:nth-child(even) { display: none; }

  .vault-info-card { flex-basis: 100%; }

  .tx-col.tx-date { flex: 1.2; }
  .tx-col.tx-type { flex: 0.6; }
  .tx-col.tx-qty { flex: 0.6; }
  .tx-col.tx-hash { flex: 1.2; }

  /* YB footer mobile */
  .footer-yb { flex-direction: column; gap: 12px; }
  .footer-yb .footer-left { flex-wrap: wrap; gap: 8px; }
  .footer-yb .footer-right { text-align: left; }
}

/* ===================== RESPONSIVE: WIDE MOBILE / SMALL TABLET (769-900px) ===================== */
/* Override mobile rules that are too small-screen for this range */
@media (min-width: 769px) and (max-width: 900px) {
  /* Header: more space, show wallet address */
  .header { padding: 0 24px; }
  .wallet-btn { height: 44px; padding: 0 14px; }
  .wallet-address { display: block; font-size: 11px; }

  /* Hero: larger type */
  .hero { padding: 32px 32px 0; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }
  .page-lend .hero-title,
  .page-borrow .hero-title,
  .page-wrappers .hero-title { font-size: 26px; }

  /* Tables/cards: 2-column grid for lend/borrow cards */
  .data-table { padding: 0 24px; }
  .lend-table .table-row,
  .borrow-table .table-row { padding: 20px; }

  /* Wrappers: 2-column grid */
  .wrapper-cards-mobile .cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 24px;
  }

  /* Landing cards: 2-column */
  .cards-section { padding: 32px 24px; }
  .cards-row { gap: 16px; }
  .card { min-height: 240px; }

  /* Search wider */
  .search-section { padding: 16px 24px 0; }

  /* Footer: more space */
  .footer { padding: 24px 24px; }
  .footer-copyright { font-size: 12px; }
  .footer-info { font-size: 11px; }
}

/* ===================== WALLET CONNECT MODAL ===================== */

/* Overlay */
.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.wallet-modal-overlay.open { opacity: 1; }

/* Modal container */
.wallet-modal {
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 16px;
  overflow: hidden;
  transform: translateY(10px) scale(0.97);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.wallet-modal-overlay.open .wallet-modal {
  transform: translateY(0) scale(1);
}
.wallet-modal-sm { width: 380px; }

/* Header */
.wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #262626;
}
.wallet-modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #d9d9d9;
}
.wallet-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: #262626;
  border-radius: 6px;
  color: #919191;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.wallet-modal-close:hover { background: #333; color: #d9d9d9; }

/* Body */
.wallet-modal-body {
  padding: 12px;
  overflow-y: auto;
  max-height: 400px;
}

/* Wallet list */
.wallet-modal-wallets {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Wallet option button */
.wallet-modal-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  font-family: 'Inter', sans-serif;
}
.wallet-modal-option:hover {
  background: rgba(73, 196, 201, 0.06);
  border-color: rgba(73, 196, 201, 0.2);
}
.wallet-modal-option.connecting {
  opacity: 0.7;
  pointer-events: none;
}

/* Option icon */
.wallet-modal-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
}

/* Option text */
.wallet-modal-option-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.wallet-modal-option-name {
  font-size: 14px;
  font-weight: 500;
  color: #d9d9d9;
  line-height: 1.3;
}
.wallet-modal-option-desc {
  font-size: 12px;
  color: #919191;
  line-height: 1.3;
}

/* Arrow */
.wallet-modal-option-arrow {
  flex-shrink: 0;
  color: #919191;
  transition: color 0.15s;
}
.wallet-modal-option:hover .wallet-modal-option-arrow { color: #49c4c9; }

/* Badge (e.g. "Soon") */
.wallet-modal-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: #919191;
  background: #262626;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Divider */
.wallet-modal-divider {
  height: 1px;
  background: #262626;
  margin: 8px 0;
}

/* WalletConnect option */
.wallet-modal-wc {
  opacity: 0.5;
  cursor: default;
}
.wallet-modal-wc:hover {
  background: transparent;
  border-color: transparent;
}

/* Empty state */
.wallet-modal-empty {
  padding: 24px 16px;
  text-align: center;
}
.wallet-modal-empty-text {
  font-size: 14px;
  color: #d9d9d9;
  margin-bottom: 8px;
}
.wallet-modal-empty-hint {
  font-size: 13px;
  color: #919191;
  line-height: 1.5;
}
.wallet-modal-empty-hint a {
  color: #49c4c9;
  text-decoration: none;
}
.wallet-modal-empty-hint a:hover { text-decoration: underline; }

/* Footer */
.wallet-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 20px;
  border-top: 1px solid #262626;
}
.wallet-modal-footer-text {
  font-size: 12px;
  color: #919191;
}
.wallet-modal-footer-link {
  font-size: 12px;
  color: #49c4c9;
  text-decoration: none;
}
.wallet-modal-footer-link:hover { text-decoration: underline; }

/* ── Connected state modal ── */
.wallet-modal-connected {
  padding: 20px;
}
.wallet-modal-addr-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #121110;
  border-radius: 12px;
  margin-bottom: 16px;
}
.wallet-modal-addr-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wallet-modal-addr-icon svg { display: block; }
.wallet-modal-addr-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wallet-modal-addr-full {
  font-family: 'Inter', monospace;
  font-size: 13px;
  font-weight: 500;
  color: #d9d9d9;
  word-break: break-all;
  line-height: 1.4;
}
.wallet-modal-addr-wallet {
  font-size: 12px;
  color: #919191;
}

/* Action buttons */
.wallet-modal-actions {
  display: flex;
  gap: 8px;
}
.wallet-modal-copy,
.wallet-modal-disconnect {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #262626;
  background: transparent;
  color: #d9d9d9;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.wallet-modal-copy:hover {
  background: rgba(73, 196, 201, 0.08);
  border-color: rgba(73, 196, 201, 0.3);
  color: #49c4c9;
}
.wallet-modal-disconnect {
  border-color: rgba(225, 28, 42, 0.3);
  color: #e11c2a;
}
.wallet-modal-disconnect:hover {
  background: rgba(225, 28, 42, 0.08);
  border-color: rgba(225, 28, 42, 0.5);
}

/* ── Responsive: mobile wallet modal ── */
@media (max-width: 480px) {
  .wallet-modal {
    width: 100%;
    max-width: calc(100vw - 24px);
    border-radius: 14px;
  }
  .wallet-modal-body { padding: 8px; }
  .wallet-modal-option { padding: 10px 12px; }
  .wallet-modal-option-icon { width: 32px; height: 32px; }
  .wallet-modal-option-name { font-size: 13px; }
  .wallet-modal-actions { flex-direction: column; }
}
