/* ============================================================
   CAPNEX FUNDING — Dashboard Styles
   ============================================================ */

/* ── Dashboard Body ── */
.dashboard-body {
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-body);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ============================================================
   TOP HEADER
   ============================================================ */
.dash-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: calc(64px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--transition-fast);
}
.dash-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 18px;
  max-width: 100%;
  margin: 0 auto;
}
.dash-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.dash-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Avatar Button */
.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(0, 168, 132, 0.1) 0%, rgba(2, 132, 199, 0.1) 100%);
  border: 1.5px solid var(--border-color);
  color: var(--primary);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.avatar-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Search Bar */
.dash-search {
  flex: 1;
  max-width: 280px;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.dash-search i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 1.05rem;
  pointer-events: none;
  transition: color var(--transition-fast);
}
.dash-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.813rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.dash-search input::placeholder {
  color: var(--text-muted);
}
.dash-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-surface);
}
.dash-search:focus-within i {
  color: var(--primary);
}

/* Header Icon Buttons */
.header-icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.header-icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface);
  animation: pulse 2s infinite;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.dash-main {
  max-width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================================
   ACCOUNT OVERVIEW CARD
   ============================================================ */
.account-overview-section {
  padding: 0;
}
.account-overview-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 4px 20px -2px rgba(0, 168, 132, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(0, 168, 132, 0.2);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
[data-theme="dark"] .account-overview-card {
  background: linear-gradient(135deg, #0e1a2e 0%, #0c1525 100%);
  border-color: rgba(0, 212, 170, 0.2);
  box-shadow: 0 4px 20px -2px rgba(0, 212, 170, 0.1);
}
.account-overview-card:hover {
  box-shadow: 0 10px 30px -4px rgba(0, 168, 132, 0.14), 0 4px 10px -2px rgba(0, 0, 0, 0.06);
}
.account-overview-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 168, 132, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.acc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.acc-balance-title {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.acc-val-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}
.acc-val-inr {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.acc-val-usd {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}
.acc-eye-toggle {
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 2px;
  border-radius: var(--radius-sm);
}
.acc-eye-toggle:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.acc-actions-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-add-funds {
  background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
  color: #ffffff !important;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 168, 132, 0.3);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-add-funds:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 168, 132, 0.45);
  color: #ffffff;
}
.btn-withdraw-acc {
  background: var(--bg-surface);
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-color);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.btn-withdraw-acc:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  color: var(--text-primary) !important;
}

.acc-card-bottom {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.acc-metric-item {
  flex: 1;
}
.acc-metric-item:first-child {
  border-right: 1px solid var(--border-color);
  padding-right: 16px;
}
.acc-metric-item:last-child {
  padding-left: 16px;
}
.acc-metric-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.acc-metric-val {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.acc-metric-val strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.acc-metric-val span {
  font-size: 0.813rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   QUICK ACCESS
   ============================================================ */
.quick-access {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}
.qa-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex: 1;
  transition: all var(--transition-fast);
}
.qa-item span {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: color var(--transition-fast);
}
.qa-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  position: relative;
}
.qa-item:hover .qa-icon {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-surface);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px -2px rgba(0, 168, 132, 0.18);
}
.qa-item:hover span {
  color: var(--primary);
}
.qa-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 0.5rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.qa-badge.algo {
  background: var(--danger);
  color: #fff;
}
.qa-badge.new {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   PROMO CAROUSEL
   ============================================================ */
.promo-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.promo-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.promo-card {
  min-width: 100%;
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 90px;
  color: #ffffff;
}
.promo-gradient-1 {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #0284c7 100%);
}
.promo-gradient-2 {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
}
.promo-gradient-3 {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #1d4ed8 100%);
}
.promo-content h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.promo-highlight {
  color: #fef08a;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.promo-content p {
  font-size: 0.813rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}
.promo-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.813rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.promo-timer i {
  font-size: 1rem;
}
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  transition: all var(--transition-fast);
  cursor: pointer;
}
.dot.active {
  background: var(--primary);
  width: 24px;
}

/* ============================================================
   MARKET OVERVIEW CARDS (horizontal scroll)
   ============================================================ */
.market-cards-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  scrollbar-width: none;
}
.market-cards-scroll::-webkit-scrollbar { display: none; }

.market-card {
  min-width: 160px;
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px 10px;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.market-card:hover {
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}
.market-card.up { border-left: 3px solid var(--success); }
.market-card.down { border-left: 3px solid var(--danger); }

.mc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.mc-symbol {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
}
.mc-change {
  font-size: 0.688rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}
.mc-change.up { color: var(--success); }
.mc-change.down { color: var(--danger); }

.mc-price {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.mc-sparkline {
  width: 100%;
  height: 36px;
  display: block;
}

/* ============================================================
   PRICE DISTRIBUTION BAR
   ============================================================ */
.distribution-section {
  padding: 0 2px;
}
.section-label {
  font-size: 0.813rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}
.distribution-bar {
  display: flex;
  height: 6px;
  border-radius: var(--radius-full);
  overflow: hidden;
  gap: 2px;
}
.dist-down {
  background: linear-gradient(90deg, var(--danger), #f87171);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  transition: width 1s ease;
}
.dist-neutral {
  background: var(--text-muted);
}
.dist-up {
  background: linear-gradient(90deg, #4ade80, var(--success));
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: width 1s ease;
}
.distribution-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 0.75rem;
}
.dist-label-down {
  color: var(--danger);
  font-weight: 600;
}
.dist-label-down strong { color: var(--danger); }
.dist-label-up {
  color: var(--success);
  font-weight: 600;
}
.dist-label-up strong { color: var(--success); }

/* ============================================================
   TABS & FILTERS
   ============================================================ */
.market-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
}
.market-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 12px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Filter pills */
.filter-pills {
  display: flex;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }

.pill {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.pill:hover {
  border-color: var(--border-color-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ============================================================
   CONTRACTS TABLE
   ============================================================ */
.contracts-header {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
}
.ch-contract {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ch-price,
.ch-change {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.ch-price { width: 110px; text-align: right; justify-content: flex-end; }
.ch-change { width: 90px; text-align: right; justify-content: flex-end; }

/* Contract Row */
.contracts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.contract-row {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  transition: all var(--transition-fast);
  background: transparent;
}
.contract-row:hover {
  background: var(--bg-card-hover);
  border-color: transparent;
  transform: translateX(2px);
}
.cr-info {
  flex: 1;
  min-width: 0;
}
.cr-symbol {
  font-size: 0.938rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.new-tag {
  font-size: 0.563rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cr-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.cr-price-col {
  width: 110px;
  text-align: right;
}
.cr-price {
  font-size: 0.938rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.cr-volume {
  font-size: 0.688rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}
.cr-change-badge {
  width: 80px;
  text-align: center;
  font-size: 0.813rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
  transition: all var(--transition-fast);
}
.cr-change-badge.up {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}
.cr-change-badge.down {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: 68px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.688rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  padding: 6px 12px;
  position: relative;
  border-radius: var(--radius-md);
}
.bnav-item i {
  font-size: 1.35rem;
}
.bnav-item:hover,
.bnav-item.active {
  color: var(--primary);
}
.bnav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px var(--primary-glow);
}

/* Center Trade Button */
.bnav-trade-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary) 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -22px;
  box-shadow: 0 6px 20px rgba(0, 168, 132, 0.35);
  transition: all var(--transition-base);
  border: 2px solid var(--bg-surface);
}
.bnav-trade .bnav-trade-btn i {
  color: #ffffff;
  font-size: 1.45rem;
}
.bnav-trade:hover .bnav-trade-btn {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 168, 132, 0.5);
}
.bnav-trade span {
  margin-top: 4px;
}

/* ============================================================
   RESPONSIVE — Mobile First
   ============================================================ */

/* ── All Mobile Phones (<= 600px) ── */
@media (max-width: 600px) {
  /* Header & Body */
  .dashboard-body {
    padding-top: calc(58px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .dash-header {
    height: calc(58px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
  }
  .dash-header-inner {
    padding: 0 12px;
    gap: 8px;
  }
  .dash-header-left {
    gap: 8px;
    min-width: 0;
  }
  .avatar-btn {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  .dash-search {
    max-width: none;
    flex: 1;
    min-width: 0;
  }
  .dash-search input {
    padding: 7px 10px 7px 32px;
    font-size: 0.8rem;
    height: 36px;
  }
  .dash-search i {
    left: 10px;
    font-size: 1rem;
  }
  .dash-header-right {
    gap: 4px;
    flex-shrink: 0;
  }
  .header-icon-btn {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }
  .notif-badge {
    top: 2px;
    right: 2px;
    width: 15px;
    height: 15px;
    font-size: 0.58rem;
  }

  /* Main Container */
  .dash-main {
    padding: 14px 12px;
    gap: 16px;
  }

  /* Account Overview Card */
  .account-overview-card {
    padding: 16px 14px;
    border-radius: 16px;
    gap: 14px;
  }
  .acc-card-top {
    gap: 10px;
  }
  .acc-balance-title {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }
  .acc-val-wrap {
    gap: 8px;
    align-items: baseline;
  }
  .acc-val-inr {
    font-size: 1.65rem;
  }
  .acc-val-usd {
    font-size: 0.92rem;
  }
  .acc-actions-wrap {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 4px;
  }
  .btn-withdraw-acc,
  .btn-add-funds {
    flex: 1;
    justify-content: center;
    text-align: center;
    padding: 10px 10px;
    font-size: 0.82rem;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .btn-add-funds {
    gap: 4px;
  }
  .btn-withdraw-acc {
    gap: 4px;
  }
  .acc-card-bottom {
    padding: 10px 14px;
    border-radius: 12px;
  }
  .acc-metric-item:first-child {
    padding-right: 10px;
  }
  .acc-metric-item:last-child {
    padding-left: 10px;
  }
  .acc-metric-label {
    font-size: 0.68rem;
    margin-bottom: 2px;
  }
  .acc-metric-val {
    flex-wrap: wrap;
    gap: 4px;
  }
  .acc-metric-val strong {
    font-size: 0.95rem;
  }
  .acc-metric-val span {
    font-size: 0.72rem;
  }

  /* Plan Objectives & Loss / Profit Criteria */
  .criteria-container-card {
    padding: 16px 14px;
    border-radius: 16px;
  }
  .criteria-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }
  .criteria-title-wrap {
    gap: 6px;
  }
  .criteria-main-title {
    font-size: 0.95rem;
    width: 100%;
  }
  .badge-plan-tier,
  .badge-account-model,
  .criteria-status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .criteria-metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .criteria-card {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .cc-top-row {
    margin-bottom: 6px;
  }
  .cc-label {
    font-size: 0.74rem;
  }
  .cc-chip {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .cc-main-metric {
    margin-bottom: 4px;
  }
  .cc-current-val {
    font-size: 1.15rem;
  }
  .cc-limit-val {
    font-size: 0.72rem;
  }
  .cc-meter-wrap {
    height: 6px;
    margin-bottom: 8px;
  }
  .cc-bottom-meta {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: space-between;
  }

  /* Quick Access */
  .quick-access {
    gap: 6px;
    padding: 2px 0;
  }
  .qa-icon {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
    border-radius: 14px;
  }
  .qa-item span {
    font-size: 0.68rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .qa-badge {
    top: -3px;
    right: -4px;
    font-size: 0.45rem;
    padding: 1px 4px;
  }

  /* Promo Banner Carousel */
  .promo-card {
    padding: 14px 16px;
    min-height: 74px;
    gap: 10px;
    border-radius: 14px;
  }
  .promo-content h3 {
    font-size: 0.95rem;
    line-height: 1.25;
  }
  .promo-content p {
    font-size: 0.75rem;
  }
  .promo-timer {
    padding: 5px 10px;
    font-size: 0.72rem;
    gap: 4px;
  }
  .promo-dots {
    margin-top: 8px;
  }

  /* Market Cards Horizontal Scroll */
  .market-cards-scroll {
    gap: 10px;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
  }
  .market-card {
    min-width: 142px;
    max-width: 150px;
    padding: 12px 12px 8px;
    border-radius: 12px;
  }
  .mc-symbol {
    font-size: 0.78rem;
  }
  .mc-change {
    font-size: 0.68rem;
  }
  .mc-price {
    font-size: 1.05rem;
    margin-bottom: 6px;
  }
  .mc-sparkline {
    height: 32px;
  }

  /* Price Change Distribution */
  .distribution-section {
    padding: 0;
  }
  .section-label {
    font-size: 0.75rem;
    margin-bottom: 6px;
  }
  .distribution-bar {
    height: 5px;
  }
  .distribution-labels {
    font-size: 0.72rem;
    margin-top: 6px;
  }

  /* Market Tabs & Filter Pills */
  .market-tabs {
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--border-color);
  }
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }
  .filter-pills {
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
    gap: 6px;
  }
  .pill {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* Contracts Table */
  .contracts-header {
    padding: 8px 6px;
  }
  .ch-contract {
    font-size: 0.7rem;
  }
  .ch-price {
    width: 95px;
    font-size: 0.7rem;
  }
  .ch-change {
    width: 75px;
    font-size: 0.7rem;
  }
  .contract-row {
    padding: 11px 6px;
    gap: 6px;
    border-radius: 8px;
  }
  .cr-symbol {
    font-size: 0.875rem;
  }
  .cr-sub {
    max-width: 125px;
    font-size: 0.7rem;
  }
  .cr-price-col {
    width: 95px;
  }
  .cr-price {
    font-size: 0.875rem;
  }
  .cr-volume {
    font-size: 0.65rem;
  }
  .cr-change-badge {
    width: 75px;
    font-size: 0.75rem;
    padding: 5px 6px;
    border-radius: 6px;
  }

  /* Bottom Navigation */
  .bottom-nav {
    height: calc(62px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: 6px;
    padding-right: 6px;
  }
  .bnav-item {
    padding: 4px 6px;
    font-size: 0.65rem;
    gap: 2px;
  }
  .bnav-item i {
    font-size: 1.25rem;
  }
  .bnav-trade-btn {
    width: 44px;
    height: 44px;
    margin-top: -18px;
  }
  .bnav-trade .bnav-trade-btn i {
    font-size: 1.3rem;
  }
}

/* ── Compact Phones (<= 440px) ── */
@media (max-width: 440px) {
  .dash-header-inner {
    padding: 0 10px;
    gap: 6px;
  }
  .avatar-btn {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }
  .header-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }
  #walletBtn {
    display: none; /* Hide duplicate wallet icon in header to keep search bar roomy on compact phones */
  }
  .dash-search input {
    font-size: 0.75rem;
    padding: 6px 10px 6px 30px;
    height: 34px;
  }
  .dash-search input::placeholder {
    font-size: 0.75rem;
  }
  .acc-val-inr {
    font-size: 1.5rem;
  }
  .acc-val-usd {
    font-size: 0.88rem;
  }
  .acc-card-bottom {
    padding: 9px 10px;
  }
  .acc-metric-item:first-child {
    padding-right: 8px;
  }
  .acc-metric-item:last-child {
    padding-left: 8px;
  }
  .acc-metric-val strong {
    font-size: 0.88rem;
  }
  .acc-metric-val span {
    font-size: 0.68rem;
  }
  .qa-icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
    border-radius: 12px;
  }
  .qa-item span {
    font-size: 0.65rem;
  }
  .market-card {
    min-width: 135px;
    max-width: 140px;
    padding: 10px 10px 6px;
  }
  .mc-price {
    font-size: 0.95rem;
  }
  .mc-symbol {
    font-size: 0.72rem;
  }
  .ch-price {
    width: 85px;
  }
  .ch-change {
    width: 66px;
  }
  .cr-price-col {
    width: 85px;
  }
  .cr-change-badge {
    width: 66px;
    font-size: 0.7rem;
    padding: 4px 4px;
  }
  .cr-sub {
    max-width: 105px;
    font-size: 0.68rem;
  }
}

/* ── Small Phones (<= 360px) ── */
@media (max-width: 360px) {
  .dash-header-inner {
    padding: 0 8px;
    gap: 4px;
  }
  .dash-header-left {
    gap: 6px;
  }
  .avatar-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .header-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  #scanBtn {
    display: none;
  }
  .dash-search input {
    font-size: 0.72rem;
    padding: 6px 8px 6px 26px;
    height: 32px;
  }
  .dash-search i {
    left: 8px;
    font-size: 0.9rem;
  }
  .acc-val-inr {
    font-size: 1.35rem;
  }
  .btn-withdraw-acc,
  .btn-add-funds {
    padding: 8px 6px;
    font-size: 0.75rem;
  }
  .qa-icon {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    border-radius: 10px;
  }
  .qa-item span {
    font-size: 0.6rem;
  }
  .ch-price,
  .cr-price-col {
    width: 76px;
  }
  .ch-change,
  .cr-change-badge {
    width: 58px;
    font-size: 0.65rem;
  }
  .cr-symbol {
    font-size: 0.8rem;
  }
  .cr-price {
    font-size: 0.8rem;
  }
  .cr-sub {
    max-width: 85px;
    font-size: 0.62rem;
  }
}

/* ── Tablets (601px – 1023px) ── */
@media (min-width: 601px) and (max-width: 1023px) {
  .dash-header-inner {
    max-width: 100%;
    padding: 0 24px;
  }
  .dash-search {
    max-width: 340px;
  }
  .dash-main {
    max-width: 100%;
    padding: 24px;
    gap: 24px;
  }
  /* Quick access — slightly bigger icons */
  .qa-icon {
    width: 54px;
    height: 54px;
    font-size: 1.4rem;
  }
  .qa-item span {
    font-size: 0.75rem;
  }
  /* Promo */
  .promo-card {
    padding: 24px 28px;
    min-height: 90px;
  }
  .promo-content h3 {
    font-size: 1.15rem;
  }
  /* Market cards — use CSS grid, no horizontal scroll */
  .market-cards-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .market-card {
    min-width: unset;
  }
  /* Distribution */
  .distribution-bar {
    height: 8px;
  }
  /* Contracts — more breathing room */
  .cr-sub {
    max-width: 240px;
  }
  .cr-price-col {
    width: 130px;
  }
  .cr-change-badge {
    width: 90px;
  }
  .contract-row {
    padding: 16px 8px;
  }
  /* Bottom nav stays */
  .bottom-nav {
    max-width: 100%;
  }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
  /* Remove bottom padding, we'll use a sidebar instead */
  .dashboard-body {
    padding-bottom: 0;
    padding-left: 240px;
  }

  /* ── Header stretches full width ── */
  .dash-header {
    left: 240px;
  }
  .dash-header-inner {
    max-width: 100%;
    padding: 0 32px;
  }
  .dash-search {
    max-width: 420px;
  }
  .header-icon-btn {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }
  .dash-header-right {
    gap: 6px;
  }

  /* ── Main content uses full width ── */
  .dash-main {
    max-width: 1200px;
    padding: 28px 36px;
    gap: 28px;
  }

  /* Quick access — row with bigger icons */
  .quick-access {
    gap: 16px;
    justify-content: flex-start;
  }
  .qa-item {
    flex: 0 0 auto;
  }
  .qa-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    border-radius: var(--radius-lg);
  }
  .qa-item span {
    font-size: 0.813rem;
  }

  /* Promo banner — bigger */
  .promo-card {
    padding: 28px 36px;
    min-height: 100px;
  }
  .promo-content h3 {
    font-size: 1.25rem;
  }
  .promo-content p {
    font-size: 0.875rem;
  }
  .promo-timer {
    padding: 8px 16px;
    font-size: 0.875rem;
  }

  /* Market cards — CSS grid, all visible */
  .market-cards-scroll {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
  .market-card {
    min-width: unset;
    padding: 16px 18px 12px;
  }
  .mc-price {
    font-size: 1.25rem;
  }
  .mc-symbol {
    font-size: 0.875rem;
  }
  .mc-change {
    font-size: 0.75rem;
  }
  .mc-sparkline {
    height: 44px;
  }

  /* Distribution bar */
  .distribution-bar {
    height: 8px;
  }
  .distribution-labels {
    font-size: 0.813rem;
  }

  /* Tabs */
  .tab-btn {
    padding: 14px 24px;
    font-size: 0.938rem;
  }
  .pill {
    padding: 8px 20px;
    font-size: 0.875rem;
  }

  /* Contracts — wider layout */
  .contracts-header {
    padding: 10px 12px;
  }
  .contract-row {
    padding: 16px 12px;
    border-radius: var(--radius-sm);
  }
  .contract-row:hover {
    background: rgba(255,255,255,0.03);
  }
  .cr-symbol {
    font-size: 1rem;
  }
  .cr-sub {
    max-width: 320px;
    font-size: 0.813rem;
  }
  .cr-price-col {
    width: 150px;
  }
  .cr-price {
    font-size: 0.938rem;
  }
  .cr-volume {
    font-size: 0.75rem;
  }
  .cr-change-badge {
    width: 100px;
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: var(--radius-md);
  }

  /* ── Bottom nav → Desktop Sidebar ── */
  .bottom-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: auto;
    width: 240px;
    height: 100vh;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    border-top: none;
    border-right: 1px solid var(--border-color);
    background: var(--bg-surface);
    z-index: 950;
  }
  .bnav-item {
    flex-direction: row;
    gap: 14px;
    padding: 14px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
    justify-content: flex-start;
  }
  .bnav-item i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
  }
  .bnav-item.active::before {
    top: 50%;
    left: 0;
    right: auto;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
  }
  .bnav-item.active {
    background: rgba(0, 212, 170, 0.06);
  }
  /* Trade button in sidebar — inline style */
  .bnav-trade {
    margin-top: auto;
    margin-bottom: 16px;
    padding: 12px 24px;
  }
  .bnav-trade-btn {
    width: 36px;
    height: 36px;
    margin-top: 0;
    flex-shrink: 0;
  }
  .bnav-trade .bnav-trade-btn i {
    font-size: 1.1rem;
  }

  /* Sidebar Logo area */
  .bottom-nav::before {
    content: 'CAPNEX';
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.12em;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
  }
}

/* ── Wide Desktop (1280px+) ── */
@media (min-width: 1280px) {
  .dash-main {
    max-width: 1400px;
    padding: 32px 48px;
    gap: 32px;
  }
  .dash-header-inner {
    padding: 0 48px;
  }
  .dash-search {
    max-width: 500px;
  }
  /* Market cards could show even more */
  .market-cards-scroll {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
  .market-card {
    padding: 18px 20px 14px;
  }
  .mc-price {
    font-size: 1.375rem;
  }
  .mc-sparkline {
    height: 50px;
  }
  /* Contracts — add a 24h Vol column visually */
  .cr-sub {
    max-width: 400px;
  }
  .cr-price-col {
    width: 170px;
  }
  .cr-change-badge {
    width: 110px;
  }
}

/* ── Ultra-wide (1600px+) ── */
@media (min-width: 1600px) {
  .dashboard-body {
    padding-left: 280px;
  }
  .dash-header {
    left: 280px;
  }
  .bottom-nav {
    width: 280px;
  }
  .dash-main {
    max-width: 1600px;
    padding: 36px 56px;
  }
  .bnav-item {
    padding: 16px 28px;
    font-size: 0.938rem;
  }
}

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

.contract-row {
  animation: fadeIn 0.3s ease-out;
  animation-fill-mode: both;
}
.contract-row:nth-child(1) { animation-delay: 0.05s; }
.contract-row:nth-child(2) { animation-delay: 0.1s; }
.contract-row:nth-child(3) { animation-delay: 0.15s; }
.contract-row:nth-child(4) { animation-delay: 0.2s; }
.contract-row:nth-child(5) { animation-delay: 0.25s; }
.contract-row:nth-child(6) { animation-delay: 0.3s; }
.contract-row:nth-child(7) { animation-delay: 0.35s; }
.contract-row:nth-child(8) { animation-delay: 0.4s; }

.market-card {
  animation: fadeIn 0.4s ease-out;
  animation-fill-mode: both;
}
.market-card:nth-child(1) { animation-delay: 0.05s; }
.market-card:nth-child(2) { animation-delay: 0.12s; }
.market-card:nth-child(3) { animation-delay: 0.19s; }
.market-card:nth-child(4) { animation-delay: 0.26s; }
.market-card:nth-child(5) { animation-delay: 0.33s; }

/* ============================================================
   CHALLENGE OBJECTIVES & LOSS / PROFIT CRITERIA STYLES
   ============================================================ */

/* ── Suspended Alert Banner ── */
.suspended-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16) 0%, rgba(153, 27, 27, 0.22) 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.5);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
  animation: pulseSuspended 2.5s ease-in-out infinite;
}

@keyframes pulseSuspended {
  0%, 100% { box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15); }
  50% { box-shadow: 0 4px 30px rgba(239, 68, 68, 0.35); border-color: rgba(239, 68, 68, 0.8); }
}

.sab-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sab-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.sab-text h4 {
  margin: 0 0 3px 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #fca5a5;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sab-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sab-text p {
  margin: 0;
  font-size: 0.82rem;
  color: #fecaca;
  line-height: 1.4;
}

.sab-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-sab-action {
  background: #ef4444;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sab-action:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-sab-reactivate {
  background: linear-gradient(135deg, #00c087 0%, #00876c 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(0, 192, 135, 0.4);
}

.btn-sab-reactivate:hover {
  background: linear-gradient(135deg, #00d696 0%, #00a884 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 18px rgba(0, 192, 135, 0.6);
  transform: translateY(-1px);
}

/* ── Criteria Section Container ── */
.challenge-criteria-section {
  margin-bottom: 24px;
}

.criteria-container-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.criteria-container-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, #0284c7 50%, #38bdf8 100%);
}

.criteria-container-card.is-suspended::before {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

/* ── Top Header Row ── */
.criteria-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.criteria-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.criteria-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.criteria-main-title i {
  color: var(--primary);
  font-size: 1.25rem;
}

.badge-plan-tier {
  background: rgba(0, 168, 132, 0.12);
  color: var(--primary);
  border: 1px solid rgba(0, 168, 132, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-account-model {
  background: rgba(2, 132, 199, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.criteria-status-badge {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.criteria-status-badge.active {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.criteria-status-badge.suspended {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.criteria-status-badge.passed {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

/* ── 3 Metric Cards Grid ── */
.criteria-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.criteria-card {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.criteria-card:hover {
  border-color: rgba(0, 168, 132, 0.4);
  transform: translateY(-2px);
}

.criteria-card.card-breached {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

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

.cc-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.cc-chip {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cc-chip.chip-safe {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.cc-chip.chip-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.cc-chip.chip-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.cc-chip.chip-profit {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}

.cc-main-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cc-current-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cc-current-val.loss-danger {
  color: #ef4444;
}

.cc-current-val.profit-success {
  color: #10b981;
}

.cc-limit-val {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Progress Meter Bar ── */
.cc-meter-wrap {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.cc-meter-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.cc-meter-fill.fill-safe {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.cc-meter-fill.fill-warning {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.cc-meter-fill.fill-danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.cc-meter-fill.fill-profit {
  background: linear-gradient(90deg, #0ea5e9, #10b981);
}

.cc-bottom-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cc-bottom-meta strong {
  color: var(--text-primary);
}

/* ── Trade Page Suspended Banner ── */
.trade-suspended-banner {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 10px 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-suspended-banner i {
  color: #ef4444;
  font-size: 1.2rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .criteria-metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .suspended-alert-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .sab-actions {
    width: 100%;
  }
  .btn-sab-action {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .criteria-container-card {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .criteria-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }
  .criteria-title-wrap {
    gap: 6px;
  }
  .criteria-main-title {
    font-size: 0.95rem;
    width: 100%;
  }
  .badge-plan-tier,
  .badge-account-model,
  .criteria-status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
  .criteria-metrics-grid {
    gap: 10px;
  }
  .criteria-card {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .cc-top-row {
    margin-bottom: 6px;
  }
  .cc-label {
    font-size: 0.74rem;
  }
  .cc-chip {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .cc-main-metric {
    margin-bottom: 4px;
  }
  .cc-current-val {
    font-size: 1.15rem;
  }
  .cc-limit-val {
    font-size: 0.72rem;
  }
  .cc-meter-wrap {
    height: 6px;
    margin-bottom: 8px;
  }
  .cc-bottom-meta {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: space-between;
  }
  .cc-bottom-meta span {
    font-size: 0.7rem;
  }
}

/* ════════════════════════════════════════════════════════════
   USER DASHBOARD RESPONSIVE ENGINE (450px & 380px PRECISION)
   ════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .dash-main {
    padding-top: 5px !important;
  }
  .dash-container {
    padding: 10px 12px 84px !important;
    gap: 14px !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  .dash-header-clean {
    height: 56px !important;
  }
  .dash-header-clean-inner {
    padding: 0 12px !important;
    gap: 8px !important;
  }
  .dh-user-info {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .dh-avatar {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }
  .dh-meta {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .dh-greeting {
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 140px !important;
  }
  .dh-client-id {
    font-size: 0.7rem !important;
  }
  .dh-search {
    display: none !important;
  }
  .dh-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .dh-btn {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
    border-radius: 8px !important;
  }
  #scanBtn {
    display: none !important;
  }

  .dash-kyc-alert-banner,
  .suspended-alert-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 14px 14px !important;
    gap: 12px !important;
    border-radius: 14px !important;
  }
  .dkab-left {
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .dkab-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.45rem !important;
    border-radius: 10px !important;
  }
  .dkab-badge {
    font-size: 0.68rem !important;
    padding: 2px 8px !important;
  }
  .dkab-title {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }
  .dkab-desc {
    font-size: 0.78rem !important;
    line-height: 1.4 !important;
  }
  .btn-dkab-claim {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 0.84rem !important;
    border-radius: 9px !important;
    box-sizing: border-box !important;
  }

  .hero-account-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    gap: 14px !important;
  }
  .hac-top {
    gap: 8px !important;
    align-items: center !important;
  }
  .hac-label {
    font-size: 0.74rem !important;
  }
  .hac-tier-badge {
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
  }
  .hac-middle {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  .hac-balance-wrap {
    grid-column: 1 / -1 !important;
    margin-bottom: 2px !important;
  }
  .acc-val-usd {
    font-size: clamp(1.85rem, 7.5vw, 2.2rem) !important;
  }
  .acc-val-inr {
    font-size: 0.92rem !important;
  }
  .hac-metric-box {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    gap: 3px !important;
  }
  .hmb-title {
    font-size: 0.68rem !important;
  }
  .hmb-value {
    font-size: 1.05rem !important;
  }
  .hmb-sub {
    font-size: 0.72rem !important;
  }
  .hac-actions-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding-top: 12px !important;
  }
  .btn-hac-action {
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
    gap: 5px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .btn-hac-action i {
    font-size: 1rem !important;
    flex-shrink: 0 !important;
  }

  .dash-section-card {
    padding: 16px 14px !important;
    border-radius: 16px !important;
    gap: 14px !important;
  }
  .dsc-header {
    gap: 10px !important;
  }
  .dsc-title {
    font-size: 1.08rem !important;
  }
  .dsc-desc {
    font-size: 0.78rem !important;
  }
  .dsc-tag {
    font-size: 0.7rem !important;
  }

  .criteria-metrics-grid-clean {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .clean-rule-card {
    padding: 14px 12px !important;
    gap: 10px !important;
    border-radius: 12px !important;
  }
  .crc-label {
    font-size: 0.78rem !important;
  }
  .crc-status-pill {
    font-size: 0.66rem !important;
    padding: 2px 6px !important;
  }
  .crc-values {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .crc-val-main {
    font-size: 1.25rem !important;
  }
  .crc-val-limit {
    font-size: 0.76rem !important;
  }
  .crc-footer {
    font-size: 0.74rem !important;
  }

  .dpc-controls-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding-bottom: 12px !important;
  }
  .dpc-model-toggle {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 3px !important;
    box-sizing: border-box !important;
  }
  .dpc-toggle-btn {
    padding: 8px 6px !important;
    font-size: 0.76rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .dpc-loss-pills {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }
  .loss-pill {
    flex: 1 !important;
    min-width: 120px !important;
    text-align: center !important;
    padding: 7px 8px !important;
    font-size: 0.74rem !important;
  }
  .dpc-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .dp-card {
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }
  .dp-name {
    font-size: 1.05rem !important;
  }
  .dp-capital {
    font-size: 1.5rem !important;
  }
  .dp-price-num {
    font-size: 1.3rem !important;
  }
  .dp-specs li {
    font-size: 0.78rem !important;
  }
  .btn-buy-plan {
    padding: 10px !important;
    font-size: 0.88rem !important;
    border-radius: 9px !important;
  }

  .market-cards-scroll-clean {
    gap: 10px !important;
    padding-bottom: 6px !important;
  }
  .market-card {
    min-width: 150px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
  }
  .mc-symbol {
    font-size: 0.78rem !important;
  }
  .mc-price {
    font-size: 1.05rem !important;
  }
  .mc-change {
    font-size: 0.68rem !important;
  }
  .contract-row-clean {
    padding: 10px 12px !important;
    gap: 8px !important;
    border-radius: 10px !important;
  }
  .crc-asset {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .crc-asset-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .crc-sym {
    font-size: 0.84rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .crc-desc {
    font-size: 0.68rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .cr-price {
    font-size: 0.86rem !important;
  }
  .cr-change-badge {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }
  .btn-trade-pill {
    padding: 5px 11px !important;
    font-size: 0.74rem !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
  }

  .bottom-nav {
    height: 60px !important;
    padding: 0 4px !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }
  .bnav-item {
    padding: 4px 6px !important;
    font-size: 0.65rem !important;
    gap: 2px !important;
  }
  .bnav-item i {
    font-size: 1.25rem !important;
  }
  .bnav-trade-btn {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.15rem !important;
  }
}

@media (max-width: 390px) {
  .dash-container {
    padding: 8px 10px 84px !important;
    gap: 12px !important;
  }
  .dash-header-clean-inner {
    padding: 0 10px !important;
    gap: 6px !important;
  }
  .dh-greeting {
    font-size: 0.78rem !important;
    max-width: 110px !important;
  }
  .dh-client-id {
    font-size: 0.66rem !important;
  }
  .dh-actions {
    gap: 4px !important;
  }
  .dh-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
  }

  .hero-account-card {
    padding: 14px 12px !important;
    gap: 12px !important;
  }
  .acc-val-usd {
    font-size: 1.85rem !important;
  }
  .acc-val-inr {
    font-size: 0.86rem !important;
  }
  .hac-metric-box {
    padding: 9px 10px !important;
  }
  .hmb-title {
    font-size: 0.64rem !important;
  }
  .hmb-value {
    font-size: 0.98rem !important;
  }
  .hmb-sub {
    font-size: 0.68rem !important;
  }
  .hac-actions-bar {
    gap: 6px !important;
  }
  .btn-hac-action {
    padding: 8px 6px !important;
    font-size: 0.74rem !important;
    gap: 4px !important;
  }
  .btn-hac-action i {
    font-size: 0.92rem !important;
  }

  .dash-section-card {
    padding: 14px 12px !important;
    gap: 12px !important;
  }
  .dsc-title {
    font-size: 1rem !important;
  }
  .dsc-desc {
    font-size: 0.74rem !important;
  }

  .dpc-toggle-btn {
    font-size: 0.72rem !important;
    padding: 7px 4px !important;
    gap: 3px !important;
  }
  .loss-pill {
    font-size: 0.7rem !important;
    padding: 5px 6px !important;
    min-width: 100px !important;
  }
  .dp-card {
    padding: 14px 12px !important;
  }
  .dp-specs li {
    font-size: 0.75rem !important;
  }

  .contract-row-clean {
    padding: 8px 10px !important;
    gap: 6px !important;
  }
  .crc-asset-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
  }
  .crc-sym {
    font-size: 0.78rem !important;
  }
  .crc-desc {
    display: none !important;
  }
  .cr-price {
    font-size: 0.82rem !important;
  }
  .btn-trade-pill {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
  }
}


