/* keep existing dark-glass styling … */
.tce-wrap { max-width: 1100px; margin: 0 auto; }
.tce-card.tce-darkglass { background: rgba(16,16,20,.90); color:#fff; border-radius:16px; padding:16px; box-shadow:0 22px 48px rgba(0,0,0,.5); }
.tce-title { font-size:28px; font-weight:800; color:#fff; }
.tce-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.tce-right { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tce-badge { background: rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.14); padding:6px 10px; border-radius:999px; font-size:12px;}
.tce-btn { border:0; border-radius:10px; padding:10px 14px; color:#fff; cursor:pointer; background:#2b66ff; }
.tce-btn.tce-danger{ background:#ff4949; }
.tce-btn.tce-primary{ background:#2e6fe7; }

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

/* Mobile responsive - make Connect button and top bar fit properly */
@media (max-width: 980px){ 
  .tce-grid { grid-template-columns: 1fr; }
  .tce-top { flex-direction: column; align-items: stretch; }
  .tce-right { justify-content: center; width: 100%; flex-wrap: wrap; }
  .tce-btn.tce-connect { flex: 1; max-width: 200px; min-width: 120px; }
}

@media (max-width: 640px) {
  .tce-top { padding: 8px 0; }
  .tce-title { font-size: 22px; text-align: center; width: 100%; }
  .tce-right { flex-direction: column; gap: 8px; width: 100%; }
  .tce-badge { font-size: 11px; padding: 5px 8px; }
  .tce-acct { font-size: 12px; word-break: break-all; text-align: center; }
  .tce-btn.tce-connect { width: 100%; max-width: 100%; font-size: 14px; padding: 10px 16px; }
}

@media (max-width: 400px) {
  .tce-title { font-size: 18px; }
  .tce-badge { font-size: 10px; padding: 4px 6px; }
  .tce-acct { font-size: 11px; }
  .tce-btn.tce-connect { font-size: 13px; padding: 9px 14px; }
}

.tce-panel { background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:14px; padding:14px; }
.tce-panel h4 { margin:0 0 10px 0; color:#fff; }

.tce-panel label { display:block; margin:6px 0; color:#ddd; }
.tce-panel input, .tce-panel select {
  width:100%; padding:12px; border-radius:12px; border:1px solid rgba(255,255,255,.14);
  background:#0E1117; color:#fff; font-size:16px;
}

/* Dividends: USD above BNB */
.tce-div-row { display:grid; grid-template-columns: 140px 1fr; gap:10px; align-items:start; margin:8px 0; }
.tce-div-vals { display:flex; flex-direction:column; gap:4px; }
.tce-fiat { color:#8EF07A; font-weight:800; font-size:24px; } /* $USD line */
.tce-big { font-weight:800; font-size:18px; }                  /* numeric lines */
.tce-sub { opacity:.85; font-size:14px; color:#cfd8dc; font-weight:500; } /* BNB labels */
.tce-claimable-bnb-label, .tce-earned-bnb-label { opacity:.85; font-size:14px; }

/* Balances: 2 columns / 3 rows per token */
.tce-balances-list { display:flex; flex-direction:column; }
.tce-token-row {
  display:grid; grid-template-columns: 1fr 1fr; gap:16px; padding:12px 0;
  border-top:1px dashed rgba(255,255,255,.14);
}
.tce-token-row:first-child { border-top:0; }

.tce-col { display:flex; flex-direction:column; gap:6px; }
.tce-col .title { font-weight:800; color:#fff; font-size:20px; }
.tce-col .line-big { font-weight:800; color:#fff; font-size:20px; }
.tce-col .line-usd { color:#8EF07A; font-weight:800; font-size:24px; }
.tce-col .line-bnb { color:#ddd; font-size:18px; }

/* messages */
.tce-messages { margin-top:10px; padding:10px; border-radius:10px; background:#10233dcc; border:1px solid rgba(255,255,255,.14); }

/* hide raw token list textarea */
.tce-hidden { display:none !important; }

/* REMOVED: Manual harvest button is now visible for user control */
/* .tce-panel [data-act="harvest"] { display: none !important; } */

/* Optional: subtle style for the price stamp */
.tce-price-stamp { text-align: right; color: #cfd3d8; }
.tce-price-stamp a { color: #9fc3ff; text-decoration: underline; }

/* ==== Balances 2-col / 3-row layout ==== */
.tce-balances-list { width: 100%; }

.tce-balance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 18px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tce-balance-row:last-child {
  border-bottom: none;
}

.tce-col .tce-token-name {
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.tce-col .tce-line { line-height: 1.25; margin: 6px 0; color: rgba(255,255,255,0.85); }
.tce-col .tce-line .tce-label { opacity: 0.9; margin-left: 6px; }

.tce-col .tce-line-2.tce-usd {
  color: #72ff7e;
  font-weight: 800;
  font-size: 24px;         /* big green USD */
}

.tce-col .tce-line-3.tce-bnb {
  font-size: 18px;
  opacity: 0.95;
}

@media (max-width: 820px) {
  .tce-balance-row {
    grid-template-columns: 1fr;   /* stack on mobile */
    gap: 16px;
  }
}

/* strong green USD on balances */
.tce-fiat-strong {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  color: #4cd137;
}

/* keep the 2-col grid look in My Token Balances */
.tce-balances-list { display: grid; gap: 18px; }
.tce-balance-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 14px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tce-col { display:flex; flex-direction:column; gap:6px; }
.tce-col-right { align-items:flex-start; }
.tce-token-name { font-weight: 800; font-size: 20px; color: #fff; letter-spacing:.4px; }
.tce-token-amt { font-weight: 700; font-size: 20px; color:#fff; }
.tce-mono { font-weight:600; opacity:.9; font-size:18px; margin-left:6px; }
.tce-bnb { font-size:18px; opacity:.85; color:#cfd8dc; }

/* BNB Recovery Button - Emergency styling */
.tce-btn.tce-recovery {
  background: linear-gradient(135deg, #ff6b35 0%, #ff4757 100%);
  border: 2px solid #ff3742;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tce-btn.tce-recovery:hover {
  background: linear-gradient(135deg, #ff8c42 0%, #ff6348 100%);
  box-shadow: 0 6px 16px rgba(255, 71, 87, 0.4);
  transform: translateY(-1px);
}

.tce-btn.tce-recovery:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.tce-btn.tce-recovery:hover:before {
  left: 100%;
}

/* responsive keeps it beautiful */
@media (max-width: 640px){
  .tce-balance-row{ grid-template-columns: 1fr 1fr; gap: 12px; }
  .tce-token-name{ font-size:18px; }
  .tce-token-amt{ font-size:18px; }
  .tce-fiat-strong{ font-size:22px; }
  .tce-btn.tce-recovery { font-size: 12px; padding: 6px 10px; }
}


/* ============================================================
   MOBILE HARDENING — 2026-06-19 (single source of truth, wins cascade)
   Fixes: horizontal overflow, cramped 2-col token balances on phones,
   tap-target size, oversized USD numbers wrapping the card.
   ============================================================ */
.tce-wrap, .tce-wrap *, .tce-card.tce-darkglass, .tce-card.tce-darkglass * { box-sizing: border-box; }
.tce-wrap { width: 100%; max-width: 1100px; padding-left: 12px; padding-right: 12px; overflow-x: hidden; }
.tce-card.tce-darkglass { max-width: 100%; overflow-x: hidden; }
.tce-card.tce-darkglass img, .tce-card.tce-darkglass canvas { max-width: 100%; height: auto; }

@media (max-width: 640px){
  .tce-card.tce-darkglass { padding: 14px 12px; border-radius: 14px; }
  /* token balances → ONE clean column on phones (overrides earlier 2-col rules) */
  .tce-balance-row, .tce-token-row { grid-template-columns: 1fr !important; gap: 8px; padding: 14px 4px; }
  .tce-col-right { align-items: flex-start; }
  /* dividends row → stack the fixed 140px label column */
  .tce-div-row { grid-template-columns: 1fr !important; gap: 6px; }
  /* primary action inputs/buttons → full width, comfy 48px tap targets, no iOS zoom-on-focus */
  .tce-panel input, .tce-panel select, .tce-btn { width: 100%; font-size: 16px; min-height: 48px; }
  /* keep small header/utility buttons compact */
  .tce-right .tce-btn, .tce-btn.tce-recovery { width: auto; min-height: 0; }
  /* big numbers must wrap, not blow out the card */
  .tce-fiat, .tce-col .line-usd, .tce-fiat-strong, .tce-col .tce-line-2.tce-usd { font-size: 20px; word-break: break-word; }
  .tce-token-name, .tce-token-amt, .tce-col .title, .tce-col .line-big { font-size: 18px; word-break: break-word; }
  .tce-mono, .tce-bnb, .tce-col .line-bnb { font-size: 15px; }
  .tce-messages { word-break: break-word; }
  .tce-msg-pager { flex-wrap: wrap; }
  .tce-acct { word-break: break-all; }
}
@media (max-width: 380px){
  .tce-fiat, .tce-col .line-usd, .tce-fiat-strong, .tce-col .tce-line-2.tce-usd { font-size: 18px; }
  .tce-title { font-size: 17px; }
}
/* mobile-hardening-marker-v1 */
