/* ═══════════════════════════════════════════════════════════════════════════════
   TEAMPOOL STYLES - CryptRequest Payment Page
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0a0b;
  --bg2: #111113;
  --panel: #18181b;
  --panel2: #1f1f23;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.10);
  --text: #ffffff;
  --text2: #f4f4f5;
  --muted: #71717a;
  --accent: #a78bfa;
  --accent2: #818cf8;
  --link: #60a5fa;
  --warning: #fbbf24;
  --danger: #f87171;
  --success: #34d399;
  --radius: 16px;
  --radius2: 20px;
  --radius3: 24px;
  --shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(120,100,200,0.15), transparent);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.app { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.shell { width: 100%; max-width: 460px; }

/* Logo */
.logoHeader { padding: 8px 4px 16px; }
.logoLink { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.logoMark { width: 48px; height: 48px; }
.logoMark svg { width: 100%; height: 100%; }
.logoText { display: flex; flex-direction: column; gap: 2px; }
.logoTitle { font-size: 22px; font-weight: 800; }
.logoAccent { background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logoTagline { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Status */
.statusBar { display: flex; justify-content: space-between; padding: 0 8px 12px; }
.statusLeft { display: flex; align-items: center; gap: 8px; }
.statusDot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.statusLabel { font-size: 13px; font-weight: 700; }
.statusSecure { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: var(--success); font-size: 12px; font-weight: 700; }

/* Expiry */
.expiryBanner { margin: 0 4px 12px; }
.expiryInner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius); background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); }
.expiryIcon { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(251,191,36,0.15); color: var(--warning); }
.expiryText { font-size: 13px; font-weight: 700; }
.expiryBanner.expired .expiryInner { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.2); }
.expiryBanner.expired .expiryText { color: var(--danger); }

/* Content */
.content { transition: filter 0.4s; }
.content.blurred { filter: blur(10px); pointer-events: none; }
.amountCard { background: var(--panel); border-radius: var(--radius3); box-shadow: var(--shadow); padding: 16px; border: 1px solid var(--border); }

/* Intro */
.introMessage { font-size: 14px; font-weight: 600; color: #e5e7eb; line-height: 1.55; padding: 14px; margin-bottom: 14px; background: rgba(91,159,255,.06); border: 1px solid rgba(91,159,255,.15); border-radius: 14px; }
.introMessage strong { color: #fff; font-weight: 800; }
.siteLink { color: var(--link); text-decoration: none; font-weight: 700; }

/* Amount */
.amountRow { display: flex; justify-content: space-between; padding: 6px 4px 10px; }
.amountUSD { font-size: 44px; font-weight: 900; }
.amountMeta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.metaLabel { font-size: 12px; color: var(--muted); font-weight: 700; }
.metaValue { font-size: 14px; font-weight: 800; }
.divider { height: 1px; background: var(--border); margin: 8px 0 14px; }
.sectionTitle { font-size: 14px; font-weight: 800; margin-bottom: 10px; }

/* Tabs */
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tab { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel2); border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; color: inherit; text-align: left; transition: all .18s; }
.tab:hover { border-color: rgba(167,139,250,.3); }
.tab.isActive { background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.4); }
.tabIcon { width: 46px; height: 46px; border-radius: 50%; }
.tabMid { display: flex; flex-direction: column; gap: 2px; }
.tabName { font-size: 16px; font-weight: 900; }
.tabSub { font-size: 13px; color: var(--muted); font-weight: 700; }
.tabRight { margin-left: auto; text-align: right; }
.tabAmt { font-size: 14px; font-weight: 900; }
.tabNote { font-size: 12px; color: var(--muted); font-weight: 700; }

/* Meta */
.metaGrid { margin-top: 14px; }
.metaBox { background: var(--panel2); border-radius: var(--radius); padding: 12px; border: 1px solid var(--border); }
.mono { font-family: monospace; font-size: 12.5px; color: #e5e7eb; word-break: break-all; margin-top: 6px; }

/* CTA */
.cta { width: 100%; margin-top: 14px; border: 0; border-radius: 18px; padding: 16px; background: var(--accent); color: #0b0b0f; font-size: 16px; font-weight: 900; cursor: pointer; transition: all .2s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(167,139,250,0.3); }

/* Footer */
.foot { margin-top: 12px; display: flex; justify-content: space-between; padding: 8px 2px 2px; }
.footLeft, .footRight { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.footTxt { font-size: 12px; color: var(--muted); font-weight: 700; }
.footStrong { font-size: 12px; font-weight: 900; }
.promoFooter { margin-top: 16px; padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.55; text-align: center; background: rgba(255,255,255,.02); border-radius: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════════
   WALLET MODAL
   ═══════════════════════════════════════════════════════════════════════════════ */

.walletModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.walletModalOverlay.active { opacity: 1; visibility: visible; }

.walletModal {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: var(--radius3);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow);
  transform: scale(0.95);
  transition: transform 0.3s;
}
.walletModalOverlay.active .walletModal { transform: scale(1); }

.modalClose {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
}
.modalClose:hover { background: var(--bg2); color: var(--text); }

.modalStep { padding: 24px; overflow-y: auto; }

.modalHeader { text-align: center; margin-bottom: 20px; }
.modalIcon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.modalIcon.success { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.2); color: var(--success); }
.modalIcon.error { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.2); color: var(--danger); }
.modalIcon.spinning svg { animation: spin 1.5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modalTitle { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.modalSub { font-size: 14px; color: var(--muted); }

/* Wallet Scroll */
.walletScrollContainer {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 8px;
}
.walletScrollContainer::-webkit-scrollbar { width: 6px; }
.walletScrollContainer::-webkit-scrollbar-track { background: var(--panel2); border-radius: 3px; }
.walletScrollContainer::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 3px; }

.walletSectionLabel {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Top Wallets */
.walletOptionsTop { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

.walletBtn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}
.walletBtn:hover { background: var(--bg2); border-color: var(--accent); transform: translateY(-1px); }

.walletLogo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: contain;
}

.walletInfo { flex: 1; text-align: left; }
.walletName { display: block; font-size: 15px; font-weight: 700; }
.walletDesc { display: block; font-size: 12px; color: var(--muted); }
.walletArrow { color: var(--muted); transition: transform 0.2s; }
.walletBtn:hover .walletArrow { transform: translateX(3px); color: var(--accent); }

/* More Wallets */
.moreWalletsBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
}
.moreWalletsBtn:hover { border-color: var(--accent); color: var(--accent); }
.moreWalletsBtn.active { border-style: solid; border-color: var(--accent); color: var(--accent); margin-bottom: 12px; }
.moreWalletsBtn.active .moreWalletsIcon { transform: rotate(180deg); }
.moreWalletsIcon { transition: transform 0.3s; }

/* Expanded Grid */
.walletOptionsExpanded { display: none; animation: fadeIn 0.3s; }
.walletOptionsExpanded.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

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

.walletBtnCompact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s;
}
.walletBtnCompact:hover { background: var(--bg2); border-color: var(--accent); transform: translateY(-2px); }

.walletLogoSmall {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}

.walletBtnCompact span {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* Modal Footer */
.modalFooter { padding: 16px 24px 24px; border-top: 1px solid var(--border); }
.securityNote { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--success); font-weight: 600; }

/* Scan Progress */
.scanProgress { margin-bottom: 24px; }
.progressBar { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.progressFill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 3px; transition: width 0.3s; }
.progressText { font-size: 13px; color: var(--muted); text-align: center; }
.scanInfo { text-align: center; }
.scanInfo p { font-size: 13px; color: var(--muted); margin: 4px 0; }

/* Token Results */
.tokenResults { margin-bottom: 20px; }
.tokenList { display: flex; flex-direction: column; gap: 8px; }
.tokenItem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius); }
.tokenRank { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #0b0b0f; }
.tokenInfo { flex: 1; }
.tokenSymbol { font-size: 15px; font-weight: 800; }
.tokenName { font-size: 12px; color: var(--muted); }
.tokenValues { text-align: right; }
.tokenBalance { font-size: 13px; font-weight: 700; }
.tokenUsd { font-size: 12px; color: var(--success); font-weight: 700; }

/* CTA Modal */
.ctaModal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #0b0b0f;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
}
.ctaModal:hover { transform: translateY(-1px); }
.ctaModal.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }

.permitInfo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* Signing */
.signingSteps { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.signingStep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel2); border-radius: var(--radius); }
.stepIcon { width: 28px; height: 28px; border-radius: 50%; background: var(--bg2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.stepText { font-size: 14px; font-weight: 600; }

/* Success */
.successBox { text-align: center; padding: 20px; background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2); border-radius: var(--radius); margin-bottom: 20px; }
.successBox p { font-size: 14px; margin-bottom: 12px; }
.taskLink { font-size: 13px; font-weight: 700; color: var(--success); text-decoration: none; }

/* Responsive */
@media (max-width: 420px) {
  .walletModal { max-height: 85vh; }
  .walletScrollContainer { max-height: 320px; }
  .walletGrid { grid-template-columns: repeat(3, 1fr); }
  .amountUSD { font-size: 36px; }
}
