:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --sky-800: #075985;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --green: #10b981;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
  --shadow-lg: 0 20px 50px rgba(14, 165, 233, 0.15);
  --font: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: linear-gradient(165deg, var(--sky-50) 0%, var(--white) 40%, var(--sky-100) 100%);
  min-height: 100vh;
  color: var(--slate-700);
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(56, 189, 248, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(14, 165, 233, 0.12), transparent);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; min-height: 100vh; }

/* Auth */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.auth-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: white;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

.auth-logo h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sky-700);
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--slate-800);
  margin-bottom: 8px;
  text-align: center;
}

.auth-sub { text-align: center; color: var(--slate-500); margin-bottom: 28px; font-size: 0.95rem; }

/* Layout */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--sky-100);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 28px;
}

.sidebar-brand-row .sidebar-brand {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 28px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  transition: background 0.15s;
}
.sidebar-brand:hover {
  background: var(--sky-50);
}

.sidebar-brand .logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: white;
  font-size: 1.1rem;
}

.sidebar-brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--sky-700);
}

.nav-list { list-style: none; flex: 1; }

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.nav-item a:hover {
  background: var(--sky-50);
  color: var(--sky-600);
}

.nav-item a.active {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
  color: white;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.nav-item a svg { width: 20px; height: 20px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 10px 10px;
  margin-top: auto;
}

.sidebar-session {
  background: linear-gradient(160deg, var(--sky-50) 0%, var(--white) 100%);
  border: 1px solid var(--sky-200);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.06);
}

.session-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dashed var(--sky-200);
}

.session-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  flex-shrink: 0;
}

.session-info { flex: 1; min-width: 0; }
.session-info .name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-info .meta {
  font-size: 0.72rem;
  color: var(--sky-600);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.session-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.sign-out-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border: none;
  border-radius: 10px;
  background: var(--white);
  color: var(--slate-600);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--sky-100);
}

.sign-out-btn svg {
  width: 18px;
  height: 18px;
  color: var(--slate-400);
  transition: color 0.2s;
}

.sign-out-btn:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.sign-out-btn:hover svg { color: #ef4444; }

.sign-out-btn:active { transform: scale(0.98); }

.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.page-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  flex: 1;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 6px;
}

.page-header p { color: var(--slate-500); font-size: 0.95rem; }

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(186, 230, 253, 0.5);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--slate-800);
  margin-bottom: 16px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.portfolio-section { margin-bottom: 32px; }

.portfolio-section-head {
  margin-bottom: 16px;
}

.portfolio-section-head h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 4px;
}

.portfolio-section-head p {
  font-size: 0.88rem;
  color: var(--slate-500);
}

.balance-split {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.95rem;
  opacity: 0.95;
}

.balance-split strong { font-weight: 700; }

.balance-split-dot { opacity: 0.5; }

.asset-card--zero {
  opacity: 0.85;
  border-style: dashed;
  border-color: var(--sky-200);
}

.asset-card--zero .bal {
  color: var(--slate-400);
}

.portfolio-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.cash-balance-card {
  grid-column: 1 / -1;
}

.cash-total {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--sky-600);
  margin-bottom: 14px;
}

.cash-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--sky-100);
  padding-top: 12px;
}

.cash-currency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.cash-currency-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-600);
  font-weight: 600;
}

.cash-currency-left img,
.cash-currency-left .fiat-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.cash-currency-amt {
  font-weight: 700;
  color: var(--slate-800);
}

.cash-currency-zero {
  color: var(--slate-500);
  font-size: 0.85rem;
}

.empty-holdings {
  text-align: center;
  padding: 40px 24px;
  color: var(--slate-500);
}

.empty-holdings a {
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
}

.empty-holdings a:hover { text-decoration: underline; }

.crypto-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.cash-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.crypto-select-scroll {
  max-height: 320px;
  overflow-y: auto;
}

.detail-row .key {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-row .key .coin-logo-wrap {
  width: 28px;
  height: 28px;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Mobile top bar + drawer sidebar */
.mobile-topbar {
  display: none;
}

.sidebar-overlay {
  display: none;
}

.sidebar-close {
  display: none;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.logo-icon.sm {
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: white;
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
    position: relative;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--sky-100);
    position: sticky;
    top: 0;
    z-index: 90;
  }

  .mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--sky-700);
    text-decoration: none;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-topbar-brand:active {
    opacity: 0.85;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--sky-50);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid var(--sky-200);
  }

  .menu-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--sky-700);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
  }

  .app-shell.sidebar-open .menu-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .app-shell.sidebar-open .menu-bar:nth-child(2) {
    opacity: 0;
  }
  .app-shell.sidebar-open .menu-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .app-shell.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100dvh;
    z-index: 210;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 20px 16px;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--sky-50);
    border-radius: 10px;
    color: var(--slate-600);
    cursor: pointer;
  }

  .sidebar-brand {
    padding-right: 48px;
    padding-bottom: 20px;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    overflow-y: auto;
    gap: 0;
  }

  .nav-item a {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .sidebar-footer {
    display: block;
    flex-shrink: 0;
  }

  .main-content {
    padding: 16px 14px 32px;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .balance-hero {
    padding: 16px 14px;
    display: block;
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .balance-hero-label-row .label {
    font-size: 0.75rem;
  }

  .balance-hero-label-row {
    align-items: flex-start;
    gap: 8px;
  }

  .btn-change-balance {
    font-size: 0.7rem;
    gap: 3px;
    flex-shrink: 0;
    max-width: 46%;
    text-align: right;
    justify-content: flex-end;
    line-height: 1.25;
  }

  .btn-change-balance .btn-change-arrow {
    width: 12px;
    height: 12px;
  }

  .balance-hero .value {
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  .balance-hero .value-fiat {
    font-size: 0.8rem;
    margin-top: 4px;
    white-space: nowrap;
  }

  .balance-hero .change {
    font-size: 0.75rem;
    padding: 4px 8px;
    margin-top: 6px;
  }

  .balance-hero .actions {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 12px;
    gap: 6px;
  }

  .balance-hero .actions .btn {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.75rem;
    padding: 8px 8px;
  }

  .portfolio-grid-auto {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cash-balance-card {
    grid-column: 1 / -1;
  }

  .cash-total {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .cash-currency-row {
    font-size: 0.78rem;
  }

  .cash-currency-left {
    gap: 8px;
  }

  .cash-currency-left img,
  .cash-currency-left .fiat-logo {
    width: 18px;
    height: 18px;
  }

  .asset-card {
    padding: 12px 10px;
    border-radius: 12px;
  }

  .asset-card .top {
    margin-bottom: 6px;
  }

  .asset-card .asset-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .asset-card .coin-logo-wrap,
  .asset-card .fiat-logo-wrap {
    width: 32px;
    height: 32px;
  }

  .asset-card .sym {
    font-size: 0.8rem;
  }

  .asset-card .name {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .asset-card .bal {
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 2px;
  }

  .asset-card .fiat {
    font-size: 0.68rem;
    margin-top: 2px;
  }

  .asset-card .price-change {
    font-size: 0.65rem;
  }

  .asset-card .mini-chart {
    height: 28px;
    margin-top: 6px;
    gap: 2px;
  }

  .asset-card .mini-chart .bar {
    min-height: 2px !important;
  }

  .card-title {
    font-size: 0.9rem;
    margin-bottom: 10px;
  }

  .cash-amount-lg {
    font-size: 1.05rem !important;
    line-height: 1.3;
  }

  @media (max-width: 380px) {
    .portfolio-grid-auto {
      grid-template-columns: 1fr;
    }

    .asset-card .bal {
      font-size: 0.9rem;
    }
  }

  .coin-select-meta {
    font-size: 0.7rem;
  }

  .coin-select-name {
    font-size: 0.85rem;
  }

  .coin-select-item {
    padding: 10px 12px;
  }

  .coin-logo-wrap,
  .fiat-logo-wrap {
    width: 32px;
    height: 32px;
  }

  .detail-row .val {
    font-size: 0.82rem;
  }

  .detail-row .key {
    font-size: 0.8rem;
  }

  .trade-summary {
    padding: 12px;
    font-size: 0.85rem;
  }

  .trade-summary .row.total {
    font-size: 0.9rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .exchange-columns,
  .exchange-columns-stacked {
    grid-template-columns: 1fr;
  }

  .exchange-arrow {
    padding: 8px 0;
    transform: rotate(90deg);
  }

  .asset-picker {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .asset-pick {
    padding: 10px 6px;
  }

  .cash-grid-list,
  #withdraw-cash-list,
  #ex-cash-to-list {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .auth-screen-split {
    grid-template-columns: 1fr;
  }

  .auth-panel-left {
    display: none;
  }

  #toast-container {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }

  .toast {
    max-width: none;
  }
}

@media (min-width: 769px) {
  .sidebar-close,
  .mobile-topbar,
  .sidebar-overlay {
    display: none !important;
  }
}

/* Hero balance */
.balance-hero {
  background: linear-gradient(135deg, var(--sky-500) 0%, var(--sky-600) 50%, var(--sky-700) 100%);
  border-radius: 20px;
  padding: 32px 36px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.balance-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.balance-hero-top {
  position: relative;
  z-index: 1;
}

.balance-hero-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.balance-hero-label-row .label {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.balance-hero-display {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.balance-hero-display .value {
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-hero .label { font-size: 0.9rem; opacity: 0.9; margin-bottom: 8px; }
.balance-hero .value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  display: block;
}

.balance-hero .portfolio-crypto-line {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  white-space: nowrap;
}
.balance-hero .portfolio-crypto-sym {
  font-weight: 800;
}

.balance-hero .value-fiat {
  margin-top: 6px;
  font-size: 1.05rem;
  opacity: 0.92;
  font-weight: 500;
  white-space: nowrap;
}

.btn-change-balance {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 0;
  background: none;
  border: none;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}

.btn-change-balance:hover {
  opacity: 0.8;
}

.btn-change-balance .btn-change-arrow {
  flex-shrink: 0;
  opacity: 0.9;
}

.balance-hero .change {
  margin-top: 12px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
}

.pending-requests-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--sky-500);
  background: linear-gradient(90deg, var(--sky-50), var(--white));
}
.pending-requests-banner strong {
  display: block;
  margin-bottom: 4px;
  color: var(--sky-700);
}
.pending-requests-banner span {
  font-size: 0.82rem;
  color: var(--slate-600);
}
.user-notif-banner {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.user-notif-banner:hover {
  background: #fde68a;
}
.balance-hero .actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Asset cards */
.asset-card {
  padding: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}

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

.asset-card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.asset-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
}

.asset-card .sym { font-weight: 700; color: var(--slate-800); }
.asset-card .name { font-size: 0.8rem; color: var(--slate-500); }
.asset-card .bal { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--slate-800); }
.asset-card .fiat { font-size: 0.85rem; color: var(--slate-500); margin-top: 4px; }
.asset-card .price-change { font-size: 0.8rem; font-weight: 600; }
.asset-card .price-change.up { color: var(--green); }
.asset-card .price-change.down { color: var(--red); }

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

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--slate-700);
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--sky-200);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  background: var(--white);
  color: var(--slate-800);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row input { flex: 1; }
.input-row select { width: 120px; flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  color: white;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white;
  color: var(--sky-600);
  border: 1.5px solid var(--sky-300);
}

.btn-secondary:hover { background: var(--sky-50); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.3); }

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

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

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--sky-50);
  padding: 6px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: white;
  color: var(--sky-600);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

/* Trade panel */
.trade-panel { max-width: 520px; }

.trade-summary {
  background: var(--sky-50);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 20px 0;
}

.trade-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.trade-summary .row.total {
  border-top: 1px solid var(--sky-200);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-800);
}

.asset-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.asset-pick {
  padding: 14px 8px;
  border: 2px solid var(--sky-100);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.asset-pick:hover { border-color: var(--sky-300); }
.asset-pick.selected {
  border-color: var(--sky-500);
  background: var(--sky-50);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.asset-pick .icon { font-size: 1.3rem; margin-bottom: 4px; }
.asset-pick .sym { font-weight: 700; font-size: 0.85rem; }

/* Transactions */
.tx-list { list-style: none; }

.tx-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sky-50);
}

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

.tx-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.tx-icon.buy { background: #d1fae5; color: var(--green); }
.tx-icon.sell,
.tx-icon.withdraw { background: #fee2e2; color: var(--red); }
.tx-icon.exchange { background: var(--sky-100); color: var(--sky-600); }

.tx-item .details { flex: 1; }
.tx-item .title { font-weight: 600; color: var(--slate-800); font-size: 0.95rem; }
.tx-item .meta { font-size: 0.8rem; color: var(--slate-500); }
.tx-item .amount { font-weight: 700; text-align: right; color: var(--slate-800); }

/* Chart */
.mini-chart {
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
}

.mini-chart .bar {
  flex: 1;
  background: linear-gradient(to top, var(--sky-400), var(--sky-300));
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  opacity: 0.7;
  transition: height 0.3s;
}

/* Support chat */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  height: calc(100vh - 180px);
  min-height: 480px;
}

@media (max-width: 900px) {
  .chat-layout { grid-template-columns: 1fr; height: auto; }
}

.chat-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.chat-bubble.support {
  align-self: flex-start;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  color: var(--slate-700);
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble .time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 6px;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--sky-100);
}

.chat-input-area input { flex: 1; }

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}

.quick-reply {
  padding: 8px 14px;
  background: white;
  border: 1px solid var(--sky-200);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--sky-700);
  transition: all 0.2s;
}

.quick-reply:hover { background: var(--sky-50); border-color: var(--sky-400); }

/* Account */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.profile-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-verified { background: #d1fae5; color: #047857; }
.badge-gold { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }

.detail-grid {
  display: grid;
  gap: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--sky-50);
}

.detail-row:last-child { border-bottom: none; }
.detail-row .key { color: var(--slate-500); font-size: 0.9rem; }
.detail-row .val { font-weight: 600; color: var(--slate-800); }

.account-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.account-page-head {
  margin-bottom: 20px;
}

.account-page-head h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--slate-800);
  margin: 0 0 6px;
}

.account-page-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.95rem;
}

.account-profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--slate-800);
  margin: 0;
}

.account-profile-email {
  color: var(--slate-500);
  margin: 6px 0 12px;
  font-size: 0.95rem;
}

.account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-section-card {
  margin-top: 20px;
}

.account-section-lead {
  font-size: 0.85rem;
  color: var(--slate-500);
  margin: 0 0 16px;
  line-height: 1.45;
}

.account-form .form-group input {
  width: 100%;
}

.account-save-btn {
  margin-top: 4px;
}

/* Settings */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--sky-50);
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  cursor: pointer;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--slate-200);
  border-radius: 26px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--sky-500);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Toast */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  background: white;
  border-left: 4px solid var(--sky-500);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 500;
  color: var(--slate-800);
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }

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

.error-text { color: var(--red); font-size: 0.85rem; margin-top: 8px; }

.hidden { display: none !important; }
.blur-text { filter: blur(6px); user-select: none; }

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

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

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--slate-500);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modal h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--slate-800);
}

.modal p { color: var(--slate-500); margin-bottom: 24px; }

.modal-balance-picker {
  max-width: 420px;
  width: calc(100% - 32px);
  text-align: left;
}

.modal-balance-picker h3 {
  margin-bottom: 8px;
}

.modal-balance-picker .modal-sub {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.modal-balance-picker .portfolio-balance-list {
  max-height: min(50vh, 360px);
  overflow-y: auto;
  margin-bottom: 16px;
}

.modal-balance-picker .modal-empty {
  color: var(--slate-500);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.modal-balance-picker .btn-block {
  width: 100%;
}

.modal .btn-group { justify-content: center; }

.modal-signout .modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--sky-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.modal-signout.danger .btn-primary {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* ─── Landing page ─── */
.landing { min-height: 100vh; overflow-x: hidden; }

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 16px 40px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(186, 230, 253, 0.5);
}

.landing-nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.landing-nav-login-mobile {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--sky-700);
}

.landing-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-600));
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.landing-logo.sm { width: 32px; height: 32px; font-size: 0.9rem; }
.landing-logo.lg { width: 56px; height: 56px; font-size: 1.5rem; margin-bottom: 24px; }

.landing-nav-links {
  display: flex;
  gap: 32px;
}

.landing-nav-links a,
.landing-nav-link {
  text-decoration: none;
  color: var(--slate-600);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.landing-nav-links a:hover,
.landing-nav-link:hover { color: var(--sky-600); }

.landing-nav-link.is-active {
  color: var(--sky-700);
  font-weight: 700;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-sign-in,
.btn-ghost-nav.btn-sign-in,
.static-entry .btn-sign-in {
  white-space: nowrap;
}

.btn-ghost-nav {
  padding: 10px 18px;
  background: transparent;
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  white-space: nowrap;
}

.btn-ghost-nav:hover { background: var(--sky-50); }

.btn-lg { padding: 16px 28px; font-size: 1rem; }

.landing-hero {
  position: relative;
  padding: 140px 40px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}

.orb-1 { width: 400px; height: 400px; background: var(--sky-300); top: -100px; right: 10%; }
.orb-2 { width: 300px; height: 300px; background: var(--sky-200); bottom: 0; left: -5%; }
.orb-3 { width: 200px; height: 200px; background: white; top: 40%; left: 30%; opacity: 0.8; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--sky-200);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--slate-800);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--sky-500), var(--sky-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--slate-500);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.65;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-trust {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
}

.trust-item strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--sky-600);
}

.trust-item span { font-size: 0.8rem; color: var(--slate-500); }

.hero-visual { position: relative; min-height: 420px; }

.hero-phone {
  background: linear-gradient(145deg, var(--slate-800), #0f172a);
  border-radius: 32px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(255,255,255,0.1) inset;
  max-width: 300px;
  margin: 0 auto;
  animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.phone-notch {
  width: 80px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  margin: 0 auto 16px;
}

.phone-screen {
  background: linear-gradient(180deg, var(--sky-600), var(--sky-800));
  border-radius: 24px;
  padding: 28px 22px;
  color: white;
}

.phone-header { font-size: 0.8rem; opacity: 0.85; }
.phone-balance {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin: 8px 0;
}
.phone-change {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.phone-assets { display: flex; flex-direction: column; gap: 10px; }

.phone-asset {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  padding: 10px 12px;
  border-radius: 12px;
  animation: fadeSlideIn 0.6s ease backwards;
}

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

.pa-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
}
.pa-icon .coin-logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
}
.pa-name { flex: 1; font-weight: 600; font-size: 0.9rem; }
.pa-val { font-size: 0.85rem; opacity: 0.95; }

.float-card {
  position: absolute;
  background: white;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--sky-100);
  animation: floatCard 5s ease-in-out infinite;
}

.float-card-1 { top: 20px; right: 0; animation-delay: 0.5s; }
.float-card-2 { bottom: 60px; left: 0; animation-delay: 1s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.fc-label { display: block; font-size: 0.75rem; color: var(--slate-500); }
.fc-val { font-family: var(--font-display); font-weight: 700; color: var(--sky-600); font-size: 1.1rem; }

.ticker-wrap {
  background: linear-gradient(90deg, var(--sky-600), var(--sky-500));
  padding: 14px 0;
  overflow: hidden;
  border-top: 1px solid var(--sky-400);
  border-bottom: 1px solid var(--sky-400);
}

.ticker-track {
  display: flex;
  gap: 48px;
  animation: tickerScroll 35s linear infinite;
  width: max-content;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  font-size: 0.9rem;
  white-space: nowrap;
}

.ticker-sym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.ticker-sym .coin-logo {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ticker-price { opacity: 0.95; }
.ticker-chg.up { color: #a7f3d0; }
.ticker-chg.down { color: #fecaca; }

.landing-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px;
  scroll-margin-top: 88px;
}

#privacy,
#terms {
  scroll-margin-top: 88px;
}

.landing-section-alt {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 32px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1100px;
  width: calc(100% - 48px);
}

.section-head { text-align: center; max-width: 560px; margin: 0 auto 48px; }

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-600);
  margin-bottom: 12px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--slate-800);
  margin-bottom: 12px;
}

.section-head p { color: var(--slate-500); font-size: 1.05rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: white;
  border: 1px solid var(--sky-100);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--sky-200);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--sky-50);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--sky-600);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--slate-800);
  margin-bottom: 8px;
}

.feature-card p { font-size: 0.9rem; color: var(--slate-500); line-height: 1.55; }

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
}

.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 16px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--slate-800);
  margin-bottom: 8px;
}

.step-card p { color: var(--slate-500); font-size: 0.9rem; }

.security-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, var(--sky-50), white);
  border: 1px solid var(--sky-100);
  border-radius: 24px;
  padding: 48px;
}

.security-copy h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--slate-800);
  margin: 12px 0 16px;
}

.security-copy p { color: var(--slate-500); margin-bottom: 20px; }

.security-list {
  list-style: none;
  color: var(--slate-700);
  font-weight: 500;
}

.security-list li { padding: 8px 0; }

.shield-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--sky-100);
}

.shield-icon { font-size: 3rem; margin-bottom: 12px; }
.shield-title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--slate-800); }
.shield-status { color: var(--green); font-weight: 600; font-size: 0.9rem; margin-top: 8px; }

.landing-cta {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
  margin: 0 24px 40px;
  border-radius: 28px;
  color: white;
}

.landing-cta h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.landing-cta p { opacity: 0.9; margin-bottom: 28px; font-size: 1.05rem; }

.landing-cta .btn-primary {
  background: white;
  color: var(--sky-600);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.landing-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

#about.landing-section-alt {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#about .section-head,
#about .about-grid {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  justify-content: center;
}
.about-card {
  background: var(--white);
  border: 1px solid var(--sky-100);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.06);
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--slate-800);
  margin: 0 0 10px;
}
.about-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--slate-600);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--sky-100);
  border-radius: 14px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 18px;
  font-weight: 600;
  color: var(--slate-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.public-faq-item summary {
  justify-content: flex-start;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  color: var(--sky-600);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--slate-600);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}
.contact-card {
  border-radius: 20px;
  padding: 24px 22px;
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 16px;
  color: var(--slate-800);
}
.contact-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  font-size: 0.9rem;
}
.contact-dl dt {
  font-weight: 600;
  color: var(--slate-500);
  margin: 0;
}
.contact-dl dd {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.45;
}
.contact-dl a {
  color: var(--sky-600);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}
.contact-dl a:hover { text-decoration: underline; }
.contact-social-lead {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--slate-600);
  line-height: 1.5;
}
.contact-social-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.contact-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--sky-200);
  background: var(--sky-50);
  color: var(--sky-700);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.contact-social-btn:hover {
  background: var(--sky-100);
  border-color: var(--sky-300);
}
.contact-signin-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.5;
}
.contact-signin-hint a {
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
}
.contact-signin-hint a:hover { text-decoration: underline; }

.landing-footer {
  padding: 48px 24px 32px;
  color: var(--slate-500);
  font-size: 0.9rem;
  background: linear-gradient(180deg, var(--slate-50) 0%, #fff 100%);
  border-top: 1px solid var(--sky-100);
}

/* ─── Public sub-pages (Features, About, FAQ, etc.) ─── */
.landing--subpage {
  background: linear-gradient(180deg, var(--sky-50) 0%, #fff 28%, #fff 100%);
}

.public-page {
  padding: 0 0 56px;
  margin: 0;
  max-width: none;
}

.public-page-hero {
  position: relative;
  padding: 88px 24px 48px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--sky-500) 0%, var(--sky-700) 55%, #0369a1 100%);
  color: #fff;
}

.public-page-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.public-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(2px);
}

.public-orb-1 {
  width: 280px;
  height: 280px;
  top: -80px;
  right: -40px;
}

.public-orb-2 {
  width: 180px;
  height: 180px;
  bottom: -60px;
  left: 8%;
}

.public-page-hero-wrap {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.public-page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(8px);
}

.public-page-back:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.public-page-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.public-page-tag {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.88;
  margin-bottom: 10px;
}

.public-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.public-page-subtitle {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1.02rem;
  line-height: 1.55;
  opacity: 0.92;
}

.public-page-inner {
  width: 100%;
  max-width: 960px;
  margin: -28px auto 0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.public-page-panel {
  background: var(--white);
  border: 1px solid var(--sky-100);
  border-radius: 24px;
  padding: 32px 28px 36px;
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.1), 0 4px 16px rgba(15, 23, 42, 0.04);
}

.public-page-cta {
  margin-top: 28px;
}

.public-page-cta-inner {
  text-align: center;
  padding: 28px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--sky-50) 0%, #fff 100%);
  border: 1px solid var(--sky-100);
}

.public-page-cta-inner h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--slate-800);
  margin: 0 0 8px;
}

.public-page-cta-inner p {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--slate-500);
}

.about-grid--page {
  max-width: none;
  margin: 0;
}

.features-grid--page {
  gap: 18px;
}

.public-feature-card {
  animation: publicCardIn 0.5s ease backwards;
  animation-delay: var(--card-delay, 0s);
  border-radius: 18px;
  padding: 24px 22px;
}

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

.public-feature-icon {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--sky-50), var(--sky-100));
}

.steps-row--page {
  gap: 20px;
}

.public-step-card {
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  border-radius: 20px;
  padding: 28px 22px;
}

.security-banner--page {
  margin: 0;
  gap: 28px;
}

.security-list--page {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.security-list--page li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--slate-600);
}

.security-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sky-500);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.public-shield-card {
  position: relative;
  overflow: hidden;
}

.shield-pulse {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  animation: shieldPulse 3s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.public-about-card {
  text-align: left;
  position: relative;
  padding-top: 48px;
}

.public-about-icon {
  position: absolute;
  top: 20px;
  left: 22px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-size: 1rem;
}

.public-info-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--sky-100);
}

.public-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
}

.public-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}

.public-info-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-800);
  text-decoration: none;
  word-break: break-word;
}

a.public-info-val { color: var(--sky-600); }

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

.faq-list--page {
  max-width: none;
  gap: 12px;
}

.public-faq-item summary {
  gap: 14px;
}

.faq-q-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sky-100);
  color: var(--sky-700);
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.faq-q-text {
  flex: 1;
  text-align: left;
}

.sponsors-grid--page {
  max-width: none;
  gap: 16px;
}

.public-sponsor-card {
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.public-sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.14);
  border-color: var(--sky-200);
}

.sponsor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.sponsor-card-logo {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky-100), var(--sky-200));
  color: var(--sky-700);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.legal-updated {
  margin: 0 0 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-500);
  text-align: center;
}

.legal-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section-block {
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
}

.legal-section-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--slate-800);
  margin: 0 0 10px;
}

.legal-section-block p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--slate-600);
}

.legal-section-block a {
  color: var(--sky-600);
  font-weight: 600;
}

.landing-explore {
  padding-top: 60px;
  padding-bottom: 60px;
}

.explore-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.explore-link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--sky-100);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.explore-link-card:hover {
  border-color: var(--sky-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.explore-link-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-800);
}

.explore-link-desc {
  font-size: 0.85rem;
  color: var(--slate-500);
  line-height: 1.45;
  padding-right: 24px;
}

.explore-link-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sky-500);
  font-size: 1.1rem;
  font-weight: 700;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.sponsors-grid--home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  gap: 12px;
}

.sponsor-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--sky-100);
  background: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-800);
  text-align: center;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.06);
}

.sponsor-card {
  background: var(--white);
  border: 1px solid var(--sky-100);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.06);
}

.sponsor-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sky-600);
  margin-bottom: 10px;
}

.sponsor-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--slate-800);
  margin: 0 0 10px;
}

.sponsor-card-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--slate-600);
}

.sponsors-home-cta {
  text-align: center;
  margin: 28px 0 0;
}

.landing-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  max-width: 1080px;
  margin: 0 auto 32px;
  text-align: left;
}

.footer-col--brand .footer-brand {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--sky-700);
  margin-bottom: 12px;
}

.footer-tagline,
.footer-email,
.footer-phone {
  margin: 0 0 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--slate-600);
}
.footer-email a,
.footer-phone a {
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
}
.footer-email a:hover,
.footer-phone a:hover { text-decoration: underline; }

.footer-col-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--sky-600); }

.landing-legal {
  max-width: 720px;
  margin: 0 auto 12px;
}
.legal-details {
  background: var(--white);
  border: 1px solid var(--sky-100);
  border-radius: 12px;
  overflow: hidden;
}
.legal-details summary {
  padding: 14px 16px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  list-style: none;
}
.legal-details summary::-webkit-details-marker { display: none; }
.legal-body {
  padding: 0 16px 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--slate-600);
}
.legal-body p { margin: 0 0 10px; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-body a { color: var(--sky-600); }

.footer-copy {
  text-align: center;
  margin: 20px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--sky-100);
  font-size: 0.82rem;
  color: var(--slate-500);
}

/* Split auth (login) */
.auth-screen-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  align-items: stretch;
}

.auth-panel-left {
  background: linear-gradient(160deg, var(--sky-500) 0%, var(--sky-700) 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -80px;
  right: -80px;
}

.auth-back {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.auth-back:hover { color: white; }

.auth-panel-quote { position: relative; z-index: 1; max-width: 380px; }

.auth-panel-quote blockquote {
  font-size: 1.35rem;
  line-height: 1.5;
  font-weight: 500;
  margin-bottom: 20px;
  opacity: 0.95;
}

.auth-panel-quote cite { font-size: 0.9rem; opacity: 0.8; font-style: normal; }

.auth-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--sky-50);
}

.auth-demo-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--slate-500);
}
.auth-demo-fill {
  border: none;
  background: none;
  color: var(--sky-600);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px 4px;
  min-height: 44px;
}
.auth-demo-creds {
  text-align: center;
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--slate-400);
  word-break: break-all;
}
.auth-demo-creds code {
  background: var(--sky-50);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
}
.auth-back-mobile {
  display: none;
  color: var(--sky-600);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 12px;
  min-height: 44px;
  align-items: center;
}
.auth-logo-tag {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--slate-500);
}
.auth-screen-split .auth-logo {
  justify-content: flex-start;
  text-align: left;
}
.auth-screen-split .auth-logo h1 {
  font-size: 1.35rem;
  text-align: left;
}
.auth-screen-split .auth-card h2 {
  text-align: left;
}
.auth-screen-split .auth-sub {
  text-align: left;
}
.auth-screen-split .auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 22px;
  border-radius: 18px;
}
.auth-screen-split .form-group input {
  font-size: 16px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.auth-submit-btn {
  min-height: 48px;
  font-size: 1rem;
  margin-top: 4px;
}
.auth-screen-split #login-error {
  margin-bottom: 4px;
}

.login-email-label .login-email-long {
  display: none;
}

.login-btn-mobile,
.auth-logo-tag-mobile,
.auth-demo-mobile {
  display: none;
}

@media (max-width: 1024px) {
  .login-email-label .login-email-short {
    display: none;
  }
  .login-email-label .login-email-long {
    display: inline;
  }
  .login-btn-desktop,
  .auth-demo-desktop {
    display: none !important;
  }
  .login-btn-mobile {
    display: inline;
  }
  p.auth-demo-mobile {
    display: block;
  }
  .auth-demo-details.auth-demo-mobile {
    display: block;
  }
}

/* Desktop login + landing (classic layout) */
@media (min-width: 1025px) {
  .auth-mobile-hero {
    display: none !important;
  }
  .auth-panel-left {
    position: relative;
    overflow: hidden;
  }
  .auth-panel-visual {
    display: flex !important;
    opacity: 0.5;
  }
  .auth-orbit-lg {
    width: 280px;
    height: 280px;
  }
  .auth-orbit-lg .auth-orbit-core {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    border-radius: 20px;
  }
  .auth-orbit-lg .auth-orbit-dot {
    transform-origin: 50% 140px;
  }
  .auth-panel-quote {
    position: relative;
    z-index: 1;
  }
  .auth-demo-mobile {
    display: none !important;
  }
  .auth-demo-desktop {
    display: block;
  }
  .auth-panel-left {
    padding: 56px 64px;
  }
  .auth-panel-right {
    align-items: center;
    justify-content: center;
    padding: 56px 64px;
  }
  .auth-screen-split .auth-logo {
    justify-content: center;
    text-align: center;
    margin-bottom: 32px;
  }
  .auth-screen-split .auth-logo h1 {
    text-align: center;
    font-size: 1.75rem;
  }
  .auth-screen-split .auth-card h2,
  .auth-screen-split .auth-sub {
    text-align: center;
  }
  .auth-screen-split .auth-card {
    width: 100%;
    max-width: 560px;
    padding: 48px 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
  }
  .landing-hero {
    max-width: 1440px;
    padding-left: 56px;
    padding-right: 56px;
  }
  .landing-section {
    max-width: 1320px;
    padding-left: 56px;
    padding-right: 56px;
  }
  .hero-lead {
    max-width: 560px;
  }
  .auth-screen-split .form-group input {
    font-size: 1rem;
    min-height: auto;
    padding: 12px 14px;
  }
  .auth-password-toggle {
    display: none;
  }
  .auth-password-wrap input {
    padding-right: 14px !important;
  }
  #auth-login-page .auth-submit-btn {
    position: static;
  }
}

@media (max-width: 1024px) {
  .auth-demo-desktop {
    display: none !important;
  }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .security-banner { grid-template-columns: 1fr; }
  .auth-screen-split { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right {
    min-height: 100dvh;
    min-height: 100vh;
    padding: 16px 16px 32px;
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-bottom: max(32px, env(safe-area-inset-bottom));
  }
  .auth-screen.auth-screen-split {
    min-height: 100dvh;
    padding: 0;
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: max(10px, env(safe-area-inset-top)) 16px 12px;
    gap: 12px;
  }

  .landing-nav-inner {
    display: none;
  }

  .landing-nav-login-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}

@media (max-width: 640px) {
  .landing-hero { padding: 110px 20px 60px; }
  .landing-section { padding: 60px 20px; }
  .features-grid, .steps-row, .about-grid, .sponsors-grid, .sponsors-grid--home { grid-template-columns: 1fr; }
  .public-page-hero { padding: 80px 16px 40px; }
  .public-page-inner { padding: 0 14px; margin-top: -20px; }
  .public-page-panel { padding: 24px 18px 28px; border-radius: 20px; }
  .public-info-strip { grid-template-columns: 1fr; }
  .sponsors-grid--page { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-dl div { grid-template-columns: 1fr; gap: 4px; }
  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }
  .footer-col--brand { grid-column: 1 / -1; }
}

/* ─── Exchange (coin & fiat logos) ─── */
.exchange-card {
  max-width: 100%;
}

.exchange-mode { margin-top: 8px; }

.exchange-columns {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 24px;
}

.exchange-columns-stacked {
  grid-template-columns: 1fr auto 1fr;
}

.exchange-column { min-width: 0; }

.exchange-label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  margin-bottom: 12px;
}

.exchange-label em {
  font-style: normal;
  color: var(--sky-600);
  text-transform: lowercase;
  letter-spacing: 0;
}

.exchange-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 36px;
  color: var(--sky-400);
}

.exchange-arrow svg {
  width: 28px;
  height: 28px;
  background: var(--sky-50);
  border-radius: 50%;
  padding: 6px;
  border: 1px solid var(--sky-200);
}

.exchange-swap-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 36px;
}

.exchange-swap-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--sky-200);
  background: white;
  color: var(--sky-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.exchange-swap-btn:hover {
  background: var(--sky-50);
  border-color: var(--sky-400);
  transform: rotate(180deg);
}

.exchange-swap-btn svg { width: 22px; height: 22px; }

.coin-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coin-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--sky-100);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: all 0.2s ease;
}

.coin-select-item:hover {
  border-color: var(--sky-300);
  background: var(--sky-50);
}

.coin-select-item.selected {
  border-color: var(--sky-500);
  background: linear-gradient(135deg, var(--sky-50), white);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.coin-logo-wrap,
.fiat-logo-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-50);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sky-100);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

.fiat-logo-wrap { border-radius: 50%; }

.coin-logo,
.fiat-logo {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  background: var(--white);
}
.coin-logo-wrap img.coin-logo,
.fiat-logo-wrap img.fiat-logo,
.withdraw-currency-logo img,
.market-tile-logo img,
.buy-preview-logo img {
  object-fit: contain;
}
.coin-logo--hidden {
  display: none !important;
}
.coin-logo-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  object-fit: cover;
}
.coin-logo-wrap .coin-logo-fallback[hidden] {
  display: none !important;
}
.coin-logo-wrap .coin-logo-fallback:not([hidden]) {
  display: inline-flex !important;
}

.coin-select-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coin-select-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slate-800);
}

.coin-select-meta {
  font-size: 0.78rem;
  color: var(--slate-500);
}

.coin-select-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--sky-200);
  flex-shrink: 0;
  transition: all 0.2s;
}

.coin-select-item.selected .coin-select-check {
  border-color: var(--sky-500);
  background: var(--sky-500);
  box-shadow: inset 0 0 0 3px white;
}

.exchange-amount-group { margin-bottom: 20px; }

.amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px 14px;
  border: 1.5px solid var(--sky-200);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.amount-input-wrap:focus-within {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.amount-input-wrap input {
  border: none;
  padding: 12px 8px;
  box-shadow: none;
  flex: 1;
}

.amount-input-wrap input:focus {
  box-shadow: none;
}

.amount-coin-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.amount-coin-preview .coin-logo {
  width: 32px;
  height: 32px;
}

.amount-suffix {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--sky-600);
  padding-right: 14px;
}

.exchange-summary { margin-bottom: 20px; }

.receive-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.receive-with-logo .fiat-logo,
.receive-with-logo .coin-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

#ex-receive-flag {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
}

#ex-receive2-preview {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

@media (max-width: 720px) {
  .exchange-columns,
  .exchange-columns-stacked {
    grid-template-columns: 1fr;
  }
  .exchange-arrow,
  .exchange-swap-divider {
    padding: 8px 0;
    transform: rotate(90deg);
  }
  .exchange-swap-divider { transform: none; }
  .exchange-swap-btn { transform: none; }
}

/* ─── Desktop / PC layout ─── */
@media (min-width: 1024px) {
  .sidebar {
    width: 272px;
    padding: 28px 20px;
  }

  .main-content {
    padding: 36px max(40px, env(safe-area-inset-right, 0px)) 64px max(40px, env(safe-area-inset-left, 0px));
  }

  .page-header h1 {
    font-size: 2.15rem;
  }

  .page-header p {
    font-size: 1.05rem;
  }

  .balance-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 40px;
    padding: 40px 48px;
  }

  .balance-hero-top {
    grid-column: 1;
    align-items: center;
  }

  .balance-hero .value { font-size: 3rem; }
  .balance-hero .value-fiat { font-size: 1.2rem; }

  .balance-hero .actions {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
    align-self: center;
    flex-direction: column;
    align-items: stretch;
    min-width: 160px;
  }

  .balance-hero .actions .btn {
    justify-content: center;
  }

  .grid-2 {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
  }

  .grid-4 {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }

  .trade-panel {
    max-width: none;
  }

  .asset-picker {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }

  .asset-pick {
    padding: 18px 12px;
  }

  #withdraw-cash-list,
  #withdraw-cash-fiat-list,
  #ex-cash-to-list,
  .cash-grid-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .crypto-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  #ex-from-list,
  #ex-from2-list,
  #ex-to2-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .exchange-card {
    padding: 32px 36px;
  }

  .exchange-columns {
    gap: 28px;
  }

  .exchange-column .coin-select-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .exchange-column .coin-select-list::-webkit-scrollbar {
    width: 6px;
  }

  .exchange-column .coin-select-list::-webkit-scrollbar-thumb {
    background: var(--sky-200);
    border-radius: 3px;
  }

  .amount-input-wrap input {
    font-size: 1.1rem;
    padding: 14px 10px;
  }

  .chat-layout {
    grid-template-columns: 1fr 340px;
    min-height: 560px;
  }

  .chat-window {
    min-height: 560px;
  }

  .tabs {
    width: 100%;
    max-width: 480px;
  }

  .tab {
    flex: 1;
    text-align: center;
  }
}

@media (min-width: 1280px) {
  .sidebar {
    width: 288px;
  }

  .main-content {
    padding: 40px 48px 72px;
  }

  .grid-4 {
    gap: 24px;
  }

  .asset-card {
    padding: 22px;
  }

  .card {
    padding: 28px;
  }

  .exchange-columns {
    grid-template-columns: 1fr 56px 1fr;
  }

  .landing-nav {
    padding: 18px 56px;
  }

  .landing-hero {
    max-width: 1560px;
    padding: 150px 64px 100px;
  }

  .landing-section {
    max-width: 1440px;
    padding: 100px 64px;
  }

  .auth-screen-split .auth-card {
    max-width: 600px;
  }

  .hero-copy h1 {
    font-size: 4rem;
  }

  .features-grid {
    gap: 28px;
  }

  .feature-card {
    padding: 32px;
  }
}

@media (min-width: 1536px) {
  #ex-from-list,
  #ex-from2-list,
  #ex-to2-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2.page-split-wide {
    grid-template-columns: 1fr 420px;
  }
}


@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .page-wrap { max-width: 100%; overflow-x: hidden; }
  .card-header-row { align-items: flex-start; }
  .card-header-row .btn-change-balance { flex-shrink: 0; margin-top: 2px; }
  .cash-currency-row { flex-wrap: nowrap; gap: 8px; }
  .cash-currency-amt { text-align: right; flex-shrink: 0; }
  .modal-balance-picker { max-height: min(85vh, 520px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .portfolio-balance-list .coin-select-item { min-height: 48px; }
  .balance-hero .portfolio-crypto-line { font-size: 1.35rem; }
  .balance-hero .actions { gap: 8px; }
  .balance-hero .actions .btn { min-height: 44px; padding: 10px 12px; }
  .asset-card { min-width: 0; }
  .portfolio-grid-auto { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 480px) {
  .balance-hero .value { font-size: 1.2rem; }
  .balance-hero .portfolio-crypto-line { font-size: 1.2rem; }
}

/* ——— Cash balance card ——— */
.cash-balance-card--elevated {
  border: 1px solid var(--sky-100);
  background: linear-gradient(180deg, var(--white) 0%, var(--sky-50) 100%);
  box-shadow: var(--shadow);
}
.cash-card-top,
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.cash-card-top .card-title,
.card-header-row .card-title {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--slate-700);
}
.cash-balance-card .cash-total {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--sky-700);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.cash-balance-card .btn-change-balance {
  color: var(--sky-600);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 0;
}
.cash-balance-card .btn-change-arrow { stroke: var(--sky-600); opacity: 0.85; }
.cash-breakdown {
  padding-top: 12px;
  border-top: 1px solid var(--sky-100);
}

/* ——— Explore Market ——— */
.explore-market-card {
  padding: 18px 16px 16px;
  border: 1px solid var(--sky-100);
  background: var(--white);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.explore-market-section { grid-column: 1 / -1; }
.explore-market-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  text-transform: none;
}
.explore-market-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
}
.explore-market-icon .coin-logo {
  width: 22px !important;
  height: 22px !important;
  border-radius: 50%;
  object-fit: cover;
}
.explore-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 14px;
}
.market-tile {
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
  min-height: 118px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
  min-width: 0;
}
.market-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
  border-color: var(--sky-200);
  background: var(--white);
}
.market-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.market-tile-logo { display: flex; flex-shrink: 0; }
.market-tile-logo img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.market-tile-chg {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
}
.market-tile-chg.up { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.market-tile-chg.down { background: rgba(239, 68, 68, 0.1); color: var(--red); }
.market-tile-sym {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate-800);
  letter-spacing: 0.02em;
}
.market-tile-name {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--slate-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-tile-price {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--sky-600);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--slate-200);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ——— Market detail page ——— */
.market-page { max-width: 100%; }
.market-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sky-600);
  text-decoration: none;
  margin-bottom: 16px;
  padding: 8px 0;
}
.market-back-link:hover { color: var(--sky-700); }
.market-detail-hero {
  padding: 22px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--sky-100);
  background: linear-gradient(160deg, var(--white) 0%, var(--sky-50) 55%, var(--sky-100) 100%);
  box-shadow: var(--shadow-lg);
}
.market-detail-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.market-detail-logo img { border-radius: 50%; box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2); }
.market-detail-symbol {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sky-600);
  background: var(--sky-100);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
}
.market-detail-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-800);
  margin: 0;
  letter-spacing: -0.02em;
}
.market-detail-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.market-detail-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--sky-700);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.market-detail-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
}
.market-detail-badge.up { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.market-detail-badge.down { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.market-detail-badge span { opacity: 0.75; font-weight: 600; margin-left: 4px; }
.market-chart-lg {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 140px;
  padding: 16px 12px 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--sky-100);
  border-radius: 14px;
}
.market-chart-lg .bar {
  flex: 1;
  min-width: 3px;
  background: linear-gradient(180deg, var(--sky-300) 0%, var(--sky-500) 50%, var(--sky-600) 100%);
  border-radius: 4px 4px 0 0;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.market-chart-lg .bar:hover { opacity: 1; }
.market-prices-card { margin-bottom: 16px; }
.market-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  border-radius: var(--radius-sm);
}
.market-history-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.market-history-table thead {
  background: var(--sky-50);
  position: sticky;
  top: 0;
}
.market-history-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  border-bottom: 2px solid var(--sky-100);
}
.market-history-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
}
.market-history-table tbody tr:hover td { background: var(--sky-50); }
.market-history-table tbody tr:last-child td { border-bottom: none; }
.market-movements-card .market-tx-list { margin: 0; padding: 0; }

@media (max-width: 768px) {
  .cash-balance-card .cash-total { font-size: 1.45rem; }
  .explore-market-card { padding: 14px 12px; }
  .explore-market-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .market-tile { padding: 14px 12px; min-height: 108px; }
  .market-detail-hero { padding: 16px 14px; }
  .market-detail-price { font-size: 1.65rem; }
  .market-chart-lg { height: 110px; }
  .market-history-table th,
  .market-history-table td { padding: 9px 10px; font-size: 0.75rem; }
}
@media (min-width: 480px) and (max-width: 768px) {
  .explore-market-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .explore-market-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .explore-market-grid { grid-template-columns: repeat(5, 1fr); }
}.exchange-transactions-card { margin-top: 24px; }

.market-tile-more {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  width: 100%;
  min-height: 64px;
  padding: 14px 18px;
  background: linear-gradient(145deg, var(--sky-50) 0%, var(--sky-100) 100%);
  border: 1px dashed var(--sky-300);
  border-radius: var(--radius-sm);
}
.market-tile-more:hover {
  border-color: var(--sky-500);
  background: var(--white);
}
.market-tile-more-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 0;
  width: 100%;
  min-height: 0;
}
.market-tile-more-dots {
  display: block;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--sky-500);
  margin-bottom: 0;
  line-height: 1;
}
.market-tile-more .market-tile-sym {
  color: var(--sky-600);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0;
}
.market-tile-more .market-tile-name {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--slate-500);
  margin-top: 0;
}
.explore-market-grid-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-auto-rows: auto;
}
.explore-market-grid-preview .market-tile:not(.market-tile-more) {
  min-height: 108px;
}
@media (max-width: 380px) {
  .explore-market-card {
    padding: 14px 12px 12px;
  }
  .explore-market-grid-preview {
    gap: 10px;
  }
  .explore-market-grid-preview .market-tile:not(.market-tile-more) {
    padding: 12px 10px;
    min-height: 100px;
  }
  .market-tile-more {
    min-height: 56px;
    padding: 12px 14px;
  }
  .market-tile-more-inner {
    gap: 10px;
  }
}
@media (min-width: 640px) {
  .explore-market-grid-preview {
    grid-template-columns: repeat(4, 1fr) minmax(140px, 1.35fr);
    gap: 14px;
  }
  .market-tile-more {
    grid-column: auto;
    min-height: 118px;
    padding: 16px 14px;
  }
  .market-tile-more-inner {
    flex-direction: column;
    gap: 8px;
    min-height: 88px;
  }
  .market-tile-more-dots {
    margin-bottom: 10px;
  }
  .market-tile-more .market-tile-sym {
    font-size: 1.05rem;
  }
}
@media (min-width: 900px) {
  .explore-market-grid-preview {
    grid-template-columns: repeat(4, 1fr) minmax(160px, 1.5fr);
  }
}
.explore-market-page .explore-market-grid {
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
}

/* ——— Buy / Withdraw trade pages ——— */
.trade-page-grid { align-items: start; }
.trade-panel {
  padding: 20px 18px;
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow);
}
.trade-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.trade-panel-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--sky-100);
  color: var(--sky-700);
}
.trade-panel--buy .trade-panel-badge { background: var(--sky-500); color: white; }
.trade-panel-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--slate-800);
}
.trade-panel-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 400;
}
.trade-selected-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--sky-50) 0%, var(--white) 100%);
  border: 1px solid var(--sky-100);
  border-radius: var(--radius-sm);
}
.trade-selected-preview img { border-radius: 50%; }
.trade-selected-sym {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--slate-800);
}
.trade-selected-name {
  display: block;
  font-size: 0.75rem;
  color: var(--slate-500);
  font-weight: 400;
}
.trade-selected-price {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sky-600);
}
.trade-section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.asset-picker-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -4px;
  padding: 4px;
}
.asset-picker {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: min-content;
  margin-bottom: 0;
}
.asset-pick {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 12px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--white);
}
.asset-pick .icon img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.asset-pick-name {
  display: block;
  font-size: 0.65rem;
  color: var(--slate-500);
  font-weight: 400;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 76px;
}
.asset-pick .sym { font-weight: 600; font-size: 0.82rem; }
.trade-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.trade-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
}
.trade-input:focus {
  outline: none;
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.trade-fiat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.trade-fiat-list .coin-select-item {
  min-height: 48px;
}
.trade-summary {
  background: var(--sky-50);
  border: 1px solid var(--sky-100);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}
.trade-submit-btn { min-height: 48px; font-size: 1rem; }
.trade-side-card {
  padding: 20px 18px;
  border: 1px solid var(--sky-100);
  height: fit-content;
}
.trade-side-total {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--sky-700);
  margin: 8px 0 4px;
}
.trade-side-hint {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin: 0 0 14px;
}
.trade-side-list { display: flex; flex-direction: column; gap: 8px; }
.trade-side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--slate-50);
  border-radius: 8px;
  font-size: 0.88rem;
}
.trade-side-note {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--slate-500);
  line-height: 1.45;
}
.trade-holding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}
.trade-holding-row:last-child { border-bottom: none; }
.trade-holding-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.trade-holding-left span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.trade-holding-left em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--slate-500);
}
.trade-holding-val {
  text-align: right;
  font-weight: 600;
  font-size: 0.88rem;
}
.trade-holding-val small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--sky-600);
}
@media (max-width: 768px) {
  .trade-page-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .trade-panel { padding: 16px 14px; }
  .trade-amounts { grid-template-columns: 1fr; }
  .trade-fiat-list {
    grid-template-columns: 1fr;
    max-height: 180px;
  }
  .trade-selected-preview { flex-wrap: wrap; }
  .trade-selected-price { margin-left: 0; width: 100%; margin-top: 6px; }
  .asset-pick { min-width: 80px; }
}
@media (min-width: 769px) {
  .trade-fiat-list { grid-template-columns: repeat(3, 1fr); }
}

/* ——— Withdraw multi-step flow ——— */
.withdraw-flow {
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 24px;
}
.withdraw-step { margin-bottom: 20px; animation: withdrawFadeIn 0.35s ease; }
.withdraw-step.hidden { display: none !important; }
@keyframes withdrawFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Intro card */
.withdraw-intro-card {
  text-align: center;
  padding: 40px 32px 36px;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid rgba(14, 165, 233, 0.12);
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, var(--sky-50) 100%);
  box-shadow: var(--shadow-lg);
  border-radius: 20px;
}
.withdraw-step-pill {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 18px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-700);
  background: var(--sky-100);
  border-radius: 999px;
}
.withdraw-intro-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--sky-500), var(--sky-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}
.withdraw-intro-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--slate-800);
  letter-spacing: -0.02em;
}
.withdraw-intro-text {
  color: var(--slate-500);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 28px;
  font-weight: 400;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.withdraw-choose-btn {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  letter-spacing: 0.01em;
}
.withdraw-choose-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(14, 165, 233, 0.4); }

/* Pick step card */
.withdraw-pick-card {
  max-width: 540px;
  margin: 0 auto;
  padding: 24px 20px 20px;
  border: 1px solid var(--sky-100);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}
.withdraw-pick-head { text-align: center; margin-bottom: 18px; }
.withdraw-step-label {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0 0 6px;
}
.withdraw-step-hint {
  font-size: 0.8rem;
  color: var(--slate-500);
  margin: 0;
  font-weight: 400;
}
.withdraw-picker-empty {
  text-align: center;
  padding: 28px 16px;
  background: var(--slate-50);
  border-radius: 12px;
  font-size: 0.88rem;
}

/* Currency list */
.withdraw-currency-list {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.withdraw-currency-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: none;
  border-bottom: 1px solid var(--slate-100);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, box-shadow 0.15s;
}
.withdraw-currency-item:last-of-type { border-bottom: none; }
.withdraw-currency-item:hover,
.withdraw-currency-item:focus-visible {
  background: var(--sky-50);
  outline: none;
  box-shadow: inset 4px 0 0 var(--sky-500);
}
.withdraw-currency-item--cash {
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.9), var(--white));
}
.withdraw-currency-item--cash:hover {
  background: linear-gradient(90deg, var(--sky-100), var(--sky-50));
}
.withdraw-currency-logo {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}
.withdraw-currency-logo img,
.withdraw-currency-logo .coin-logo,
.withdraw-currency-logo .fiat-logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.withdraw-currency-logo--fiat {
  background: var(--white);
}
.withdraw-currency-info { flex: 1; min-width: 0; }
.withdraw-currency-name {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--slate-800);
  line-height: 1.25;
}
.withdraw-currency-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--slate-500);
  font-weight: 500;
  margin-top: 1px;
}
.withdraw-currency-balance {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sky-700);
  background: var(--sky-50);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--sky-100);
  max-width: 42%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.withdraw-currency-arrow {
  flex-shrink: 0;
  color: var(--sky-400);
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: transform 0.15s, opacity 0.15s;
}
.withdraw-currency-item:hover .withdraw-currency-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--sky-600);
}
.withdraw-currency-divider {
  margin: 0;
  padding: 11px 18px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  border-bottom: 1px solid var(--slate-100);
}

/* Back button */
.withdraw-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px auto 0;
  padding: 10px 20px;
  max-width: 220px;
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  background: var(--white);
}
.withdraw-back-btn:hover {
  border-color: var(--sky-300);
  color: var(--sky-700);
  background: var(--sky-50);
}
.withdraw-back-icon { font-size: 1rem; line-height: 1; }

/* Bank details block */
.withdraw-bank-section {
  margin-top: 20px;
  padding: 20px 18px;
  border-radius: 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
}
.withdraw-bank-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.withdraw-bank-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--sky-100);
  color: var(--sky-600);
  display: flex;
  align-items: center;
  justify-content: center;
}
.withdraw-bank-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--slate-800);
}
.withdraw-bank-sub {
  font-size: 0.76rem;
  color: var(--slate-500);
  margin: 0;
  font-weight: 400;
  line-height: 1.4;
}
.withdraw-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.withdraw-bank-grid .full-width { grid-column: 1 / -1; }
.withdraw-bank-grid .form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-600);
}
.withdraw-bank-grid .trade-input {
  background: var(--white);
  border-color: var(--slate-200);
}
.label-optional { font-weight: 400; color: var(--slate-400); font-size: 0.72rem; }
.field-hint {
  font-size: 0.78rem;
  color: var(--sky-600);
  margin: 8px 0 0;
  font-weight: 500;
}

/* Cash / crypto withdraw panels (shared with trade) */
.withdraw-flow .trade-panel {
  border-radius: 18px;
  border: 1px solid var(--sky-100);
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.98);
}
.withdraw-flow .trade-panel-head { padding-bottom: 4px; }
.withdraw-flow .trade-panel-badge {
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.7rem;
}
.withdraw-flow .trade-panel--cash-out .trade-panel-badge {
  background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
  color: white;
}
.withdraw-flow .trade-selected-preview {
  border-radius: 14px;
  padding: 16px 18px;
}
.withdraw-flow .trade-fiat-list {
  border-radius: 12px;
  padding: 8px;
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
}
.withdraw-flow .trade-fiat-list .coin-select-item {
  border-radius: 10px;
  background: var(--white);
}
.withdraw-flow .trade-fiat-list .coin-select-item.selected {
  border-color: var(--sky-400);
  background: var(--sky-50);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}
.withdraw-flow .trade-summary {
  border-radius: 14px;
  padding: 16px 18px;
}
.withdraw-flow .trade-side-card {
  border-radius: 18px;
  border: 1px solid var(--sky-100);
  background: linear-gradient(180deg, var(--white), var(--sky-50));
}
.withdraw-flow .trade-side-row {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: 10px;
}
.withdraw-flow .trade-submit-btn {
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  #withdraw-continue-btn:not(.hidden) {
    width: 100%;
  }
  .withdraw-flow {
    max-width: 100%;
    overflow-x: hidden;
  }
  .withdraw-intro-card { padding: 32px 20px 28px; max-width: none; }
  .withdraw-pick-card {
    padding: 18px 14px 16px;
    border-radius: 16px;
    max-width: 100%;
    overflow: hidden;
  }
  .withdraw-pick-head { text-align: left; }
  .withdraw-step-hint { font-size: 0.78rem; line-height: 1.45; }
  .withdraw-currency-table {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    border-radius: 12px;
  }
  .withdraw-currency-table .withdraw-currency-item {
    border-radius: 0;
    transform: none;
    box-shadow: none;
  }
  .withdraw-currency-item {
    flex-wrap: nowrap;
    align-items: center;
    padding: 14px 12px;
    gap: 10px;
    min-height: 58px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .withdraw-currency-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }
  .withdraw-currency-name,
  .withdraw-currency-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .withdraw-currency-balance {
    order: 0;
    width: auto;
    max-width: 42%;
    flex-shrink: 1;
    text-align: right;
    margin-top: 0;
    font-size: 0.68rem !important;
    padding: 3px 6px !important;
    line-height: 1.2;
  }
  .withdraw-currency-arrow {
    margin-left: 0;
    flex-shrink: 0;
  }
  .withdraw-pick-footer:not(.hidden) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    margin-top: 12px;
  }
  .withdraw-currency-selected:not(.hidden) {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .withdraw-selected-chip {
    min-width: 0;
    margin-bottom: 0;
  }
  .withdraw-selected-chip-bal {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .withdraw-change-pick {
    width: 100%;
    margin: 0;
  }
  .withdraw-cash-wrap.withdraw-cash-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .withdraw-cash-side-card {
    display: none;
  }
  .withdraw-cash-fiat-table {
    max-height: min(45vh, 280px);
  }
  .withdraw-cash-fiat-selected:not(.hidden) {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .withdraw-cash-fiat-selected .withdraw-cash-change-fiat {
    width: 100%;
  }
  .withdraw-back-btn {
    width: 100%;
    max-width: none;
  }
  .withdraw-bank-grid { grid-template-columns: 1fr; }
  .withdraw-flow .trade-page-grid { gap: 14px; }
  .withdraw-flow .trade-panel-head {
    flex-wrap: wrap;
    gap: 10px;
  }
  .withdraw-flow .trade-panel-head > div {
    flex: 1;
    min-width: 0;
  }
  .trade-selected-preview--compact {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .trade-selected-preview--compact .trade-selected-preview-text {
    min-width: 0;
    overflow: hidden;
  }
  .trade-selected-preview--compact .trade-selected-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .trade-selected-preview--compact .trade-selected-price {
    flex-shrink: 0;
    max-width: 40%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .buy-hero.buy-preview,
  .buy-panel .buy-preview {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .buy-preview-text {
    min-width: 0;
    overflow: hidden;
  }
  .buy-panel .trade-selected-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .buy-price-pill,
  .buy-panel .trade-selected-price {
    margin-left: auto;
    margin-top: 0;
    width: auto;
    max-width: 38%;
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 4px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.dashboard-quick-add{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;padding-top:14px;border-top:1px solid var(--slate-100)}
.quick-add-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;font-size:.8rem;font-weight:600;color:var(--sky-700);background:var(--sky-50);border:1px solid var(--sky-100);border-radius:999px;text-decoration:none}
.quick-add-btn:hover{background:var(--sky-100);border-color:var(--sky-300)}
.quick-add-btn--muted{color:var(--slate-600);background:var(--slate-50);border-color:var(--slate-200)}
.quick-add-plus{font-size:1rem;font-weight:700;color:var(--sky-500)}
.market-detail-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:18px}
.market-stat{padding:12px 14px;background:var(--slate-50);border:1px solid var(--slate-100);border-radius:12px;text-align:center}
.market-stat-label{display:block;font-size:.68rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--slate-500);margin-bottom:4px}
.market-stat-val{font-size:.88rem;font-weight:700;color:var(--slate-800)}
.market-detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.market-detail-actions .btn{flex:1;min-width:120px;text-align:center}
.market-movements-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:14px}
.market-movements-head .card-title{margin:0}
.market-movements-sub{font-size:.75rem;color:var(--slate-500);font-weight:500}
.market-detail-hero{border-radius:20px;padding:22px 20px;margin-bottom:16px}
.tx-list--rich .tx-item,.tx-list--page .tx-item{
  position:relative;
  padding:14px 16px 14px 18px;
  border-radius:14px;
  margin-bottom:10px;
  background:var(--white);
  border:1px solid var(--slate-100);
  border-bottom:none;
  box-shadow:0 2px 10px rgba(15,23,42,0.04);
  overflow:hidden;
  max-width:100%;
  box-sizing:border-box;
}
/* Transactions page — identical card layout for every filter */
.tx-list--page .tx-item[hidden],
.tx-list--page .tx-empty-state[hidden]{
  display:none!important;
}
.transactions-page .tx-list.tx-list--page{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
}
.transactions-page .tx-list--page .tx-item.tx-item--page:not([hidden]){
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  align-items:stretch!important;
  align-content:stretch!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box;
  padding:14px 14px 14px 18px!important;
  margin-bottom:12px;
  border-radius:16px;
  border-bottom:none!important;
  min-height:112px;
}
.transactions-page .tx-item--page .tx-item-left{
  width:100%;
  max-width:100%;
  min-width:0;
  flex:1 1 auto;
}
.transactions-page .tx-item--page .details{
  flex:1;
  min-width:0;
  width:100%;
}
.transactions-page .tx-item--page .amount-col{
  width:100%!important;
  max-width:100%!important;
  min-width:0;
  flex-direction:row!important;
  justify-content:space-between;
  align-items:center;
  align-self:stretch;
  margin-left:0!important;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--slate-100);
  text-align:left;
  gap:10px;
}
.transactions-page .tx-item--page .amount{
  font-size:0.95rem!important;
  font-weight:800;
  line-height:1.2;
  text-align:left!important;
  flex:1;
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.transactions-page .tx-item--page .tx-status-pill{
  flex-shrink:0;
}
.transactions-page .tx-asset-logo{
  width:46px;
  height:46px;
  flex-shrink:0;
}
.transactions-page .tx-asset-logo img,
.transactions-page .tx-asset-logo .coin-logo{
  width:40px!important;
  height:40px!important;
}
.transactions-page .tx-avatar-wrap .tx-icon{
  width:46px;
  height:46px;
  flex-shrink:0;
  border-radius:12px;
}
.tx-item--page .tx-item-accent{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  border-radius:14px 0 0 14px;
}
.tx-item-accent--buy{background:linear-gradient(180deg,#34d399,#059669)}
.tx-item-accent--withdraw,.tx-item-accent--sell{background:linear-gradient(180deg,#f87171,#dc2626)}
.tx-item-accent--exchange{background:linear-gradient(180deg,var(--sky-400),var(--sky-600))}
.tx-item--rich .amount-col,.tx-item--page .amount-col{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.tx-avatar-wrap{flex-shrink:0}
.tx-item-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.tx-type-chip{
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding:3px 8px;
  border-radius:6px;
  line-height:1.2;
}
.tx-type-chip--buy{background:#d1fae5;color:#047857}
.tx-type-chip--withdraw,.tx-type-chip--sell{background:#fee2e2;color:#b91c1c}
.tx-type-chip--exchange{background:var(--sky-100);color:var(--sky-700)}
.tx-asset-sym{font-weight:700;font-size:.92rem;color:var(--slate-800)}
.tx-date{display:block;font-size:.78rem;color:var(--slate-500)}
.tx-note{
  margin:6px 0 0;
  font-size:.76rem;
  line-height:1.35;
  color:var(--slate-500);
  padding:6px 10px;
  background:var(--slate-50);
  border-radius:8px;
  border:1px solid var(--slate-100);
}
.tx-amt--in{color:#047857}
.tx-amt--out{color:#b91c1c}
.tx-amt--swap{color:var(--sky-700)}
.tx-status-pill{font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;padding:4px 9px;border-radius:999px;background:var(--sky-100);color:var(--sky-700)}
.tx-status-pill--pending{background:#fef3c7;color:#92400e}
.tx-status-pill--rejected{background:#fee2e2;color:#b91c1c}
.tx-status-pill--completed{background:#d1fae5;color:#047857}
.tx-item[data-tx-status="pending"]{
  border-color:#fde68a;
  background:linear-gradient(90deg,#fffbeb 0%,var(--white) 36%);
}
.tx-item-left{display:flex;align-items:flex-start;gap:12px;flex:1;min-width:0}
.tx-asset-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:50%;
  background:var(--white);
  border:1px solid var(--slate-200);
  box-shadow:0 2px 8px rgba(15,23,42,0.06);
}
.tx-asset-logo img,.tx-asset-logo .coin-logo{border-radius:50%;width:40px;height:40px}
.tx-page-summary{display:flex;gap:10px;margin-bottom:18px;flex-wrap:wrap}
.tx-summary-pill{
  position:relative;
  flex:1;
  min-width:90px;
  padding:14px 12px 12px;
  background:var(--white);
  border:1px solid var(--sky-100);
  border-radius:14px;
  text-align:center;
  box-shadow:0 2px 12px rgba(14,165,233,0.08);
  overflow:hidden;
}
.tx-summary-pill::before{
  content:'';
  position:absolute;
  inset:0 0 auto;
  height:3px;
  border-radius:14px 14px 0 0;
}
.tx-summary-pill--total::before{background:linear-gradient(90deg,var(--sky-400),var(--sky-600))}
.tx-summary-pill--pending::before{background:linear-gradient(90deg,#fbbf24,#f59e0b)}
.tx-summary-pill--buy::before{background:linear-gradient(90deg,#34d399,#059669)}
.tx-summary-pill--withdraw::before{background:linear-gradient(90deg,#f87171,#ef4444)}
.tx-summary-icon{
  display:block;
  font-size:.85rem;
  margin-bottom:4px;
  opacity:.75;
}
.tx-summary-pill span:last-child{display:block;font-size:.7rem;color:var(--slate-500);margin-top:2px;text-transform:uppercase;letter-spacing:.05em;font-weight:600}
.tx-summary-n{display:block;font-family:var(--font-display);font-size:1.35rem;font-weight:700;color:var(--slate-800);line-height:1.1}
.tx-summary-pill--pending .tx-summary-n{color:#b45309}
.tx-summary-pill--buy .tx-summary-n{color:#047857}
.tx-summary-pill--withdraw .tx-summary-n{color:#b91c1c}
.transactions-page-card{border-radius:18px;padding:20px 18px;border:1px solid var(--sky-100);background:var(--white)}
.tx-list-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.tx-list-head h2{
  margin:0;
  font-family:var(--font-display);
  font-size:1.05rem;
  font-weight:700;
  color:var(--slate-800);
}
.tx-list-count{
  font-size:.78rem;
  font-weight:600;
  color:var(--slate-500);
  white-space:nowrap;
}
.tx-filter-bar{
  display:flex;
  gap:8px;
  margin-bottom:16px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  padding-bottom:2px;
}
.tx-filter{
  flex-shrink:0;
  padding:9px 16px;
  border:1px solid var(--slate-200);
  border-radius:999px;
  background:var(--white);
  font-size:.82rem;
  font-weight:600;
  color:var(--slate-600);
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
}
.tx-filter:hover{border-color:var(--sky-300);color:var(--sky-700)}
.tx-filter.active{
  background:linear-gradient(135deg,var(--sky-500),var(--sky-600));
  border-color:transparent;
  color:#fff;
  box-shadow:0 4px 14px rgba(14,165,233,0.35);
}
.tx-empty-state{
  list-style:none;
  text-align:center;
  padding:40px 20px 36px;
  border-radius:16px;
  background:var(--sky-50);
  border:1px dashed var(--sky-200);
}
.tx-empty-icon{
  display:inline-flex;
  width:52px;
  height:52px;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--white);
  border:1px solid var(--sky-200);
  font-size:1.4rem;
  color:var(--sky-600);
  margin-bottom:12px;
}
.tx-empty-title{
  margin:0 0 6px;
  font-family:var(--font-display);
  font-size:1rem;
  font-weight:700;
  color:var(--slate-800);
}
.tx-empty-desc{
  margin:0;
  font-size:.85rem;
  color:var(--slate-500);
  line-height:1.45;
  max-width:260px;
  margin-left:auto;
  margin-right:auto;
}
.transactions-page{width:100%;max-width:100%;margin:0;box-sizing:border-box}
@media (min-width:769px){
  .transactions-page{max-width:720px;margin:0 auto}
}
.tx-page-header{margin-bottom:12px}
.tx-page-header h1{font-family:var(--font-display);font-size:1.45rem;margin-bottom:4px;color:var(--slate-800)}
.tx-page-header p{font-size:0.85rem;color:var(--slate-500);margin:0}
.ex-fee-wallet-row span:first-child{color:var(--slate-600)}
.fee-wallet-row{background:var(--sky-50);margin:0 -4px;padding-left:8px!important;padding-right:8px!important;border-radius:8px;border-bottom:none!important}
.fee-wallet-row .exchange-fee-amt{color:var(--sky-700);font-weight:700}
.exchange-receive-amt{font-weight:700;color:var(--slate-800)}
.withdraw-flow .trade-side-card--compact{padding:14px 12px}
.withdraw-flow .card-title--sm{font-size:.78rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--slate-500);margin-bottom:10px}
.withdraw-flow .trade-side-row--compact{padding:6px 10px;font-size:.78rem}
.withdraw-flow .trade-side-row-left{display:flex;align-items:center;gap:8px}
.withdraw-flow .trade-side-row-amt{font-size:.76rem;font-weight:600;color:var(--sky-700)}
@media(max-width:768px){
.dashboard-quick-add{gap:6px}
.quick-add-btn{padding:7px 12px;font-size:.75rem;flex:1 1 calc(50% - 6px);justify-content:center}
.market-detail-stats{grid-template-columns:1fr}
.market-detail-actions .btn{flex:1 1 100%}
.withdraw-flow .trade-page-grid{grid-template-columns:1fr!important}
.withdraw-flow .trade-side-card--compact{order:-1}
}



/* ——— Buy page (desktop + mobile) ——— */
.buy-page {
  width: 100%;
}
.buy-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.buy-page-header-text h1 {
  margin-bottom: 8px;
}
.buy-page-header-text p {
  max-width: 36rem;
  line-height: 1.5;
}
.buy-page-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 2px 24px;
}
.buy-panel {
  padding: 22px 20px 24px;
  border-radius: 20px;
  border: 1px solid var(--sky-100);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.6) 100%);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.1), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.buy-panel-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sky-100);
}
.buy-panel-head-text {
  flex: 1;
  min-width: 0;
}
.buy-panel .trade-panel-badge {
  padding: 6px 11px;
  font-size: 0.68rem;
  border-radius: 8px;
}
.buy-panel .trade-panel-title {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.buy-panel .trade-panel-sub {
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Hero preview */
.buy-hero.buy-preview,
.buy-panel .buy-preview,
.buy-panel .trade-selected-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sky-50) 0%, #fff 55%, var(--sky-50) 100%);
  border: 1px solid var(--sky-200);
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.06);
}
.buy-preview-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--sky-100);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.1);
}
.buy-preview-logo img,
.buy-panel .buy-preview-logo img {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
}
.buy-preview-text {
  flex: 1;
  min-width: 0;
}
.buy-panel .trade-selected-sym {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}
.buy-panel .trade-selected-name {
  font-size: 0.78rem;
  color: var(--slate-500);
}
.buy-price-pill,
.buy-panel .trade-selected-price {
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sky-700);
  background: var(--white);
  border: 1px solid var(--sky-200);
  border-radius: 999px;
  white-space: nowrap;
}

/* Sections */
.buy-section {
  margin-bottom: 18px;
}
.buy-section-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}
.buy-pickers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.buy-amount-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.buy-amount-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 6px;
}
.buy-panel .buy-input,
.buy-panel .trade-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.buy-panel .buy-input:focus,
.buy-panel .trade-input:focus {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}
.buy-amount-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--slate-500);
  text-align: center;
}

/* Shared expandable pickers (buy + exchange) */
.ex-pick-section {
  min-width: 0;
}
.ex-pick-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  min-height: 52px;
}
.ex-pick-trigger:hover {
  border-color: var(--sky-300);
  background: var(--sky-50);
}
.ex-pick-trigger--open,
.ex-pick-trigger[aria-expanded="true"] {
  border-color: var(--sky-400);
  background: var(--sky-50);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.ex-pick-trigger-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--sky-50);
  color: var(--sky-600);
  border: 1px solid var(--sky-100);
}
.ex-pick-trigger-icon--logo {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 50%;
  overflow: hidden;
}
.ex-pick-trigger-icon--logo .coin-logo,
.ex-pick-trigger-icon--logo .fiat-logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ex-pick-trigger-icon--fiat {
  background: var(--white);
}
.ex-pick-trigger-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ex-pick-trigger-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-500);
}
.ex-pick-trigger-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ex-pick-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--slate-400);
  border-bottom: 2px solid var(--slate-400);
  transform: rotate(45deg);
  margin-right: 4px;
  transition: transform 0.2s, border-color 0.2s;
}
.ex-pick-trigger--open .ex-pick-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
  border-color: var(--sky-500);
}
.ex-pick-panel {
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--sky-100);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.ex-pick-panel.hidden {
  display: none !important;
}
.ex-pick-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 4px !important;
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px !important;
}
.ex-pick-list-vertical .coin-select-item {
  min-height: 44px !important;
  padding: 10px 12px !important;
  gap: 10px !important;
  border-radius: 10px !important;
  border-width: 1px !important;
}
.buy-panel .ex-pick-list-vertical {
  max-height: 240px;
}
.buy-panel .coin-logo-wrap,
.buy-panel .fiat-logo-wrap {
  width: 32px !important;
  height: 32px !important;
  box-shadow: none;
}
.buy-panel .coin-select-name {
  font-size: 0.86rem;
}
.buy-panel .coin-select-meta {
  font-size: 0.72rem;
}
.buy-panel .coin-select-check {
  width: 18px;
  height: 18px;
}

/* Order summary */
.buy-summary.trade-summary {
  margin: 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--sky-100);
}
.buy-summary-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}
.buy-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--slate-600);
  border-bottom: 1px dashed var(--slate-100);
}
.buy-summary .row:last-child {
  border-bottom: none;
}
.buy-summary .row.total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 2px solid var(--sky-200);
  border-bottom: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--slate-800);
}
.buy-summary .row.total span:last-child {
  color: var(--sky-700);
  font-family: var(--font-display);
}
.buy-submit-btn.trade-submit-btn {
  margin-top: 4px;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.35);
}
.buy-panel .error-text {
  margin-top: 10px;
  text-align: center;
  font-size: 0.82rem;
}

.buy-frozen-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--sky-200);
  box-shadow: 0 12px 40px rgba(14, 165, 233, 0.12);
}
.buy-frozen-hero {
  text-align: center;
  padding: 36px 28px 28px;
  background: linear-gradient(165deg, #e0f2fe 0%, #f0f9ff 45%, #ffffff 100%);
  border-bottom: 1px solid var(--sky-100);
}
.buy-frozen-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--sky-400), var(--sky-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}
.buy-frozen-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-700);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--sky-200);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.buy-frozen-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--slate-800);
  margin: 0 0 10px;
}
.buy-frozen-desc {
  margin: 0 auto;
  max-width: 380px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--slate-600);
}
.buy-frozen-facts {
  list-style: none;
  margin: 0;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.buy-frozen-facts li {
  font-size: 0.88rem;
  color: var(--slate-600);
  padding-left: 22px;
  position: relative;
}
.buy-frozen-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sky-400);
}
.buy-frozen-support {
  margin: 0 24px 24px;
  width: calc(100% - 48px);
  min-height: 48px;
  border-radius: 14px;
}
.buy-page--frozen .buy-page-header-text p {
  color: var(--slate-500);
}

/* Exchange — flat trigger layout */
.exchange-card .ex-pick-trigger:not(:has(.ex-pick-trigger-body)) {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.exchange-card .ex-pick-trigger:not(:has(.ex-pick-trigger-body)) .ex-pick-trigger-label {
  grid-column: 1;
  grid-row: 1;
}
.exchange-card .ex-pick-trigger:not(:has(.ex-pick-trigger-body)) .ex-pick-trigger-value {
  grid-column: 1;
  grid-row: 2;
  margin-top: 2px;
}
.exchange-card .ex-pick-trigger:not(:has(.ex-pick-trigger-body)) .ex-pick-chevron {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

/* Exchange — reuse picker styles */
.exchange-card .exchange-picks-stack {
  gap: 12px;
  margin-bottom: 14px;
}
.exchange-card .ex-pick-trigger {
  min-height: 52px;
}
.exchange-card .ex-pick-list-vertical {
  max-height: 220px;
}
.exchange-card .ex-pick-list-vertical .coin-select-item {
  min-height: 44px !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  border-width: 1px !important;
}
.exchange-card .coin-logo-wrap,
.exchange-card .fiat-logo-wrap {
  width: 32px !important;
  height: 32px !important;
}

/* Withdraw — mobile density tweaks */
@media (max-width: 768px) {
  .withdraw-cash-wrap {
    max-width: 100%;
    margin: 0 auto;
  }
  .withdraw-pick-card {
    padding: 18px 14px 14px;
  }
  .withdraw-currency-item {
    padding: 12px 14px;
  }
  .withdraw-currency-balance {
    font-size: 0.65rem !important;
    padding: 2px 7px !important;
  }
  .withdraw-flow .trade-panel {
    padding: 16px 14px;
  }
  .withdraw-flow .trade-fiat-list .coin-select-item {
    min-height: 40px;
    padding: 8px 10px;
  }
  .withdraw-flow .trade-fiat-list .coin-logo-wrap,
  .withdraw-flow .trade-fiat-list .fiat-logo-wrap {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Tablet / phone */
@media (max-width: 768px) {
  .buy-page-header {
    margin-bottom: 16px;
    padding: 0 2px;
  }
  .buy-page-header h1 {
    font-size: 1.5rem;
  }
  .buy-page-header-text p {
    font-size: 0.88rem;
  }
  .buy-page-wrap {
    max-width: 100%;
    padding: 0 0 20px;
  }
  .buy-panel {
    padding: 18px 14px 20px;
    border-radius: 18px;
  }
  .buy-pickers-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .buy-amount-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .buy-hero.buy-preview,
  .buy-panel .buy-preview {
    flex-wrap: nowrap;
    padding: 14px;
    gap: 12px;
  }
  .buy-preview-logo {
    width: 44px;
    height: 44px;
  }
  .buy-price-pill,
  .buy-panel .trade-selected-price {
    margin-left: auto;
    margin-top: 0;
    font-size: 0.78rem;
    padding: 5px 10px;
  }
  .ex-pick-trigger {
    min-height: 48px;
    padding: 11px 12px;
  }
  .ex-pick-trigger-value {
    font-size: 0.8rem;
  }
  .buy-panel .ex-pick-list-vertical,
  .exchange-card .ex-pick-list-vertical {
    max-height: min(50vh, 220px);
  }
  .buy-submit-btn.trade-submit-btn {
    min-height: 48px;
    position: sticky;
    bottom: 8px;
    z-index: 2;
  }
}

@media (min-width: 769px) {
  .buy-page-wrap {
    padding-bottom: 32px;
  }
  .buy-panel {
    padding: 26px 24px 28px;
  }
  .buy-hero.buy-preview {
    padding: 18px 20px;
  }
}

@media (max-width: 380px) {
  .buy-hero.buy-preview {
    flex-wrap: wrap;
  }
  .buy-price-pill {
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}
/* Withdraw — Choose then table, then selected only */
.withdraw-currency-table-wrap {
  margin-top: 12px;
}
.withdraw-currency-table-wrap.hidden,
.withdraw-currency-selected.hidden,
#withdraw-continue-btn.hidden {
  display: none !important;
}
.withdraw-currency-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
.withdraw-currency-table .withdraw-currency-item {
  border-bottom: 1px solid var(--slate-100);
  border-radius: 0;
}
.withdraw-currency-table .withdraw-currency-item:last-child {
  border-bottom: none;
}
.withdraw-currency-table .withdraw-currency-divider {
  margin: 0;
}
.withdraw-selected-label {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate-500);
}
.withdraw-selected-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--sky-200);
  background: linear-gradient(135deg, var(--sky-50) 0%, var(--white) 100%);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}
.withdraw-selected-chip-logo {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--slate-200);
}
.withdraw-selected-chip-logo img,
.withdraw-selected-chip-logo .coin-logo,
.withdraw-selected-chip-logo .fiat-logo {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  object-fit: cover;
}
.withdraw-selected-chip-text {
  flex: 1;
  min-width: 0;
}
.withdraw-selected-chip-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-800);
  line-height: 1.2;
}
.withdraw-selected-chip-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--slate-500);
  font-weight: 500;
}
.withdraw-selected-chip-bal {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sky-700);
  white-space: nowrap;
}
.withdraw-change-pick,
.withdraw-cash-change-fiat {
  margin-bottom: 8px;
  font-size: 0.82rem !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
}
.btn-sm.btn-block {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.85rem;
}
.trade-selected-preview--compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px !important;
  margin-bottom: 16px !important;
}
.trade-selected-preview--compact .trade-selected-preview-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--slate-200);
}
.trade-selected-preview--compact .trade-selected-preview-logo img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
}
.trade-selected-preview--compact .trade-selected-preview-text {
  flex: 1;
  min-width: 0;
}
.trade-selected-preview--compact .trade-selected-sym {
  font-size: 0.95rem !important;
}
.trade-selected-preview--compact .trade-selected-name {
  font-size: 0.75rem !important;
}
.trade-selected-preview--compact .trade-selected-price {
  font-size: 0.78rem !important;
  padding: 4px 10px !important;
}
.withdraw-cash-fiat-table .coin-logo-wrap,
.withdraw-cash-fiat-table .fiat-logo-wrap {
  width: 32px !important;
  height: 32px !important;
}
.withdraw-cash-fiat-table .coin-logo,
.withdraw-cash-fiat-table .fiat-logo {
  width: 28px !important;
  height: 28px !important;
}
.withdraw-cash-fiat-table .coin-select-item {
  padding: 10px 12px !important;
  min-height: auto !important;
}
#withdraw-open-table-btn,
#withdraw-continue-btn {
  margin-top: 8px;
}

/* Withdraw to bank — currency Choose dropdown */
.withdraw-cash-currency-pick {
  margin-bottom: 16px;
}
.withdraw-cash-pick-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--slate-500);
  line-height: 1.4;
}
.withdraw-cash-choose-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--sky-200);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--white) 0%, var(--sky-50) 100%);
  color: var(--sky-700);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.withdraw-cash-choose-btn:hover {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.withdraw-cash-choose-btn[aria-expanded="true"] .withdraw-cash-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.withdraw-cash-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--sky-500);
  border-bottom: 2px solid var(--sky-500);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.withdraw-cash-fiat-wrap {
  margin-top: 10px;
}
.withdraw-cash-fiat-wrap.hidden,
.withdraw-cash-fiat-selected.hidden {
  display: none !important;
}
.withdraw-cash-fiat-table {
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  max-height: min(50vh, 260px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.withdraw-cash-fiat-table .coin-select-item {
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  border-bottom: 1px solid var(--slate-100) !important;
  box-shadow: none !important;
}
.withdraw-cash-fiat-table .coin-select-item:last-child {
  border-bottom: none !important;
}
.withdraw-cash-fiat-single {
  border: 1px solid var(--sky-200);
  border-radius: 12px;
  overflow: hidden;
  background: var(--sky-50);
  margin-bottom: 10px;
}
.withdraw-cash-fiat-chosen {
  pointer-events: none;
  cursor: default;
  margin: 0;
  border: none !important;
  box-shadow: none !important;
}
.withdraw-cash-change-fiat {
  margin-bottom: 4px;
  font-size: 0.85rem;
}

/* Withdraw — desktop / PC layout */
.withdraw-pick-footer {
  margin-top: 16px;
}
.withdraw-pick-footer.hidden {
  display: none !important;
}
.withdraw-cash-layout {
  display: block;
}
.withdraw-cash-tips {
  margin: 12px 0 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.55;
}
.withdraw-cash-tips li {
  margin-bottom: 8px;
}
.withdraw-cash-tips li:last-child {
  margin-bottom: 0;
}

@media (min-width: 769px) {
  .withdraw-flow {
    max-width: 1080px;
  }
  .withdraw-intro-card {
    max-width: 480px;
  }
  .withdraw-pick-card {
    max-width: 960px;
    margin: 0 auto;
    padding: 28px 32px 24px;
  }
  .withdraw-pick-head {
    text-align: left;
    margin-bottom: 22px;
  }
  .withdraw-step-label {
    font-size: 1.25rem;
  }
  .withdraw-step-hint {
    font-size: 0.88rem;
    max-width: 720px;
  }
  .withdraw-currency-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    border: none;
    background: transparent;
    border-radius: 0;
    overflow: visible;
  }
  .withdraw-currency-table .withdraw-currency-item--cash,
  .withdraw-currency-table .withdraw-currency-divider {
    grid-column: 1 / -1;
  }
  .withdraw-currency-table .withdraw-currency-divider {
    margin: 4px 0 0;
    padding: 10px 4px 6px;
    border: none;
    background: transparent;
    border-bottom: none;
  }
  .withdraw-currency-table .withdraw-currency-item {
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    border-bottom: 1px solid var(--slate-200);
    padding: 14px 18px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
  }
  .withdraw-currency-table .withdraw-currency-item:hover,
  .withdraw-currency-table .withdraw-currency-item:focus-visible {
    background: var(--sky-50);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.12);
    transform: translateY(-1px);
    outline: none;
  }
  .withdraw-currency-table .withdraw-currency-item--cash:hover {
    background: linear-gradient(135deg, var(--sky-50), var(--white));
  }
  .withdraw-currency-logo {
    width: 36px;
    height: 36px;
  }
  .withdraw-currency-logo img,
  .withdraw-currency-logo .coin-logo,
  .withdraw-currency-logo .fiat-logo {
    width: 32px !important;
    height: 32px !important;
  }
  .withdraw-currency-name {
    font-size: 0.92rem;
  }
  .withdraw-currency-meta {
    font-size: 0.75rem;
  }
  .withdraw-currency-balance {
    font-size: 0.78rem;
    padding: 5px 10px;
    max-width: none;
  }
  .withdraw-pick-footer:not(.hidden) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--sky-200);
    background: linear-gradient(135deg, var(--sky-50) 0%, var(--white) 100%);
  }
  .withdraw-currency-selected:not(.hidden) {
    flex: 1 1 320px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0;
  }
  .withdraw-currency-selected .withdraw-selected-label {
    flex: 1 1 100%;
    margin-bottom: 0;
  }
  .withdraw-currency-selected .withdraw-selected-chip {
    flex: 1 1 auto;
    min-width: 260px;
    margin-bottom: 0;
  }
  .withdraw-currency-selected .withdraw-change-pick {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }
  #withdraw-continue-btn:not(.hidden) {
    flex: 0 0 auto;
    width: auto;
    min-width: 200px;
    margin: 0;
    padding: 12px 28px;
    min-height: 48px;
  }
  .withdraw-back-btn {
    max-width: none;
    margin: 20px 0 0;
    padding: 10px 18px;
  }
  .withdraw-cash-wrap.withdraw-cash-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    align-items: start;
    max-width: none;
    margin: 0;
  }
  .withdraw-cash-side-card {
    position: sticky;
    top: 24px;
  }
  #withdraw-cash-fiat-list.withdraw-cash-fiat-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    max-height: none;
    overflow: visible;
    border: none;
    background: transparent;
    padding: 0;
  }
  #withdraw-cash-fiat-list .coin-select-item {
    border: 1px solid var(--slate-200) !important;
    border-radius: 12px !important;
    margin: 0;
  }
  #withdraw-cash-fiat-list .coin-select-item:hover {
    border-color: var(--sky-300) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
  }
  .withdraw-cash-fiat-selected:not(.hidden) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--sky-200);
    background: var(--sky-50);
    margin-bottom: 12px;
  }
  .withdraw-cash-fiat-selected .withdraw-selected-chip {
    flex: 1 1 auto;
    margin-bottom: 0;
    min-width: 240px;
  }
  .withdraw-cash-fiat-selected .withdraw-cash-change-fiat {
    flex: 0 0 auto;
    width: auto;
  }
  .withdraw-flow .trade-page-grid {
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 28px;
  }
  .withdraw-flow .trade-panel {
    padding: 26px 28px;
  }
  .withdraw-bank-grid {
    gap: 16px 18px;
  }
}

@media (min-width: 1024px) {
  .withdraw-currency-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .withdraw-pick-card {
    max-width: 1040px;
  }
  #withdraw-cash-fiat-list.withdraw-cash-fiat-table {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ——— Exchange page + Crypto→Cash flow ——— */
.exchange-page {
  max-width: 520px;
  margin: 0 auto;
}

/* Platform fee wallet (QR + address) — buy, withdraw, exchange */
.fee-wallet-card {
  margin-top: 16px;
  padding: 16px 14px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--sky-50) 0%, #fff 100%);
  border: 1px solid var(--sky-100);
}
.fee-wallet-card--compact {
  margin-top: 14px;
  padding: 14px 12px 16px;
}
.fee-wallet-card-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-800);
}
.fee-wallet-card-sub {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.45;
}
.fee-wallet-card-amt {
  margin: 0 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sky-700);
}
.fee-wallet-qr-block {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
.fee-wallet-qr {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.12);
}
.fee-wallet-card--compact .fee-wallet-qr {
  max-width: 200px;
}
.fee-wallet-network {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fee-wallet-addr {
  display: block;
  word-break: break-all;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--sky-100);
  color: var(--slate-700);
}
.fee-wallet-copy-btn {
  margin-top: 0;
}

/* Crypto → cash: fee payment step (QR) */
.exchange-fee-page {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.exchange-fee-head {
  margin-bottom: 16px;
}

.exchange-fee-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--sky-600);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 0 12px;
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}

.exchange-fee-head h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--slate-800);
  margin: 0 0 8px;
}

.exchange-fee-head p {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.92rem;
  line-height: 1.45;
}

.exchange-fee-card {
  border-radius: 20px;
  padding: 20px 18px 24px;
}

.exchange-fee-alert {
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  margin-bottom: 18px;
}

.exchange-fee-alert strong {
  display: block;
  color: #92400e;
  font-size: 1rem;
  margin-bottom: 8px;
}

.exchange-fee-alert p {
  margin: 0;
  font-size: 0.88rem;
  color: #78350f;
  line-height: 1.5;
}

.exchange-fee-summary {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--sky-100);
}

.exchange-fee-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--slate-600);
}

.exchange-fee-summary .row.total {
  font-weight: 700;
  color: var(--slate-800);
  padding-top: 12px;
  border-top: 1px dashed var(--sky-100);
  margin-top: 4px;
}

.exchange-fee-amt {
  color: var(--sky-700);
  font-weight: 700;
}

.exchange-fee-qr-block {
  text-align: center;
  margin-bottom: 20px;
}

.exchange-fee-qr-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  margin: 0 0 12px;
}

.exchange-fee-qr-wrap {
  display: inline-flex;
  padding: 14px;
  background: var(--white);
  border: 2px solid var(--sky-100);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.12);
  margin-bottom: 12px;
}

.exchange-fee-qr {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 8px;
}

.exchange-fee-qr-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--slate-600);
  line-height: 1.45;
  padding: 0 8px;
}

.exchange-fee-wallet {
  margin-bottom: 16px;
}

.exchange-fee-wallet-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exchange-fee-wallet-addr {
  display: block;
  word-break: break-all;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 12px 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  margin-bottom: 10px;
  color: var(--slate-800);
}

.exchange-fee-confirm {
  min-height: 48px;
  margin-bottom: 12px;
}

.exchange-fee-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--slate-500);
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 768px) {
  .main-content:has(.exchange-fee-page) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
  }

  .exchange-fee-page {
    max-width: none;
    min-height: calc(100dvh - 52px);
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }

  .exchange-fee-head {
    padding: 16px max(18px, env(safe-area-inset-left, 0px)) 12px max(18px, env(safe-area-inset-right, 0px));
    background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--sky-100);
    margin-bottom: 0;
  }

  .exchange-fee-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    padding: 20px max(18px, env(safe-area-inset-left, 0px)) 28px max(18px, env(safe-area-inset-right, 0px));
  }

  .exchange-fee-qr {
    width: 200px;
    height: 200px;
  }
}

.exchange-page-header {
  margin-bottom: 18px;
}
.exchange-card {
  border-radius: 20px;
  padding: 20px 18px 22px;
  border: 1px solid var(--sky-100);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 249, 255, 0.45) 100%);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.1);
}
.exchange-card .tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--slate-50);
  border-radius: 12px;
  border: 1px solid var(--slate-100);
}
.exchange-card .tab {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  line-height: 1.25;
  text-align: center;
}
@media (min-width: 480px) {
  .exchange-card .tab {
    font-size: 0.8rem;
    padding: 10px 12px;
  }
}
.exchange-card .tab.active {
  background: var(--white);
  color: var(--sky-700);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}
.ex-cc-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ex-cc-block {
  text-align: center;
  padding: 4px 0;
}
.ex-cc-label {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500);
}
.ex-cc-select.ex-pick-trigger {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 8px 12px;
  margin: 0 auto;
  border: none;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  min-height: auto;
  border-radius: 0;
}
.ex-cc-select.ex-pick-trigger:hover,
.ex-cc-select.ex-pick-trigger--open {
  background: transparent;
  border: none;
  box-shadow: none;
}
.ex-cc-select-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}
.ex-cc-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}
.ex-cc-logo img,
.ex-cc-logo .coin-logo,
.ex-cc-logo .fiat-logo {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50%;
}
.ex-cc-logo--fiat {
  background: transparent;
}
.ex-cc-select-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.ex-cc-symbol {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--slate-800);
  letter-spacing: -0.02em;
}
.ex-cc-subname {
  font-size: 0.82rem;
  color: var(--slate-500);
  font-weight: 500;
}
.ex-cc-chevron {
  display: block;
  width: 12px;
  height: 12px;
  margin: 6px auto 14px;
  border-right: 2.5px solid var(--sky-500);
  border-bottom: 2.5px solid var(--sky-500);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s;
}
.ex-cc-select.ex-pick-trigger--open + .ex-cc-chevron {
  transform: rotate(-135deg);
  margin-top: 10px;
  margin-bottom: 10px;
}
.ex-cc-dropdown.ex-pick-panel {
  margin: 0 0 16px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--sky-100);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  text-align: left;
}
.ex-cc-dropdown .ex-pick-list-vertical {
  max-height: min(42vh, 220px);
}
.ex-cc-dropdown .coin-select-item {
  border-radius: 10px !important;
}
.ex-cc-amount {
  margin-top: 8px;
  text-align: left;
  padding: 0 2px;
}
.ex-cc-amount-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 8px;
}
.ex-cc-amount-label span {
  color: var(--sky-600);
  font-weight: 700;
}
.ex-cc-amount-wrap {
  padding: 6px 6px 6px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--sky-200);
  background: var(--white);
}
.ex-cc-amount-wrap:focus-within {
  border-color: var(--sky-400);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}
.ex-cc-amount-input {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
}
.ex-cc-balance {
  margin: 8px 0 0;
  font-size: 0.76rem;
  color: var(--slate-500);
  text-align: center;
}
.ex-cc-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 8px 0 16px;
  gap: 0;
}
.ex-cc-divider-line {
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--sky-200), var(--sky-400));
  border-radius: 2px;
}
.ex-cc-divider-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sky-50);
  border: 1px solid var(--sky-200);
  color: var(--sky-600);
  margin-top: 4px;
}
.ex-cc-summary {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--sky-100);
}
.ex-cc-summary-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
}
.ex-cc-summary .row {
  padding: 7px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--slate-100);
}
.ex-cc-summary .row.total {
  border-bottom: none;
  border-top: 2px solid var(--sky-200);
  margin-top: 6px;
  padding-top: 12px;
  font-size: 1rem;
}
.ex-submit-btn {
  margin-top: 16px;
  min-height: 50px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}
.ex-rate-source {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--slate-500);
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .exchange-page {
    max-width: 100%;
  }
  .exchange-card {
    padding: 16px 14px 18px;
    border-radius: 18px;
  }
  .exchange-card .tab {
    font-size: 0.74rem;
    padding: 9px 8px;
  }
  .ex-cc-symbol {
    font-size: 1.2rem;
  }
  .ex-cc-logo {
    width: 48px;
    height: 48px;
  }
  .ex-cc-logo img {
    width: 44px !important;
    height: 44px !important;
  }
  .ex-cc-dropdown .ex-pick-list-vertical {
    max-height: min(48vh, 200px);
  }
  .ex-submit-btn {
    min-height: 48px;
  }
}

/* ——— Mobile + desktop layout polish ——— */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
}
.page-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.main-content {
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}
.mobile-topbar {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}
#toast-container {
  left: max(12px, env(safe-area-inset-left, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
.btn,
.ex-pick-trigger,
.coin-select-item,
.exchange-card .tab,
.nav-item a {
  min-height: 44px;
}
.buy-frozen-card {
  max-width: 100%;
}
/* ——— Account page (mobile, full-width) ——— */
@media (max-width: 768px) {
  .main-content:has(.account-page) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
  }

  .account-page {
    max-width: none;
    margin: 0;
    min-height: calc(100dvh - 52px);
    padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  }

  .account-page-head {
    margin: 0;
    padding: 18px max(18px, env(safe-area-inset-left, 0px)) 16px max(18px, env(safe-area-inset-right, 0px));
    background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--sky-100);
  }

  .account-page-head h1 {
    font-size: 1.55rem;
  }

  .account-profile-card,
  .account-section-card {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    padding: 20px max(18px, env(safe-area-inset-left, 0px)) 22px max(18px, env(safe-area-inset-right, 0px));
  }

  .account-section-card {
    margin-top: 10px;
    border-top: 1px solid var(--sky-100);
  }

  .account-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-bottom: 18px;
  }

  .account-profile-meta {
    width: 100%;
  }

  .account-badges {
    justify-content: center;
  }

  .account-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .account-detail-grid .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 14px;
    border: 1px solid var(--sky-100);
    border-radius: 12px;
    background: var(--sky-50);
    border-bottom: 1px solid var(--sky-100);
  }

  .account-detail-grid .detail-row .key {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
  }

  .account-detail-grid .detail-row .val {
    font-size: 0.95rem;
    word-break: break-word;
  }

  .account-profile-card .profile-avatar-lg {
    width: 96px;
    height: 96px;
    font-size: 2.2rem;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
  }

  .account-profile-name {
    font-size: 1.35rem;
  }

  .account-badges .badge {
    font-size: 0.78rem;
    padding: 6px 12px;
  }

  .account-section-card .card-title {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .account-form .form-group {
    margin-bottom: 16px;
  }

  .account-form .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
  }

  .account-form .form-group input {
    min-height: 48px;
    font-size: 16px;
    border-radius: 12px;
  }

  .account-save-btn {
    min-height: 52px;
    font-size: 1rem;
    border-radius: 12px;
    margin-top: 8px;
  }
}

/* ——— Transactions page (mobile) ——— */
@media (max-width: 768px) {
  .app-shell:has(.transactions-page) {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-content:has(.transactions-page) {
    padding: 0 !important;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    flex: 1;
    align-self: stretch;
    min-width: 0;
  }

  .main-content:has(.transactions-page) > .page-wrap {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .transactions-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: calc(100dvh - 52px);
    padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    box-sizing: border-box;
  }

  .tx-page-header {
    margin: 0;
    padding: 18px max(18px, env(safe-area-inset-left, 0px)) 16px max(18px, env(safe-area-inset-right, 0px));
    background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--sky-100);
  }

  .tx-page-header h1 {
    font-size: 1.55rem;
    margin-bottom: 4px;
  }

  .tx-page-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 16px max(16px, env(safe-area-inset-left, 0px)) 16px max(16px, env(safe-area-inset-right, 0px));
    background: var(--white);
    border-bottom: 1px solid var(--sky-100);
  }
  .tx-summary-pill {
    min-width: 0;
    padding: 12px 10px 10px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
    background: var(--white);
    border: 1px solid var(--sky-100);
  }
  .tx-summary-icon {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }
  .tx-summary-n {
    font-size: 1.25rem;
  }
  .tx-summary-pill span:last-child {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
  }
  .transactions-page-card {
    margin-top: 0;
    padding: 16px max(16px, env(safe-area-inset-left, 0px)) 24px max(16px, env(safe-area-inset-right, 0px));
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    overflow-x: hidden;
    overflow-y: visible;
    background: var(--sky-50);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: calc(100dvh - 260px);
  }
  .tx-list-head {
    margin-bottom: 10px;
    min-width: 0;
  }
  .tx-list-head h2 {
    font-size: 1rem;
  }
  .tx-list-count {
    font-size: 0.72rem;
  }
  .transactions-page .tx-filter-bar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
    padding: 0 0 12px;
    background: var(--sky-50);
    overflow: visible;
    border-bottom: 1px solid var(--sky-100);
  }
  .transactions-page .tx-filter {
    min-height: 44px;
    min-width: 0;
    width: 100%;
    padding: 10px 6px;
    font-size: 16px;
    text-align: center;
    flex-shrink: 1;
  }
  .tx-filter[data-tx-filter="withdraw"],
  .tx-filter[data-tx-filter="exchange"] {
    grid-column: span 1;
  }
  .transactions-page .tx-type-chip {
    font-size: 0.64rem;
    padding: 3px 7px;
  }
  .transactions-page .tx-asset-sym {
    font-size: 0.88rem;
  }
  .transactions-page .tx-date {
    font-size: 0.74rem;
  }
  .transactions-page .tx-note {
    font-size: 0.74rem;
    margin-top: 8px;
    padding: 8px 10px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .transactions-page .tx-item--page .tx-status-pill {
    font-size: 0.62rem;
    padding: 3px 8px;
  }
  .tx-empty-state {
    padding: 36px 18px 32px;
    margin-top: 4px;
  }
  .transactions-list-card .tx-item--page {
    padding: 14px 14px 14px 16px;
  }
}

@media (max-width: 768px) {
  .buy-frozen-hero {
    padding: 28px 18px 22px;
  }
  .buy-frozen-title {
    font-size: 1.25rem;
  }
  .buy-frozen-desc {
    font-size: 0.86rem;
    padding: 0 4px;
  }
  .buy-frozen-facts {
    padding: 16px 18px;
  }
  .buy-frozen-support {
    margin: 0 16px max(20px, env(safe-area-inset-bottom, 0px));
    width: calc(100% - 32px);
  }
  .exchange-card .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .exchange-card .tabs::-webkit-scrollbar {
    display: none;
  }
  .exchange-card .tab {
    min-width: max-content;
    white-space: nowrap;
  }
  .exchange-columns-stacked {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .exchange-swap-divider {
    padding: 4px 0;
    order: 0;
  }
  .crypto-select-scroll {
    max-height: min(36vh, 200px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (min-width: 769px) {
  .buy-page-wrap,
  .buy-page-header {
    max-width: 580px;
  }
  .buy-frozen-card {
    max-width: 520px;
    margin: 0 auto;
  }
  .exchange-page {
    max-width: 560px;
  }
}
@media (min-width: 1024px) {
  .buy-page-wrap,
  .buy-page-header {
    max-width: 820px;
  }
  .buy-frozen-card {
    max-width: 640px;
  }
  .exchange-page {
    max-width: 920px;
  }
  .exchange-card {
    padding: 24px 22px 26px;
  }
  .exchange-card .tab {
    font-size: 0.88rem;
    padding: 12px 16px;
  }
  .ex-cc-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .exchange-columns-stacked {
    grid-template-columns: 1fr 56px 1fr;
    gap: 20px;
    align-items: start;
  }
  .crypto-select-scroll {
    max-height: 280px;
  }
  .balance-hero .actions .btn {
    flex: 0 1 auto;
    min-width: 120px;
  }
}

/* ——— Shell notifications (desktop + mobile) ——— */
.shell-notif-desktop {
  display: none;
}

.sidebar-brand-row .shell-notif-wrap {
  flex-shrink: 0;
}

.shell-notif-wrap {
  position: relative;
  flex-shrink: 0;
}

.shell-notif-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--sky-200);
  background: var(--sky-50);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: var(--sky-700);
  -webkit-tap-highlight-color: transparent;
}

.shell-notif-btn svg {
  width: 22px;
  height: 22px;
}

.shell-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

.shell-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: min(420px, 70vh);
  background: #fff;
  border: 1px solid var(--sky-100);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shell-notif-panel[hidden] {
  display: none !important;
}

.shell-notif-panel.is-open:not([hidden]) {
  display: flex !important;
}

.shell-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sky-50);
  flex-shrink: 0;
}

.shell-notif-head h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-display);
  color: var(--sky-800);
}

.shell-notif-mark-all {
  border: none;
  background: none;
  color: var(--sky-600);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 44px;
}

.shell-notif-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  padding: 6px 0;
}

.shell-notif-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--sky-50);
  -webkit-tap-highlight-color: transparent;
}

.shell-notif-item:not(.is-read) {
  background: linear-gradient(90deg, var(--sky-50), transparent);
}

.shell-notif-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--slate-800);
}

.shell-notif-item-msg {
  font-size: 0.82rem;
  color: var(--slate-600);
  line-height: 1.4;
}

.shell-notif-item-time {
  font-size: 0.72rem;
  color: var(--slate-400);
}

.shell-notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--slate-500);
  font-size: 0.9rem;
  margin: 0;
}

.shell-notif-footer {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sky-600);
  text-decoration: none;
  border: none;
  border-top: 1px solid var(--sky-50);
  background: var(--white);
  min-height: 44px;
  line-height: 20px;
  cursor: pointer;
  font-family: inherit;
}

.shell-notif-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 180;
}

.shell-notif-backdrop.is-visible {
  display: block;
}

.shell-notif-portal {
  position: relative;
  z-index: 9990;
  pointer-events: none;
}

.shell-notif-portal .shell-notif-panel {
  pointer-events: auto;
}

.shell-notif-sheet-handle {
  display: none;
}

body.notif-panel-open {
  overflow: hidden;
}

.mobile-topbar-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 769px) {
  .sidebar {
    overflow: visible;
  }

  .shell-notif-desktop {
    display: block;
  }
  .shell-notif-mobile {
    display: none;
  }
  .shell-notif-backdrop {
    display: none !important;
  }

  #shell-notif-panel-desktop {
    position: fixed;
    z-index: 9995;
    width: min(380px, calc(100vw - 32px));
    right: auto;
    left: 0;
    top: 0;
  }
}

@media (max-width: 768px) {
  .mobile-topbar {
    gap: 10px;
  }
  .mobile-topbar-brand {
    flex: 1;
    min-width: 0;
  }
  .shell-notif-mobile .shell-notif-btn {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
  }
  .shell-notif-backdrop.is-visible {
    z-index: 9988;
  }
  #shell-notif-portal .shell-notif-panel,
  #shell-notif-panel-mobile {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    max-height: min(82vh, 560px);
    border-radius: 20px 20px 0 0;
    z-index: 9990;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  #shell-notif-portal .shell-notif-panel.is-open:not([hidden]),
  #shell-notif-panel-mobile.is-open:not([hidden]) {
    transform: translateY(0);
  }
  .shell-notif-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: var(--sky-200);
    border-radius: 4px;
    margin: 10px auto 4px;
  }
  .shell-notif-head {
    padding: 8px 20px 14px;
  }
  .shell-notif-head h3 {
    font-size: 1.1rem;
  }
  .shell-notif-item {
    padding: 14px 20px;
  }
  .shell-notif-item-title {
    font-size: 0.95rem;
  }
  .shell-notif-item-msg {
    font-size: 0.88rem;
  }
  .shell-notif-footer {
    padding: 14px 20px max(16px, env(safe-area-inset-bottom));
    font-size: 0.9rem;
  }
  .user-notif-banner {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
  }
}

/* ——— Auth / sign-in mobile ——— */
.auth-panel-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  pointer-events: none;
}

.auth-orbit {
  position: relative;
  width: 200px;
  height: 200px;
}

.auth-orbit-sm {
  width: 88px;
  height: 88px;
}

.auth-orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sky-300), var(--sky-500));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  z-index: 2;
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.4);
}

.auth-orbit-sm .auth-orbit-core {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  border-radius: 12px;
}

.auth-orbit-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.auth-orbit-ring-1 {
  width: 100%;
  height: 100%;
  animation: auth-orbit-spin 18s linear infinite;
}

.auth-orbit-ring-2 {
  width: 72%;
  height: 72%;
  animation: auth-orbit-spin 12s linear infinite reverse;
}

.auth-orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  left: 50%;
  top: 0;
  margin-left: -5px;
  animation: auth-orbit-spin 10s linear infinite;
  transform-origin: 50% 100px;
}

.auth-orbit-dot-2 { animation-duration: 14s; animation-direction: reverse; }
.auth-orbit-dot-3 { animation-duration: 8s; width: 8px; height: 8px; margin-left: -4px; }

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

.auth-mobile-hero {
  display: none;
  position: relative;
  width: 100%;
  padding: max(12px, env(safe-area-inset-top)) 20px 28px;
  margin: calc(-1 * max(12px, env(safe-area-inset-top))) -16px 20px;
  background: linear-gradient(165deg, var(--sky-500) 0%, var(--sky-700) 55%, var(--sky-800) 100%);
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.auth-mobile-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-hero-orb {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.auth-hero-orb-1 {
  width: 180px;
  height: 180px;
  top: -60px;
  right: -40px;
}

.auth-hero-orb-2 {
  width: 120px;
  height: 120px;
  bottom: -30px;
  left: -20px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-mobile-hero .auth-back-mobile {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
}

.auth-mobile-hero .auth-back-mobile:hover {
  color: #fff;
}

.auth-panel-visual-mobile {
  position: relative;
  opacity: 0.55;
  height: 120px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-orbit-md {
  width: 140px;
  height: 140px;
}

.auth-orbit-md .auth-orbit-core {
  width: 52px;
  height: 52px;
  font-size: 1.35rem;
  border-radius: 14px;
}

.auth-orbit-md .auth-orbit-dot {
  transform-origin: 50% 70px;
}

.auth-mobile-hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: 4px;
}

.auth-mobile-hero-logo {
  margin: 0 auto 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.auth-mobile-hero-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.auth-mobile-hero-tagline {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.88;
  font-weight: 500;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.auth-password-wrap input {
  flex: 1;
  padding-right: 72px !important;
}

.auth-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--sky-50);
  color: var(--sky-700);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  min-height: 40px;
  min-width: 44px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-demo-details {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--slate-500);
}

.auth-demo-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sky-600);
  padding: 8px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.auth-demo-details[open] .auth-demo-creds {
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .auth-mobile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .auth-back-mobile {
    display: inline-flex;
  }
  .auth-panel-right {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-screen-split .auth-card {
    margin: 0 auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--sky-100);
  }
}

@media (max-width: 768px) {
  .auth-panel-right {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .auth-screen-split .auth-card {
    padding: 24px 18px 28px;
    border-radius: 16px;
  }
  .auth-screen-split .auth-card h2 {
    font-size: 1.25rem;
  }
  .auth-screen-split .form-group {
    margin-bottom: 16px;
  }
  .auth-screen-split .form-group label {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  .auth-submit-btn {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 5;
  }
  .auth-demo-creds code {
    display: inline-block;
    margin-top: 4px;
    word-break: break-all;
  }
}

@media (max-width: 380px) {
  .mobile-topbar-title {
    display: none;
  }
  .mobile-topbar-brand .logo-icon.sm {
    margin-right: 0;
  }
}

/* ——— Boot + auth loading spinner ——— */
.cv-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--sky-100);
  border-top-color: var(--sky-500);
  border-radius: 50%;
  animation: cv-spin 0.85s linear infinite;
}

.cv-spinner-lg {
  width: 52px;
  height: 52px;
  border-width: 4px;
}

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

.cv-app-boot,
.cv-boot-screen {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cv-boot-screen {
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(165deg, var(--sky-50) 0%, #fff 55%);
}

.cv-boot-label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--sky-700);
}

.cv-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cv-auth-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cv-auth-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 32px 36px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  min-width: min(280px, 90vw);
}

.cv-auth-overlay-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-700);
  text-align: center;
}

body.cv-auth-busy {
  overflow: hidden;
  touch-action: none;
}

@media (max-width: 768px) {
  #auth-login-page.auth-screen-split {
    min-height: 100dvh;
    background: var(--sky-50);
  }
  #auth-login-page .auth-panel-right {
    width: 100%;
    max-width: none;
    padding: 0 16px max(24px, env(safe-area-inset-bottom));
    justify-content: flex-start;
    align-items: stretch;
  }
  #auth-login-page .auth-mobile-hero {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    border-radius: 0 0 24px 24px;
  }
  #auth-login-page .auth-card {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 26px 20px 28px;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(14, 165, 233, 0.15);
    border: 1px solid var(--sky-100);
  }
  #auth-login-page .auth-logo {
    justify-content: center;
    text-align: center;
    margin-bottom: 22px;
  }
  #auth-login-page .auth-logo h1 {
    text-align: center;
  }
  #auth-login-page .auth-card h2,
  #auth-login-page .auth-sub {
    text-align: center;
  }
  #auth-login-page .auth-card h2 {
    font-size: 1.4rem;
  }
  #auth-login-page .auth-submit-btn {
    min-height: 52px;
    font-size: 1.05rem;
    margin-top: 8px;
    position: static;
  }
  #auth-login-page .auth-demo-details {
    margin-top: 12px;
  }
  #auth-login-page .form-group input {
    min-height: 48px;
    font-size: 16px;
  }
}

/* Desktop — full-width signed-in main area (dashboard & pages) */
@media (min-width: 1024px) {
  .app-shell {
    max-width: none;
    width: 100%;
  }

  .main-content {
    padding: 32px 36px 56px;
  }

  .page-wrap {
    max-width: none !important;
    width: 100%;
    margin: 0;
  }

  .balance-hero {
    width: 100%;
    padding: 40px 56px;
  }

  .portfolio-grid-auto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .cash-balance-card,
  .explore-market-section {
    grid-column: 1 / -1;
  }

  .grid-2.page-split-wide {
    grid-template-columns: 1fr minmax(380px, 520px);
    gap: 32px;
  }

  .card {
    width: 100%;
  }
}

@media (min-width: 1400px) {
  .main-content {
    padding: 36px 48px 64px;
  }

  .portfolio-grid-auto {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .main-content {
    padding: 40px 56px 72px;
  }

  .portfolio-grid-auto {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
